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

56 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

2014-11-10 02:24:07 +00:00
<script>
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
</script>
2021-08-10 01:40:26 +00:00
<style type="text/css">
.expired{
color: #BE2E2E;
}
</style>
2014-11-10 02:24:07 +00:00
<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>
2021-08-10 01:40:26 +00:00
<%= act.category.title %>
</td>
<td>
<% if act.expired? %>
<span class='label'><%= t(:expired) %></span>
<% end %>
2024-04-18 12:23:56 +00:00
<a href="<%= page_for_act(act) %>?method=show_data" target="_blank"><%= act.title.html_safe %></a>
2014-11-10 02:24:07 +00:00
<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>
2021-08-10 01:40:26 +00:00
<td><%= format_value(act.postdate,'yyyy-MM-dd') %></td>
<td class="<%= act.expired? ? "expired" : "" %>"><%= format_value(act.end_date,'yyyy-MM-dd') %></td>
2014-11-10 02:24:07 +00:00
<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
%>