diff --git a/app/overrides/add_capture_order_shortcut.rb b/app/overrides/add_capture_order_shortcut.rb index f733d31531..b24744261e 100644 --- a/app/overrides/add_capture_order_shortcut.rb +++ b/app/overrides/add_capture_order_shortcut.rb @@ -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']", diff --git a/app/overrides/spree/admin/orders/index/add_distributor_td.html.haml.deface b/app/overrides/spree/admin/orders/index/add_distributor_td.html.haml.deface new file mode 100644 index 0000000000..0a11ef2775 --- /dev/null +++ b/app/overrides/spree/admin/orders/index/add_distributor_td.html.haml.deface @@ -0,0 +1,4 @@ +/ insert_top "[data-hook='admin_orders_index_rows']" + +%td.align-center + = order.distributor.name diff --git a/app/overrides/spree/admin/orders/index/add_distributor_th.html.haml.deface b/app/overrides/spree/admin/orders/index/add_distributor_th.html.haml.deface new file mode 100644 index 0000000000..f9bc5adf5b --- /dev/null +++ b/app/overrides/spree/admin/orders/index/add_distributor_th.html.haml.deface @@ -0,0 +1,3 @@ +/ insert_top "[data-hook='admin_orders_index_headers']" +%th + Distributor diff --git a/app/overrides/spree/admin/orders/index/rearrange_cols.html.haml.deface b/app/overrides/spree/admin/orders/index/rearrange_cols.html.haml.deface new file mode 100644 index 0000000000..7a019e9869 --- /dev/null +++ b/app/overrides/spree/admin/orders/index/rearrange_cols.html.haml.deface @@ -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 :) \ No newline at end of file