personal-journal1/app/views/admin/journal_papers/merge.html.erb

74 lines
2.0 KiB
Plaintext
Raw Normal View History

2019-10-31 12:50:02 +00:00
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "lib/main-forms" %>
<%= stylesheet_link_tag "lib/fileupload" %>
<%= stylesheet_link_tag "lib/main-list" %>
<%= stylesheet_link_tag "lib/main-form-col2" %>
<% end %>
2019-10-31 12:51:37 +00:00
<table class="table main-list">
2019-10-31 12:37:59 +00:00
<thead>
<tr>
<th><%= t('personal_journal.paper_title') %></th>
<th><%= t('personal_journal.journal_title') %></th>
2019-11-01 05:59:06 +00:00
<% if params['mode']!='simple' %>
<th><%= t('personal_journal.level_type') %></th>
<th><%= t('personal_journal.author_type') %></th>
<th><%= t('personal_journal.paper_type') %></th>
<th><%= t('personal_journal.publication_date') %></th>
<% end %>
2019-11-01 06:42:24 +00:00
<th><%= t("personal_journal.authors") %></th>
2019-10-31 12:37:59 +00:00
</tr>
</thead>
<tbody>
2019-11-01 05:59:06 +00:00
<% @journals.each do |key,journals| %>
<tr>
<% if params['mode']=='simple'
len = journals.length
else
len = journals.values.reduce(0){|sum,num| sum+num.length}
2019-11-01 06:04:34 +00:00
end
2019-11-01 05:59:06 +00:00
%>
<td rowspan="<%= len %>">
<%= key[0].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') %>
</td>
<td rowspan="<%= len %>">
<%= key[1].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') %>
</td>
2019-11-01 06:17:01 +00:00
<% if params['mode']=='simple' %>
<% journals.each_with_index do |journal,i| %>
2019-10-31 12:44:37 +00:00
<td>
2019-11-01 06:42:24 +00:00
<%= get_member(journal) %>
2019-10-31 12:44:37 +00:00
</td>
2019-11-01 06:20:52 +00:00
<% if len!=(i+1) %>
</tr>
<tr>
<% end %>
2019-11-01 06:17:01 +00:00
<% end %>
<% else %>
2019-11-01 06:24:54 +00:00
<% i=0 %>
2019-11-01 06:23:17 +00:00
<% journals.each do |k,v| %>
2019-11-01 06:17:01 +00:00
<% len1 = v.length %>
2019-11-01 06:33:37 +00:00
<% k.each do |keychild| %>
2019-11-01 06:32:12 +00:00
<td rowspan="<%= len1 %>">
2019-11-01 06:33:37 +00:00
<%= keychild.to_s.blank? ? t('personal_journal.no_input') : keychild %>
2019-11-01 06:32:12 +00:00
</td>
<% end %>
2019-11-01 06:17:01 +00:00
<% v.each_with_index do |journal_child,index1| %>
<td>
2019-11-01 06:42:24 +00:00
<%= get_member(journal_child) %>
2019-11-01 06:17:01 +00:00
</td>
2019-11-01 06:30:18 +00:00
<% if len1!=index1 %>
2019-11-01 06:17:01 +00:00
</tr>
<tr>
<% end %>
<% end %>
2019-11-01 06:30:18 +00:00
<% if len1!=(i+1) %>
2019-11-01 06:17:01 +00:00
</tr>
<tr>
2019-10-31 12:37:59 +00:00
<% end %>
2019-11-01 06:30:18 +00:00
<% i =i+1 %>
2019-10-31 12:37:59 +00:00
<% end %>
<% end %>
2019-11-01 05:59:06 +00:00
</tr>
2019-10-31 12:37:59 +00:00
<% end %>
</tbody>
2019-11-01 06:42:24 +00:00
</table>