mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-17 18:20:36 -05:00
Customer page: Customers » name trail, actions under it, Open in QuickBooks
- The title is a trail back to the customer list, like Redmine's pages, instead of "Customer #id - name" - The action links sit on their own line under the title (qbo-under-title, also used by redmine_qbo_vehicles), so a long name and the many actions don't crowd each other - Open in QuickBooks joins the action links, as on the payments, invoice and estimate pages, in place of the name linking to QuickBooks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
489edd97fa
commit
e2a871b1e8
3 files changed
+23
-8
No files matched your search
@@ -1,11 +1,16 @@
|
||||
<div class="contextual">
|
||||
<% html_title @customer.to_s %>
|
||||
|
||||
<h2><%= link_to l(:label_customers), customers_path %> » <%= @customer.to_s %></h2>
|
||||
|
||||
<%# Under the title rather than beside it, so a long name and the many actions don't crowd each other %>
|
||||
<div class="contextual qbo-under-title">
|
||||
<%# New issue for this customer; picks up what's ticked on this page (an estimate, other plugins' items) %>
|
||||
<%= link_to sprite_icon('add', l(:label_new_issue)), new_issue_path(issue: { customer_id: @customer.id }),
|
||||
id: 'dynamic-new-issue-link', class: 'icon icon-add', target: :_blank %>
|
||||
<%# Plugins add their customer actions here (e.g. redmine_qbo_calendar's Add appointment) %>
|
||||
<%= call_hook :view_customers_show_contextual, { customer: @customer } %>
|
||||
<%# Estimates, invoices and payments are handled here, each shown to users with its permission. The customer's
|
||||
name below links to their QuickBooks account page as a fallback. %>
|
||||
<%# Estimates, invoices and payments are handled here, each shown to users with its permission; Open in
|
||||
QuickBooks goes to their QuickBooks account page for anything else. %>
|
||||
<% if RedmineQboBilling.writer? %>
|
||||
<%= render partial: 'qbo_estimates/customer_link', locals: { customer: @customer } %>
|
||||
<% end %>
|
||||
@@ -22,9 +27,10 @@
|
||||
<%= link_to sprite_icon('edit', l(:button_edit)), edit_customer_path(@customer),
|
||||
class: 'icon icon-edit', accesskey: accesskey(:edit) %>
|
||||
<% end %>
|
||||
<%= link_to sprite_icon('link', l(:button_open_in_quickbooks)),
|
||||
"https://#{RedmineQbo.sandbox_mode? ? 'sandbox' : 'app'}.qbo.intuit.com/app/customerdetail?nameId=#{@customer.id}",
|
||||
class: 'icon icon-link', target: :_blank, rel: 'noopener' %>
|
||||
</div>
|
||||
|
||||
<h2><%=t(:field_customer)%> #<%= @customer.id %> - <%= link_to @customer.to_s, "https://#{RedmineQbo.sandbox_mode? ? "sandbox" : "app"}.qbo.intuit.com/app/customerdetail?nameId=#{@customer.id}", target: :_blank %> </h2>
|
||||
<div class="issue">
|
||||
|
||||
<div class="splitcontent">
|
||||
|
||||
Reference in new issue
Block a user