Merge branch 'master' into 'master'
Fix sign up link. See merge request spen/seminar!39
This commit is contained in:
commit
c41e8db6a7
|
@ -160,6 +160,8 @@ class SeminarsController < ApplicationController
|
||||||
"time_now" => time_now
|
"time_now" => time_now
|
||||||
}
|
}
|
||||||
@_request = OrbitHelper.request
|
@_request = OrbitHelper.request
|
||||||
|
@custom_slug = "registration"
|
||||||
|
@registration_postfix = ""
|
||||||
if template_info["main_content"]
|
if template_info["main_content"]
|
||||||
main_content = render_other_method("show_data",template_info["main_content"])
|
main_content = render_other_method("show_data",template_info["main_content"])
|
||||||
else
|
else
|
||||||
|
@ -307,7 +309,7 @@ class SeminarsController < ApplicationController
|
||||||
seminar = SeminarMain.find_by(uid: params[:uid])
|
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 )
|
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) + @registration_postfix.to_s + '" target="_blank">' + t('seminar.signup') + '</a>').html_safe
|
sign_up = ('<a href="'+ (@custom_slug ? OrbitHelper.url_to_show(@custom_slug) : OrbitHelper.url_to_show(seminar.to_param)) + @registration_postfix.to_s + '" target="_blank">' + t('seminar.signup') + '</a>').html_safe
|
||||||
elsif seminar.registration_status.blank?
|
elsif seminar.registration_status.blank?
|
||||||
sign_up = t('seminar.sign_up_not_open')
|
sign_up = t('seminar.sign_up_not_open')
|
||||||
elsif seminar.signup_start_date > time_now
|
elsif seminar.signup_start_date > time_now
|
||||||
|
|
Loading…
Reference in New Issue