mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-21 06:15:31 +08:00
Add command/subprotocol/safety for PIO
This commit is contained in:
parent
c00b08b101
commit
2834edb286
3 changed files with 30 additions and 28 deletions
app
config/locales
|
@ -467,21 +467,21 @@ module ProtocolsIoHelper
|
|||
pe_array = %w(
|
||||
name description os_name os_version
|
||||
)
|
||||
key['source_data']['name'] =
|
||||
key['source']['name'] =
|
||||
'<pre><code>' +
|
||||
not_null(key['source_data']['name'].gsub(/\n/, '<br>')) +
|
||||
not_null(key['source']['name'].gsub(/\n/, '<br>')) +
|
||||
'</code></pre>'
|
||||
trans_text = 'protocols.protocols_io_import.comp_append.command.'
|
||||
newj[i.to_s]['description'] += pio_stp(
|
||||
key['source_data'], pe_array, trans_text
|
||||
key['source'], pe_array, trans_text
|
||||
)
|
||||
when 18
|
||||
pe_array = %w(
|
||||
protocol_name full_name link
|
||||
title title_html uri
|
||||
)
|
||||
trans_text = 'protocols.protocols_io_import.comp_append.sub_protocol.'
|
||||
newj[i.to_s]['description'] += pio_stp(
|
||||
key['source_data'], pe_array, trans_text
|
||||
key['source'], pe_array, trans_text
|
||||
)
|
||||
when 19
|
||||
pe_array = %w(
|
||||
|
@ -489,7 +489,7 @@ module ProtocolsIoHelper
|
|||
)
|
||||
trans_text = 'protocols.protocols_io_import.comp_append.safety_infor.'
|
||||
newj[i.to_s]['description'] += pio_stp(
|
||||
key['source_data'], pe_array, trans_text
|
||||
key['source'], pe_array, trans_text
|
||||
)
|
||||
end # case end
|
||||
end # finished looping over step components
|
||||
|
|
|
@ -85,43 +85,43 @@
|
|||
<% when 9 %>
|
||||
<% step_info_string += not_null(key['source']['name']).html_safe %>
|
||||
<br>
|
||||
<%= t('protocols.protocols_io_import.preview.dataset_name') %>
|
||||
<%= t('protocols.protocols_io_import.preview.dataset_name').html_safe %>
|
||||
<%= prepare_for_view(key['source']['name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<br>
|
||||
<%= t('protocols.protocols_io_import.preview.s_link') %>
|
||||
<%= prepare_for_view(key['source']['link'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<% when 15 %>
|
||||
<% step_info_string += not_null(key['source_data']['description']) %>
|
||||
<% step_info_string += not_null(key['source']['description']) %>
|
||||
<br>
|
||||
<strong><%= key['name']+': ' %></strong>
|
||||
<%= prepare_for_view('<pre><code>'+key['source_data']['name'].gsub(/\n/, '<br>')+'</code></pre>',ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<%= t('protocols.protocols_io_import.preview.command_name').html_safe %>
|
||||
<%= prepare_for_view('<pre><code>'+key['source']['name'].gsub(/\n/, '<br>')+'</code></pre>',ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<br>
|
||||
<%= t('protocols.protocols_io_import.preview.s_desc') %>
|
||||
<%= prepare_for_view(key['source_data']['description'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<%= prepare_for_view(key['source']['description'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<br>
|
||||
<%= t('protocols.protocols_io_import.preview.os') %>
|
||||
<%= 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'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<%= prepare_for_view(key['source']['os_name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe + ' , ' +
|
||||
prepare_for_view(key['source']['os_version'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<% when 18 %>
|
||||
<br>
|
||||
<strong><%= t('protocols.protocols_io_import.preview.sub_prot') %></strong>
|
||||
<%= pio_eval_title_len(sanitize_input(key['source_data']['protocol_name'])).html_safe %>
|
||||
<%= t('protocols.protocols_io_import.preview.sub_prot').html_safe %>
|
||||
<%= pio_eval_title_len(sanitize_input(key['source']['title'])).html_safe %>
|
||||
<br>
|
||||
<%= t('protocols.protocols_io_import.preview.auth') %>
|
||||
<%= prepare_for_view(key['source_data']['full_name'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<%= prepare_for_view(key['source']['title_html'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<br>
|
||||
<% if key['source_data']['link'].present? %>
|
||||
<% if key['source']['uri'].present? %>
|
||||
<%= t('protocols.protocols_io_import.preview.s_nobr_link') %>
|
||||
<%= prepare_for_view(key['source_data']['link'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<%= prepare_for_view(key['source']['uri'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<% end %>
|
||||
<% when 19 %>
|
||||
<% step_info_string += not_null(key['source_data']['body']) %>
|
||||
<% step_info_string += not_null(key['source']['body']) %>
|
||||
<br>
|
||||
<strong><%= not_null(key['name'])+': ' %></strong>
|
||||
<%= prepare_for_view(key['source_data']['body'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<%= t('protocols.protocols_io_import.preview.safety_info').html_safe %>
|
||||
<%= prepare_for_view(key['source']['body'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<br>
|
||||
<%= t('protocols.protocols_io_import.preview.s_link') %>
|
||||
<%= prepare_for_view(key['source_data']['link'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<%= prepare_for_view(key['source']['link'],ProtocolsIoHelper::PIO_ELEMENT_RESERVED_LENGTH_SMALL,'table').html_safe %>
|
||||
<% else %>
|
||||
<% end #case if%>
|
||||
<% end #inner if%>
|
||||
|
|
|
@ -1547,14 +1547,16 @@ en:
|
|||
s_desc: "Description:"
|
||||
strng_s_desc: "Description:"
|
||||
s_exp_res: "Expected result:"
|
||||
sw_name: "Software package:"
|
||||
sw_name: "<strong>Software package:</strong>"
|
||||
dev: "Developer:"
|
||||
vers: "Version:"
|
||||
repo: "Repository:"
|
||||
os: "OS name , OS version:"
|
||||
sub_prot: "This protocol also contains an attached sub-protocol:"
|
||||
command_name: "<strong>Command:</strong>"
|
||||
sub_prot: "<strong>This protocol also contains an attached sub-protocol:</strong>"
|
||||
safety_info: "<strong>Safety information:</strong>"
|
||||
auth: "Author:"
|
||||
dataset_name: "Dataset:"
|
||||
dataset_name: "<strong>Dataset:</strong>"
|
||||
manuscript_citation: "Manuscript citation:"
|
||||
published_on: "Publish date:"
|
||||
vendor_name: "Vendor name:"
|
||||
|
@ -1582,9 +1584,9 @@ en:
|
|||
description: "<br>Description: "
|
||||
os: "<br>OS name , OS version: "
|
||||
sub_protocol:
|
||||
protocol_name: "<br><strong>This step also contains an attached sub-protocol: </strong>"
|
||||
full_name: "<br>Author: "
|
||||
link: "<br>Link: "
|
||||
title: "<br><strong>This step also contains an attached sub-protocol: </strong>"
|
||||
title_html: "<br>Author: "
|
||||
uri: "<br>Link: "
|
||||
safety_infor:
|
||||
body: "<br><strong>Safety information: </strong>"
|
||||
link: "<br>Link: "
|
||||
|
|
Loading…
Reference in a new issue