now this is what i call an app

This commit is contained in:
Roscoe 2025-09-08 03:34:58 +01:00
commit 8063246b68
Signed by: RoscoeDaWah
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE
97 changed files with 1989 additions and 0 deletions

View file

@ -0,0 +1,11 @@
<%= form_with model: tape do |form| %>
<div>
<%= form.label :title %>
<%= form.text_field :title %>
<%= form.file_field :video, :accept => 'video/quicktime,video/mp4' %>
</div>
<div>
<%= form.submit %>
</div>
<% end %>

View file

@ -0,0 +1,4 @@
<h1>Edit tape</h1>
<%= render "form", tape: @tape %>
<%= link_to "Cancel", @tape %>

View file

@ -0,0 +1,11 @@
<h1>Tapes</h1>
<%= link_to "New tape", new_tape_path if authenticated? %>
<div id="tapes">
<% @tapes.each do |tape| %>
<div>
<%= link_to tape.title, tape %>
</div>
<% end %>
</div>

View file

@ -0,0 +1,4 @@
<h1>New tape</h1>
<%= render "form", tape: @tape %>
<%= link_to "Cancel", tapes_path %>

View file

@ -0,0 +1,11 @@
<% cache @tape do %>
<h1><%= @tape.title %></h1>
<% end %>
<% if @tape.video.attached? %>
<%= video_tag @tape.video, :controls => true%>
<% end %>
<%= link_to "Back", tapes_path%>
<% if authenticated? %>
<%= link_to "Edit", edit_tape_path(@tape) %>
<%= button_to "Delete", @tape, method: :delete, data: { turbo_confirm: "Are you sure?" } %>
<% end %>