From 3c6d37ce6484a94c8d0ba3fe73dd84e212f83de2 Mon Sep 17 00:00:00 2001 From: Zanz2 Date: Thu, 11 Jan 2018 18:37:36 +0100 Subject: [PATCH] Fixed according to PR review --- .../import_export/_import_json_protocol_p_desc.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb b/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb index 35d384d9c..dae8b49f6 100644 --- a/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb +++ b/app/views/protocols/import_export/_import_json_protocol_p_desc.html.erb @@ -19,8 +19,6 @@ <% prot_info_string = '' %> <% @remaining = ProtocolsIoHelper::PIO_P_AVAILABLE_LENGTH %> <% protocol_table_elements_array = [] %> - <% protocol_iterate_elements = ['description','before_start','warning','guidelines','manuscript_citation', - 'publish_date','vendor_name','vendor_link','keywords','tags','link'] %> <% add_to_info_string_elements = ['description','before_start','warning','guidelines','manuscript_citation']%> <% protocol_attr_len_hash = { description: ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_MEDIUM, @@ -34,7 +32,8 @@ publish_date: ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL, link: ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_BIG, vendor_link: ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_BIG } %> - <% protocol_iterate_elements.each do |element|%> + <% protocol_attr_len_hash.each do |element, value|%> + <% element = element.to_s %> <% if(json_object[element].present?) %> <% if element == 'tags' %> <% translation_string = 'protocols.protocols_io_import.preview.' + element %>