A very messy overview page
All checks were successful
Build and Publish Docker Container / build (push) Successful in 5m22s
All checks were successful
Build and Publish Docker Container / build (push) Successful in 5m22s
This commit is contained in:
parent
a0e526662b
commit
d5d30c96fd
@ -4,6 +4,11 @@ class AttendanceTrackerController < ApplicationController
|
||||
@current_lecture = get_current_lecture
|
||||
end
|
||||
|
||||
def overview
|
||||
@courses = Course.all.sort_by(&:title)
|
||||
@current_lecture = get_current_lecture
|
||||
end
|
||||
|
||||
def today
|
||||
@courses = Course.all.sort_by(&:title)
|
||||
@date = Date.today
|
||||
|
||||
15
app/views/attendance_tracker/overview.erb
Normal file
15
app/views/attendance_tracker/overview.erb
Normal file
@ -0,0 +1,15 @@
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<h1 class="text-3xl font-medium">Overview</h1>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-2 gap-2">
|
||||
<% @courses.each do |course| %>
|
||||
<div class="mt-4 py-2">
|
||||
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 rounded-lg">
|
||||
<div class="divide-y divide-gray-300 w-full">
|
||||
<%= render partial: 'course_table', locals: { course: course } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@ -11,6 +11,7 @@ Rails.application.routes.draw do
|
||||
|
||||
root controller: :attendance_tracker, action: :index
|
||||
get '/today', controller: :attendance_tracker, action: :today
|
||||
get '/overview', controller: :attendance_tracker, action: :overview
|
||||
get '/courses/:id', controller: :attendance_tracker, action: :course_focus
|
||||
|
||||
post '/lectures/:id/start', to: 'lecture#start', as: :lectures_start
|
||||
|
||||
Loading…
Reference in New Issue
Block a user