Merge pull request #1784 from okriuchykhin/ok_SCI_3485

Remove protocol description from preview popup [SCI-3485]
This commit is contained in:
Alex Kriuchykhin 2019-05-21 10:07:21 +02:00 committed by GitHub
commit 952f716d9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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