Updated video view page; added recently updated videos to dashboard
This commit is contained in:
parent
e39728cb33
commit
db74e26124
@ -61,8 +61,10 @@ hr{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#channel-header{
|
||||
.channel-name{
|
||||
#channel-header,
|
||||
#video-header{
|
||||
.channel-name,
|
||||
.video-name{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.channel-created,
|
||||
@ -75,7 +77,8 @@ hr{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.channel-description{
|
||||
.channel-description,
|
||||
.video-description{
|
||||
margin-top: 10px;
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
|
@ -2,9 +2,11 @@ namespace '/' do
|
||||
|
||||
get '' do
|
||||
channels = Channel.reverse(:updated_at).limit(10).all()
|
||||
videos = Video.reverse(:updated_at).limit(10).all()
|
||||
erb :index, :locals => {
|
||||
:title => 'Dashboard',
|
||||
:channels => channels
|
||||
:channels => channels,
|
||||
:videos => videos
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -8,6 +8,27 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="twelve columns">
|
||||
<table class="u-full-width">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Video name</th>
|
||||
<th>Video serial</th>
|
||||
<th>Video channel</th>
|
||||
<th>Last updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% videos.each do |v| %>
|
||||
<tr>
|
||||
<td><a href="/video/<%= v.id %>"><%= v.name %></a></td>
|
||||
<td><%= serialize(v.serial) %></td>
|
||||
<td><%= v.channel.name %></td>
|
||||
<td><%= date_format(v.updated_at) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table class="u-full-width">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -1,19 +1,24 @@
|
||||
<div id="video-header" class="row">
|
||||
<div class="twelve columns">
|
||||
<div class="eight columns">
|
||||
<h1 class="video-name"><%= video.name %></h1>
|
||||
<h3 class="video-serial"><%= video.channel.name %> - <%= serialize(video.serial) %></h3>
|
||||
<h4 class="video-created">Item added at: <%= date_format(video.created_at) %></h4>
|
||||
<% if video.updated_at %>
|
||||
<h4 class="video-updated">Last updated at: <%= date_format(video.updated_at) %></h4>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="twelve columns">
|
||||
<p class="inventory-actions">
|
||||
<a href="/video/<%= video.id %>/edit"><i class="fa-solid fa-pen-to-square"></i></a>
|
||||
<a href="/video/<%= video.id %>/delete"><i class="fa-solid fa-trash"></i></a>
|
||||
</p>
|
||||
<p class="video-description"><%= video.description %></p>
|
||||
</div>
|
||||
|
||||
<div id="sidebar" class="four columns">
|
||||
<div class="actions-bar">
|
||||
<span><a href="/video/<%= video.id %>/edit">Edit <i class="fa-solid fa-pen-to-square"></i></a></span><span>
|
||||
<a href="/video/<%= video.id %>/delete">Delete <i class="fa-solid fa-trash"></i></a></span>
|
||||
</div>
|
||||
<div class="video-channel">
|
||||
<p>Channel: <span><%= video.channel.name %></span></p>
|
||||
</div>
|
||||
<div class="video-serial">
|
||||
<p>Serial: <span><%= serialize(video.serial) %></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user