mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-05 23:25:46 +08:00
Refactored code according to review
This commit is contained in:
parent
2b9563ec6d
commit
d52400f741
1 changed files with 14 additions and 14 deletions
|
@ -79,26 +79,26 @@
|
|||
data-role="preview-container">
|
||||
<hr>
|
||||
|
||||
<% if @json_object["before_start"]&&@json_object["before_start"]!="" %>
|
||||
<% if @json_object["before_start"].present? %>
|
||||
|
||||
<strong><%= t("protocols.protocols_io_import.preview.b_s_p") %></strong><br>
|
||||
<%= (@json_object["before_start"]) %><br>
|
||||
|
||||
<% end %>
|
||||
<% if @json_object["warning"]&&@json_object["warning"]!="" %>
|
||||
<% if @json_object["warning"].present? %>
|
||||
|
||||
<strong><%= t("protocols.protocols_io_import.preview.warn") %></strong><br>
|
||||
<%= (@json_object["warning"]) %><br>
|
||||
|
||||
<% end %>
|
||||
<% if @json_object["guidelines"]&&@json_object["guidelines"]!="" %>
|
||||
<% if @json_object["guidelines"].present? %>
|
||||
|
||||
<strong><%= t("protocols.protocols_io_import.preview.guideln") %></strong><br>
|
||||
<%= (@json_object["guidelines"]) %><br>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% if @json_object["link"]&&@json_object["link"]!="" %>
|
||||
<% if @json_object["link"].present? %>
|
||||
|
||||
<br><strong><%= t("protocols.protocols_io_import.preview.p_link") %></strong><br>
|
||||
<%= (@json_object["link"]) %>
|
||||
|
@ -133,7 +133,7 @@
|
|||
<% end %>
|
||||
|
||||
<% if(key1["component_type_id"]=="6") %>
|
||||
<% if(!key1["data"].nil? && key1["data"]!="") %>
|
||||
<% if(key1["data"].present?) %>
|
||||
<% title ||=key1["data"] %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -159,8 +159,8 @@
|
|||
<% key=value %>
|
||||
<% end %>
|
||||
|
||||
<% if whitelist_simple.include?(key["component_type_id"]) && key["data"]!="" &&
|
||||
key["data"] %>
|
||||
<% if whitelist_simple.include?(key["component_type_id"]) &&
|
||||
key["data"].present? %>
|
||||
<br>
|
||||
<% case key["component_type_id"]
|
||||
when "1" %>
|
||||
|
@ -211,7 +211,7 @@
|
|||
<br><%= t("protocols.protocols_io_import.preview.auth") %>
|
||||
<%= (key["source_data"]["full_name"]) %>
|
||||
<br>
|
||||
<% if key["source_data"]["link"]&&key["source_data"]["link"]!="" %>
|
||||
<% if key["source_data"]["link"].present? %>
|
||||
<%= t("protocols.protocols_io_import.preview.s_nobr_link") %>
|
||||
<%= (key["source_data"]["link"]) %>
|
||||
<% end %>
|
||||
|
@ -258,37 +258,37 @@
|
|||
<% end #step loop%>
|
||||
|
||||
<% if
|
||||
@json_object["manuscript_citation"]&&@json_object["manuscript_citation"]!="" %>
|
||||
@json_object["manuscript_citation"].present? %>
|
||||
|
||||
<br><strong><%= t("protocols.protocols_io_import.preview.manu_cit") %></strong><br>
|
||||
<%= (@json_object["manuscript_citation"]) %>
|
||||
|
||||
<% end %>
|
||||
<% if @json_object["publish_date"]&&@json_object["publish_date"]!="" %>
|
||||
<% if @json_object["publish_date"].present? %>
|
||||
|
||||
<br><strong><%= t("protocols.protocols_io_import.preview.pbl_date") %></strong><br>
|
||||
<%= (@json_object["publish_date"]) %>
|
||||
|
||||
<% end %>
|
||||
<% if @json_object["vendor_name"]&&@json_object["vendor_name"]!="" %>
|
||||
<% if @json_object["vendor_name"].present? %>
|
||||
|
||||
<br><strong><%= t("protocols.protocols_io_import.preview.vnd_name") %></strong><br>
|
||||
<%= (@json_object["vendor_name"]) %>
|
||||
|
||||
<% end %>
|
||||
<% if @json_object["vendor_link"]&&@json_object["vendor_link"]!="" %>
|
||||
<% if @json_object["vendor_link"].present? %>
|
||||
|
||||
<br><strong><%= t("protocols.protocols_io_import.preview.vnd_link") %></strong><br>
|
||||
<%= (@json_object["vendor_link"]) %>
|
||||
|
||||
<% end %>
|
||||
<% if @json_object["keywords"]&&@json_object["keywords"]!="" %>
|
||||
<% if @json_object["keywords"].present? %>
|
||||
|
||||
<br><strong><%= t("protocols.protocols_io_import.preview.key_wrd") %></strong><br>
|
||||
<%= (@json_object["keywords"]) %>
|
||||
|
||||
<% end %>
|
||||
<% if @json_object["tags"]&&@json_object["tags"]!="" %>
|
||||
<% if @json_object["tags"].present? %>
|
||||
|
||||
<br><strong><%= t("protocols.protocols_io_import.preview.tags") %></strong><br>
|
||||
<% @json_object["tags"].each do |tag| %>
|
||||
|
|
Loading…
Reference in a new issue