Added channel and video edit pages; added link back to channel from video view page

This commit is contained in:
2023-03-04 08:47:07 -05:00
parent ef1813f16e
commit 5ed1771b18
5 changed files with 147 additions and 1 deletions

34
views/channel/edit.erb Normal file
View File

@ -0,0 +1,34 @@
<div class="row">
<div class="twelve columns">
<h1>Editing: <%= channel.name %></h1>
</div>
</div>
<div class="row">
<div class="twelve columns">
<form action="/channel/<%= channel.id %>/edit" method="POST" class="u-full-width">
<div class="row">
<div class="columns twelve">
<label for="channel_name">Channel name:</label>
<input class="u-full-width" type="text" placeholder="My new channel" id="channel_name" name="channel_name" required value="<%= channel.name %>">
</div>
</div>
<div class="row">
<div class="columns twelve">
<label for="channel_dir">Channel directory:</label>
<input class="u-full-width" type="text" id="channel_dir" name="channel_dir" required value="<%= channel.directory_path %>">
</div>
</div>
<div class="row">
<div class="twelve columns">
<label for="channel_description">Channel description:</label>
<textarea class="u-full-width" type="text" placeholder="Description of the channel" id="channel_description" name="channel_description"><%= channel.description %></textarea>
</div>
</div>
<input class="button-primary u-full-width" type="submit" value="Submit">
</form>
</div>
</div>