Move recording to its own column

This commit is contained in:
Joshua Coles 2023-10-06 20:19:44 +01:00
parent 5b74f1380b
commit e3199a097f

View File

@ -4,8 +4,8 @@
<% @courses.each do |course| %> <% @courses.each do |course| %>
<div class="mt-8 flow-root"> <div class="mt-8 flow-root">
<div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"> <div class="-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="inline-block py-2 align-middle sm:px-6 lg:px-8"> <div class="inline-block py-2 align-middle px-6 lg:px-8">
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:rounded-lg"> <div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 rounded-lg">
<h2 class="text-2xl p-2 px-4"><%= course.title %></h2> <h2 class="text-2xl p-2 px-4"><%= course.title %></h2>
<table class="border-t-2 divide-y divide-gray-300 w-full"> <table class="border-t-2 divide-y divide-gray-300 w-full">
@ -15,6 +15,7 @@
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Date</th> <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Date</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Status</th> <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Status</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Action</th> <th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Action</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Recording</th>
</tr> </tr>
</thead> </thead>
@ -36,9 +37,8 @@
<%= lecture.start_time.to_fs(:dmy) %> <%= lecture.start_time.to_fs(:dmy) %>
</td> </td>
<% if lecture.cancelled %> <% if lecture.cancelled %>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" colspan="2"> <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500" colspan="3">
<div class="flex justify-center"> <div class="flex justify-center">
Cancelled Cancelled
</div> </div>
@ -55,6 +55,8 @@
%> %>
</div> </div>
</td> </td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
</td>
<% else %> <% else %>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 flex justify-center"> <td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500 flex justify-center">
<div> <div>
@ -83,11 +85,13 @@
class: 'action-button' class: 'action-button'
%> %>
</div> </div>
<% end %>
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
<% if lecture.recording %> <% if lecture.recording %>
<%= link_to "Open recording", lecture.recording&.recording_url %> <%= link_to "Open recording", lecture.recording&.recording_url %>
<% end %> <% end %>
<% end %>
</td> </td>
<% end %> <% end %>
</tr> </tr>