stage-manager/views/channel/view.erb

55 lines
1.7 KiB
Plaintext

<div id="channel-header" class="row">
<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 %>
<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-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>
<hr>
<div class="row">
<div class="twelve columns">
<h3>Channel videos</h3>
<% if channel.videos.length > 0 %>
<table class="u-full-width">
<thead>
<tr>
<th>Video name</th>
<th>Video serial</th>
<th>Video description</th>
</tr>
</thead>
<tbody>
<% channel.videos.each do |v| %>
<tr>
<td><a href="/video/<%= v.id %>"><%= v.name %></a></td>
<td><%= serialize(v.serial) %></td>
<td><%= v.description %></td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p>There are no videos associated with this project yet.</p>
<% end %>
</div>
</div>