show tags in places
This commit is contained in:
parent
bacef8db2c
commit
47c71a3935
2 changed files with 30 additions and 12 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
<th>Category</th>
|
<th>Category</th>
|
||||||
<th>Updated at</th>
|
<th>Updated at</th>
|
||||||
<th>Created at</th>
|
<th>Created at</th>
|
||||||
|
<th>Tags</th>
|
||||||
</tr>
|
</tr>
|
||||||
<% @clips.each do |clip| %>
|
<% @clips.each do |clip| %>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -31,6 +32,11 @@
|
||||||
<td>
|
<td>
|
||||||
<%= clip.created_at %>
|
<%= clip.created_at %>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<% clip.tags.each_with_index do |tag, index| %>
|
||||||
|
<%= link_to tag.name, tag_path(tag) %><% if index < clip.tags.size - 1 %>, <% end %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<% cache @clip do %>
|
<% cache @clip do %>
|
||||||
<h1><%= @clip.title %></h1>
|
<h1><%= @clip.title %></h1>
|
||||||
<% end %>
|
<% end %>
|
||||||
<table>
|
<table cellpadding="10">
|
||||||
<tr>
|
<tr>
|
||||||
<% if @clip.video.attached? %>
|
<% if @clip.video.attached? %>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -9,19 +9,31 @@
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
<table border="1">
|
<table class="metatable" cellpadding="5" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<td valign="top"><b>Clip ID:</b></td>
|
||||||
|
<td><%= @clip.id %></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><b>Category:</b></td>
|
<td valign="top"><b>Category:</b></td>
|
||||||
<td><%= link_to @clip.category.name, @clip.category %></td>
|
<td><%= link_to @clip.category.name, @clip.category %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><b>Tags:</b></td>
|
<td valign="top"><b>Tags:</b></td>
|
||||||
<td><%= @clip.tags.map(&:name).join(', ') %></td>
|
<td>
|
||||||
|
<% @clip.tags.each_with_index do |tag, index| %>
|
||||||
|
<%= link_to tag.name, tag_path(tag) %><% if index < @clip.tags.size - 1 %>, <% end %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><b>Length:</b></td>
|
<td valign="top"><b>Length:</b></td>
|
||||||
<td><%= seconds_to_time(@clip.video.metadata["duration"]) %></td>
|
<td><%= seconds_to_time(@clip.video.metadata["duration"]) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top"><b>Resolution:</b></td>
|
||||||
|
<td><%= @clip.video.metadata["width"].round %>x<%= @clip.video.metadata["height"].round %> (<%= get_video_aspect(@clip.video) %>)</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top"><b>Last Updated:</b></td>
|
<td valign="top"><b>Last Updated:</b></td>
|
||||||
<td><%= @clip.updated_at %></td>
|
<td><%= @clip.updated_at %></td>
|
||||||
|
|
@ -30,14 +42,14 @@
|
||||||
<td valign="top"><b>Created:</b></td>
|
<td valign="top"><b>Created:</b></td>
|
||||||
<td><%= @clip.created_at %></td>
|
<td><%= @clip.created_at %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<% if authenticated? %>
|
<% if authenticated? %>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="editcontrols">
|
||||||
<%= button_to "Edit", edit_clip_path(@clip), :method => "get" %>
|
<%= button_to "Edit", edit_clip_path(@clip), :method => "get" %>
|
||||||
<%= button_to "Delete", @clip, method: :delete, data: { turbo_confirm: "Are you sure?" } %>
|
<%= button_to "Delete", @clip, method: :delete, data: { turbo_confirm: "Are you sure?" } %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue