diff --git a/README.md b/README.md index ab70909..baed7a6 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,7 @@ Available hooks: |Type|Hook|Note |--|--|--| -View Hook|:customer_actions_top, { customer: @customer }| Used to add action links to customer view -View Hook|:customer_actions_bottom, { customer: @customer} | Used to add action links to customer view +View Hook|:view_customers_show_contextual, { customer: @customer } | Used to add action links to the customer page's top-right action area (return links styled like Redmine's, e.g. `link_to sprite_icon('add', 'Label'), path, class: 'icon icon-add'`). Replaces `customer_actions_top` / `customer_actions_bottom` View Hook|:pdf_left, { issue: issue } | Used to add text to left side of PDF View Hook|:pdf_right, { issue: issue } | Used to add text to right side of PDF View Hook|:show_customer_view_right, { customer: customer } | Used to show partials on right side of customer view diff --git a/app/views/customers/_actions.html.erb b/app/views/customers/_new_issue_link_script.html.erb similarity index 76% rename from app/views/customers/_actions.html.erb rename to app/views/customers/_new_issue_link_script.html.erb index e690341..00358e0 100644 --- a/app/views/customers/_actions.html.erb +++ b/app/views/customers/_new_issue_link_script.html.erb @@ -1,19 +1,7 @@ -<%= call_hook :customer_actions_top, { customer: @customer } %> - -
- <%= link_to t(:label_new_issue), new_issue_path(issue: { customer_id: @customer.id }), id: "dynamic-new-issue-link", target: :_blank %> -
- -- <%= link_to t(:label_create_estimate), "https://qbo.intuit.com/app/estimate?nameId=#{@customer.id}", target: :_blank %> -
- -- <%= link_to t(:label_create_payment), "https://qbo.intuit.com/app/recvpayment?nameId=#{@customer.id}", target: :_blank %> -
- -<%= call_hook :customer_actions_bottom, { customer: @customer } %> - +<%# + Adds the estimate and vehicle ticked on the customer page to the "New issue" link + (#dynamic-new-issue-link in the contextual area). One of each can be ticked. +%> \ No newline at end of file + diff --git a/app/views/customers/show.html.erb b/app/views/customers/show.html.erb index 2992ca5..2c25e15 100644 --- a/app/views/customers/show.html.erb +++ b/app/views/customers/show.html.erb @@ -1,4 +1,13 @@