mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #28 from differentreality/event_registration
Show No of registrations for proposal, in proposal index page
This commit is contained in:
commit
9d09d6d038
2 changed files with 6 additions and 0 deletions
|
|
@ -30,6 +30,10 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -22,6 +22,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;"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue