28 lines
783 B
Plaintext
28 lines
783 B
Plaintext
<% joinable_time = lecture.start_time - 5.minutes %>
|
|
|
|
<% if lecture == @current_lecture %>
|
|
<div class="py-1">
|
|
Started
|
|
</div>
|
|
<% elsif 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 %>
|