2020-02-04 09:35:19 +00:00
|
|
|
<script src="https://kit.fontawesome.com/1fa49cfdc9.js" crossorigin="anonymous"></script>
|
|
|
|
<table class="table main-list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="span1"><%= t("personal_activity.participant") %></th>
|
|
|
|
<th class="span1"><%= t("personal_activity.year") %></th>
|
2020-04-01 08:02:23 +00:00
|
|
|
<th class="span5"><%= t("personal_activity.activity_name") %></th>
|
|
|
|
<th class="span1"><%= t("personal_activity.activity_organizer") %></th>
|
2020-02-04 09:35:19 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="tbody_activity" class="sort-holder">
|
|
|
|
<%= render 'activity' %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="bottomnav clearfix">
|
2020-02-06 05:45:12 +00:00
|
|
|
|
|
|
|
<!-- buttons -->
|
|
|
|
<div class="action pull-right">
|
2020-02-06 09:53:44 +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><%= t('personal_activity.upload') %>
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<div class="dropdown-menu upload-box">
|
2020-02-10 07:25:48 +00:00
|
|
|
<form action="/admin/activities/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/activities/download_excel_format.xlsx">Download excel format</a>
|
|
|
|
</form>
|
2020-02-06 09:53:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-06 05:45:12 +00:00
|
|
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:new_), new_admin_activity_path, :class => 'btn btn-primary' %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- pagination -->
|
2020-02-04 09:35:19 +00:00
|
|
|
<div class="pagination pagination-centered">
|
|
|
|
<%= content_tag :div, paginate(@activities), class: "pagination pagination-centered" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-10 07:25:48 +00:00
|
|
|
|
|
|
|
<% 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_activities_url %>"
|
|
|
|
</script>
|
|
|
|
<% end %>
|