academic_advising/app/views/admin/academic_advisings/index.html.erb

43 lines
2.0 KiB
Plaintext
Raw Normal View History

2014-07-02 09:37:34 +00:00
<table class="table main-list">
<thead>
<tr>
2021-02-07 14:56:22 +00:00
<th class="span3"><%= t('academic_advising.year') %></th>
<th class="span3"><%= t('academic_advising.award_name') %></th>
<th class="span3"><%= t('academic_advising.awarding_unit') %></th>
<th class="span3"><%= t('academic_advising.academic_advisingee') %></th>
2014-07-02 09:37:34 +00:00
</tr>
</thead>
<tbody id="tbody_experiences" class="sort-holder">
2021-02-07 14:56:22 +00:00
<%= render 'academic_advising' %>
2014-07-02 09:37:34 +00:00
</tbody>
</table>
<div class="bottomnav clearfix">
<div class="action pull-right">
2015-12-14 07:18:27 +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">
2021-02-07 14:56:22 +00:00
<form action="/admin/academic_advisings/import_from_excel" method="post" enctype="multipart/form-data">
2015-12-14 07:18:27 +00:00
<%= hidden_field_tag :authenticity_token, form_authenticity_token %>
<input type="file" name="import_file" >
<button class="btn btn-primary" type="submit"><%= t(:submit) %></button>
2021-02-07 14:56:22 +00:00
<a class="" href="/admin/academic_advisings/download_excel_format.xlsx">Download excel format</a>
2015-12-14 07:18:27 +00:00
</form>
</div>
</div>
2021-02-07 14:56:22 +00:00
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:new_), new_admin_academic_advising_path, :class => 'btn btn-primary' %>
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), admin_academic_advising_setting_path, :class => 'btn btn-primary pull-right' %>
2014-07-02 09:37:34 +00:00
</div>
<div class="pagination pagination-centered">
2021-02-07 14:56:22 +00:00
<%= content_tag :div, paginate(@academic_advisings), class: "pagination pagination-centered" %>
2014-07-02 09:37:34 +00:00
</div>
2015-12-14 07:18:27 +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.");
2021-02-07 14:56:22 +00:00
window.location.href = "<%= admin_academic_advisings_url %>"
2015-12-14 07:18:27 +00:00
</script>
<% end %>