seminar/app/views/admin/seminars/_index.html.erb

47 lines
1.9 KiB
Plaintext

<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 == 'seminar.title' %>
<th class='span4'><%= t(f)%></th>
<% else %>
<%= thead(f) %>
<% end %>
<% end %>
</tr>
</thead>
<tbody>
<% @seminars.each do |seminar| %>
<tr>
<td><%= seminar.category.title %></td>
<td>
<a href="<%= page_for_seminar(seminar) %>?method=show_data" target="_blank"><%= seminar.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(seminar) %>
<li><a href="/admin/seminars/<%=seminar.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="<%= admin_seminar_item_contents_path(:seminar_main_id=>seminar.id.to_s) %>"><%= t('seminar.set_seminar_item_content') %></a></li>
<li><a href="/admin/seminars/<%=seminar.id.to_s%>/seminar_signup_field"><%= t('seminar.set_seminar_signup_field') %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/seminars/<%=seminar.id.to_s%>"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td><%= SeminarMain.time_range(seminar.seminar_start_date, seminar.seminar_end_date) %></td>
<td><%= SeminarMain.time_range(seminar.signup_start_date, seminar.signup_end_date) %></td>
<td><a href="/admin/seminars/<%=seminar.id.to_s%>/seminar_signup"><%= seminar.seminar_signups.count %></a></td>
<td><a href="/admin/seminars/<%=seminar.id.to_s%>/export?format=xlsx" target="_blank"><%= t('seminar.export') %></a></td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@seminars), class: "pagination pagination-centered"
end
%>