Show Edit Registration button for registered users

Registered users should see a button on the main conference page
to edit their current registration instead of being asked to
create/add a new one.

Fixes #2041
This commit is contained in:
Soon Van 2018-06-02 15:03:38 -04:00 committed by James Mason
parent dffd4ac7a0
commit 76babc6372

View file

@ -28,6 +28,11 @@
registration_period.end_date) registration_period.end_date)
- if conference.registration_open? - if conference.registration_open?
%p.cta-button %p.cta-button
= link_to('Register Now', - if conference.user_registered?(current_user)
new_conference_conference_registration_path(conference_id), = link_to("Edit Your Registration",
class: 'btn btn-lg btn-success') conference_conference_registration_path(conference_id),
class: 'btn btn-success')
- else
= link_to('Register Now',
new_conference_conference_registration_path(conference_id),
class: 'btn btn-lg btn-success')