<%= lecture.title %> <% if lecture.online %> <% end %> <%= lecture.start_time.to_fs(:dmy) %> <%= render partial: 'lecture_status_icons', locals: { lecture: } %> <% joinable_time = lecture.start_time - 5.minutes %> <% if joinable_time.future? %> <%= button_to "Prepare", lecture_start_preparation_path(id: lecture.id), class: 'action-button' %> <% elsif joinable_time.past? && !lecture.attended? %> <% start_label = if lecture.is_live? then "Join" else "Start" end %> <%= button_to start_label, lectures_start_path(id: lecture.id), class: 'action-button' %> <% else %>
<%= button_to "Review", lecture_start_review_path(id: lecture.id), class: 'action-button' %>
<% end %> <% if lecture.recording %> <%= link_to "Open recording", lecture.recording&.recording_url %> <% end %>