Added images to vehicles
This commit is contained in:
@@ -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" %>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user