43 lines
1.8 KiB
Plaintext
43 lines
1.8 KiB
Plaintext
<table class="table main-list">
|
|
<thead>
|
|
<tr>
|
|
<th class="span1"><%= t(:category) %></th>
|
|
<th class="span1"><%= t('personal_writing.year') %></th>
|
|
<th class="span1"><%= t('personal_writing.month') %></th>
|
|
<th class="span3"><%= t('module_name.personal_writing') %></th>
|
|
<th class="span1"><%= t('users.name') %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="tbody_writings" class="sort-holder">
|
|
<%= render 'writing' %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="bottomnav clearfix">
|
|
<div class="action pull-right">
|
|
<div class="dropup upload-button">
|
|
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
|
|
<i class="icon-upload-alt icon-white"></i>上傳
|
|
<span class="caret"></span>
|
|
</button>
|
|
<div class="dropdown-menu upload-box">
|
|
<form action="/admin/writings/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/writings/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_writing_path, :class => 'btn btn-primary' %>
|
|
</div>
|
|
<div class="pagination pagination-centered">
|
|
<%= content_tag :div, paginate(@writings), class: "pagination pagination-centered" %>
|
|
</div>
|
|
</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_writings_url %>"
|
|
</script>
|
|
<% end %> |