Application_Form/app/views/application_forms/show_data.html.erb

94 lines
4.0 KiB
Plaintext
Raw Normal View History

2022-03-10 02:11:18 +00:00
<% # encoding: utf-8 %>
<% @@session = session %>
<%= yield %>
<%
data = action_data
no_close = data["no_close"]
@application_form = data["application_form"]
@sign_up = data["sign_up"]
@sign_up_time_range = data["sign_up_time_range"]
@application_form_time_range = data["application_form_time_range"]
@contribute_time_range = data["contribute_time_range"]
@contribute_action = data["contribute_action"]
%>
<table class="table table-striped application_formive-show-table">
<tbody >
<tr>
<th class="application_formive-title-field"><%= t(:category) %></th>
<td class="application_formive-title-value"><%= @application_form.category.title %></td>
</tr>
<tr>
<th class="application_formive-title-field"><i class="fa fa-calendar fa-fw"></i><%= t('application_form.event_during') %></th>
<td class="application_formive-title-value"><%= @application_form_time_range %></td>
</tr>
<tr>
<th class="application_formive-title-field"><%= t('application_form.title') %></th>
<td class="application_formive-title-value"><%= @application_form.title %></td>
</tr>
<% if !@application_form.speaker.blank? %>
<tr>
<th class="application_formive-title-field"><%= t('application_form.speaker') %></th>
<td class="application_formive-title-value"><%= @application_form.speaker %></td>
</tr>
<% end %>
<% if !@application_form.content.blank? %>
<tr>
<th class="application_formive-title-field"><%= t('application_form.content') %></th>
<td class="application_formive-title-value"><%= nl2br(@application_form.content) %></td>
</tr>
<% end %>
<tr>
<th class="application_formive-title-field"><i class="fa fa-calendar fa-fw"></i><%= t('application_form.signup_during') %></th>
<td class="application_formive-title-value"><%= @sign_up_time_range %></td>
</tr>
<% if !@contribute_time_range.blank? %>
<tr>
<th class="application_formive-title-field"><i class="fa fa-calendar fa-fw"></i><%= t('application_form.contribute_during') %></th>
<td class="application_formive-title-value"><%= @contribute_time_range %></td>
</tr>
<% end %>
<tr>
<th class="application_formive-title-field"><%= t('application_form.signup') %></th>
<td class="application_formive-title-value"><%= @sign_up %><br /><%= @contribute_action %></td>
</tr>
<% if !@application_form.act_place.blank? %>
<tr>
<th class="application_formive-title-field"><i class="icon-flag"></i><%= t('application_form.act_place') %></th>
<td class="application_formive-title-value"><%= @application_form.act_place %></td>
</tr>
<% end %>
<% if !@application_form.application_form_files.blank? %>
<tr>
<th class="application_formive-title-field"><i class="fa fa-fw fa-paperclip"></i><%= t(:file_) %></th>
<td class="application_formive-title-value">
<% @application_form.application_form_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 !@application_form.application_form_links.blank? %>
<tr>
<th class="application_formive-title-field"><i class="fa fa-fw fa-link"></i><%= t(:link) %></th>
<td class="application_formive-title-value">
<% @application_form.application_form_links.map do |link| %>
<%= link_to (link.title.blank? ? link.url : link.title), link.url, :target => '_blank' %>
<% end %>
</td>
</tr>
<% end %>
<% @application_form.application_form_item_contents.asc(:_id).each do |item_content| %>
<tr>
<th class="application_formive-title-field"><%= item_content.application_form_item.title %></th>
<td class="application_formive-title-value"><%= item_content.content.html_safe %></td>
</tr>
<% end %>
</tbody>
</table>
<br />
<% if !no_close%>
<%= link_to t(:close), 'javascript:window.close();', :class => 'btn btn-primary' %>
<% end %>