active/app/views/actives/show_data.html.erb

78 lines
2.6 KiB
Plaintext

<% # encoding: utf-8 %>
<%
data = action_data
@act = data["act"]
@sign_up = data["sign_up"]
@sign_up_time_range = data["sign_up_time_range"]
@act_time_range = data["act_time_range"]
%>
<table class="table table-striped active-show-table">
<tbody >
<tr>
<th class="active-title-field"><%= t(:category) %></th>
<td class="active-title-value"><%= @act.category.title %></td>
</tr>
<tr>
<th class="active-title-field"><i class="fa fa-calendar fa-fw"></i><%= t('act.act_time_range') %></th>
<td class="active-title-value"><%= @act_time_range %></td>
</tr>
<tr>
<th class="active-title-field"><%= t('act.title') %></th>
<td class="active-title-value"><%= @act.title %></td>
</tr>
<% if !@act.content.blank? %>
<tr>
<th class="active-title-field"><%= t('act.content') %></th>
<td class="active-title-value"><%= nl2br(@act.content) %></td>
</tr>
<% end %>
<tr>
<th class="active-title-field"><i class="fa fa-calendar fa-fw"></i><%= t('act.sign_up_time_range') %></th>
<td class="active-title-value"><%= @sign_up_time_range %></td>
</tr>
<% if !@act.place.blank? %>
<tr>
<th class="active-title-field"><i class="icon-flag"></i><%= t('act.place') %></th>
<td class="active-title-value"><%= @act.place %></td>
</tr>
<% end %>
<% if !@act.act_files.blank? %>
<tr>
<th class="active-title-field"><i class="fa fa-fw fa-paperclip"></i><%= t(:file_) %></th>
<td class="active-title-value">
<% @act.act_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 !@act.act_links.blank? %>
<tr>
<th class="active-title-field"><i class="fa fa-fw fa-link"></i><%= t(:link) %></th>
<td class="active-title-value">
<% @act.act_links.map do |link| %>
<%= link_to (link.title.blank? ? link.url : link.title), link.url, :target => '_blank' %>
<% end %>
</td>
</tr>
<% end %>
<% if !@act.note.blank? %>
<tr>
<th class="active-title-field"><%= t('act.note') %></th>
<td class="active-title-value"><%= @act.note %></td>
</tr>
<% end %>
<tr>
<th class="active-title-field"><%= t('act.sign_up') %></th>
<td class="active-title-value"><%= @sign_up %></td>
</tr>
</tbody>
</table>
<br />
<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>