Skip to content

Commit

Permalink
Improve text to show a join link when logged out
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Jul 19, 2023
1 parent 521bc9c commit 0bc6584
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 6 additions & 5 deletions app/helpers/events_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,14 @@ def convert_timezone(date, old_timezone, new_timezone)
end

def join_event_link(event, event_schedule, current_user, small: false)
return unless current_user && event_schedule
return if event.ended?
return if !event_schedule || event.ended?

unless event_schedule.room_url.present?
return content_tag :span, class: 'label label-default' do
'In-person only'
end
return content_tag :span, 'In-person only', class: 'label label-default'
end

unless current_user
return content_tag :span, 'Log in to view join link', class: 'label label-default'
end

conference = event.conference
Expand Down
6 changes: 2 additions & 4 deletions app/views/schedules/_event.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
.panel.panel-default
.trapezoid{ style: 'color: white; top: 12px; z-index: 100;' }
.panel-heading{ style: "#{color_style} border-radius: 4px" }
-# %p
= canceled_replacement_event_label(event, event_schedule)
= replacement_event_notice(event_schedule, styles: color_style)

%div{ style: 'display: flex; flex-direction: row;' }
-# In the schedule view, favorited events show as false, until set by JS. (Caching perf)
= render 'proposals/toggle_favorite_event',
Expand All @@ -38,6 +34,8 @@
- if event.speakers.any?
%h4
= event.speaker_names
- else
%br
- if !event.parent_event.present? && event_schedule.present?
- if condensed_view
- new_start_time = current_user ? convert_timezone(event_schedule.start_time, event.timezone, current_user.timezone) || event_schedule.start_time : event_schedule.start_time
Expand Down

0 comments on commit 0bc6584

Please sign in to comment.