forked from spen/seminar
Fix bug.
This commit is contained in:
parent
2b81e298cd
commit
ed1ebc8ec3
|
@ -6,4 +6,4 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= t('seminar.email_signup_content') %>
|
<%= t('seminar.email_signup_content') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= (@data['extra_text'] rescue "").html_safe %>
|
<%= (@data['extra_text'] rescue "").to_s.html_safe %>
|
|
@ -6,4 +6,4 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= t('seminar.email_submission_content') %>
|
<%= t('seminar.email_submission_content') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= (@data['extra_text'] rescue "").html_safe %>
|
<%= (@data['extra_text'] rescue "").to_s.html_safe %>
|
|
@ -5,7 +5,7 @@
|
||||||
@total_pages = data["total_pages"]
|
@total_pages = data["total_pages"]
|
||||||
@time_now = data["time_now"]
|
@time_now = data["time_now"]
|
||||||
%>
|
%>
|
||||||
|
<% begin %>
|
||||||
<table class="table table-hover table-striped seminar-index">
|
<table class="table table-hover table-striped seminar-index">
|
||||||
<caption>
|
<caption>
|
||||||
<h3><%= t('seminar.seminar') %></h3>
|
<h3><%= t('seminar.seminar') %></h3>
|
||||||
|
@ -23,11 +23,11 @@
|
||||||
<%
|
<%
|
||||||
@seminars.each do |seminar|
|
@seminars.each do |seminar|
|
||||||
|
|
||||||
if !seminar.registration_status.blank? and seminar.signup_start_date <= @time_now and ( seminar.signup_end_date.nil? or seminar.signup_end_date+1 >= @time_now )
|
if !seminar.registration_status.blank? and (seminar.signup_start_date <= @time_now rescue false) and ( seminar.signup_end_date.nil? or 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) + '" 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 rescue false)
|
||||||
sign_up = t('seminar.sign_up_not_yet')
|
sign_up = t('seminar.sign_up_not_yet')
|
||||||
else
|
else
|
||||||
sign_up = t('seminar.sign_up_overdue')
|
sign_up = t('seminar.sign_up_overdue')
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<%= sign_up %> <br />
|
<%= sign_up %> <br />
|
||||||
|
|
||||||
<%=
|
<%=
|
||||||
if !seminar.registration_status.blank? and seminar.registration_status.include?('C') and seminar.contribute_start_date <= @time_now and ( seminar.contribute_end_date.nil? or seminar.contribute_end_date+1 >= @time_now )
|
if !seminar.registration_status.blank? and seminar.registration_status.include?('C') and (seminar.contribute_start_date <= @time_now rescue false) and ( seminar.contribute_end_date.nil? or (seminar.contribute_end_date+1 >= @time_now rescue false) )
|
||||||
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
|
||||||
('<a href="'+ OrbitHelper.url_to_show(seminar.to_param) + '?method=con_upload">' + t('seminar_signup.uploads') + '</a>').html_safe
|
('<a href="'+ OrbitHelper.url_to_show(seminar.to_param) + '?method=con_upload">' + t('seminar_signup.uploads') + '</a>').html_safe
|
||||||
|
@ -59,5 +59,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<% rescue => e
|
||||||
|
puts [e,e.backtrace]
|
||||||
|
end
|
||||||
|
%>
|
||||||
<%= create_pagination(@total_pages).html_safe if @total_pages > 1 %>
|
<%= create_pagination(@total_pages).html_safe if @total_pages > 1 %>
|
|
@ -212,7 +212,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-sm-offset-2 col-sm-10">
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
<input type="hidden" name="referer_url" value="<%= request.original_url.split(request.env["HTTP_HOST"]).last %>">
|
<input type="hidden" name="referer_url" value="<%= request.original_url.split(request.env["HTTP_HOST"]).last rescue "/" %>">
|
||||||
<input type="hidden" name="seminar_signup[seminar_main_id]" value="<%= @seminar.id %>">
|
<input type="hidden" name="seminar_signup[seminar_main_id]" value="<%= @seminar.id %>">
|
||||||
<%= f.submit "Submit", class: 'btn btn-primary', :id => 'button-mail' %>
|
<%= f.submit "Submit", class: 'btn btn-primary', :id => 'button-mail' %>
|
||||||
<%= f.button "Delete", type: 'reset', class: 'btn' %>
|
<%= f.button "Delete", type: 'reset', class: 'btn' %>
|
||||||
|
|
Loading…
Reference in New Issue