better fix for join event links
This commit is contained in:
parent
899d973020
commit
deb249d2fd
1 changed files with 2 additions and 1 deletions
|
|
@ -177,7 +177,8 @@ module EventsHelper
|
||||||
return unless event.url.present? && current_user
|
return unless event.url.present? && current_user
|
||||||
|
|
||||||
conference = event.conference
|
conference = event.conference
|
||||||
is_today = event.time&.today?
|
is_today = event.time&.in_time_zone(c.timezone).to_date == conference.current_conference_day
|
||||||
|
|
||||||
if current_user.roles.where(id: conference.roles).any?
|
if current_user.roles.where(id: conference.roles).any?
|
||||||
# Show Pre-Event links for any memeber of the conference team.
|
# Show Pre-Event links for any memeber of the conference team.
|
||||||
link_to("Join Live Event #{'(Pre-Event)' unless is_today}",
|
link_to("Join Live Event #{'(Pre-Event)' unless is_today}",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue