73 lines
2.9 KiB
Plaintext
73 lines
2.9 KiB
Plaintext
|
<% # encoding: utf-8 %>
|
||
|
<% @@session = session %>
|
||
|
<%= yield %>
|
||
|
<%
|
||
|
data = action_data
|
||
|
@venue_management = data["venue_management"]
|
||
|
@venue_management_signup = data["venue_management_signup"]
|
||
|
@time_now = data["time_now"]
|
||
|
%>
|
||
|
<% if @venue_management.contribute_start_date <= @time_now and ( @venue_management.contribute_end_date.nil? or @venue_management.contribute_end_date+1 >= @time_now ) %>
|
||
|
|
||
|
<% if !session[:venue_management_signup_id].blank? %>
|
||
|
|
||
|
<a href="<%= OrbitHelper.url_to_show(@venue_management.to_param) %>?method=con_logout&con_no=<%= @venue_management.id %>" class='btn btn-primary'><%= t('venue_management_signup.logout') %></a>
|
||
|
|
||
|
<table class="table table-hover table-striped venue_management-index">
|
||
|
<caption>
|
||
|
<h3><%= @venue_management.title %></h3>
|
||
|
</caption>
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th class="col-md-2"><%= t('venue_management_signup.file_name') %></th>
|
||
|
<th class="col-md-2"><%= t('venue_management_signup.file_note') %></th>
|
||
|
<th class="col-md-2"><%= t('venue_management_signup.files') %></th>
|
||
|
<th class="col-md-2"><%= t(:action) %></th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<%
|
||
|
@venue_management_signup.venue_management_signup_contributes.each do |venue_management_signup_contribute|
|
||
|
%>
|
||
|
<tr>
|
||
|
<td><%= venue_management_signup_contribute.title %></td>
|
||
|
<td><%= venue_management_signup_contribute.description.to_s.html_safe %></td>
|
||
|
<td><%= link_to File.basename(venue_management_signup_contribute.file.path), venue_management_signup_contribute.file.url, {:target => '_blank', :title => Nokogiri::HTML(venue_management_signup_contribute.description).text} if venue_management_signup_contribute.file.file %></td>
|
||
|
<td>
|
||
|
<%= link_to t(:edit), OrbitHelper.url_to_show(@venue_management.to_param) + '?method=edit_file&con_no=' + venue_management_signup_contribute.id, :class => 'btn btn-primary' %>
|
||
|
<form method="post" action="<%= del_file_venue_managements_path %>">
|
||
|
<%= submit_tag t(:delete_), class: "btn btn-primary" %>
|
||
|
<input type="hidden" name="referer_url" value="<%= request.original_url.split(request.env["HTTP_HOST"]).last.split('?').first %>">
|
||
|
<input type="hidden" name="con_no" value="<%= venue_management_signup_contribute.id %>">
|
||
|
</form>
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
<% if ( @venue_management.contribute_file_count.blank? or @venue_management_signup.venue_management_signup_contributes.count < @venue_management.contribute_file_count.to_i ) %>
|
||
|
|
||
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') +' '+ t('new_'), OrbitHelper.url_to_show(@venue_management.to_param) + '?method=add_file', :class => 'btn btn-primary' %>
|
||
|
|
||
|
<% end %>
|
||
|
<br />
|
||
|
<br />
|
||
|
<!-- 檔案上限: <%#= @venue_management.contribute_file_count.blank? ? '無' : @venue_management.contribute_file_count %> -->
|
||
|
|
||
|
<% else %>
|
||
|
|
||
|
請先登入
|
||
|
<br />
|
||
|
<a href="<%= page_for_venue_management_url %>">回列表頁</a>
|
||
|
|
||
|
<% end %>
|
||
|
|
||
|
<% else %>
|
||
|
|
||
|
已截止
|
||
|
|
||
|
<% end %>
|
||
|
|