Add started text to table
This commit is contained in:
@@ -14,10 +14,11 @@
|
||||
<% lectures.each do |lecture| %>
|
||||
<% status_classes = class_names({
|
||||
'lecture-future': lecture.start_time.future?,
|
||||
'bg-purple-100': lecture == @current_lecture,
|
||||
'bg-green-100': lecture.attended?,
|
||||
}) %>
|
||||
|
||||
<div class="<%= status_classes %> px-6 py-4 flex justify-between bg-white items-center grid grid-cols-4">
|
||||
<div class="<%= status_classes %> px-6 py-4 flex justify-between items-center grid grid-cols-4">
|
||||
<div class="whitespace-nowrap text-sm font-medium text-gray-900">
|
||||
<%= lecture.title %>
|
||||
</div>
|
||||
@@ -29,7 +30,9 @@
|
||||
<div class="whitespace-nowrap text-sm font-medium text-gray-900">
|
||||
<% joinable_time = lecture.start_time - 5.minutes %>
|
||||
|
||||
<% if joinable_time.future? %>
|
||||
<% if lecture == @current_lecture %>
|
||||
Started
|
||||
<% elsif joinable_time.future? %>
|
||||
<%= button_to "Prepare",
|
||||
lecture_start_preparation_path(id: lecture.id),
|
||||
class: 'action-button'
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
<div class="inline-block py-2 align-middle px-6 lg:px-8 w-full">
|
||||
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 rounded-lg">
|
||||
<%= render partial: 'course_table', locals: { course: @course } %>
|
||||
<%= render partial: 'course_table', locals: { course: @course, current_lecture: @current_lecture } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -16,10 +16,11 @@
|
||||
<% @lectures.each do |lecture| %>
|
||||
<% status_classes = class_names({
|
||||
'lecture-future': lecture.start_time.future?,
|
||||
'bg-purple-100': lecture == @current_lecture,
|
||||
'bg-green-100': lecture.attended?,
|
||||
}) %>
|
||||
|
||||
<div class="<%= status_classes %> px-6 py-4 flex justify-between bg-white items-center grid grid-cols-4">
|
||||
<div class="px-6 py-4 flex justify-between items-center grid grid-cols-4 <%= status_classes %>">
|
||||
<div class="whitespace-nowrap text-sm font-medium text-gray-900">
|
||||
<%= lecture.course.title %>
|
||||
</div>
|
||||
@@ -34,7 +35,9 @@
|
||||
|
||||
<div class="whitespace-nowrap text-sm font-medium text-gray-900">
|
||||
<% joinable_time = lecture.start_time - 5.minutes %>
|
||||
<% if joinable_time.future? %>
|
||||
<% if lecture == @current_lecture %>
|
||||
Started
|
||||
<% elsif joinable_time.future? %>
|
||||
<%= button_to "Prepare",
|
||||
lecture_start_preparation_path(id: lecture.id),
|
||||
class: 'action-button'
|
||||
|
||||
Reference in New Issue
Block a user