From a50c4e330fcffc7caf3f59f4634959c157f41797 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sat, 25 Oct 2014 18:03:50 +0200 Subject: [PATCH] Add a "Create a new invoice" button per customer This is done similarly as in the customer_form view. --- stoptime.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/stoptime.rb b/stoptime.rb index 687173c..d43419f 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -2022,7 +2022,13 @@ module StopTime::Views div.span7 do @invoices.keys.sort.each do |customer| next if @invoices[customer].empty? - h3 { customer.name } + h2 do + text! customer.name + div.btn_group.pull_right do + a.btn.btn_small "ยป Create a new invoice", + :href => R(CustomersNInvoicesNew, customer.id) + end + end _invoice_list(@invoices[customer]) end end