From c5d58fb6e0cfa96e144859f8a16537d2e8d9fc18 Mon Sep 17 00:00:00 2001 From: Bohung Date: Thu, 14 Apr 2022 12:42:39 +0800 Subject: [PATCH] Fix sign up link. --- app/controllers/seminars_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/seminars_controller.rb b/app/controllers/seminars_controller.rb index d5cf858..dca2136 100644 --- a/app/controllers/seminars_controller.rb +++ b/app/controllers/seminars_controller.rb @@ -77,8 +77,10 @@ class SeminarsController < ApplicationController seminar_template_setting = seminar.seminar_template_setting @seminar_template_setting = seminar_template_setting home_page = Page.where(:parent_page_id=>seminar.id).first + OrbitHelper.set_page(home_page) rescue nil prefix_url = OrbitHelper.request.path.split("-").first + "-#{params[:uid]}" @prefix_url = prefix_url + @registration_postfix = "/home/registration" header_data = "Home | " + "Main Site" content_style = seminar_template_setting.content_style @@ -169,7 +171,7 @@ class SeminarsController < ApplicationController params = OrbitHelper.params seminar = SeminarMain.find_by(uid: params[:uid]) if !seminar.registration_status.blank? && seminar.signup_start_date <= time_now && ( seminar.signup_end_date.nil? || seminar.signup_end_date+1 >= time_now ) - sign_up = ('' + t('seminar.signup') + '').html_safe + sign_up = ('' + t('seminar.signup') + '').html_safe elsif seminar.registration_status.blank? sign_up = t('seminar.sign_up_not_open') elsif seminar.signup_start_date > time_now @@ -305,7 +307,7 @@ class SeminarsController < ApplicationController seminar = SeminarMain.find_by(uid: params[:uid]) if !seminar.registration_status.blank? && seminar.signup_start_date <= time_now && ( seminar.signup_end_date.nil? || seminar.signup_end_date+1 >= time_now ) - sign_up = ('' + t('seminar.signup') + '').html_safe + sign_up = ('' + t('seminar.signup') + '').html_safe elsif seminar.registration_status.blank? sign_up = t('seminar.sign_up_not_open') elsif seminar.signup_start_date > time_now