All checks were successful
Build and Publish Docker Container / build (push) Successful in 5m29s
This update enhances tracking functionality. It adds the ability to track time spent 'catching up' on lectures, with distinctions made within the controllers and views to handle these new 'catch-up' entries. Also implemented a flexible match for lecture titles to include various forms such as 'Lecture 1', 'Lecture 1: Prep' and the 'Catch-up'.
32 lines
995 B
Plaintext
32 lines
995 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? %>
|
|
<% if lecture.end_time.future? %>
|
|
<% start_label = if lecture.is_live?
|
|
"Join"
|
|
else
|
|
"Start"
|
|
end %>
|
|
|
|
<%= button_to start_label,
|
|
lectures_start_path(id: lecture.id),
|
|
class: 'action-button' %>
|
|
<% else %>
|
|
<%= button_to 'Catch Up',
|
|
lectures_start_path(id: lecture.id, catch_up: true),
|
|
class: 'action-button' %>
|
|
<% end %>
|
|
<% else %>
|
|
<%= button_to "Review",
|
|
lecture_start_review_path(id: lecture.id),
|
|
class: 'action-button' %>
|
|
<% end %>
|