diff --git a/app/views/vehicles/_details.html.erb b/app/views/vehicles/_details.html.erb index dde39a9..a577254 100644 --- a/app/views/vehicles/_details.html.erb +++ b/app/views/vehicles/_details.html.erb @@ -52,13 +52,3 @@ at <%= mileage %> <%= t(:label_miles) %>

<% end %> - -
- <% if User.current.allowed_to?(:edit_vehicles, nil, global: true) %> - <%= button_to t(:label_edit), edit_vehicle_path(vehicle), method: :get %> - <% end %> - <%# Vehicles with issues can't be deleted, to keep their service history %> - <% if User.current.allowed_to?(:delete_vehicles, nil, global: true) && !vehicle.issues.exists? %> - <%= button_to t(:label_delete), vehicle, method: :delete, data: { confirm: t(:warn_ru_sure) } %> - <% end %> -
\ No newline at end of file diff --git a/app/views/vehicles/show.html.erb b/app/views/vehicles/show.html.erb index 3102005..268d64b 100644 --- a/app/views/vehicles/show.html.erb +++ b/app/views/vehicles/show.html.erb @@ -1,3 +1,14 @@ +
+ <% if User.current.allowed_to?(:edit_vehicles, nil, global: true) %> + <%= link_to sprite_icon('edit', l(:button_edit)), edit_vehicle_path(@vehicle), + class: 'icon icon-edit', accesskey: accesskey(:edit) %> + <% end %> + <%# Vehicles with issues can't be deleted, to keep their service history %> + <% if User.current.allowed_to?(:delete_vehicles, nil, global: true) && !@vehicle.issues.exists? %> + <%= delete_link vehicle_path(@vehicle) %> + <% end %> +
+

<%=t(:field_vehicle)%> #<%=@vehicle.id%>

<% unless @vehicle.vin_decoded? %>