mirror of
https://github.com/rickbarrette/redmine_qbo_vehicles.git
synced 2026-11-17 18:40:36 -05:00
Vehicle pages: Customers » customer » vehicle trail, actions under it
The vehicle, edit and new vehicle pages' titles are a trail through the vehicle's customer (Vehicles » vehicle when it has none), and the vehicle page's actions sit under the title like the customer page's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d842b9b724
commit
23f4a25070
4 files changed
+17
-5
No files matched your search
@@ -0,0 +1,9 @@
|
||||
<%# Page title: Customers » the vehicle's customer » tail (Vehicles » tail for a vehicle without a customer) %>
|
||||
<h2>
|
||||
<% if vehicle.customer %>
|
||||
<%= link_to l(:label_customers), customers_path %> » <%= link_to vehicle.customer.to_s, customer_path(vehicle.customer) %>
|
||||
<% else %>
|
||||
<%= link_to l(:field_vehicles), vehicles_path %>
|
||||
<% end %>
|
||||
» <%= tail %>
|
||||
</h2>
|
||||
@@ -1,4 +1,4 @@
|
||||
<h2><%= link_to l(:field_vehicles), vehicles_path %> » <%= link_to @vehicle.to_s, vehicle_path(@vehicle) %></h2>
|
||||
<%= render partial: 'vehicles/trail', locals: { vehicle: @vehicle, tail: link_to(@vehicle.to_s, vehicle_path(@vehicle)) } %>
|
||||
|
||||
<%= labelled_form_for @vehicle do |f| %>
|
||||
<%= render partial: 'vehicles/form', locals: { f: f } %>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<h2><%= link_to l(:field_vehicles), vehicles_path %> » <%= l(:label_new_vehicle) %></h2>
|
||||
<%= render partial: 'vehicles/trail', locals: { vehicle: @vehicle, tail: l(:label_new_vehicle) } %>
|
||||
|
||||
<%= labelled_form_for @vehicle do |f| %>
|
||||
<%# Where to go back to, and what the vehicle is being added for (see VehiclesController#create) %>
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
<div class="contextual">
|
||||
<% html_title @vehicle.to_s %>
|
||||
|
||||
<%= render partial: 'vehicles/trail', locals: { vehicle: @vehicle, tail: @vehicle.to_s } %>
|
||||
|
||||
<%# Under the title, like the customer page (redmine_qbo's qbo-under-title) %>
|
||||
<div class="contextual qbo-under-title">
|
||||
<% 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) %>
|
||||
@@ -9,8 +14,6 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%=t(:field_vehicle)%> #<%=@vehicle.id%></h2>
|
||||
|
||||
<% unless @vehicle.vin_decoded? %>
|
||||
<div id="vin-status" class="flash <%= @vehicle.error ? "error" : "notice" %>">
|
||||
<% if @vehicle.error%>
|
||||
|
||||
Reference in new issue
Block a user