Details
Description
Currently we use the GET parameter "context=dashboard" to suppress the Register link. This doesn't handle the case where a logged in user visits the Event Info page from somewhere other than the User Dashboard. We also need to take into account whether the event allows "Multiple registrations from the same email address".
We should replace this as follows:
- EventInfo class should check if event allows "Multiple registrations from same email address". If so, we can show Register link (unless other conditions like Event Full etc apply).
- Then check user is logged in. If so check if they are already registered. If true, pass flag to tpl to hide the Register link.
---- Original post —
The event info when viewed with contect=Dashboard for the same user does not show the "Register Now" link
Steps to reproduce event
1 - create an event with 'Online Registration'
2 - view the event information directly - http://www.civievent-drupal.com/civicrm/event/info?reset=1&id=9
(civievent5.png)
Notice the "Register Now" link
3 - Register for the event
4 - Click on 'My Contact Dashboard' - http://www.civievent-drupal.com/civicrm/user?reset=1
and in the "Your Events" section click on the event info - http://www.civievent-drupal.com/civicrm/event/info?reset=1&id=9&context=dashboard
The "Register Now" link is missing (civievent6.png)
5 - Click on the same event without the dashboard context http://www.civievent-drupal.com/civicrm/event/info?reset=1&id=9
it does show the "Register Now" link.
there when checking the dashboard context one must check if it's for the currently logged in user and display the "Register Now" link appropriately.
thx.
yashesh bhatia