diff --git a/app/assets/stylesheets/seminar/background_style/11/css/background.css b/app/assets/stylesheets/seminar/background_style/11/css/background.css index 7448b32..782a581 100644 --- a/app/assets/stylesheets/seminar/background_style/11/css/background.css +++ b/app/assets/stylesheets/seminar/background_style/11/css/background.css @@ -8,7 +8,7 @@ body{ .layout-footer-content, .layout-footer-inner,.layout-footer-content, .footer-counter{ color: #727272; } -.layout-footer-inner a: hover{ +.layout-footer-inner a:hover{ color: #000000; } .layout-content{ diff --git a/app/assets/stylesheets/seminar/background_style/12/css/background.css b/app/assets/stylesheets/seminar/background_style/12/css/background.css index edf50dc..d85b17c 100644 --- a/app/assets/stylesheets/seminar/background_style/12/css/background.css +++ b/app/assets/stylesheets/seminar/background_style/12/css/background.css @@ -11,7 +11,7 @@ body{ .layout-footer-content, .layout-footer-inner,.layout-footer-content, .footer-counter{ color: #727272; } -.layout-footer-inner a: hover{ +.layout-footer-inner a:hover{ color: #000000; } .layout-content{ diff --git a/app/assets/stylesheets/seminar/background_style/13/css/background.css b/app/assets/stylesheets/seminar/background_style/13/css/background.css index c3f59d1..2f08483 100644 --- a/app/assets/stylesheets/seminar/background_style/13/css/background.css +++ b/app/assets/stylesheets/seminar/background_style/13/css/background.css @@ -11,7 +11,7 @@ body{ .layout-footer-content, .layout-footer-inner,.layout-footer-content, .footer-counter{ color: #96a1ca; } -.layout-footer-inner a: hover{ +.layout-footer-inner a:hover{ color: #ffffff; } .layout-content{ diff --git a/app/assets/stylesheets/seminar/background_style/2/css/background.css b/app/assets/stylesheets/seminar/background_style/2/css/background.css index f9efc55..2f66629 100644 --- a/app/assets/stylesheets/seminar/background_style/2/css/background.css +++ b/app/assets/stylesheets/seminar/background_style/2/css/background.css @@ -8,7 +8,7 @@ body{ .layout-footer-content, .layout-footer-inner,.layout-footer-content, .footer-counter{ color: #606060; } -.layout-footer-inner a: hover{ +.layout-footer-inner a:hover{ color: #000000; } .layout-content{ diff --git a/app/assets/stylesheets/seminar/background_style/4/css/background.css b/app/assets/stylesheets/seminar/background_style/4/css/background.css index ca82672..72720ab 100644 --- a/app/assets/stylesheets/seminar/background_style/4/css/background.css +++ b/app/assets/stylesheets/seminar/background_style/4/css/background.css @@ -7,7 +7,7 @@ body{ .layout-footer-content, .layout-footer-inner,.layout-footer-content, .footer-counter{ color: #606060; } -.layout-footer-inner a: hover{ +.layout-footer-inner a:hover{ color: #000000; } .layout-content{ diff --git a/app/assets/stylesheets/seminar/background_style/8/css/background.css b/app/assets/stylesheets/seminar/background_style/8/css/background.css index 6f264e6..1e85015 100644 --- a/app/assets/stylesheets/seminar/background_style/8/css/background.css +++ b/app/assets/stylesheets/seminar/background_style/8/css/background.css @@ -16,7 +16,7 @@ body{ .layout-footer-content, .layout-footer-inner,.layout-footer-content, .footer-counter{ color: #6f6f70; } -.layout-footer-inner a: hover{ +.layout-footer-inner a:hover{ color: #000000; } .layout-content{ diff --git a/app/controllers/admin/seminars_controller.rb b/app/controllers/admin/seminars_controller.rb index 2fc0f2f..852f9fd 100644 --- a/app/controllers/admin/seminars_controller.rb +++ b/app/controllers/admin/seminars_controller.rb @@ -81,11 +81,7 @@ class Admin::SeminarsController < OrbitAdminController else @seminar_page_root.update(:name_translations=>@seminar.title_translations,:module=>"seminars_home",:url=>"/home",:page_id=>"home",:enabled_for=>available_locales,:bind_uid=>@seminar.uid,:bind_module_app=>"seminar",:bind_model=>"SeminarMain",:menu_enabled_for=>available_locales) end - pages_info = {"introduction" => "seminars_page", - "news" => "custom_announcement", - "registration" => "seminar_registration", - "submission" => "seminar_submission", - "album" => "custom_gallery"} + pages_info = SeminarTemplateSetting::PagesInfo relation_model = {"news" => "CustomBulletin","album"=>"CustomAlbum"} pages_info.each do |page_id , page_module| seminar_page = @seminar_page_root.child_page.where(:page_id=>page_id).first diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index 2193d88..332446c 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -75,6 +75,7 @@ class SeminarsController < ApplicationController @seminar = seminar @site_in_use_locales = Site.first.in_use_locales rescue I18n.available_locales seminar_template_setting = seminar.seminar_template_setting + @seminar_template_setting = seminar_template_setting home_page = Page.where(:parent_page_id=>seminar.id).first prefix_url = OrbitHelper.request.path.split("-").first + "-#{params[:uid]}" @prefix_url = prefix_url @@ -200,12 +201,8 @@ class SeminarsController < ApplicationController main_content = render_to_string("seminars/show_data",:locals=>{:action_data=>data, :request=>OrbitHelper.request,:flash=>OrbitHelper.request.flash, :params=>params,:session=>OrbitHelper.request.session},:layout=>false) - elsif params[:current_page_module] == "seminar_registration" - main_content = render_seminar_registration - elsif params[:current_page_module] == "seminar_submission" - main_content = render_seminar_submission else - main_content = nil + main_content = render_other_method("render_"+params[:current_page_module]) rescue nil end custom_datapp_data = {} if custom_banner @@ -236,8 +233,19 @@ class SeminarsController < ApplicationController :request=>OrbitHelper.request,:flash=>OrbitHelper.request.flash, :params=>params,:session=>OrbitHelper.request.session},:layout=>false) end + def render_seminar_registered_participants + action_data = {"seminar"=>@seminar, "seminar_template_setting"=>@seminar_template_setting} + @_request = OrbitHelper.request + action_data["prefix_url"] = @prefix_url + render_to_string("seminars/registered_participants",:locals=>{:action_data=>action_data, + :request=>OrbitHelper.request,:flash=>OrbitHelper.request.flash, + :params=>params,:session=>OrbitHelper.request.session},:layout=>false) + end def render_other_method(render_method=nil,render_template=nil) params = OrbitHelper.params + if render_method && render_template.nil? + return eval(render_method) + end render_method = render_method || params[:method] render_template = render_template || render_method params = OrbitHelper.params diff --git a/app/models/seminar_template_setting.rb b/app/models/seminar_template_setting.rb index 77c1052..87fcb35 100644 --- a/app/models/seminar_template_setting.rb +++ b/app/models/seminar_template_setting.rb @@ -1,7 +1,13 @@ class SeminarTemplateSetting include Mongoid::Document include Mongoid::Timestamps - DefaultMenu = ["introduction","news","registration","submission","album"] + DefaultMenu = ["introduction","news","registration","registered_participants","submission","album"] + PagesInfo = {"introduction" => "seminars_page", + "news" => "custom_announcement", + "registration" => "seminar_registration", + "registered_participants" => "seminar_registered_participants", + "submission" => "seminar_submission", + "album" => "custom_gallery"} belongs_to :seminar_main field :enable_custom_template, type: Boolean, default: false field :display_menu, type: Array, default: ["introduction","news","registration","submission","album"] @@ -56,16 +62,23 @@ class SeminarTemplateSetting display_menu = self.display_menu available_locales = Site.first.in_use_locales rescue I18n.available_locales available_locales = available_locales.map{|l| l.to_s} + pages_info = self.class::PagesInfo if @seminar_page_root default_display_menu = self.class::DefaultMenu default_display_menu.each do |page_id| page = @seminar_page_root.child_page.where(:page_id=>page_id).first if page - if display_menu.include?(page_id) - page.update(:enabled_for=>available_locales,:menu_enabled_for=>available_locales) - else - page.update(:enabled_for=>[],:menu_enabled_for=>[]) - end + if display_menu.include?(page_id) + page.update(:enabled_for=>available_locales,:menu_enabled_for=>available_locales) + else + page.update(:enabled_for=>[],:menu_enabled_for=>[]) + end + else + page_module = pages_info[page_id] + seminar_page = @seminar_page_root.child_page.where(:page_id=>page_id).first + page_trans = available_locales.map{|l| [l,I18n.with_locale(l){I18n.t("seminar.menu.#{page_id}")}]}.to_h + available_locales_tmp = available_locales.clone + @seminar_page_root.child_page.create(:name_translations=>page_trans,:page_id=>page_id,:url=>"/home/#{page_id}",:enabled_for=>available_locales_tmp,:module=>page_module,:menu_enabled_for=>available_locales_tmp) end end end diff --git a/app/views/admin/seminars/_get_display_fields.html.erb b/app/views/admin/seminars/_get_display_fields.html.erb index 8c4ebb9..c1e9005 100644 --- a/app/views/admin/seminars/_get_display_fields.html.erb +++ b/app/views/admin/seminars/_get_display_fields.html.erb @@ -11,6 +11,7 @@ <% if @seminar.present? %> <% if @seminar.seminar_signup_field_sets.count != 0 %> <% @seminar.seminar_signup_field_sets.each do |field_set| %> + <% next if field_set.field_name == "password" %> <% default_hidden << "seminar_signup_field_set.#{field_set.field_name}" if (field_set.hidden) %> <% @field_names << "seminar_signup_field_set.#{field_set.field_name}" %> <% @field_name_translations << field_set.name[I18n.locale] %> @@ -91,6 +92,7 @@ <% seminar_signup_field_sets = SeminarSignupFieldSet.all.uniq{|s| s.field_name} %> <% if seminar_signup_field_sets.count != 0 %> <% seminar_signup_field_sets.each do |field_set| %> + <% next if field_set.field_name == "password" %> <% default_show << "seminar_signup_field_set.#{field_set.field_name}" if !(field_set.hidden) %> <% @field_names << "seminar_signup_field_set.#{field_set.field_name}" %> <% @field_name_translations << field_set.name[I18n.locale] %> @@ -137,6 +139,7 @@ <% @field_name_translations << s.title %> <% end %> <% @display_field = @seminar_signup_admin_setting.display_field %> + <% @display_field.delete("seminar_signup_field_set.password") %> <% if @display_field.blank? @display_field = default_show end %> diff --git a/app/views/seminars/_contribute_form.html.erb b/app/views/seminars/_contribute_form.html.erb index 997e844..4f0613d 100644 --- a/app/views/seminars/_contribute_form.html.erb +++ b/app/views/seminars/_contribute_form.html.erb @@ -76,7 +76,7 @@
<%= I18n.t("seminar_signup.name") %> | + <% if display_unit %> +<%= I18n.t("seminar_signup.unit") %> | + <% end %> +
---|---|
<%= ss.name %> | +<%= ss.unit %> | +
<%= ss.name %> | +