2019-10-30 14:14:00 +00:00
|
|
|
<script src="https://kit.fontawesome.com/1fa49cfdc9.js" crossorigin="anonymous"></script>
|
2019-11-01 09:21:17 +00:00
|
|
|
<script>
|
|
|
|
function MergeUrl(){
|
2019-11-01 09:22:05 +00:00
|
|
|
var temp_url = location.href
|
2019-11-01 09:21:17 +00:00
|
|
|
if (temp_url.search("locale=")!=-1){
|
|
|
|
var tp=temp_url.lastIndexOf('/')
|
|
|
|
location.href = temp_url.substring(0,tp+1)+"merge/"+temp_url.substring(tp+1)
|
|
|
|
}
|
2019-11-01 09:22:59 +00:00
|
|
|
else if (temp_url.slice(-1)!='/'){
|
2019-11-01 09:21:17 +00:00
|
|
|
location.href = location.href + "merge"
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
location.href = location.href + "/merge"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2014-06-12 10:27:26 +00:00
|
|
|
<table class="table main-list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="span1"><%= t('personal_journal.year') %></th>
|
2014-06-25 13:43:04 +00:00
|
|
|
<th class="span7"><%= t('module_name.journal_paper') %></th>
|
2015-01-09 07:30:13 +00:00
|
|
|
<th class="span1"><%= t("personal_plugins.author") %></th>
|
2014-06-12 10:27:26 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="tbody_writing_journals" class="sort-holder">
|
2014-07-18 07:04:07 +00:00
|
|
|
<%= render 'writing_journal' %>
|
2014-06-12 10:27:26 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="bottomnav clearfix">
|
|
|
|
<div class="action pull-right">
|
2015-12-11 11:06:33 +00:00
|
|
|
<div class="dropup upload-button">
|
2019-11-01 09:21:17 +00:00
|
|
|
<button class="btn btn-primary" type="button" onclick="MergeUrl()">
|
2019-10-30 14:14:00 +00:00
|
|
|
<i class="far fa-object-group"></i>
|
2019-11-01 09:21:17 +00:00
|
|
|
<span class="group"></span><%= t('personal_journal.merge') %>
|
2019-10-30 14:14:00 +00:00
|
|
|
</button>
|
2015-12-11 11:06:33 +00:00
|
|
|
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
2019-11-01 09:21:17 +00:00
|
|
|
<i class="icon-upload-alt icon-white"></i><%= t('personal_journal.upload') %>
|
2015-12-11 11:06:33 +00:00
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu upload-box">
|
|
|
|
<form action="/admin/journal_papers/import_from_excel" method="post" enctype="multipart/form-data">
|
|
|
|
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
|
|
|
|
<input type="file" name="import_file" >
|
|
|
|
<button class="btn btn-primary" type="submit"><%= t(:submit) %></button>
|
|
|
|
<a class="" href="/admin/journal_papers/download_excel_format.xlsx">Download excel format</a>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:new_), new_admin_journal_paper_path, :class => 'btn btn-primary' %>
|
|
|
|
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), admin_writing_journal_setting_path, :class => 'btn btn-primary pull-right' %>
|
2014-06-12 10:27:26 +00:00
|
|
|
</div>
|
|
|
|
<div class="pagination pagination-centered">
|
2014-07-18 07:04:07 +00:00
|
|
|
<%= content_tag :div, paginate(@writing_journals), class: "pagination pagination-centered" %>
|
2014-06-12 10:27:26 +00:00
|
|
|
</div>
|
2015-12-11 11:06:33 +00:00
|
|
|
</div>
|
|
|
|
<% if params[:error] == "1" %>
|
|
|
|
<script type="text/javascript">
|
|
|
|
alert("File cannot be imported. File has more than 500 entries. Please seperate the entries in different files.");
|
|
|
|
window.location.href = "<%= admin_journal_papers_url %>"
|
|
|
|
</script>
|
|
|
|
<% end %>
|