2019-11-10 16:13:52 +00:00
|
|
|
<script src="https://kit.fontawesome.com/1fa49cfdc9.js" crossorigin="anonymous"></script>
|
|
|
|
<script>
|
|
|
|
function MergeUrl(){
|
2019-11-16 05:52:49 +00:00
|
|
|
location.href = '<%= merge_admin_books_path %>'
|
2019-11-10 16:13:52 +00:00
|
|
|
}
|
|
|
|
</script>
|
2014-07-03 07:48:28 +00:00
|
|
|
<table class="table main-list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="span1"><%= t("personal_book.year") %></th>
|
|
|
|
<th class="span7"><%= t("personal_book.book_title") %></th>
|
|
|
|
<th class="span1"><%= t("personal_plugins.author") %></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="tbody_writing_books" class="sort-holder">
|
2014-07-18 06:29:33 +00:00
|
|
|
<%= render 'writing_book' %>
|
2014-07-03 07:48:28 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="bottomnav clearfix">
|
|
|
|
<div class="action pull-right">
|
2015-12-15 10:08:07 +00:00
|
|
|
<div class="dropup upload-button">
|
2019-11-10 16:13:52 +00:00
|
|
|
<button class="btn btn-primary" type="button" onclick="MergeUrl()">
|
|
|
|
<i class="far fa-object-group"></i>
|
|
|
|
<span class="group"></span><%= t('personal_book.merge') %>
|
|
|
|
</button>
|
2015-12-15 10:08:07 +00:00
|
|
|
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
2019-11-10 16:13:52 +00:00
|
|
|
<i class="icon-upload-alt icon-white"></i><%= t('personal_book.upload') %>
|
2015-12-15 10:08:07 +00:00
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu upload-box">
|
|
|
|
<form action="/admin/books/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/books/download_excel_format.xlsx">Download excel format</a>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-01-20 06:43:01 +00:00
|
|
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:new_), new_admin_book_path, :class => 'btn btn-primary' %>
|
2014-07-31 13:51:25 +00:00
|
|
|
<% if current_user.is_admin? %>
|
|
|
|
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), admin_book_setting_path, :class => 'btn btn-primary pull-right' %>
|
|
|
|
<% end %>
|
2014-07-03 07:48:28 +00:00
|
|
|
</div>
|
2014-07-18 06:29:33 +00:00
|
|
|
<div class="pagination pagination-centered">
|
|
|
|
<%= content_tag :div, paginate(@writing_books), class: "pagination pagination-centered" %>
|
|
|
|
</div>
|
2015-12-15 10:08:07 +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_books_url %>"
|
|
|
|
</script>
|
|
|
|
<% end %>
|