Update merge.html.erb

This commit is contained in:
chiu 2019-11-01 13:59:06 +08:00
parent 7883047002
commit 31f7407b35
1 changed files with 58 additions and 16 deletions

View File

@ -9,32 +9,74 @@
<tr> <tr>
<th><%= t('personal_journal.paper_title') %></th> <th><%= t('personal_journal.paper_title') %></th>
<th><%= t('personal_journal.journal_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> <th><%= t('module_name.personal_journal') %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% if params['mode']=='simple' %> <% @journals.each do |key,journals| %>
<% else %> <tr>
<% @journals.each do |key,journals| %> <% if params['mode']=='simple'
<tr> len = journals.length
<% len = journals.length %> else
<td rowspan="<%= len %>"> len = journals.values.reduce(0){|sum,num| sum+num.length}
<%= key[0].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') %> %>
</td> <td rowspan="<%= len %>">
<td rowspan="<%= len %>"> <%= key[0].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') %>
<%= key[1].values.map{|v| v=="" ? t('personal_journal.no_input') : v}.join('/') %> </td>
</td> <td rowspan="<%= len %>">
<% journals.each_with_index do |journal,i| %> <%= 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> <td>
<%= journal %> <%= journal %>
</td> </td>
<% if len!=(i+1) %> <% else %>
</tr> <% j=0 %>
<tr> <% 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 %>
<% end %> <% end %>
</tr> <% if len!=(i+1) %>
</tr>
<tr>
<% end %>
<% end %> <% end %>
</tr>
<% end %> <% end %>
</tbody> </tbody>
</table> </table>