aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-11-13 17:19:14 +0000
committerMatthew Lemon <y@yulqen.org>2024-11-13 17:19:14 +0000
commit25afd4b7ef65ea7164b43d0599d901aedf252536 (patch)
tree026cf4168ce868fff510ebec28276a6a9643c491
parent5a9063a04b5a81de31566ad641728ca06fe96927 (diff)
Listing files missing on edit form
-rw-r--r--app/views/pdfresources/_form.html.erb68
1 files changed, 33 insertions, 35 deletions
diff --git a/app/views/pdfresources/_form.html.erb b/app/views/pdfresources/_form.html.erb
index 86b1ca5..0739bc9 100644
--- a/app/views/pdfresources/_form.html.erb
+++ b/app/views/pdfresources/_form.html.erb
@@ -32,54 +32,52 @@
<div class="my-5">
<%= form.label :pdfs, "Resource PDFs", class: "font-bold" %>
<%= form.file_field :pdfs, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
- <p class="text-sm text-gray-700">You can upload up to 10 PDFs per resource. The original files were:
+ <p class="text-sm text-gray-700">You can upload up to 10 PDFs per resource. The original files were:</p>
+ <ul class="list-disc font-bold text-green-500">
<% pdfresource.pdfs.each do |pdf| %>
- <span class="text-red-500">
- <%= pdf.filename %>
- </span>
+ <li><%= pdf.filename %></li>
<% end %>
- </p>
+ </ul>
</div>
<div class="my-5">
<%= form.label :thumbnails, class: "font-bold" %>
<%= form.file_field :thumbnails, multiple: true, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
- <p class="text-sm text-gray-700">You can upload up to 10 thumbnails per resource. The original files were:
+ <p class="text-sm text-gray-700">You can upload up to 10 thumbnails per resource. The original files were:</p>
+ <ul class="list-disc font-bold text-green-500">
<% pdfresource.thumbnails.each do |thumbnail| %>
- <span class="text-red-500">
- <%= thumbnail.filename %>
- </span>
+ <li><%= thumbnail.filename %></li>
<% end.to_sentence %>
-</p>
-</div>
+ </ul>
+ </div>
-<div class="my-5">
- <%= form.label :price, class: "font-bold" %>
- <%= form.number_field :price, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
- <p class="text-sm text-gray-700">This is what we will sell it for!</p>
-</div>
+ <div class="my-5">
+ <%= form.label :price, class: "font-bold" %>
+ <%= form.number_field :price, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ <p class="text-sm text-gray-700">This is what we will sell it for!</p>
+ </div>
-<div class="my-5">
- <%= form.label :stripe_product_id, "Stripe Product ID", class: "font-bold" %>
- <%= form.text_field :stripe_product_id, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-</div>
+ <div class="my-5">
+ <%= form.label :stripe_product_id, "Stripe Product ID", class: "font-bold" %>
+ <%= form.text_field :stripe_product_id, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ </div>
-<div class="my-5">
- <%= form.label :age_range, class: "font-bold" %>
- <%= form.text_field :age_range, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-</div>
+ <div class="my-5">
+ <%= form.label :age_range, class: "font-bold" %>
+ <%= form.text_field :age_range, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ </div>
-<div class="my-5">
- <%= form.label :curriculum, class: "font-bold" %>
- <%= form.text_field :curriculum, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-</div>
+ <div class="my-5">
+ <%= form.label :curriculum, class: "font-bold" %>
+ <%= form.text_field :curriculum, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ </div>
-<div class="my-5">
- <%= form.label :feature_slot, class: "font-bold" %>
- <%= form.number_field :feature_slot, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
-</div>
+ <div class="my-5">
+ <%= form.label :feature_slot, class: "font-bold" %>
+ <%= form.number_field :feature_slot, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
+ </div>
-<div class="inline">
- <%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
-</div>
+ <div class="inline">
+ <%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
+ </div>
<% end %>