diff --git a/app/models/lecture.rb b/app/models/lecture.rb
index a525ab9..3b8a22e 100644
--- a/app/models/lecture.rb
+++ b/app/models/lecture.rb
@@ -12,4 +12,12 @@ class Lecture < ApplicationRecord
def week_number
((start_time.beginning_of_week - Time.new('2023-10-02')) / 1.week).floor
end
+
+ def live_video_url
+ nil
+ end
+
+ def recording_url
+ "https://google.com"
+ end
end
diff --git a/app/views/attendance_tracker/index.html.erb b/app/views/attendance_tracker/index.html.erb
index 3387cb0..1719a62 100644
--- a/app/views/attendance_tracker/index.html.erb
+++ b/app/views/attendance_tracker/index.html.erb
@@ -33,21 +33,36 @@
<% if lecture.status == 'future' %>
-
+ Future
<% elsif lecture.status == 'happening_now' %>
-
+ Happening Now
<% elsif lecture.status == 'attended_in_person' %>
-
+
<% elsif lecture.status == 'watched_recording' %>
-
+
+ <% elsif lecture.status == 'missed' %>
+
<% else %>
<% lecture.status %>
<% end %>
|
+
-
+ <% if lecture.status == 'future' %>
+ <% elsif lecture.status == 'happening_now' && lecture.live_video_url.present? %>
+ <% link_to "Open live", lecture.live_video_url %>
+ <% elsif lecture.status == 'attended_in_person' %>
+ <% link_to "Open recording", lecture.recording_url %>
+
+ <% elsif lecture.status == 'watched_recording' %>
+
+ <% elsif lecture.status == 'missed' %>
+
+ <% else %>
+ <% lecture.status %>
+ <% end %>
|
<% end %>