From f12fd7b4a364c5c243ced437bb8751f91a48a183 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 16 Oct 2015 15:10:36 +1100 Subject: [PATCH] Adding button for print action to admin orders show page --- .../spree/admin/orders/show/add_print_button.html.haml.deface | 3 +++ config/locales/en.yml | 1 + 2 files changed, 4 insertions(+) create mode 100644 app/overrides/spree/admin/orders/show/add_print_button.html.haml.deface diff --git a/app/overrides/spree/admin/orders/show/add_print_button.html.haml.deface b/app/overrides/spree/admin/orders/show/add_print_button.html.haml.deface new file mode 100644 index 0000000000..e48ad372e9 --- /dev/null +++ b/app/overrides/spree/admin/orders/show/add_print_button.html.haml.deface @@ -0,0 +1,3 @@ +/ insert_after "code[erb-loud]:contains('button_link_to t(:edit)')" +- if @order.complete? + %li= button_link_to t(:print), print_admin_order_url(@order), :method => :get, :icon => 'icon-print', :target => "_blank" diff --git a/config/locales/en.yml b/config/locales/en.yml index b9a330b20e..e6ede20009 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -19,6 +19,7 @@ en: producers: Aussie Producers producers_join: Australian producers are now welcome to join the Open Food Network. charges_sales_tax: Charges GST? + print: "Print" logo: "Logo (640x130)" logo_mobile: "Mobile logo (75x26)"