forked from spen/seminar
Fix sign up link.
This commit is contained in:
parent
bd5d34197f
commit
c5d58fb6e0
|
@ -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 = "<a href=\"#{prefix_url}#{home_page.url}\">Home</a> | " +
|
||||
"<a href=\"/\">Main Site</a>"
|
||||
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 = ('<a href="'+ prefix_url + '/home/registration" target="_blank">' + t('seminar.signup') + '</a>').html_safe
|
||||
sign_up = ('<a href="'+ prefix_url + @registration_postfix + '" target="_blank">' + t('seminar.signup') + '</a>').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 = ('<a href="'+ OrbitHelper.url_to_show(seminar.to_param) + '" target="_blank">' + t('seminar.signup') + '</a>').html_safe
|
||||
sign_up = ('<a href="'+ OrbitHelper.url_to_show(seminar.to_param) + @registration_postfix.to_s + '" target="_blank">' + t('seminar.signup') + '</a>').html_safe
|
||||
elsif seminar.registration_status.blank?
|
||||
sign_up = t('seminar.sign_up_not_open')
|
||||
elsif seminar.signup_start_date > time_now
|
||||
|
|
Loading…
Reference in New Issue