2019-11-01 13:33:49 +00:00
|
|
|
<%= csrf_meta_tags %>
|
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-11-01 12:29:45 +00:00
|
|
|
<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>
|
2019-11-01 12:47:17 +00:00
|
|
|
<nobr>
|
2019-11-01 09:42:28 +00:00
|
|
|
<form method="get" action='?' name='mode_form'>
|
2019-11-01 13:26:51 +00:00
|
|
|
<%= t('strict_compare_mode') +':' %>
|
2019-11-01 12:31:49 +00:00
|
|
|
<input type='hidden' name='mode' value=''>
|
2019-11-01 09:42:28 +00:00
|
|
|
<% if params['mode']!='simple' %>
|
2019-11-01 14:31:05 +00:00
|
|
|
<input type="checkbox" onchange='change_mode()' checked><span style="margin-right: 2em;"><%= t('yes_') %></span>
|
2019-11-01 09:42:28 +00:00
|
|
|
<% else %>
|
2019-11-01 14:31:05 +00:00
|
|
|
<input type="checkbox" onchange='change_mode()'><span style="margin-right: 2em;"><%= t('no_') %></span>
|
2019-11-01 09:42:28 +00:00
|
|
|
<% end %>
|
2019-11-01 12:52:59 +00:00
|
|
|
<button type="button" onclick="merge_form.submit()"><%= t('personal_journal.merge') %></button>
|
2019-11-01 09:42:28 +00:00
|
|
|
</form>
|
2019-11-01 12:47:17 +00:00
|
|
|
</nobr>
|
2019-11-01 13:30:32 +00:00
|
|
|
<form method="post" action='/admin/journal_papers/merge_process?' name='merge_form'>
|
2019-11-01 13:41:55 +00:00
|
|
|
<%= token_tag(nil) %>
|
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 13:26:51 +00:00
|
|
|
<th><%= t("personal_journal.merge") %></th>
|
2019-11-01 06:47:53 +00:00
|
|
|
<th><%= t("personal_plugins.author") %></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' %>
|
2019-11-01 09:31:44 +00:00
|
|
|
<td rowspan="<%= len %>">
|
2019-11-01 12:47:17 +00:00
|
|
|
<input type="checkbox" class="checkbox" name="journal_id[]" value="<%= journals.collect(&:id).join('/') %>">
|
2019-11-01 09:31:44 +00:00
|
|
|
</td>
|
2019-11-01 06:17:01 +00:00
|
|
|
<% journals.each_with_index do |journal,i| %>
|
2019-10-31 12:44:37 +00:00
|
|
|
<td>
|
2019-11-01 09:01:14 +00:00
|
|
|
<a href="<%= edit_admin_journal_paper_path(journal) %>" target="_blank">
|
2019-11-01 08:59:22 +00:00
|
|
|
<%= get_member(journal).collect(&:name).join(' / ') rescue t('personal_journal.no_input') %>
|
|
|
|
</a>
|
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 09:31:44 +00:00
|
|
|
<td rowspan="<%= len1 %>">
|
2019-11-01 12:47:17 +00:00
|
|
|
<input type="checkbox" class="checkbox" name="journal_id[]" value="<%= v.collect(&:id).join('/') %>">
|
2019-11-01 09:31:44 +00:00
|
|
|
</td>
|
2019-11-01 06:17:01 +00:00
|
|
|
<% v.each_with_index do |journal_child,index1| %>
|
|
|
|
<td>
|
2019-11-01 09:02:08 +00:00
|
|
|
<a href="<%= edit_admin_journal_paper_path(journal_child) %>" target="_blank">
|
2019-11-01 08:59:22 +00:00
|
|
|
<%= get_member(journal_child).collect(&:name).join(' / ') rescue t('personal_journal.no_input') %>
|
|
|
|
</a>
|
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 12:44:00 +00:00
|
|
|
</table>
|
|
|
|
</form>
|