From 882c12cd31d228a44f29a2769449b8cc5597572f Mon Sep 17 00:00:00 2001
From: Oleksii Kriuchykhin <okriuchykhin@biosistemika.com>
Date: Mon, 20 May 2019 15:04:54 +0200
Subject: [PATCH] Remove protocol description from preview popup [SCI-3485]

---
 app/helpers/protocol_status_helper.rb | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/app/helpers/protocol_status_helper.rb b/app/helpers/protocol_status_helper.rb
index f6e134188..eb074241a 100644
--- a/app/helpers/protocol_status_helper.rb
+++ b/app/helpers/protocol_status_helper.rb
@@ -49,25 +49,18 @@ module ProtocolStatusHelper
 
   def protocol_status_popover_content(protocol)
     if protocol_private_for_current_user?(protocol)
-      res = "<p><em>" + I18n.t("my_modules.protocols.protocol_status_bar.private_protocol_desc") + "</em></p>"
+      res = '<p><em>' + I18n.t('my_modules.protocols.protocol_status_bar.private_protocol_desc') + '</em></p>'
     else
-      res = "<p>"
-      if protocol.description.present?
-        res << protocol.tinymce_render(:description)
-      else
-        res << "<em>" + I18n.t("my_modules.protocols.protocol_status_bar.no_description") + "</em>"
-      end
-      res << "</p>"
-      res << "<p><b>" + I18n.t("my_modules.protocols.protocol_status_bar.keywords") + ":</b>&nbsp;"
-      if protocol.protocol_keywords.size > 0
+      res = '<p><b>' + I18n.t('my_modules.protocols.protocol_status_bar.keywords') + ':</b>&nbsp;'
+      if protocol.protocol_keywords.size.positive?
         protocol.protocol_keywords.each do |kw|
-          res << kw.name + ", "
+          res << kw.name + ', '
         end
         res = res[0..-3]
       else
-        res << "<em>" + I18n.t("my_modules.protocols.protocol_status_bar.no_keywords") + "</em>"
+        res << '<em>' + I18n.t('my_modules.protocols.protocol_status_bar.no_keywords') + '</em>'
       end
-      res << "</p>"
+      res << '</p>'
     end
     escape_input(res)
   end