venue_management/app/views/venue_managements/show_data.html.erb

93 lines
4.0 KiB
Plaintext
Raw Permalink Normal View History

2020-05-07 15:26:34 +00:00
<% # encoding: utf-8 %>
<% @@session = session %>
<%= yield %>
<%
data = action_data
@venue_management = data["venue_management"]
@sign_up = data["sign_up"]
@sign_up_time_range = data["sign_up_time_range"]
@venue_management_time_range = data["venue_management_time_range"]
@contribute_time_range = data["contribute_time_range"]
@contribute_action = data["contribute_action"]
%>
<table class="table table-striped venue_managementive-show-table">
<tbody >
<tr>
<th class="venue_managementive-title-field"><%= t(:category) %></th>
<td class="venue_managementive-title-value"><%= @venue_management.category.title %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><i class="fa fa-calendar fa-fw"></i><%= t('venue_management.event_during') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_time_range %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('venue_management.title') %></th>
<td class="venue_managementive-title-value"><%= @venue_management.title %></td>
</tr>
<% if !@venue_management.speaker.blank? %>
<tr>
<th class="venue_managementive-title-field"><%= t('venue_management.speaker') %></th>
<td class="venue_managementive-title-value"><%= @venue_management.speaker %></td>
</tr>
<% end %>
<% if !@venue_management.content.blank? %>
<tr>
<th class="venue_managementive-title-field"><%= t('venue_management.content') %></th>
<td class="venue_managementive-title-value"><%= nl2br(@venue_management.content) %></td>
</tr>
<% end %>
<tr>
<th class="venue_managementive-title-field"><i class="fa fa-calendar fa-fw"></i><%= t('venue_management.signup_during') %></th>
<td class="venue_managementive-title-value"><%= @sign_up_time_range %></td>
</tr>
<% if !@contribute_time_range.blank? %>
<tr>
<th class="venue_managementive-title-field"><i class="fa fa-calendar fa-fw"></i><%= t('venue_management.contribute_during') %></th>
<td class="venue_managementive-title-value"><%= @contribute_time_range %></td>
</tr>
<% end %>
<tr>
<th class="venue_managementive-title-field"><%= t('venue_management.signup') %></th>
<td class="venue_managementive-title-value"><%= @sign_up %><br /><%= @contribute_action %></td>
</tr>
<% if !@venue_management.act_place.blank? %>
<tr>
<th class="venue_managementive-title-field"><i class="icon-flag"></i><%= t('venue_management.act_place') %></th>
<td class="venue_managementive-title-value"><%= @venue_management.act_place %></td>
</tr>
<% end %>
<% if !@venue_management.venue_management_files.blank? %>
<tr>
<th class="venue_managementive-title-field"><i class="fa fa-fw fa-paperclip"></i><%= t(:file_) %></th>
<td class="venue_managementive-title-value">
<% @venue_management.venue_management_files.map do |file| %>
<%= link_to (file.title.blank? ? File.basename(file.file.path) : file.title) , file.file.url, {:target => '_blank', :title => file.description} if file.file.file %>
<% end %>
</td>
</tr>
<% end %>
<% if !@venue_management.venue_management_links.blank? %>
<tr>
<th class="venue_managementive-title-field"><i class="fa fa-fw fa-link"></i><%= t(:link) %></th>
<td class="venue_managementive-title-value">
<% @venue_management.venue_management_links.map do |link| %>
<%= link_to (link.title.blank? ? link.url : link.title), link.url, :target => '_blank' %>
<% end %>
</td>
</tr>
<% end %>
<% @venue_management.venue_management_item_contents.asc(:_id).each do |item_content| %>
<tr>
<th class="venue_managementive-title-field"><%= item_content.venue_management_item.title %></th>
<td class="venue_managementive-title-value"><%= item_content.content.html_safe %></td>
</tr>
<% end %>
</tbody>
</table>
<br />
<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>