<% # encoding: utf-8 %> <% data = action_data @application_forms = data["application_forms"] @total_pages = data["total_pages"] @time_now = data["time_now"] %> <% begin %> <% @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 ) sign_up = ('' + t('application_form.signup') + '').html_safe elsif application_form.registration_status.blank? sign_up = t('application_form.sign_up_not_open') elsif (application_form.application_form_start_date > @time_now rescue false) sign_up = t('application_form.sign_up_not_yet') else sign_up = t('application_form.sign_up_overdue') end %> <% end %>
<% page = OrbitHelper.page rescue Page.where(:page_id => OrbitHelper.params[:page_id]).first %>

<%= page.name rescue t('application_form.application_form') %>

<%= t(:category) %> <%= t('application_form.title') %> <%= t('application_form.signup') %>
<%= application_form.category.title %> <% if (application_form.enable_custom_template rescue false) %> <%= ('' + application_form.title + '').html_safe %> <% else %> <%= ('' + application_form.title + '').html_safe %> <% end %> <%= sign_up %>
<%= if !application_form.registration_status.blank? and application_form.registration_status.include?('C') and (application_form.contribute_start_date <= @time_now rescue false) and ( application_form.contribute_end_date.nil? or (application_form.contribute_end_date+1 >= @time_now rescue false) ) if !session[:application_form_signup_id].blank? if session[:application_form_main_id] == application_form.id ('' + t('application_form_signup.uploads') + '').html_safe else ('' + t('application_form_signup.con_login') + '').html_safe end else ('' + t('application_form_signup.con_login') + '').html_safe end end %>
<% rescue => e puts [e,e.backtrace] end %> <%= create_pagination(@total_pages).html_safe if @total_pages > 1 %>