venue_management/app/views/admin/venue_managements/_index.html.erb

50 lines
2.5 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 == 'venue_management.title' %>
<th class='span4'><%= t(f)%></th>
<% else %>
<%= thead(f) %>
<% end %>
<% end %>
</tr>
</thead>
<tbody>
<% @venue_managements.each do |venue_management| %>
<tr>
<td><%= venue_management.category.title %></td>
<td>
<a href="<%= page_for_venue_management(venue_management) %>?method=show_data" target="_blank"><%= venue_management.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(venue_management) %>
<li><a href="/admin/venue_managements/<%=venue_management.id.to_s%>/edit"><%= t(:edit) %></a></li>
<li><a href="<%= admin_venue_management_item_contents_path(:venue_management_main_id=>venue_management.id.to_s) %>"><%= t('venue_management.set_venue_management_item_content') %></a></li>
<li><a href="/admin/venue_managements/<%=venue_management.id.to_s%>/venue_management_signup_field"><%= t('venue_management.set_venue_management_signup_field') %></a></li>
<li><a href="/admin/venue_managements/<%=venue_management.id.to_s%>/venue_management_submission_field"><%= t('venue_management.set_venue_management_submission_field') %></a></li>
<li><a href="#" class="delete text-error" rel="/admin/venue_managements/<%=venue_management.id.to_s%>"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td><%= VenueManagementMain.time_range(venue_management.venue_management_start_date, venue_management.venue_management_end_date) %></td>
<td><%= VenueManagementMain.time_range(venue_management.signup_start_date, venue_management.signup_end_date) %></td>
<td><a href="/admin/venue_managements/<%=venue_management.id.to_s%>/venue_management_signup"><%= venue_management.venue_management_signups.count %></a></td>
<td><a href="#">0</a></td>
<td><a href="#">0</a></td>
<td><a href="/admin/venue_managements/<%=venue_management.id.to_s%>/export?format=xlsx" target="_blank"><%= t('venue_management.export') %></a></td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@venue_managements), class: "pagination pagination-centered"
end
%>