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

48 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

<% # encoding: utf-8 %>
<% @@session = session %>
<%= yield %>
<%
data = action_data
@venue_management_memorabilia = data["venue_management_memorabilia"]
@params = data['params']
%>
<table class="table table-striped venue_managementive-show-table">
<tbody>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_memorabilia.case_no') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_memorabilia.case_no %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_memorabilia.event_date') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_memorabilia.event_date %></td>
</tr>
<tr>
<th class="venue_managementive-title-field"><%= t('vm_memorabilia.details') %></th>
<td class="venue_managementive-title-value"><%= @venue_management_memorabilia.details.to_s.html_safe %></td>
</tr>
<% if !@venue_management_memorabilia.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_memorabilia.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_memorabilia.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_memorabilia.venue_management_links.map do |link| %>
<%= link_to (link.title.blank? ? link.url : link.title), link.url, :target => '_blank' %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<br />
<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>