Tapes are now Clips, also they have categories

This commit is contained in:
Roscoe 2025-09-10 03:08:27 +01:00
commit c8732b6332
Signed by: RoscoeDaWah
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE
41 changed files with 347 additions and 148 deletions

View file

@ -0,0 +1,42 @@
<% cache @category do %>
<h1><%= @category.name %></h1>
<% end %>
<table id="clips" border="1">
<tr>
<th>Preview</th>
<th>Title</th>
<th>Duration</th>
<th>Category</th>
<th>Updated at</th>
<th>Created at</th>
</tr>
<% @clips.each do |clip| %>
<tr>
<td>
<%= link_to (image_tag url_for(clip.video.preview(resize_to_limit: [160, 120]).processed)), clip %>
</td>
<td>
<%= link_to clip.title, clip %>
</td>
<td>
<%= seconds_to_time(clip.video.metadata["duration"]) %>
</td>
<td>
<%= clip.category.name %>
</td>
<td>
<%= clip.updated_at %>
</td>
<td>
<%= clip.created_at %>
</td>
</tr>
<% end %>
</table>
<%= link_to "Back", categories_path%>
<% if authenticated? %>
<%= link_to "Edit", edit_category_path(@category) %>
<%= button_to "Delete", @category, method: :delete, data: { turbo_confirm: "Are you sure?" } %>
<% end %>