seminar/app/views/seminars/con_email_contents.html.erb

47 lines
1.5 KiB
Plaintext

<style>
.signup_infos td:first-child {
white-space: nowrap;
}
</style>
<%
data2 = @seminar.seminar_submission_field_sets.select{|v| v.field_name=='description'}[0]
show2 = !(data2.disabled) rescue false
name2 = data2['name'][I18n.locale]
description = ""
if show2
description = @con.description.to_s
if @seminar.enable_summary_choice
if (@con.description.to_s.to_i.to_s == @con.description)
description = @seminar.summary_chioices[@con.description.to_i] rescue @con.description
else
description = @con.description.map{|i| @seminar.summary_chioices[i.to_i] rescue "" }.join("<br>") rescue @con.description
end
end
end
seminar_submission_fields = @seminar.seminar_submission_fields.where(:disabled=>false).asc(:sort_number, :_id)
%>
<h3><%= @seminar.title rescue nil %></h3>
<table id="signup_infos">
<tbody>
<tr>
<td>
<%= I18n.t('seminar_signup.file_name') %>:&nbsp;
</td>
<td>
<a href="<%= @host_url %><%= @con.file.url %>" target="_blank" download="<%= @con.disp_filename %>"><%= @con.disp_filename %></a>
</td>
</tr>
<% if show2 %>
<tr>
<td><%= name2.present? ? "#{name2}:" : '' %>&nbsp;</td>
<td><%= description.html_safe %></td>
</tr>
<% end %>
<% seminar_submission_fields.each do |sf| %>
<tr>
<td><%= sf.title.present? ? "#{sf.title}:" : '' %>&nbsp;</td>
<td><%= sf.seminar_submission_values.where(:seminar_signup_contribute_id=>@con.id).first.get_value_by_locale(I18n.locale) rescue "" %></td>
</tr>
<% end %>
</tbody>
</table>