Add distributor name to admin orders table

This commit is contained in:
David Cook
2013-09-12 15:16:51 +10:00
parent b7541dcd52
commit a99f23eb01
4 changed files with 13 additions and 13 deletions

View File

@@ -3,19 +3,7 @@ Deface::Override.new(:virtual_path => "spree/admin/orders/index",
:insert_bottom => "[data-hook='admin_orders_index_row_actions']",
:partial => 'spree/admin/orders/capture'
)
#Resize columns to fit new button (note: this may break with a new version of spree)
Deface::Override.new(:virtual_path => "spree/admin/orders/index",
:name => "add_capture_order_shortcut_first_column",
:set_attributes => "#listing_orders colgroup col:first-child",
:attributes => {:style => "width: 12%"} #was 16%
)
Deface::Override.new(:virtual_path => "spree/admin/orders/index",
:name => "add_capture_order_shortcut_last_column",
:set_attributes => "#listing_orders colgroup col:last-child",
:attributes => {:style => "width: 12%"} #was 8%
)
#And align actions column (not spree standard, but looks better IMO)
# And align actions column (not spree standard, but looks better IMO)
Deface::Override.new(:virtual_path => "spree/admin/orders/index",
:name => "add_capture_order_shortcut_align",
:set_attributes => "[data-hook='admin_orders_index_row_actions']",

View File

@@ -0,0 +1,4 @@
/ insert_top "[data-hook='admin_orders_index_rows']"
%td.align-center
= order.distributor.name

View File

@@ -0,0 +1,3 @@
/ insert_top "[data-hook='admin_orders_index_headers']"
%th
Distributor

View File

@@ -0,0 +1,5 @@
/ replace_contents "table#listing_orders colgroup"
/ See also: add_capture_order_shortcut, admin/orders/index/add_distributor_*to_admin_orders
%col{style: "width: 10%"}
-# There are 8 other columns, but they seem to sort themselves out :)