<% val = "" %>
<% names = @field_names[i].split(".") %>
<% if names[0] == "seminar_signup_field_set" %>
<% if names[1] == "name" %>
<% val = seminar_signup.name %>
<% 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 %>
<% 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 = html_escape(seminar_signup.seminar_signup_values.where(:key=>names[1]).first.get_value_by_locale(I18n.locale)).gsub(/(\r\n|\n)/,"
") rescue "" %>
<% elsif names[0] == "seminar_signup_contributes" %>
<% if names[1] == "file" %>
<% seminar_signup_contribute = @seminar_signup_contribute %>
<% description = seminar_signup_contribute.description.to_s %>
<% if @seminar.enable_summary_choice
if (seminar_signup_contribute.description.to_s.to_i.to_s == seminar_signup_contribute.description)
description = @seminar.summary_chioices[seminar_signup_contribute.description.to_i] rescue seminar_signup_contribute.description
else
description = seminar_signup_contribute.description.map{|i| @seminar.summary_chioices[i.to_i] rescue "" }.join("
") rescue seminar_signup_contribute.description
end
end %>
<% file_path = seminar_signup_contribute.file.path %>
<% file_title = (seminar_signup_contribute.title.blank? ? File.basename(seminar_signup_contribute.file.path) : seminar_signup_contribute.title) %>
<% filename = seminar_signup_contribute.disp_filename %>
<% file_url = seminar_signup_contribute.file.url %>
<% file_extname = File.extname(file_path) %>
<% if (file_extname.match(/pdf/i) rescue false) %>
<% val = "
" %>
<% elsif (file_extname.match(/(jpg|jpeg|png|gif|bmp)/i) rescue false) %>
<% val = "
" %>
<% else %>
<% file_content = File.read(file_path) rescue "" %>
<% if file_content.is_utf8? %>
<% file_content = html_escape(file_content).gsub(/(\r\n|\n)/,"
") %>
<% val = "
#{t(:download)}#{file_title}
#{file_content}
"%>
<% else %>
<% val = link_to( file_title, file_url , {:target => '_blank', :title => Nokogiri::HTML(description.gsub("
"," , ")).text, :download=>filename} ) if seminar_signup_contribute.file.file %>
<% end %>
<% end %>
<% else %>
<% if names[1] == "description" %>
<% description = @seminar_signup_contribute.send(names[1]) %>
<% if @seminar.enable_summary_choice
if (description.to_s.to_i.to_s == description)
description = @seminar.summary_chioices[description.to_i] rescue description
else
description = description.map{|i| @seminar.summary_chioices[i.to_i] rescue "" }.join("
") rescue description
end
end %>
<% val = description %>
<% else %>
<% val = @seminar_signup_contribute.send(names[1]).to_s %>
<% end %>
<% end %>
<% elsif names[0] == "seminar_submission_fields" %>
<% seminar_submission_field = seminar_signup.seminar_main.seminar_submission_fields.where(:key=>names[1]).first %>
<% if seminar_submission_field && seminar_submission_field.markup == "seminar_preferred_session"
seminar_submission_value = @seminar_signup_contribute.seminar_submission_values.where(:key=>names[1]).first
val = "
#{(html_escape(seminar_submission_value.get_value_by_locale(I18n.locale)).gsub(/(\r\n|\n)/,"
") rescue "")}"
else
val = html_escape(@seminar_signup_contribute.seminar_submission_values.where(:key=>names[1]).first.get_value_by_locale(I18n.locale)).gsub(/(\r\n|\n)/,"
") rescue ""
end %>
<% elsif names[0] == "seminar_signup" %>
<% val = (seminar_signup.send("display_"+names[1]) rescue seminar_signup.send(names[1])) rescue nil %>
<% elsif names[0] == "seminar_review_result" %>
<% val = @seminar_signup_contribute.send(names[1]) rescue "" %>
<% end %>
<%= val.html_safe %>