108 lines
3.4 KiB
Plaintext
108 lines
3.4 KiB
Plaintext
<% 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 %>
|
|
<script>
|
|
function change_mode(){
|
|
var value = $("form[name='mode_form']").find("input[type='checkbox']")[0].checked
|
|
if (value){
|
|
$("input[name='mode']").val("strict")
|
|
}
|
|
else{
|
|
$("input[name='mode']").val("simple")
|
|
}
|
|
document.mode_form.submit()
|
|
}
|
|
</script>
|
|
<form method="get" action='?' name='mode_form'>
|
|
<nobr>
|
|
<%= '嚴格比較模式'+':' %>
|
|
<% if params['mode']!='simple' %>
|
|
<input type='hidden' name='mode' value=''>
|
|
<input type="checkbox" onchange='change_mode()' checked><span>是</span>
|
|
<% else %>
|
|
<input type="checkbox" onchange='change_mode()'><span>否</span>
|
|
<% end %>
|
|
</nobr>
|
|
</form>
|
|
<table class="table main-list">
|
|
<thead>
|
|
<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("personal_plugins.merge") %></th>
|
|
<th><%= t("personal_plugins.author") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @journals.each do |key,journals| %>
|
|
<tr>
|
|
<% if params['mode']=='simple'
|
|
len = journals.length
|
|
else
|
|
len = journals.values.reduce(0){|sum,num| sum+num.length}
|
|
end
|
|
%>
|
|
<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>
|
|
<% if params['mode']=='simple' %>
|
|
<td rowspan="<%= len %>">
|
|
<input type="checkbox" class="checkbox" name="journal_id" value="<%= journals.collect(&:id).join('/') %>">
|
|
</td>
|
|
<% journals.each_with_index do |journal,i| %>
|
|
<td>
|
|
<a href="<%= edit_admin_journal_paper_path(journal) %>" target="_blank">
|
|
<%= get_member(journal).collect(&:name).join(' / ') rescue t('personal_journal.no_input') %>
|
|
</a>
|
|
</td>
|
|
<% if len!=(i+1) %>
|
|
</tr>
|
|
<tr>
|
|
<% end %>
|
|
<% end %>
|
|
<% else %>
|
|
<% i=0 %>
|
|
<% journals.each do |k,v| %>
|
|
<% len1 = v.length %>
|
|
<% k.each do |keychild| %>
|
|
<td rowspan="<%= len1 %>">
|
|
<%= keychild.to_s.blank? ? t('personal_journal.no_input') : keychild %>
|
|
</td>
|
|
<% end %>
|
|
<td rowspan="<%= len1 %>">
|
|
<input type="checkbox" class="checkbox" name="journal_id" value="<%= v.collect(&:id).join('/') %>">
|
|
</td>
|
|
<% v.each_with_index do |journal_child,index1| %>
|
|
<td>
|
|
<a href="<%= edit_admin_journal_paper_path(journal_child) %>" target="_blank">
|
|
<%= get_member(journal_child).collect(&:name).join(' / ') rescue t('personal_journal.no_input') %>
|
|
</a>
|
|
</td>
|
|
<% if len1!=index1 %>
|
|
</tr>
|
|
<tr>
|
|
<% end %>
|
|
<% end %>
|
|
<% if len1!=(i+1) %>
|
|
</tr>
|
|
<tr>
|
|
<% end %>
|
|
<% i =i+1 %>
|
|
<% end %>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table> |