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-10-31 12:37:59 +00:00
|
|
|
<th><%= t('module_name.personal_journal') %></th>
|
|
|
|
</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>
|
|
|
|
<% journals.each_with_index do |journal,i| %>
|
|
|
|
<% if params['mode']=='simple' %>
|
2019-10-31 12:44:37 +00:00
|
|
|
<td>
|
|
|
|
<%= journal %>
|
|
|
|
</td>
|
2019-11-01 05:59:06 +00:00
|
|
|
<% else %>
|
|
|
|
<% j=0 %>
|
2019-11-01 06:09:29 +00:00
|
|
|
<% puts ['helpme',journal] %>
|
2019-11-01 05:59:06 +00:00
|
|
|
<% journal.each do |k,v| %>
|
2019-11-01 06:13:17 +00:00
|
|
|
<% puts ['hello',j,k,v] %>
|
2019-11-01 05:59:06 +00:00
|
|
|
<% 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>
|
2019-11-01 06:02:42 +00:00
|
|
|
<% end %>
|
|
|
|
<% j=j+1 %>
|
2019-10-31 12:37:59 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2019-11-01 05:59:06 +00:00
|
|
|
<% if len!=(i+1) %>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<% end %>
|
2019-10-31 12:37:59 +00:00
|
|
|
<% end %>
|
2019-11-01 05:59:06 +00:00
|
|
|
</tr>
|
2019-10-31 12:37:59 +00:00
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|