Fix bug.
This commit is contained in:
parent
50824d7932
commit
2cd08c4731
|
@ -172,8 +172,10 @@ class SeminarsController < ApplicationController
|
||||||
time_now = Time.now
|
time_now = Time.now
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
seminar = SeminarMain.find_by(uid: params[:uid])
|
seminar = SeminarMain.find_by(uid: params[:uid])
|
||||||
|
registration_url = prefix_url + @registration_postfix
|
||||||
|
submission_url = prefix_url + '/home/submission'
|
||||||
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="'+ prefix_url + @registration_postfix + '" target="_blank">' + t('seminar.signup') + '</a>').html_safe
|
sign_up = ('<a href="'+ registration_url + '" 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
|
||||||
|
@ -184,12 +186,12 @@ class SeminarsController < ApplicationController
|
||||||
if !seminar.registration_status.blank? && seminar.registration_status.include?('C') && seminar.contribute_start_date <= time_now && ( seminar.contribute_end_date.nil? || seminar.contribute_end_date+1 >= time_now )
|
if !seminar.registration_status.blank? && seminar.registration_status.include?('C') && seminar.contribute_start_date <= time_now && ( seminar.contribute_end_date.nil? || seminar.contribute_end_date+1 >= time_now )
|
||||||
if !@@session[:seminar_signup_id].blank?
|
if !@@session[:seminar_signup_id].blank?
|
||||||
if @@session[:seminar_main_id] == seminar.id
|
if @@session[:seminar_main_id] == seminar.id
|
||||||
contribute_action = ('<a href="'+ prefix_url + '?method=con_upload">' + t('seminar_signup.uploads') + '</a>').html_safe
|
contribute_action = ('<a href="'+ submission_url + '?method=con_upload">' + t('seminar_signup.uploads') + '</a>').html_safe
|
||||||
else
|
else
|
||||||
contribute_action = ('<a href="'+ prefix_url + '?method=con_login">' + t('seminar_signup.con_login') + '</a>').html_safe
|
contribute_action = ('<a href="'+ submission_url + '?method=con_login">' + t('seminar_signup.con_login') + '</a>').html_safe
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
contribute_action = ('<a href="'+ prefix_url + '?method=con_login">' + t('seminar_signup.con_login') + '</a>').html_safe
|
contribute_action = ('<a href="'+ submission_url + '?method=con_login">' + t('seminar_signup.con_login') + '</a>').html_safe
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
data = {
|
data = {
|
||||||
|
|
|
@ -70,12 +70,11 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t(:edit), prefix_url + '?method=edit_file&con_no=' + seminar_signup_contribute.id, :class => 'btn btn-primary' %>
|
<%= link_to t(:edit), prefix_url + '?method=edit_file&con_no=' + seminar_signup_contribute.id, :class => 'btn btn-primary' %>
|
||||||
<%= form_with url: del_file_seminars_path, method: "post" do |f| %>
|
<%= form_tag(del_file_seminars_path, {method: "post"}) do |f| %>
|
||||||
<%= f.submit_tag t(:delete_), class: "btn btn-primary" %>
|
<%= submit_tag t(:delete_), class: "btn btn-primary" %>
|
||||||
<%= f.hidden_field_tag "referer_url", request.original_url.split(request.env["HTTP_HOST"]).last.split('?').first %>
|
<%= hidden_field_tag "referer_url", request.original_url.split(request.env["HTTP_HOST"]).last.split('?').first %>
|
||||||
<%= f.hidden_field_tag "con_no", seminar_signup_contribute.id %>
|
<%= hidden_field_tag "con_no", seminar_signup_contribute.id %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue