diff --git a/app/views/customers/_show_hook.html.erb b/app/views/customers/_show_hook.html.erb index bf9b353..46457eb 100644 --- a/app/views/customers/_show_hook.html.erb +++ b/app/views/customers/_show_hook.html.erb @@ -1,5 +1,5 @@

<%=t(:field_vehicles)%>:

-<%= render partial: 'vehicles/list', locals: { vehicles: customer.vehicles.paginate(page: params[:page]) } %> +<%= render partial: 'vehicles/list', locals: { vehicles: customer.vehicles.paginate(page: params[:page]), show_customer: false, show_checkbox: false } %>
<%= button_to t(:button_new_vehicle), new_customer_vehicle_path(customer), method: :get %>
\ No newline at end of file diff --git a/app/views/vehicles/_list.html.erb b/app/views/vehicles/_list.html.erb index 096e6a1..68208cf 100644 --- a/app/views/vehicles/_list.html.erb +++ b/app/views/vehicles/_list.html.erb @@ -5,14 +5,23 @@
- <%= check_box_tag "vehicle_ids[]", vehicle.id, false, onchange: "updateLink()", data: { url: vehicle_path(vehicle).html_safe, text: vehicle.to_s }, class: "appointment checkbox" %> - + <% if show_checkbox %> + <%= check_box_tag "vehicle_ids[]", vehicle.id, false, onchange: "updateLink()", data: { url: vehicle_path(vehicle).html_safe, text: vehicle.to_s }, class: "appointment checkbox" %> + <% else %> +
+
+ <% end %> +
<%= link_to vehicle.to_s, vehicle_path(vehicle) %>
<%= vehicle.vin.scan(/.{1,9}/)[0] if vehicle.vin %><%=vehicle.vin.scan(/.{1,9}/)[1] if vehicle.vin%> + <% if show_customer %> +
+ <%= vehicle.customer %> + <% end %>
diff --git a/app/views/vehicles/index.html.erb b/app/views/vehicles/index.html.erb index 8c72885..9d072fc 100644 --- a/app/views/vehicles/index.html.erb +++ b/app/views/vehicles/index.html.erb @@ -1,4 +1,4 @@

<%=t(:label_customer_vehicles)%> <%= render partial: 'vehicles/search' %>


-<%= render partial: 'vehicles/list', locals: {vehicles: @vehicles} %> +<%= render partial: 'vehicles/list', locals: {vehicles: @vehicles, show_customer: true, show_checkbox: false} %>