mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Moving standing orders products panel template into separate partial
This commit is contained in:
15
app/views/admin/standing_orders/_products_panel.html.haml
Normal file
15
app/views/admin/standing_orders/_products_panel.html.haml
Normal file
@@ -0,0 +1,15 @@
|
||||
= render :partial => "spree/admin/variants/autocomplete", :formats => :js
|
||||
%script{ type: "text/ng-template", id: "admin/panels/standing_order_products.html" }
|
||||
%form{ name: 'standing_order_form', ng: { controller: 'ProductsPanelController' } }
|
||||
%div{ style: 'width: 90%; margin: auto;' }
|
||||
= render 'products'
|
||||
%a.button.update.fullwidth{ ng: { class: "{disabled: saved() && !saving, saving: saving}", click: "save()" } }
|
||||
%span{ ng: {hide: "saved() || saving" } }
|
||||
SAVE
|
||||
%i.icon-save
|
||||
%span{ ng: {show: "saved() && !saving" } }
|
||||
SAVED
|
||||
%i.icon-ok-sign
|
||||
%span{ ng: {show: "saving" } }
|
||||
SAVING
|
||||
%i.icon-refresh
|
||||
@@ -1,18 +1,4 @@
|
||||
= render :partial => "spree/admin/variants/autocomplete", :formats => :js
|
||||
%script{ type: "text/ng-template", id: "admin/panels/standing_order_products.html" }
|
||||
%form{ name: 'standing_order_form', ng: { controller: 'ProductsPanelController' } }
|
||||
%div{ style: 'width: 90%; margin: auto;' }
|
||||
= render 'products'
|
||||
%a.button.update.fullwidth{ ng: { class: "{disabled: saved() && !saving, saving: saving}", click: "save()" } }
|
||||
%span{ ng: {hide: "saved() || saving" } }
|
||||
SAVE
|
||||
%i.icon-save
|
||||
%span{ ng: {show: "saved() && !saving" } }
|
||||
SAVED
|
||||
%i.icon-ok-sign
|
||||
%span{ ng: {show: "saving" } }
|
||||
SAVING
|
||||
%i.icon-refresh
|
||||
= render 'products_panel'
|
||||
|
||||
%table.index#standing_orders
|
||||
%col.customer{ width: "20%", 'ng-show' => 'columns.customer.visible' }
|
||||
|
||||
Reference in New Issue
Block a user