<% render :partial => "get_display_fields" %> <% if @seminar.nil? %> <% end %> <% if @drag%> <% end %> <% @field_name_translations = @field_name_translations.map.with_index{|trans,i| [@field_names[i], trans]}.to_h %> <% @display_field.each do |field_name| %> <% end %> > <% display_title = @seminar.nil? %> <% @seminar_signups.each do |seminar_signup| %> <% @seminar = seminar_signup.seminar_main if display_title %> <% vals = [] %> <% edit_urls = {} %> <% contribute_ids = seminar_signup.seminar_signup_contribute_ids.map{|id| id.to_s} %> <% @append_contribute_ids = @append_contribute_ids.to_a @remove_contribute_ids = @remove_contribute_ids.to_a %> <% intersection_contribute_ids = @append_contribute_ids & contribute_ids rescue [] %> <% if intersection_contribute_ids.count != 0 contribute_ids = intersection_contribute_ids else if @preferred_sessions contribute_ids = seminar_signup.seminar_signup_contributes.any_of({:preferred_session.in=>@preferred_sessions,:final_session=>nil},{:final_session.in=>@preferred_sessions}).pluck(:id).map{|id| id.to_s} end end %> <% contribute_ids = contribute_ids - @remove_contribute_ids seminar_signup_contributes = seminar_signup.seminar_signup_contributes.where(:id.in=>contribute_ids).sort_ordered.to_a contribute_ids = seminar_signup_contributes.map{|s| s.id} %> <% if @drag%> <% end %> <% vals << seminar_signup.seminar_main.title if display_title %> <% @display_field.each_with_index do |fn,i|%> <% 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] == 'is_confirmed' %> <% if seminar_signup.is_confirmed val = "#{t("seminar_signup.email_confirmed")}(#{seminar_signup.signup_confirmed_counter.to_s})" else val = "#{t("seminar_signup.email_not_confirmed")}" end %> <% elsif names[1] == 'signup_confirmed' %> <% if seminar_signup.signup_confirmed val = "#{t("seminar_signup.signup_confirmed")}" else val = "#{t("seminar_signup.signup_not_confirmed")}" end %> <% elsif names[1] == 'signup_confirmed_date' %> <% val = seminar_signup.signup_confirmed_date.strftime("%Y/%m/%d %H:%M") rescue "" %> <% elsif names[1] == 'is_confirmed_date' %> <% val = seminar_signup.is_confirmed_date.strftime("%Y/%m/%d %H:%M") rescue "" %> <% 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 = 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" %> <% val = seminar_signup_contributes %> <% else %> <% if names[1] == "description" %> <% descriptions = seminar_signup_contributes.collect{|s| s.send(names[1])} %> <% if @seminar.enable_summary_choice descriptions = descriptions.map do |description| 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 end %> <% val = descriptions %> <% else %> <% val = seminar_signup_contributes.collect{|s| s.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" val = seminar_signup_contributes.collect{|s| seminar_submission_value = s.seminar_submission_values.where(:key=>names[1]).first "#{(html_escape(seminar_submission_value.get_value_by_locale(I18n.locale)).gsub(/(\r\n|\n)/,"
") rescue "")}
"} edit_urls[i] = [] seminar_submission_values = seminar_signup_contributes.collect{|s| s.seminar_submission_values.where(:key=>names[1]).first } edit_urls[i] = seminar_submission_values.map{|seminar_submission_value| edit_admin_seminar_submission_value_path(seminar_submission_value.id) rescue nil} else val = seminar_signup_contributes.collect{|s| (html_escape(s.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" %> <% if names[1] == "review" %> <% val = contribute_ids.map{|contribute_id| "#{t("seminar.review")}"} %> <% elsif names[1] == "presentation_type" %> <% val = seminar_signup_contributes.map{|seminar_signup_contribute| seminar_signup_contribute.presentation_type} %> <% elsif names[1] == "abstract_number" %> <% val = seminar_signup_contributes.map{|seminar_signup_contribute| seminar_signup_contribute.abstract_number} %> <% end %> <% end %> <% vals << val %> <% end %> <% count = 0 %> <% indices = [] %> <% vals.each_with_index do |val,i| %> <% if val.class == Array %> <% count = val.count - 1 %> <% indices << i%> <% else %> <% end %> <% end %> <% (1...count+1).each do |i|%> <% if @drag%> <% end %> <% (0...vals.count).each do |index| %> <% if indices.include?(index) extra_class= "" val = vals[index][i] else extra_class = "repeated" val = vals[index] end %> <% end %> <% end %> <% end %> <% if @include_blank %> <% if @drag %> <% end %> <% (0...@display_field.count).each do |f| %> <% end %> <% end %>
<%= t('seminar.title') %><%= @field_name_translations[field_name] %>
<% if val[0].class == SeminarSignupContribute #File %> <% seminar_signup_contribute = val[0] %> <% 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 %> <%= link_to seminar_signup_contribute.disp_filename , seminar_signup_contribute.file.url, {:target => '_blank', :title => Nokogiri::HTML(description.gsub("
"," , ")).text, :download=>seminar_signup_contribute.disp_filename} if seminar_signup_contribute.file.file %> <% else %> <%= val[0].html_safe.to_s rescue "" %> <% end %> <% if edit_urls[i].present? %>
<% end %>
<%= val.to_s.html_safe %>
<% if (val.class == SeminarSignupContribute rescue false) #File %> <% seminar_signup_contribute = val %> <% 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 %> <%= link_to seminar_signup_contribute.disp_filename , seminar_signup_contribute.file.url, {:target => '_blank', :title => Nokogiri::HTML(description.gsub("
"," , ")).text, :download=>seminar_signup_contribute.disp_filename} if seminar_signup_contribute.file.file %> <% else %> <%= val.html_safe.to_s rescue "" %> <% end %> <% if (edit_urls[index][i].present? rescue false) %>
<% end %>