mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Apply capture order override
This commit is contained in:
@@ -87,3 +87,7 @@ div#group_buy_calculation {
|
||||
th.actions {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table.index td.actions {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
Deface::Override.new(:virtual_path => "spree/admin/orders/index",
|
||||
:name => "add_capture_order_shortcut",
|
||||
:insert_bottom => "[data-hook='admin_orders_index_row_actions']",
|
||||
:partial => 'spree/admin/orders/capture'
|
||||
)
|
||||
# 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']",
|
||||
:attributes => {:class => "actions", :style => "text-align:left;"} #removes 'align-center' class
|
||||
)
|
||||
@@ -95,11 +95,12 @@
|
||||
%span{class: "state #{order.shipment_state}"}= link_to t("shipment_states.#{order.shipment_state}"), admin_order_shipments_path(order) if order.shipment_state
|
||||
%td= mail_to order.email
|
||||
%td.align-center= order.display_total.to_html
|
||||
%td.actions.align-center{"data-hook" => "admin_orders_index_row_actions"}
|
||||
%td.actions{"data-hook" => "admin_orders_index_row_actions"}
|
||||
= link_to_edit_url edit_admin_order_path(order), :title => "admin_edit_#{dom_id(order)}", :no_text => true
|
||||
- if order.ready_to_ship?
|
||||
- # copied from backend/app/views/spree/admin/payments/_list.html.erb
|
||||
= link_to_with_icon "icon-road", t('admin.orders.index.ship'), fire_admin_order_url(order, :e => 'ship'), :method => :put, :no_text => true, :data => {:action => 'ship', :confirm => t(:are_you_sure)}
|
||||
= render partial: 'spree/admin/orders/capture', locals: {order: order}
|
||||
- else
|
||||
.no-objects-found
|
||||
= t(:no_orders_found)
|
||||
|
||||
Reference in New Issue
Block a user