Improve tape listing (add thumbnails, extra info, make it a table)

This commit is contained in:
Roscoe 2025-09-08 04:32:18 +01:00
commit 86c489be72
Signed by: RoscoeDaWah
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE

View file

@ -2,10 +2,27 @@
<%= link_to "New tape", new_tape_path if authenticated? %> <%= link_to "New tape", new_tape_path if authenticated? %>
<div id="tapes"> <table id="tapes" border="1">
<tr>
<th>Preview</th>
<th>Title</th>
<th>Updated at</th>
<th>Created at</th>
</tr>
<% @tapes.each do |tape| %> <% @tapes.each do |tape| %>
<div> <tr>
<%= link_to tape.title, tape %> <td>
</div> <%= link_to (image_tag url_for(tape.video.preview(resize_to_limit: [160, 120]).processed)), tape %>
</td>
<td>
<%= link_to tape.title, tape %>
</td>
<td>
<%= tape.updated_at %>
</td>
<td>
<%= tape.created_at %>
</td>
</tr>
<% end %> <% end %>
</div> </div>