stage-manager/views/channel/view.erb

62 lines
2.0 KiB
Plaintext
Raw Normal View History

<div id="channel-header" class="row">
2023-03-03 15:36:18 -05:00
<div class="eight columns">
<h1 class="channel-name"><%= channel.name %></h1>
<h4 class="channel-created">Item added at: <%= date_format(channel.created_at) %></h4>
<% if channel.updated_at %>
<h4 class="channel-updated">Last updated at: <%= date_format(channel.updated_at) %></h4>
<% end %>
2023-03-03 15:36:18 -05:00
<p><a href="/video/create?channel=<%= channel.id %>">Create video project</a></p>
2023-03-03 15:36:18 -05:00
<p class="channel-description"><%= channel.description %></p>
</div>
<div id="sidebar" class="four columns">
<div class="actions-bar">
<span><a href="/channel/<%= channel.id %>/edit">Edit <i class="fa-solid fa-pen-to-square"></i></a></span><span>
<a href="/channel/<%= channel.id %>/delete">Delete <i class="fa-solid fa-trash"></i></a></span>
</div>
<div class="channel-path">
<p><span><%= channel.directory_path %></span></p>
</div>
2023-03-03 15:36:18 -05:00
<div class="channel-open">
<p>Open projects: <span><%= channel.openProjects() %></span></p>
</div>
<div class="channel-videos">
<p>Total videos: <span><%= channel.videos.length %></span></p>
</div>
</div>
</div>
2023-03-03 15:36:18 -05:00
<hr>
<div class="row">
<div class="twelve columns">
<h3>Recently updated channel videos:</h3>
2023-03-03 15:36:18 -05:00
<% if channel.videos.length > 0 %>
<table class="u-full-width">
<thead>
<tr>
<th>Video name</th>
<th>Video serial</th>
<th>Video description</th>
<th>Last updated</th>
2023-03-03 15:36:18 -05:00
</tr>
</thead>
<tbody>
<% channel_videos.each do |v| %>
2023-03-03 15:36:18 -05:00
<tr>
<td><a href="/video/<%= v.id %>"><%= v.name %></a></td>
<td><%= serialize(v.serial) %></td>
<td><%= v.description %></td>
<td><%= date_format(v.updated_at) %></td>
2023-03-03 15:36:18 -05:00
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p>There are no videos associated with this project yet.</p>
<% end %>
</div>
</div>