mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-17 04:34:24 +00:00
Fix app_wrapper_attr code by making the content_for tag be only the name of the ng-app and ng-ctrller
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
%h1.page-title
|
||||
=t :customers
|
||||
|
||||
- content_for :app_wrapper_attrs do
|
||||
= "ng-app='admin.customers'"
|
||||
- content_for :main_ng_app_name do
|
||||
= "admin.customers"
|
||||
|
||||
- content_for :page_actions do
|
||||
%li
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
= t('.editing')
|
||||
= @enterprise.name
|
||||
|
||||
- content_for :app_wrapper_attrs do
|
||||
= "ng-app='admin.enterprises'"
|
||||
- content_for :main_ng_app_name do
|
||||
= "admin.enterprises"
|
||||
|
||||
- content_for :page_actions do
|
||||
%li= select :enterprise, :id, options_for_select(editable_enterprises.collect {|e| [e.name, e.id, {:'data-url' => "#{main_app.edit_admin_enterprise_path(e.permalink)}", :'ng-selected' => "selected==#{e.id}"}]}, @enterprise.id ), {}, {:'enterprise-switcher' => '', 'data-initial' => "#{@enterprise.id}", :'ng-init' => "selected='#{@enterprise.id}'", :'ng-model' => 'selected', :id => 'enterprise_switcher', :class => 'select2'}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
- content_for :page_title do
|
||||
= t('.title')
|
||||
|
||||
- content_for :app_wrapper_attrs do
|
||||
= "ng-app='admin.enterprises'"
|
||||
- content_for :main_ng_app_name do
|
||||
= "admin.enterprises"
|
||||
|
||||
- content_for :page_actions do
|
||||
= render 'admin/shared/user_guide_link'
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
- content_for :page_actions do
|
||||
%li= button_link_to t('.back_link'), main_app.admin_enterprises_path, icon: 'icon-arrow-left'
|
||||
|
||||
- content_for :app_wrapper_attrs do
|
||||
= "ng-app='admin.enterprises'"
|
||||
- content_for :main_ng_app_name do
|
||||
= "admin.enterprises"
|
||||
|
||||
= admin_inject_available_countries(module: 'admin.enterprises')
|
||||
= admin_inject_json "admin.enterprises", "defaultCountryID", Spree::Config[:default_country_id]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
= content_for :page_title do
|
||||
= t :admin_order_cycles
|
||||
|
||||
- content_for :app_wrapper_attrs do
|
||||
= "ng-app='admin.orderCycles'"
|
||||
- content_for :main_ng_app_name do
|
||||
= "admin.orderCycles"
|
||||
|
||||
= content_for :page_actions do
|
||||
- if subscriptions_enabled?
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.subscriptions.subscriptions')
|
||||
|
||||
- content_for :app_wrapper_attrs do
|
||||
= "ng-app='admin.subscriptions'"
|
||||
- content_for :main_ng_app_name do
|
||||
= "admin.subscriptions"
|
||||
|
||||
- content_for :page_actions do
|
||||
%li
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
- content_for :app_wrapper_attrs do
|
||||
= "ng-app='admin.lineItems'"
|
||||
- content_for :main_ng_app_name do
|
||||
= "admin.lineItems"
|
||||
|
||||
- content_for :page_title do
|
||||
%h1.page-title
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#select-customer{"data-hook" => ""}
|
||||
%fieldset.no-border-bottom
|
||||
%legend{:align => "center"}= Spree.t(:customer_search)
|
||||
- content_for :app_wrapper_attrs do
|
||||
= 'ng-app=admin.orders'
|
||||
- content_for :main_ng_app_name do
|
||||
= "admin.orders"
|
||||
= hidden_field_tag :customer_search_override, nil, distributor_id: @order.distributor_id, :class => 'fullwidth title customer-search-override'
|
||||
= render :partial => "spree/admin/orders/customer_details/autocomplete", :formats => :js
|
||||
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
|
||||
= render partial: 'spree/admin/shared/order_sub_menu'
|
||||
|
||||
- content_for :app_wrapper_attrs do
|
||||
= "ng-app='admin.orders' ng-controller='ordersCtrl'"
|
||||
- content_for :main_ng_app_name do
|
||||
= "admin.orders"
|
||||
|
||||
- content_for :main_ng_ctrl_name do
|
||||
= "ordersCtrl"
|
||||
|
||||
- content_for :table_filter_title do
|
||||
= t(:search)
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
= render :partial => 'spree/admin/shared/head'
|
||||
|
||||
%body.admin
|
||||
= render :partial => 'spree/layouts/admin_body'
|
||||
%div{ "ng-app" => yield(:main_ng_app_name).strip.html_safe, "ng-controller" => yield(:main_ng_ctrl_name).strip.html_safe }
|
||||
= render :partial => 'spree/layouts/admin_body'
|
||||
|
||||
Reference in New Issue
Block a user