Added images to vehicles
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

This commit is contained in:
2024-08-20 20:26:06 +02:00
parent 132ea2c51d
commit f50bf2fa5f
5 changed files with 25 additions and 4 deletions

View File

@@ -9,6 +9,13 @@
</ul>
</div>
<% end %>
<div class="my-5">
<%= form.label :images %>
<% vehicle.images.each do |image| %>
<%= form.hidden_field :images, multiple: true, value: image.signed_id %>
<% end %>
<%= form.file_field :images, multiple: true, 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 :license_plate %>
<%= form.text_field :license_plate, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>

View File

@@ -1,4 +1,9 @@
<div id="<%= dom_id vehicle %>">
<p class=my-5><strong class="block mb-1 font-medium">Bilder:</strong>
<% vehicle.images.each do |image| %>
<%= image_tag image.variant(:medium) %>
<% end %>
</p>
<p class="my-5">
<strong class="block mb-1 font-medium">Angemeldet:</strong>
<%= vehicle.registered %>