From 76babc6372f358df52caf12f8c94a3671f1bcbcc Mon Sep 17 00:00:00 2001 From: Soon Van Date: Sat, 2 Jun 2018 15:03:38 -0400 Subject: [PATCH] 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 --- app/views/conferences/_registration.haml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/views/conferences/_registration.haml b/app/views/conferences/_registration.haml index d789cbf2..d06179ba 100644 --- a/app/views/conferences/_registration.haml +++ b/app/views/conferences/_registration.haml @@ -28,6 +28,11 @@ registration_period.end_date) - if conference.registration_open? %p.cta-button - = link_to('Register Now', - new_conference_conference_registration_path(conference_id), - class: 'btn btn-lg btn-success') + - if conference.user_registered?(current_user) + = link_to("Edit Your Registration", + 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')