Update merge.html.erb
This commit is contained in:
parent
7883047002
commit
31f7407b35
|
@ -9,15 +9,23 @@
|
|||
<tr>
|
||||
<th><%= t('personal_journal.paper_title') %></th>
|
||||
<th><%= t('personal_journal.journal_title') %></th>
|
||||
<% 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 %>
|
||||
<th><%= t('module_name.personal_journal') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if params['mode']=='simple' %>
|
||||
<% else %>
|
||||
<% @journals.each do |key,journals| %>
|
||||
<tr>
|
||||
<% len = journals.length %>
|
||||
<% @journals.each do |key,journals| %>
|
||||
<tr>
|
||||
<% if params['mode']=='simple'
|
||||
len = journals.length
|
||||
else
|
||||
len = journals.values.reduce(0){|sum,num| sum+num.length}
|
||||
%>
|
||||
<td rowspan="<%= len %>">
|
||||
<%= key[0].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') %>
|
||||
</td>
|
||||
|
@ -25,16 +33,50 @@
|
|||
<%= key[1].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') %>
|
||||
</td>
|
||||
<% journals.each_with_index do |journal,i| %>
|
||||
<% if params['mode']=='simple' %>
|
||||
<td>
|
||||
<%= journal %>
|
||||
</td>
|
||||
<% else %>
|
||||
<% j=0 %>
|
||||
<% journal.each do |k,v| %>
|
||||
<% len1 = v.length %>
|
||||
<td rowspan="<%= len1 %>">
|
||||
<%= k[0] %>
|
||||
</td>
|
||||
<td rowspan="<%= len1 %>">
|
||||
<%= k[1] %>
|
||||
</td>
|
||||
<td rowspan="<%= len1 %>">
|
||||
<%= k[2] %>
|
||||
</td>
|
||||
<td rowspan="<%= len1 %>">
|
||||
<%= k[3] %>
|
||||
</td>
|
||||
<% v.each_with_index do |journal_child,index1| %>
|
||||
<% len2 = v.length %>
|
||||
<td>
|
||||
<%= journal_child %>
|
||||
</td>
|
||||
<% if len2!=(i+1) %>
|
||||
</tr>
|
||||
<tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if len1!=(j+1) %>
|
||||
</tr>
|
||||
<tr>
|
||||
<% end
|
||||
j=j+1
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if len!=(i+1) %>
|
||||
</tr>
|
||||
<tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
Loading…
Reference in New Issue