Apply capture order override

This commit is contained in:
Matt-Yorkley
2018-09-11 12:06:58 +01:00
parent 507f4d0878
commit f08d6389d8
3 changed files with 6 additions and 12 deletions

View File

@@ -87,3 +87,7 @@ div#group_buy_calculation {
th.actions {
white-space: nowrap;
}
table.index td.actions {
text-align: left;
}

View File

@@ -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
)

View File

@@ -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)