2020-05-07 15:26:34 +00:00
<% # encoding: utf-8 %>
<%
data = action_data
@venue_managements = data["venue_managements"]
@total_pages = data["total_pages"]
@time_now = data["time_now"]
%>
<table class="table table-hover table-striped venue_management-index">
<caption>
<h3><%= t('venue_management.venue_management') %></h3>
</caption>
<thead>
<tr>
<th class="col-md-2"><%= t(:category) %></th>
2020-11-12 13:51:31 +00:00
<th class="col-md-2"><%= t('vm_inviting.type') %></th>
2020-05-07 15:26:34 +00:00
<th class="col-md-3"><%= t('venue_management.title') %></th>
2020-11-12 13:51:31 +00:00
<th class="col-md-3"><%= t('venue_management.contractor') %></th>
<th class="col-md-3"><%= t('venue_management.event_during') %></th>
<th class="col-md-3"><%= t('venue_management.signup_during') %></th>
2020-05-07 15:26:34 +00:00
</tr>
</thead>
<tbody>
<%
@venue_managements.each do |venue_management|
if !venue_management.registration_status.blank? and venue_management.signup_start_date <= @time_now and ( venue_management.signup_end_date.nil? or venue_management.signup_end_date+1 >= @time_now )
sign_up = ('<a href="'+ OrbitHelper.url_to_show(venue_management.to_param) + '" target="_blank">' + t('venue_management.signup') + '</a>').html_safe
elsif venue_management.registration_status.blank?
sign_up = t('venue_management.sign_up_not_open')
elsif venue_management.signup_start_date > @time_now
sign_up = t('venue_management.sign_up_not_yet')
else
sign_up = t('venue_management.sign_up_overdue')
end
%>
<tr>
2020-11-12 13:51:31 +00:00
<td><%= venue_management.category.title %></td>
<td><%= venue_management.display_tags %></td>
<td>
<a href="<%= page_for_venue_management(venue_management) %>?method=show_data" target="_blank"><%= venue_management.title %></a>
</td>
<td><%= venue_management.display_contractors %></td>
<td><%= venue_management.display_event_during %></td>
<td><%= venue_management.display_signup_during %></td>
</tr>
2020-05-07 15:26:34 +00:00
<% end %>
</tbody>
</table>
<%= create_pagination(@total_pages).html_safe if @total_pages > 1 %>