Add registration_limit to conference model. Added the input for registration limit in the edit conference form. In the controller, if the limit has exceeded redirect to root_path with an alert. fix #761
This commit is contained in:
parent
2034c0f965
commit
28fbc518f3
12 changed files with 124 additions and 16 deletions
|
|
@ -27,7 +27,9 @@
|
|||
- if conference.user_registered?(current_user)
|
||||
= link_to "My Registration", conference_conference_registrations_path(conference.short_title), :class =>"btn btn-default"
|
||||
- else
|
||||
= link_to "Register", new_conference_conference_registrations_path(conference.short_title), :class =>"btn btn-default"
|
||||
= link_to "Register", new_conference_conference_registrations_path(conference.short_title), class: "btn btn-default", disabled: conference.registration_limit_exceeded?
|
||||
- if conference.registration_limit_exceeded?
|
||||
Sorry, no places left
|
||||
- if !current_user.nil? && current_user.proposal_count(conference) > 0
|
||||
= link_to "My Proposals", conference_program_proposal_index_path(conference.short_title), :class =>"btn btn-default"
|
||||
- elsif conference.program.cfp_open?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue