active/app/views/admin/actives/_index.html.erb

45 lines
1.6 KiB
Plaintext
Raw Normal View History

2014-11-10 02:24:07 +00:00
<script>
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
</script>
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<% if f == 'act.sign_up_count' or f == 'act.export' %>
<th class='span2'><%= t(f)%></th>
<% else %>
<%= thead(f) %>
<% end %>
<% end %>
</tr>
</thead>
<tbody>
<% @acts.each do |act| %>
<tr>
<td><%= act.category.title %></td>
<td>
<a href="<%= page_for_act(act) %>?method=show_data" target="_blank"><%= act.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(act) %>
<li><a href="/admin/actives/<%=act.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/actives/<%=act.id.to_s%>"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td><%= Act.time_range(act.sign_start_date, act.sign_end_date) %></td>
<td><%= Act.time_range(act.act_start_date, act.act_end_date) %></td>
<td><a href="/admin/actives/<%=act.id.to_s%>/act_signup"><%= act.act_signups.count %></a></td>
<td><a href="/admin/actives/<%=act.id.to_s%>/export?format=xlsx" target="_blank"><%= t('act.export') %></a></td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@acts), class: "pagination pagination-centered"
end
%>