diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 94b193ef..916f532b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,9 @@ module ApplicationHelper + def pre_registered(event) + @conference.events.joins(:registrations).where("events.id = ?", event.id) + end + def add_association_link(association_name, form_builder, div_class, html_options = {}) link_to_add_association "Add " + association_name.to_s.singularize, form_builder, div_class, html_options.merge(:class => "assoc btn btn-success") end diff --git a/app/views/proposal/index.html.haml b/app/views/proposal/index.html.haml index 8c8d175a..0bb4c262 100644 --- a/app/views/proposal/index.html.haml +++ b/app/views/proposal/index.html.haml @@ -21,6 +21,8 @@ = link_to event.title, conference_proposal_path(@conference.short_title, event.id) %td = event.public_state + - if event.state == 'confirmed' && event.require_registration == true + (Pre-registered: #{pre_registered(event).count}) - if event.confirmed? && !@conference.user_registered?(current_user) %br = link_to "Register to attend", register_conference_path(@conference.short_title), :style => "font-size:10px;"