diff options
Diffstat (limited to 'app/views/pdfresources')
-rw-r--r-- | app/views/pdfresources/_form.html.erb | 4 | ||||
-rw-r--r-- | app/views/pdfresources/_pdfresource.html.erb | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/views/pdfresources/_form.html.erb b/app/views/pdfresources/_form.html.erb index 1ad8fb1..a15bd67 100644 --- a/app/views/pdfresources/_form.html.erb +++ b/app/views/pdfresources/_form.html.erb @@ -90,6 +90,10 @@ <p class="text-sm text-gray-700">Number of credits required to purchase this resource.</p> </div> + <div class="my-5"> + <%= required_label_tag(form, :resource_type) %> + <%= form.collection_select :resource_type_id, ResourceType.all, :id, :name, {}, 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" %> diff --git a/app/views/pdfresources/_pdfresource.html.erb b/app/views/pdfresources/_pdfresource.html.erb index 12b2b58..8c96080 100644 --- a/app/views/pdfresources/_pdfresource.html.erb +++ b/app/views/pdfresources/_pdfresource.html.erb @@ -4,7 +4,7 @@ </div> <p class="my-5"> - <strong class="block font-bold mb-2"><%= pdfresource.name %></strong> + <%= link_to pdfresource.name, pdfresource, class: "text-blue-500 font-bold" %> </p> <div class="px-6 pt-4 pb-2"> @@ -39,6 +39,10 @@ <% end %> </div> + <p class="my-5"> + <strong class="block font-medium mb-1">Resource type:</strong> + <%= pdfresource.resource_type&.name if pdfresource.respond_to?(:resource_type) %> + </p> <p class="my-5"> <strong class="block font-medium mb-1">Price:</strong> |