Modify conference registration to a singular resource

This commit is contained in:
Arun Kumar 2016-07-05 00:10:18 +05:30
parent 8b831b1977
commit 0675572e05
No known key found for this signature in database
GPG key ID: 6C40CA6462DEA424
17 changed files with 37 additions and 37 deletions

View file

@ -25,9 +25,9 @@
= link_to "Schedule", schedule_conference_path(conference.short_title), :class =>"btn btn-default"
- if conference.registration_open?
- if conference.user_registered?(current_user)
= link_to "My Registration", conference_conference_registrations_path(conference.short_title), :class =>"btn btn-default"
= link_to "My Registration", conference_conference_registration_path(conference.short_title), :class =>"btn btn-default"
- else
= link_to "Register", new_conference_conference_registrations_path(conference.short_title), class: "btn btn-default", disabled: conference.registration_limit_exceeded?
= link_to "Register", new_conference_conference_registration_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

View file

@ -26,5 +26,5 @@
The registration period ends on
= @conference.registration_period.end_date.strftime('%A, %B %-d. %Y')
%p.cta-button
= link_to(new_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-lg btn-success') do
= link_to(new_conference_conference_registration_path(@conference.short_title), class: 'btn btn-lg btn-success') do
Register Now

View file

@ -18,7 +18,7 @@
Already have an account?
.tab-content
.tab-pane.active{role: 'tabpanel', id: 'signup'}
= semantic_form_for(@registration, url: conference_conference_registrations_path(@conference.short_title)) do |f|
= semantic_form_for(@registration, url: conference_conference_registration_path(@conference.short_title)) do |f|
= render partial: 'devise/shared/sign_up_form_embedded'
= render partial: 'registration_info', locals: { f: f }

View file

@ -117,11 +117,11 @@
.col-md-12
-if @registration
.btn-group-vertical.pull-right
= link_to 'Edit your Registration', edit_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success', disabled: @conference.end_date < Date.today
= link_to 'Unregister', conference_conference_registrations_path(@conference.short_title),
= link_to 'Edit your Registration', edit_conference_conference_registration_path(@conference.short_title), class: 'btn btn-success', disabled: @conference.end_date < Date.today
= link_to 'Unregister', conference_conference_registration_path(@conference.short_title),
method: :delete, class: 'btn btn-danger btn-xs', confirm: 'Are you sure you want to unregister?', disabled: @conference.end_date < Date.today
- else
= link_to 'Register', new_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-success btn-lg pull-right'
= link_to 'Register', new_conference_conference_registration_path(@conference.short_title), class: 'btn btn-success btn-lg pull-right'
.row
.col-md-12

View file

@ -3,9 +3,9 @@
%li{'class'=>class_for_todo(progress_status['registered'])}
%span{'class'=>icon_for_todo(progress_status['registered'])}
- if progress_status['registered']
= link_to 'Register to the conference', edit_conference_conference_registrations_path(event.program.conference.short_title)
= link_to 'Register to the conference', edit_conference_conference_registration_path(event.program.conference.short_title)
- else
= link_to 'Register to the conference', new_conference_conference_registrations_path(event.program.conference.short_title)
= link_to 'Register to the conference', new_conference_conference_registration_path(event.program.conference.short_title)
%li{'class'=>class_for_todo(progress_status['biography'])}
%span{'class'=>icon_for_todo(progress_status['biography'])}
= link_to 'Fill out your biography', edit_user_path(event.submitter)

View file

@ -83,4 +83,4 @@
.col-md-12
%dt Requires Registration:
%dd
= link_to "Yes (#{registered_text(@event)})", new_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-xs btn-danger', disabled: !@event.registration_possible?
= link_to "Yes (#{registered_text(@event)})", new_conference_conference_registration_path(@conference.short_title), class: 'btn btn-xs btn-danger', disabled: !@event.registration_possible?

View file

@ -37,10 +37,10 @@
= button_tag(type: 'submit', class: 'btn btn-success btn-lg') do
Support
%i.fa.fa-shopping-cart
= link_to 'Continue without a Ticket!', conference_conference_registrations_path(@conference.short_title),
= link_to 'Continue without a Ticket!', conference_conference_registration_path(@conference.short_title),
class: 'btn btn-danger btn-sm'
.row
.col-md-13
%p.text-muted.text-center
%small
* Buying a ticket is not mandatory. Checkout will be at the conference registration.
* Buying a ticket is not mandatory. Checkout will be at the conference registration.