2014-07-04 07:18:31 +00:00
|
|
|
<table class="table main-list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="span1"><%= t('personal_research.year') %></th>
|
|
|
|
<th class="span1"><%= t('personal_research.publication_date') %></th>
|
|
|
|
<th class="span5"><%= t('personal_research.research_title') %></th>
|
|
|
|
<th class="span3"><%= t('users.name') %></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="tbody_researchs" class="sort-holder">
|
2014-07-18 07:06:41 +00:00
|
|
|
<%= render 'research' %>
|
2014-07-04 07:18:31 +00:00
|
|
|
</tbody>
|
2014-07-18 07:06:41 +00:00
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="bottomnav clearfix">
|
2015-01-20 06:47:46 +00:00
|
|
|
<div class="action pull-right">
|
2015-12-14 11:49:14 +00:00
|
|
|
<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/researchs/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/researchs/download_excel_format.xlsx">Download excel format</a>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-01-20 06:47:46 +00:00
|
|
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:new_), new_admin_research_path, :class => 'btn btn-primary' %>
|
|
|
|
</div>
|
2014-07-18 07:06:41 +00:00
|
|
|
<div class="pagination pagination-centered">
|
|
|
|
<%= content_tag :div, paginate(@researchs), class: "pagination pagination-centered" %>
|
|
|
|
</div>
|
2015-12-14 11:49:14 +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_researchs_url %>"
|
|
|
|
</script>
|
|
|
|
<% end %>
|