Change signup and show page link to open in current tab.
This commit is contained in:
parent
24473a13b1
commit
d0062fed8f
|
@ -27,7 +27,7 @@ class ApplicationFormsController < ApplicationController
|
||||||
application_forms = application_forms.map do |application_form|
|
application_forms = application_forms.map do |application_form|
|
||||||
link_url = OrbitHelper.url_to_show(application_form.to_param)
|
link_url = OrbitHelper.url_to_show(application_form.to_param)
|
||||||
if (application_form.application_form_start_date <= time_now rescue false) && ( application_form.application_form_end_date.nil? || application_form.application_form_end_date+1 >= time_now )
|
if (application_form.application_form_start_date <= time_now rescue false) && ( application_form.application_form_end_date.nil? || application_form.application_form_end_date+1 >= time_now )
|
||||||
sign_up = ('<a href="'+ link_url + '" target="_blank">' + I18n.t('application_form.signup') + '</a>').html_safe
|
sign_up = ('<a href="'+ link_url + '">' + I18n.t('application_form.signup') + '</a>').html_safe
|
||||||
elsif application_form.registration_status.blank?
|
elsif application_form.registration_status.blank?
|
||||||
sign_up = I18n.t('application_form.sign_up_not_open')
|
sign_up = I18n.t('application_form.sign_up_not_open')
|
||||||
elsif (application_form.application_form_start_date > @time_now rescue false)
|
elsif (application_form.application_form_start_date > @time_now rescue false)
|
||||||
|
@ -304,7 +304,7 @@ class ApplicationFormsController < ApplicationController
|
||||||
application_form = ApplicationFormMain.find_by(uid: params[:uid])
|
application_form = ApplicationFormMain.find_by(uid: params[:uid])
|
||||||
|
|
||||||
if application_form.application_form_start_date <= time_now && ( application_form.application_form_end_date.nil? || application_form.application_form_end_date+1 >= time_now )
|
if application_form.application_form_start_date <= time_now && ( application_form.application_form_end_date.nil? || application_form.application_form_end_date+1 >= time_now )
|
||||||
sign_up = ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '" target="_blank">' + t('application_form.signup') + '</a>').html_safe
|
sign_up = ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '">' + t('application_form.signup') + '</a>').html_safe
|
||||||
elsif application_form.registration_status.blank?
|
elsif application_form.registration_status.blank?
|
||||||
sign_up = t('application_form.sign_up_not_open')
|
sign_up = t('application_form.sign_up_not_open')
|
||||||
elsif application_form.application_form_start_date > time_now
|
elsif application_form.application_form_start_date > time_now
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
@application_forms.each do |application_form|
|
@application_forms.each do |application_form|
|
||||||
|
|
||||||
if (application_form.application_form_start_date <= @time_now rescue false) and ( application_form.application_form_end_date.nil? or application_form.application_form_end_date+1 >= @time_now )
|
if (application_form.application_form_start_date <= @time_now rescue false) and ( application_form.application_form_end_date.nil? or application_form.application_form_end_date+1 >= @time_now )
|
||||||
sign_up = ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '" target="_blank">' + t('application_form.signup') + '</a>').html_safe
|
sign_up = ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '">' + t('application_form.signup') + '</a>').html_safe
|
||||||
elsif application_form.registration_status.blank?
|
elsif application_form.registration_status.blank?
|
||||||
sign_up = t('application_form.sign_up_not_open')
|
sign_up = t('application_form.sign_up_not_open')
|
||||||
elsif (application_form.application_form_start_date > @time_now rescue false)
|
elsif (application_form.application_form_start_date > @time_now rescue false)
|
||||||
|
@ -36,9 +36,9 @@
|
||||||
<td><%= application_form.category.title %></td>
|
<td><%= application_form.category.title %></td>
|
||||||
<td>
|
<td>
|
||||||
<% if (application_form.enable_custom_template rescue false) %>
|
<% if (application_form.enable_custom_template rescue false) %>
|
||||||
<%= ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '/home/introduction" target="_blank">' + application_form.title + '</a>').html_safe %>
|
<%= ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '/home/introduction">' + application_form.title + '</a>').html_safe %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '?method=show_data" target="_blank">' + application_form.title + '</a>').html_safe %>
|
<%= ('<a href="'+ OrbitHelper.url_to_show(application_form.to_param) + '?method=show_data">' + application_form.title + '</a>').html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in New Issue