<% @field_names.each_with_index do |fn,i|%>
<% next unless @display_field.include?(fn) %>
<% names = fn.split(".") %>
<% val = "" %>
<% if names[0] == "seminar_signup_field_set" %>
<% if names[1] == "name" %>
<% val = seminar_signup.name
val += ""
%>
<% elsif names[1] == 'status' %>
<% val = t("seminar.registration_status_#{seminar_signup.status}") if !seminar_signup.status.blank? %>
<% elsif names[1] != 'recaptcha' %>
<% val = seminar_signup.send("#{names[1]}") %>
<% end %>
<% elsif names[0] == "default" %>
<% if names[2] == "name" %>
<% val = seminar_signup.name
val += ""
%>
<% elsif names[2] == "tel" %>
<% val = seminar_signup.tel %>
<% elsif names[2] == "registration_status" %>
<% val = t("seminar.registration_status_#{seminar_signup.status}") if !seminar_signup.status.blank? %>
<% end %>
<% elsif names[0] == "seminar_signup_field_custom" || names[0] == "seminar_signup_fields" %>
<% val = seminar_signup.seminar_signup_values.where(:key=>names[1]).first.get_value_by_locale(I18n.locale) rescue "" %>
<% elsif names[0] == "seminar_signup_contributes" %>
<% if names[1] == "file" %>
<% val = seminar_signup.seminar_signup_contributes.to_a %>
<% else %>
<% val = seminar_signup.seminar_signup_contributes.collect{|s| s.send(names[1])} %>
<% end %>
<% elsif names[0] == "seminar_submission_fields" %>
<% val = seminar_signup.seminar_signup_contributes.collect{|s| (s.seminar_submission_values.where(:key=>names[1]).first.get_value_by_locale(I18n.locale) rescue "")} %>
<% end %>
<% vals << val %>
<% end %>
<% count = 0 %>
<% indices = [] %>
<% vals.each_with_index do |val,i| %>
<% if val.class == Array %>
<% count = val.count - 1 %>
<% indices << i%>
<% if val[0].class == SeminarSignupContribute #File %>
<% seminar_signup_contribute = val[0] %>
<%= link_to (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) , seminar_signup_contribute.file.url, {:target => '_blank', :title => Nokogiri::HTML(seminar_signup_contribute.description).text} if seminar_signup_contribute.file.file %>
<% else %>
<%= val[0].html_safe.to_s rescue "" %>
<% end %>
|
<% else %>
><%= val.to_s.html_safe %> |
<% end %>
<% end %>
<% (0...count).each do |i|%>