mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-10 15:14:33 +08:00
Refactored according to PR
This commit is contained in:
parent
b0012ab936
commit
53561ffd84
3 changed files with 106 additions and 130 deletions
|
@ -146,56 +146,23 @@ module ProtocolsIoHelper
|
||||||
Nokogiri::HTML::DocumentFragment.parse(text).to_html
|
Nokogiri::HTML::DocumentFragment.parse(text).to_html
|
||||||
end
|
end
|
||||||
|
|
||||||
def prepare_for_view(attribute_text, size)
|
def prepare_for_view(attribute_text1, size, table = 'no_table')
|
||||||
case size
|
if table == 'no_table'
|
||||||
when 'small'
|
attribute_text = sanitize_input(not_null(attribute_text1))
|
||||||
pio_eval_len(
|
elsif table == 'table'
|
||||||
sanitize_input(string_html_table_remove(not_null(attribute_text))),
|
attribute_text = sanitize_input(
|
||||||
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL
|
string_html_table_remove(not_null(attribute_text1))
|
||||||
)
|
|
||||||
when 'medium'
|
|
||||||
pio_eval_len(
|
|
||||||
sanitize_input(string_html_table_remove(not_null(attribute_text))),
|
|
||||||
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_MEDIUM
|
|
||||||
)
|
|
||||||
when 'big'
|
|
||||||
pio_eval_len(
|
|
||||||
sanitize_input(string_html_table_remove(not_null(attribute_text))),
|
|
||||||
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_BIG
|
|
||||||
)
|
|
||||||
when 'small-no-table'
|
|
||||||
pio_eval_len(
|
|
||||||
sanitize_input(not_null(attribute_text)),
|
|
||||||
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL
|
|
||||||
)
|
|
||||||
when 'medium-no-table'
|
|
||||||
pio_eval_len(
|
|
||||||
sanitize_input(not_null(attribute_text)),
|
|
||||||
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_MEDIUM
|
|
||||||
)
|
|
||||||
when 'big-no-table'
|
|
||||||
pio_eval_len(
|
|
||||||
sanitize_input(not_null(attribute_text)),
|
|
||||||
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_BIG
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
pio_eval_len(
|
||||||
|
attribute_text,
|
||||||
|
size
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def fill_attributes(attribute_name, attribute_text, step_component_key)
|
def fill_attributes(attribute_name, attribute_text, step_component)
|
||||||
output_string = ''
|
output_string = ''
|
||||||
trans_string = ''
|
trans_string = step_component
|
||||||
case step_component_key
|
|
||||||
when '8'
|
|
||||||
trans_string = 'protocols.protocols_io_import.comp_append.soft_packg.'
|
|
||||||
when '9'
|
|
||||||
trans_string = 'protocols.protocols_io_import.comp_append.dataset.'
|
|
||||||
when '15'
|
|
||||||
trans_string = 'protocols.protocols_io_import.comp_append.command.'
|
|
||||||
when '18'
|
|
||||||
trans_string = 'protocols.protocols_io_import.comp_append.sub_protocol.'
|
|
||||||
when '19'
|
|
||||||
trans_string = 'protocols.protocols_io_import.comp_append.safety_infor.'
|
|
||||||
end
|
|
||||||
trans_string +=
|
trans_string +=
|
||||||
if attribute_name != 'os_name' && attribute_name != 'os_version'
|
if attribute_name != 'os_name' && attribute_name != 'os_version'
|
||||||
attribute_name
|
attribute_name
|
||||||
|
@ -208,7 +175,9 @@ module ProtocolsIoHelper
|
||||||
else
|
else
|
||||||
' , '
|
' , '
|
||||||
end
|
end
|
||||||
output_string += prepare_for_view(attribute_text, 'small-no-table')
|
output_string += prepare_for_view(
|
||||||
|
attribute_text, ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL
|
||||||
|
)
|
||||||
output_string
|
output_string
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -218,7 +187,10 @@ module ProtocolsIoHelper
|
||||||
append =
|
append =
|
||||||
if iterating_key.present?
|
if iterating_key.present?
|
||||||
br +
|
br +
|
||||||
prepare_for_view(iterating_key, 'small-no-table') +
|
prepare_for_view(
|
||||||
|
iterating_key,
|
||||||
|
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL
|
||||||
|
) +
|
||||||
br
|
br
|
||||||
else
|
else
|
||||||
t('protocols.protocols_io_import.comp_append.missing_desc')
|
t('protocols.protocols_io_import.comp_append.missing_desc')
|
||||||
|
@ -235,7 +207,9 @@ module ProtocolsIoHelper
|
||||||
if iterating_key.present?
|
if iterating_key.present?
|
||||||
append =
|
append =
|
||||||
t('protocols.protocols_io_import.comp_append.expected_result') +
|
t('protocols.protocols_io_import.comp_append.expected_result') +
|
||||||
prepare_for_view(iterating_key, 'small-no-table') +
|
prepare_for_view(
|
||||||
|
iterating_key, ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL
|
||||||
|
) +
|
||||||
'<br>'
|
'<br>'
|
||||||
return append
|
return append
|
||||||
end
|
end
|
||||||
|
@ -243,78 +217,75 @@ module ProtocolsIoHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def pio_stp_8(iterating_key) # protocols io software package parser
|
def pio_stp_8(iterating_key) # protocols io software package parser
|
||||||
if iterating_key['name'] &&
|
|
||||||
iterating_key['developer'] &&
|
|
||||||
iterating_key['version'] &&
|
|
||||||
iterating_key['link'] &&
|
|
||||||
iterating_key['repository'] &&
|
|
||||||
iterating_key['os_name'] &&
|
|
||||||
iterating_key['os_version']
|
|
||||||
append = ''
|
append = ''
|
||||||
parse_elements_array = %w(
|
parse_elements_array = %w(
|
||||||
name developer version link repository os_name os_version
|
name developer version link repository os_name os_version
|
||||||
)
|
)
|
||||||
parse_elements_array.each do |element|
|
parse_elements_array.each do |element|
|
||||||
append += fill_attributes(element, iterating_key[element], '8')
|
return '' unless iterating_key[element]
|
||||||
|
append += fill_attributes(
|
||||||
|
element,
|
||||||
|
iterating_key[element],
|
||||||
|
'protocols.protocols_io_import.comp_append.soft_packg.'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
return append
|
append
|
||||||
end
|
|
||||||
''
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pio_stp_9(iterating_key) # protocols io dataset parser
|
def pio_stp_9(iterating_key) # protocols io dataset parser
|
||||||
if iterating_key['name'].present? &&
|
|
||||||
iterating_key['link']
|
|
||||||
append = ''
|
append = ''
|
||||||
parse_elements_array = %w(name link)
|
parse_elements_array = %w(name link)
|
||||||
parse_elements_array.each do |element|
|
parse_elements_array.each do |element|
|
||||||
append += fill_attributes(element, iterating_key[element], '9')
|
return '' unless iterating_key[element]
|
||||||
|
append += fill_attributes(
|
||||||
|
element,
|
||||||
|
iterating_key[element],
|
||||||
|
'protocols.protocols_io_import.comp_append.dataset.'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
return append
|
append
|
||||||
end
|
|
||||||
''
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pio_stp_15(iterating_key) # protocols io commands parser
|
def pio_stp_15(iterating_key) # protocols io commands parser
|
||||||
if iterating_key['name'].present? &&
|
|
||||||
iterating_key['description'] &&
|
|
||||||
iterating_key['os_name'] &&
|
|
||||||
iterating_key['os_version']
|
|
||||||
append = ''
|
append = ''
|
||||||
parse_elements_array = %w(name description os_name os_version)
|
parse_elements_array = %w(name description os_name os_version)
|
||||||
parse_elements_array.each do |element|
|
parse_elements_array.each do |element|
|
||||||
append += fill_attributes(element, iterating_key[element], '15')
|
return '' unless iterating_key[element]
|
||||||
|
append += fill_attributes(
|
||||||
|
element,
|
||||||
|
iterating_key[element],
|
||||||
|
'protocols.protocols_io_import.comp_append.command.'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
return append
|
append
|
||||||
end
|
|
||||||
''
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pio_stp_18(iterating_key) # protocols io sub protocol parser
|
def pio_stp_18(iterating_key) # protocols io sub protocol parser
|
||||||
if iterating_key['protocol_name'].present? &&
|
|
||||||
iterating_key['full_name'] &&
|
|
||||||
iterating_key['link']
|
|
||||||
append = ''
|
append = ''
|
||||||
parse_elements_array = %w(protocol_name full_name link)
|
parse_elements_array = %w(protocol_name full_name link)
|
||||||
parse_elements_array.each do |element|
|
parse_elements_array.each do |element|
|
||||||
append += fill_attributes(element, iterating_key[element], '18')
|
return '' unless iterating_key[element]
|
||||||
|
append += fill_attributes(
|
||||||
|
element,
|
||||||
|
iterating_key[element],
|
||||||
|
'protocols.protocols_io_import.comp_append.sub_protocol.'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
return append
|
append
|
||||||
end
|
|
||||||
''
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def pio_stp_19(iterating_key) # protocols io safety information parser
|
def pio_stp_19(iterating_key) # protocols io safety information parser
|
||||||
if iterating_key['body'].present? &&
|
|
||||||
iterating_key['link']
|
|
||||||
append = ''
|
append = ''
|
||||||
parse_elements_array = %w(body link)
|
parse_elements_array = %w(body link)
|
||||||
parse_elements_array.each do |element|
|
parse_elements_array.each do |element|
|
||||||
append += fill_attributes(element, iterating_key[element], '19')
|
return '' unless iterating_key[element]
|
||||||
|
append += fill_attributes(
|
||||||
|
element,
|
||||||
|
iterating_key[element],
|
||||||
|
'protocols.protocols_io_import.comp_append.safety_infor.'
|
||||||
|
)
|
||||||
end
|
end
|
||||||
return append
|
append
|
||||||
end
|
|
||||||
''
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def protocols_io_fill_desc(json_hash)
|
def protocols_io_fill_desc(json_hash)
|
||||||
|
@ -326,7 +297,10 @@ module ProtocolsIoHelper
|
||||||
if json_hash['description'].present?
|
if json_hash['description'].present?
|
||||||
'<strong>' + t('protocols.protocols_io_import.preview.description') +
|
'<strong>' + t('protocols.protocols_io_import.preview.description') +
|
||||||
'</strong>' +
|
'</strong>' +
|
||||||
prepare_for_view(json_hash['description'], 'medium-no-table').html_safe
|
prepare_for_view(
|
||||||
|
json_hash['description'],
|
||||||
|
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_MEDIUM
|
||||||
|
).html_safe
|
||||||
else
|
else
|
||||||
'<strong>' + t('protocols.protocols_io_import.preview.description') +
|
'<strong>' + t('protocols.protocols_io_import.preview.description') +
|
||||||
'</strong>' + t('protocols.protocols_io_import.comp_append.missing_desc')
|
'</strong>' + t('protocols.protocols_io_import.comp_append.missing_desc')
|
||||||
|
@ -338,7 +312,8 @@ module ProtocolsIoHelper
|
||||||
description_string +=
|
description_string +=
|
||||||
new_e.to_s + ': ' +
|
new_e.to_s + ': ' +
|
||||||
prepare_for_view(
|
prepare_for_view(
|
||||||
params['protocol']['created_at'].to_s, 'small-no-table'
|
params['protocol']['created_at'].to_s,
|
||||||
|
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL
|
||||||
) +
|
) +
|
||||||
+ '<br>'
|
+ '<br>'
|
||||||
elsif e == 'tags' && json_hash[e].any? && json_hash[e] != ''
|
elsif e == 'tags' && json_hash[e].any? && json_hash[e] != ''
|
||||||
|
@ -351,7 +326,8 @@ module ProtocolsIoHelper
|
||||||
sanitize_input(tag['tag_name']) + ' , '
|
sanitize_input(tag['tag_name']) + ' , '
|
||||||
end
|
end
|
||||||
description_string += prepare_for_view(
|
description_string += prepare_for_view(
|
||||||
tags_length_checker, 'medium-no-table'
|
tags_length_checker,
|
||||||
|
ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_MEDIUM
|
||||||
)
|
)
|
||||||
description_string += '<br>'
|
description_string += '<br>'
|
||||||
elsif json_hash[e].present?
|
elsif json_hash[e].present?
|
||||||
|
|
|
@ -36,19 +36,19 @@
|
||||||
<% json_object['tags'].each do |tag| %>
|
<% json_object['tags'].each do |tag| %>
|
||||||
<% string_of_tags += tag['tag_name']+' , ' %>
|
<% string_of_tags += tag['tag_name']+' , ' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= prepare_for_view(string_of_tags,'medium').html_safe %>
|
<%= prepare_for_view(string_of_tags, ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_MEDIUM,'table').html_safe %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% prot_info_string += not_null(json_object[element]) if add_to_info_string_elements.include? element %>
|
<% prot_info_string += not_null(json_object[element]) if add_to_info_string_elements.include? element %>
|
||||||
<% translation_string = 'protocols.protocols_io_import.preview.' + element %>
|
<% translation_string = 'protocols.protocols_io_import.preview.' + element %>
|
||||||
<strong><%= t(translation_string) %></strong>
|
<strong><%= t(translation_string) %></strong>
|
||||||
<% if big_elements.include? element %>
|
<% if big_elements.include? element %>
|
||||||
<%= prepare_for_view(json_object[element],'big').html_safe %>
|
<%= prepare_for_view(json_object[element],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_BIG,'table').html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if medium_elements.include? element %>
|
<% if medium_elements.include? element %>
|
||||||
<%= prepare_for_view(json_object[element],'medium').html_safe %>
|
<%= prepare_for_view(json_object[element],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_MEDIUM,'table').html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if small_elements.include? element %>
|
<% if small_elements.include? element %>
|
||||||
<%= prepare_for_view(json_object[element],'small').html_safe %>
|
<%= prepare_for_view(json_object[element],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -43,13 +43,13 @@
|
||||||
<% step_info_string += (key['data']) %>
|
<% step_info_string += (key['data']) %>
|
||||||
<br>
|
<br>
|
||||||
<strong><%= t('protocols.protocols_io_import.preview.strng_s_desc') %></strong>
|
<strong><%= t('protocols.protocols_io_import.preview.strng_s_desc') %></strong>
|
||||||
<%= prepare_for_view(key['data'],'small').html_safe %>
|
<%= prepare_for_view(key['data'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<% when '17' %>
|
<% when '17' %>
|
||||||
<% step_info_string += (key['data']) %>
|
<% step_info_string += (key['data']) %>
|
||||||
<br>
|
<br>
|
||||||
<strong><%= t('protocols.protocols_io_import.preview.s_exp_res') %></strong>
|
<strong><%= t('protocols.protocols_io_import.preview.s_exp_res') %></strong>
|
||||||
<%= prepare_for_view(key['data'],'small').html_safe %>
|
<%= prepare_for_view(key['data'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif key && whitelist_complex.include?(key['component_type_id']) %>
|
<% elsif key && whitelist_complex.include?(key['component_type_id']) %>
|
||||||
|
@ -58,63 +58,63 @@
|
||||||
<% step_info_string += not_null(key['source_data']['name']) %>
|
<% step_info_string += not_null(key['source_data']['name']) %>
|
||||||
<br>
|
<br>
|
||||||
<strong><%= not_null(key['name'])+': ' %></strong>
|
<strong><%= not_null(key['name'])+': ' %></strong>
|
||||||
<%= prepare_for_view(key['source_data']['name'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.dev') %>
|
<%= t('protocols.protocols_io_import.preview.dev') %>
|
||||||
<%= prepare_for_view(key['source_data']['developer'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['developer'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.vers') %>
|
<%= t('protocols.protocols_io_import.preview.vers') %>
|
||||||
<%= prepare_for_view(key['source_data']['version'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['version'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.s_link') %>
|
<%= t('protocols.protocols_io_import.preview.s_link') %>
|
||||||
<%= prepare_for_view(key['source_data']['link'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['link'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.repo') %>
|
<%= t('protocols.protocols_io_import.preview.repo') %>
|
||||||
<%= prepare_for_view(key['source_data']['repository'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['repository'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.os') %>
|
<%= t('protocols.protocols_io_import.preview.os') %>
|
||||||
<%= prepare_for_view(key['source_data']['os_name'],'small').html_safe + ' , ' +
|
<%= prepare_for_view(key['source_data']['os_name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe + ' , ' +
|
||||||
prepare_for_view(key['source_data']['os_version'],'small').html_safe %>
|
prepare_for_view(key['source_data']['os_version'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<% when '9'%>
|
<% when '9'%>
|
||||||
<% step_info_string += not_null(key['source_data']['name']) %>
|
<% step_info_string += not_null(key['source_data']['name']) %>
|
||||||
<br>
|
<br>
|
||||||
<strong><%= not_null(key['name'])+': ' %></strong>
|
<strong><%= not_null(key['name'])+': ' %></strong>
|
||||||
<%= prepare_for_view(key['source_data']['name'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.s_link') %>
|
<%= t('protocols.protocols_io_import.preview.s_link') %>
|
||||||
<%= prepare_for_view(key['source_data']['link'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['link'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<% when '15'%>
|
<% when '15'%>
|
||||||
<% step_info_string += not_null(key['source_data']['description']) %>
|
<% step_info_string += not_null(key['source_data']['description']) %>
|
||||||
<br>
|
<br>
|
||||||
<strong><%= key['name']+': ' %></strong>
|
<strong><%= key['name']+': ' %></strong>
|
||||||
<%= prepare_for_view(key['source_data']['name'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.s_desc') %>
|
<%= t('protocols.protocols_io_import.preview.s_desc') %>
|
||||||
<%= prepare_for_view(key['source_data']['description'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['description'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.os') %>
|
<%= t('protocols.protocols_io_import.preview.os') %>
|
||||||
<%= prepare_for_view(key['source_data']['os_name'],'small').html_safe + ' , ' +
|
<%= prepare_for_view(key['source_data']['os_name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe + ' , ' +
|
||||||
prepare_for_view(key['source_data']['os_version'],'small').html_safe %>
|
prepare_for_view(key['source_data']['os_version'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<% when '18'%>
|
<% when '18'%>
|
||||||
<br>
|
<br>
|
||||||
<strong><%= t('protocols.protocols_io_import.preview.sub_prot') %></strong>
|
<strong><%= t('protocols.protocols_io_import.preview.sub_prot') %></strong>
|
||||||
<%= prepare_for_view(key['source_data']['protocol_name'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['protocol_name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.auth') %>
|
<%= t('protocols.protocols_io_import.preview.auth') %>
|
||||||
<%= prepare_for_view(key['source_data']['full_name'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['full_name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<% if key['source_data']['link'].present? %>
|
<% if key['source_data']['link'].present? %>
|
||||||
<%= t('protocols.protocols_io_import.preview.s_nobr_link') %>
|
<%= t('protocols.protocols_io_import.preview.s_nobr_link') %>
|
||||||
<%= prepare_for_view(key['source_data']['link'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['link'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% when '19'%>
|
<% when '19'%>
|
||||||
<% step_info_string += not_null(key['source_data']['body']) %>
|
<% step_info_string += not_null(key['source_data']['body']) %>
|
||||||
<br>
|
<br>
|
||||||
<strong><%= not_null(key['name'])+': ' %></strong>
|
<strong><%= not_null(key['name'])+': ' %></strong>
|
||||||
<%= prepare_for_view(key['source_data']['body'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['body'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<br>
|
<br>
|
||||||
<%= t('protocols.protocols_io_import.preview.s_link') %>
|
<%= t('protocols.protocols_io_import.preview.s_link') %>
|
||||||
<%= prepare_for_view(key['source_data']['link'],'small').html_safe %>
|
<%= prepare_for_view(key['source_data']['link'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% end #case if%>
|
<% end #case if%>
|
||||||
<% end #inner if%>
|
<% end #inner if%>
|
||||||
|
|
Loading…
Add table
Reference in a new issue