diff --git a/app/views/attendance_tracker/today.html.erb b/app/views/attendance_tracker/today.html.erb new file mode 100644 index 0000000..ecc54c7 --- /dev/null +++ b/app/views/attendance_tracker/today.html.erb @@ -0,0 +1,63 @@ +

Attendance Tracker

+ +
+ <% @courses.each do |course| %> +
+
+
+
+
+

+ <%= course.title %> +

+ + <% if course.homepage.present? %> + + + + <% end %> +
+ + + + + + + + + + + + + + <% course.lectures_and_work_items.group_by { |lecture| lecture.week_number }.each do |(week_number, lectures)| %> + + + + + <%= render lectures %> + <% end %> + +
LectureDateStatusAction
+
+
+ Week <%= week_number %> +
+ +
+ <% total_for_week = lectures.sum { |lecture| lecture.total_overall_time }.seconds %> + <%# TODO: Improve this figure, atm it is for lectures in week, not time spent in week (ie + prepping for lecture next week will count in next week not current week) %> + <% if total_for_week > 0 %> + (Total <%= humanise_duration(lectures.sum { |lecture| lecture.total_overall_time }.seconds) %> + ) + <% end %> +
+
+
+
+
+
+
+ <% end %> +