mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Add distributor name to admin orders table
This commit is contained in:
@@ -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']",
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
/ insert_top "[data-hook='admin_orders_index_rows']"
|
||||
|
||||
%td.align-center
|
||||
= order.distributor.name
|
||||
@@ -0,0 +1,3 @@
|
||||
/ insert_top "[data-hook='admin_orders_index_headers']"
|
||||
%th
|
||||
Distributor
|
||||
@@ -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 :)
|
||||
Reference in New Issue
Block a user