mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-11-18 02:40:37 -05:00
Vehicle page: Edit and Delete in the contextual area instead of buttons
Moves Edit and Delete from buttons under the vehicle details to Redmine's standard top-right contextual area (pencil and trash icons, "e" access key, Redmine's delete confirmation). Same permissions; Delete still only shows for vehicles without issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
2 files changed
+11
-10
No files matched your search
@@ -52,13 +52,3 @@
|
||||
at <%= mileage %> <%= t(:label_miles) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<div style="float: right;">
|
||||
<% 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 %>
|
||||
</div>
|
||||
Reference in new issue
Block a user