From 094c3e70f7161f4b3ce9638bb600fffb91a538a8 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 2 Feb 2018 16:30:23 +1100 Subject: [PATCH] Replace references to 'standing order' with 'subscription' (HAML) --- .../admin/new_subscription_dialog.html.haml | 14 +-- .../form/_shop_preferences.html.haml | 12 +-- .../admin/order_cycles/_filters.html.haml | 2 +- .../_name_and_timing_form.html.haml | 2 +- app/views/admin/order_cycles/index.html.haml | 2 +- .../admin/subscriptions/_address.html.haml | 96 +++++++++---------- .../admin/subscriptions/_controls.html.haml | 4 +- app/views/admin/subscriptions/_data.html.haml | 16 ++-- .../admin/subscriptions/_details.html.haml | 42 ++++---- app/views/admin/subscriptions/_form.html.haml | 14 +-- .../admin/subscriptions/_no_results.html.haml | 6 +- .../_order_update_issues_dialog.html.haml | 6 +- .../subscriptions/_orders_panel.html.haml | 4 +- .../subscriptions/_products_panel.html.haml | 4 +- .../_standing_line_items.html.haml | 2 +- .../admin/subscriptions/_table.html.haml | 34 +++---- app/views/admin/subscriptions/edit.html.haml | 6 +- app/views/admin/subscriptions/index.html.haml | 10 +- app/views/admin/subscriptions/new.html.haml | 6 +- .../subscriptions/setup_explanation.html.haml | 10 +- 20 files changed, 146 insertions(+), 146 deletions(-) diff --git a/app/assets/javascripts/templates/admin/new_subscription_dialog.html.haml b/app/assets/javascripts/templates/admin/new_subscription_dialog.html.haml index 0f2a5f8ea8..dc96b67ac8 100644 --- a/app/assets/javascripts/templates/admin/new_subscription_dialog.html.haml +++ b/app/assets/javascripts/templates/admin/new_subscription_dialog.html.haml @@ -1,14 +1,14 @@ -#new-standing_order-dialog +#new-subscription-dialog .text-normal.margin-bottom-30.text-center - = t('admin.standing_orders.index.please_select_a_shop') + = t('admin.subscriptions.index.please_select_a_shop') - %form{ name: 'new_standing_order_form', novalidate: true, ng: { submit: "newStandingOrder()" }} + %form{ name: 'new_subscription_form', novalidate: true, ng: { submit: "newSubscription()" }} .text-center.margin-bottom-30 - %input.ofn-select2.fullwidth#new_standing_order_shop_id{ ng: { model: 'shop_id' }, required: true, name: 'shop_id', data: 'shops' } - %div{ ng: { show: "submitted && new_standing_order_form.$pristine" } } - .error{ ng: { show: "new_standing_order_form.shop_id.$error.required" } } - = t('admin.standing_orders.index.please_select_a_shop') + %input.ofn-select2.fullwidth#new_subscription_shop_id{ ng: { model: 'shop_id' }, required: true, name: 'shop_id', data: 'shops' } + %div{ ng: { show: "submitted && new_subscription_form.$pristine" } } + .error{ ng: { show: "new_subscription_form.shop_id.$error.required" } } + = t('admin.subscriptions.index.please_select_a_shop') .text-center %input.button.red.icon-plus{ type: 'submit', value: t('continue') } diff --git a/app/views/admin/enterprises/form/_shop_preferences.html.haml b/app/views/admin/enterprises/form/_shop_preferences.html.haml index 17a3406da5..2b7e916eeb 100644 --- a/app/views/admin/enterprises/form/_shop_preferences.html.haml +++ b/app/views/admin/enterprises/form/_shop_preferences.html.haml @@ -81,12 +81,12 @@ -# .row -# .alpha.eleven.columns -# .three.columns.alpha --# %label= t '.enable_standing_orders' --# %div{'ofn-with-tip' => t('.enable_standing_orders_tip')} +-# %label= t '.enable_subscriptions' +-# %div{'ofn-with-tip' => t('.enable_subscriptions_tip')} -# %a= t 'admin.whats_this' -# .three.columns --# = f.radio_button :enable_standing_orders, true --# = f.label :enable_standing_orders, t('.enable_standing_orders_true'), value: :true +-# = f.radio_button :enable_subscriptions, true +-# = f.label :enable_subscriptions, t('.enable_subscriptions_true'), value: :true -# .five.columns.omega --# = f.radio_button :enable_standing_orders, false --# = f.label :enable_standing_orders, t('.enable_standing_orders_false'), value: :false +-# = f.radio_button :enable_subscriptions, false +-# = f.label :enable_subscriptions, t('.enable_subscriptions_false'), value: :false diff --git a/app/views/admin/order_cycles/_filters.html.haml b/app/views/admin/order_cycles/_filters.html.haml index a6999f38ff..4f0df00455 100644 --- a/app/views/admin/order_cycles/_filters.html.haml +++ b/app/views/admin/order_cycles/_filters.html.haml @@ -7,7 +7,7 @@ %label{ :for => 'involving_filter' }=t('.involving') %br %input.ofn-select2.fullwidth{ :id => 'involving_filter', type: 'number', blank: "{id: 0, name: 'Any Enterprise'}", data: 'enterprises', ng: { model: 'involvingFilter' } } - - if standing_orders_enabled? + - if subscriptions_enabled? .filter_select.four.columns %label{ :for => 'schedule_filter' }=t('admin.order_cycles.index.schedule') %br diff --git a/app/views/admin/order_cycles/_name_and_timing_form.html.haml b/app/views/admin/order_cycles/_name_and_timing_form.html.haml index 40effafee4..11fc0a7a6a 100644 --- a/app/views/admin/order_cycles/_name_and_timing_form.html.haml +++ b/app/views/admin/order_cycles/_name_and_timing_form.html.haml @@ -28,7 +28,7 @@ {{ order_cycle.orders_close_at }} -- if standing_orders_enabled? +- if subscriptions_enabled? .row .two.columns.alpha = f.label :schedule_ids, t('admin.order_cycles.schedules') diff --git a/app/views/admin/order_cycles/index.html.haml b/app/views/admin/order_cycles/index.html.haml index 87d766762e..81cb437940 100644 --- a/app/views/admin/order_cycles/index.html.haml +++ b/app/views/admin/order_cycles/index.html.haml @@ -5,7 +5,7 @@ = "ng-app='admin.orderCycles'" = content_for :page_actions do - - if standing_orders_enabled? + - if subscriptions_enabled? %li %a.button.icon-plus#new-schedule{ "schedule-dialog" => true } = t('admin.order_cycles.index.new_schedule') diff --git a/app/views/admin/subscriptions/_address.html.haml b/app/views/admin/subscriptions/_address.html.haml index a30f2cac61..f7bebb3ad2 100644 --- a/app/views/admin/subscriptions/_address.html.haml +++ b/app/views/admin/subscriptions/_address.html.haml @@ -4,44 +4,44 @@ %legend{ align: 'center'}= t(:bill_address) .field %label{ for: 'bill_address_firstname'}= t(:first_name) - %input.fullwidth#bill_address_firstname{ name: 'bill_address_firstname', type: 'text', required: true, ng: { model: "standingOrder.bill_address.firstname" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.bill_address_firstname.$error.required' } }= t(:error_required) - .error{ ng: { repeat: "error in errors['bill_address.firstname']", show: 'standing_order_address_form.bill_address_firstname.$pristine' } } {{ error }} + %input.fullwidth#bill_address_firstname{ name: 'bill_address_firstname', type: 'text', required: true, ng: { model: "subscription.bill_address.firstname" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.bill_address_firstname.$error.required' } }= t(:error_required) + .error{ ng: { repeat: "error in errors['bill_address.firstname']", show: 'subscription_address_form.bill_address_firstname.$pristine' } } {{ error }} .field %label{ for: 'bill_address_lastname'}= t(:last_name) - %input.fullwidth#bill_address_lastname{ name: 'bill_address_lastname', type: 'text', required: true, ng: { model: "standingOrder.bill_address.lastname" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.bill_address_lastname.$error.required' } }= t(:error_required) - .error{ ng: { repeat: "error in errors['bill_address.lastname']", show: 'standing_order_address_form.bill_address_lastname.$pristine' } } {{ error }} + %input.fullwidth#bill_address_lastname{ name: 'bill_address_lastname', type: 'text', required: true, ng: { model: "subscription.bill_address.lastname" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.bill_address_lastname.$error.required' } }= t(:error_required) + .error{ ng: { repeat: "error in errors['bill_address.lastname']", show: 'subscription_address_form.bill_address_lastname.$pristine' } } {{ error }} .field %label{ for: 'bill_address_address1'}= t(:address) - %input.fullwidth#bill_address_address1{ name: 'bill_address_address1', type: 'text', required: true, ng: { model: "standingOrder.bill_address.address1" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.bill_address_address1.$error.required' } }= t(:error_required) - .error{ ng: { repeat: "error in errors['bill_address.address1']", show: 'standing_order_address_form.bill_address_address1.$pristine' } } {{ error }} + %input.fullwidth#bill_address_address1{ name: 'bill_address_address1', type: 'text', required: true, ng: { model: "subscription.bill_address.address1" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.bill_address_address1.$error.required' } }= t(:error_required) + .error{ ng: { repeat: "error in errors['bill_address.address1']", show: 'subscription_address_form.bill_address_address1.$pristine' } } {{ error }} .field %label{ for: 'bill_address_city'}= t(:suburb) - %input.fullwidth#bill_address_city{ name: 'bill_address_city', type: 'text', required: true, ng: { model: "standingOrder.bill_address.city" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.bill_address_city.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.bill_address.city', show: 'standing_order_address_form.bill_address_city.$pristine' } } {{ error }} + %input.fullwidth#bill_address_city{ name: 'bill_address_city', type: 'text', required: true, ng: { model: "subscription.bill_address.city" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.bill_address_city.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.bill_address.city', show: 'subscription_address_form.bill_address_city.$pristine' } } {{ error }} .field %label{ for: "bill_address_zipcode"}= t(:postcode) - %input.fullwidth#bill_address_zipcode{ name: 'bill_address_zipcode', type: 'text', required: true, ng: { model: "standingOrder.bill_address.zipcode" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.bill_address_zipcode.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.bill_address.zipcode', show: 'standing_order_address_form.bill_address_zipcode.$pristine' } } {{ error }} + %input.fullwidth#bill_address_zipcode{ name: 'bill_address_zipcode', type: 'text', required: true, ng: { model: "subscription.bill_address.zipcode" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.bill_address_zipcode.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.bill_address.zipcode', show: 'subscription_address_form.bill_address_zipcode.$pristine' } } {{ error }} .field %label{ for: "bill_address_phone"}= t(:phone) - %input.fullwidth#bill_address_phone{ name: 'bill_address_phone', type: 'text', required: true, ng: { model: "standingOrder.bill_address.phone" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.bill_address_phone.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.bill_address.phone', show: 'standing_order_address_form.bill_address_phone.$pristine' } } {{ error }} + %input.fullwidth#bill_address_phone{ name: 'bill_address_phone', type: 'text', required: true, ng: { model: "subscription.bill_address.phone" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.bill_address_phone.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.bill_address.phone', show: 'subscription_address_form.bill_address_phone.$pristine' } } {{ error }} .field %label{ for: "bill_address_country_id"}= t(:country) - %input.ofn-select2.fullwidth#bill_address_country_id{ name: 'bill_address_country_id', type: 'number', data: 'countries', required: true, placeholder: t('admin.choose'), ng: { model: 'standingOrder.bill_address.country_id' } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.bill_address_country_id.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.bill_address.country', show: 'standing_order_address_form.bill_address_country_id.$pristine' } } {{ error }} + %input.ofn-select2.fullwidth#bill_address_country_id{ name: 'bill_address_country_id', type: 'number', data: 'countries', required: true, placeholder: t('admin.choose'), ng: { model: 'subscription.bill_address.country_id' } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.bill_address_country_id.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.bill_address.country', show: 'subscription_address_form.bill_address_country_id.$pristine' } } {{ error }} .field %label{ for: "bill_address_state_id"}= t(:state) - %input.ofn-select2.fullwidth#bill_address_state_id{ name: 'bill_address_state_id', type: 'number', data: 'billStates', required: true, placeholder: t('admin.choose'), ng: { model: 'standingOrder.bill_address.state_id' } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.bill_address_state_id.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.bill_address.state', show: 'standing_order_address_form.bill_address_state_id.$pristine' } } {{ error }} + %input.ofn-select2.fullwidth#bill_address_state_id{ name: 'bill_address_state_id', type: 'number', data: 'billStates', required: true, placeholder: t('admin.choose'), ng: { model: 'subscription.bill_address.state_id' } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.bill_address_state_id.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.bill_address.state', show: 'subscription_address_form.bill_address_state_id.$pristine' } } {{ error }} .two.columns @@ -53,41 +53,41 @@ %legend{ align: 'center'}= t(:ship_address) .field %label{ for: 'ship_address_firstname'}= t(:first_name) - %input.fullwidth#ship_address_firstname{ name: 'ship_address_firstname', type: 'text', required: true, ng: { model: "standingOrder.ship_address.firstname" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.ship_address_firstname.$error.required' } }= t(:error_required) - .error{ ng: { repeat: "error in errors['ship_address.firstname']", show: 'standing_order_address_form.ship_address_firstname.$pristine' } } {{ error }} + %input.fullwidth#ship_address_firstname{ name: 'ship_address_firstname', type: 'text', required: true, ng: { model: "subscription.ship_address.firstname" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.ship_address_firstname.$error.required' } }= t(:error_required) + .error{ ng: { repeat: "error in errors['ship_address.firstname']", show: 'subscription_address_form.ship_address_firstname.$pristine' } } {{ error }} .field %label{ for: 'ship_address_lastname'}= t(:last_name) - %input.fullwidth#ship_address_lastname{ name: 'ship_address_lastname', type: 'text', required: true, ng: { model: "standingOrder.ship_address.lastname" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.ship_address_lastname.$error.required' } }= t(:error_required) - .error{ ng: { repeat: "error in errors['ship_address.lastname']", show: 'standing_order_address_form.ship_address_lastname.$pristine' } } {{ error }} + %input.fullwidth#ship_address_lastname{ name: 'ship_address_lastname', type: 'text', required: true, ng: { model: "subscription.ship_address.lastname" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.ship_address_lastname.$error.required' } }= t(:error_required) + .error{ ng: { repeat: "error in errors['ship_address.lastname']", show: 'subscription_address_form.ship_address_lastname.$pristine' } } {{ error }} .field %label{ for: 'ship_address_address1'}= t(:address) - %input.fullwidth#ship_address_address1{ name: 'ship_address_address1', type: 'text', required: true, ng: { model: "standingOrder.ship_address.address1" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.ship_address_address1.$error.required' } }= t(:error_required) - .error{ ng: { repeat: "error in errors['ship_address.address1']", show: 'standing_order_address_form.ship_address_address1.$pristine' } } {{ error }} + %input.fullwidth#ship_address_address1{ name: 'ship_address_address1', type: 'text', required: true, ng: { model: "subscription.ship_address.address1" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.ship_address_address1.$error.required' } }= t(:error_required) + .error{ ng: { repeat: "error in errors['ship_address.address1']", show: 'subscription_address_form.ship_address_address1.$pristine' } } {{ error }} .field %label{ for: 'ship_address_city'}= t(:suburb) - %input.fullwidth#ship_address_city{ name: 'ship_address_city', type: 'text', required: true, ng: { model: "standingOrder.ship_address.city" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.ship_address_city.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.ship_address.city', show: 'standing_order_address_form.ship_address_city.$pristine' } } {{ error }} + %input.fullwidth#ship_address_city{ name: 'ship_address_city', type: 'text', required: true, ng: { model: "subscription.ship_address.city" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.ship_address_city.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.ship_address.city', show: 'subscription_address_form.ship_address_city.$pristine' } } {{ error }} .field %label{ for: "ship_address_zipcode"}= t(:postcode) - %input.fullwidth#ship_address_zipcode{ name: 'ship_address_zipcode', type: 'text', required: true, ng: { model: "standingOrder.ship_address.zipcode" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.ship_address_zipcode.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.ship_address.zipcode', show: 'standing_order_address_form.ship_address_zipcode.$pristine' } } {{ error }} + %input.fullwidth#ship_address_zipcode{ name: 'ship_address_zipcode', type: 'text', required: true, ng: { model: "subscription.ship_address.zipcode" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.ship_address_zipcode.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.ship_address.zipcode', show: 'subscription_address_form.ship_address_zipcode.$pristine' } } {{ error }} .field %label{ for: "ship_address_phone"}= t(:phone) - %input.fullwidth#ship_address_phone{ name: 'ship_address_phone', type: 'text', required: true, ng: { model: "standingOrder.ship_address.phone" } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.ship_address_phone.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.ship_address.phone', show: 'standing_order_address_form.ship_address_phone.$pristine' } } {{ error }} + %input.fullwidth#ship_address_phone{ name: 'ship_address_phone', type: 'text', required: true, ng: { model: "subscription.ship_address.phone" } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.ship_address_phone.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.ship_address.phone', show: 'subscription_address_form.ship_address_phone.$pristine' } } {{ error }} .field %label{ for: "ship_address_country_id"}= t(:country) - %input.ofn-select2.fullwidth#ship_address_country_id{ name: 'ship_address_country_id', type: 'number', data: 'countries', required: true, placeholder: t('admin.choose'), ng: { model: 'standingOrder.ship_address.country_id' } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.ship_address_country_id.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.ship_address.country', show: 'standing_order_address_form.ship_address_country_id.$pristine' } } {{ error }} + %input.ofn-select2.fullwidth#ship_address_country_id{ name: 'ship_address_country_id', type: 'number', data: 'countries', required: true, placeholder: t('admin.choose'), ng: { model: 'subscription.ship_address.country_id' } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.ship_address_country_id.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.ship_address.country', show: 'subscription_address_form.ship_address_country_id.$pristine' } } {{ error }} .field %label{ for: "ship_address_state_id"}= t(:state) - %input.ofn-select2.fullwidth#ship_address_state_id{ name: 'ship_address_state_id', type: 'number', data: 'shipStates', required: true, placeholder: t('admin.choose'), ng: { model: 'standingOrder.ship_address.state_id' } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_address_form.ship_address_state_id.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.ship_address.state', show: 'standing_order_address_form.ship_address_state_id.$pristine' } } {{ error }} + %input.ofn-select2.fullwidth#ship_address_state_id{ name: 'ship_address_state_id', type: 'number', data: 'shipStates', required: true, placeholder: t('admin.choose'), ng: { model: 'subscription.ship_address.state_id' } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_address_form.ship_address_state_id.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.ship_address.state', show: 'subscription_address_form.ship_address_state_id.$pristine' } } {{ error }} diff --git a/app/views/admin/subscriptions/_controls.html.haml b/app/views/admin/subscriptions/_controls.html.haml index 86ec22c6e1..ece0c7eecb 100644 --- a/app/views/admin/subscriptions/_controls.html.haml +++ b/app/views/admin/subscriptions/_controls.html.haml @@ -1,5 +1,5 @@ -%hr.divider.sixteen.columns.alpha.omega{ ng: { show: 'shop_id && standingOrders.length > 0' } } -.controls.sixteen.columns.alpha.omega{ ng: { show: 'shop_id && standingOrders.length > 0' } } +%hr.divider.sixteen.columns.alpha.omega{ ng: { show: 'shop_id && subscriptions.length > 0' } } +.controls.sixteen.columns.alpha.omega{ ng: { show: 'shop_id && subscriptions.length > 0' } } .twelve.columns.alpha   .four.columns.omega diff --git a/app/views/admin/subscriptions/_data.html.haml b/app/views/admin/subscriptions/_data.html.haml index e92f88ccc2..046b732d14 100644 --- a/app/views/admin/subscriptions/_data.html.haml +++ b/app/views/admin/subscriptions/_data.html.haml @@ -1,8 +1,8 @@ -= admin_inject_json_ams "admin.standingOrders", "standingOrder", @standing_order, Api::Admin::StandingOrderSerializer, fee_calculator: @fee_calculator if @standing_order -= admin_inject_json_ams_array "admin.standingOrders", "shops", @shops, Api::Admin::IdNameSerializer if @shops -= admin_inject_json_ams_array "admin.standingOrders", "customers", @customers, Api::Admin::IdEmailSerializer if @customers -= admin_inject_json_ams_array "admin.standingOrders", "schedules", @schedules, Api::Admin::IdNameSerializer if @schedules -= admin_inject_json_ams_array "admin.standingOrders", "paymentMethods", @payment_methods, Api::Admin::PaymentMethodSerializer if @payment_methods -= admin_inject_json_ams_array "admin.standingOrders", "shippingMethods", @shipping_methods, Api::Admin::IdNameSerializer if @shipping_methods -= admin_inject_json_ams_array "admin.standingOrders", "orderCycles", @order_cycles, Api::Admin::BasicOrderCycleSerializer if @order_cycles -= admin_inject_available_countries(module: "admin.standingOrders") += admin_inject_json_ams "admin.subscriptions", "subscription", @subscription, Api::Admin::SubscriptionSerializer, fee_calculator: @fee_calculator if @subscription += admin_inject_json_ams_array "admin.subscriptions", "shops", @shops, Api::Admin::IdNameSerializer if @shops += admin_inject_json_ams_array "admin.subscriptions", "customers", @customers, Api::Admin::IdEmailSerializer if @customers += admin_inject_json_ams_array "admin.subscriptions", "schedules", @schedules, Api::Admin::IdNameSerializer if @schedules += admin_inject_json_ams_array "admin.subscriptions", "paymentMethods", @payment_methods, Api::Admin::PaymentMethodSerializer if @payment_methods += admin_inject_json_ams_array "admin.subscriptions", "shippingMethods", @shipping_methods, Api::Admin::IdNameSerializer if @shipping_methods += admin_inject_json_ams_array "admin.subscriptions", "orderCycles", @order_cycles, Api::Admin::BasicOrderCycleSerializer if @order_cycles += admin_inject_available_countries(module: "admin.subscriptions") diff --git a/app/views/admin/subscriptions/_details.html.haml b/app/views/admin/subscriptions/_details.html.haml index 46b3714789..6fa57f41f4 100644 --- a/app/views/admin/subscriptions/_details.html.haml +++ b/app/views/admin/subscriptions/_details.html.haml @@ -1,47 +1,47 @@ %fieldset.no-border-bottom - %legend{ align: 'center'}= t("admin.standing_orders.form.details") + %legend{ align: 'center'}= t("admin.subscriptions.form.details") .row .seven.columns.alpha.field %label{ for: 'customer_id'}= t('admin.customer') - %input.ofn-select2.fullwidth#customer_id{ name: 'customer_id', type: 'number', data: 'customers', text: 'email', required: true, placeholder: t('admin.choose'), ng: { model: 'standingOrder.customer_id', disabled: 'standingOrder.id' } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_details_form.customer_id.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.customer', show: 'standing_order_details_form.customer_id.$pristine' } } {{ error }} + %input.ofn-select2.fullwidth#customer_id{ name: 'customer_id', type: 'number', data: 'customers', text: 'email', required: true, placeholder: t('admin.choose'), ng: { model: 'subscription.customer_id', disabled: 'subscription.id' } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_details_form.customer_id.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.customer', show: 'subscription_details_form.customer_id.$pristine' } } {{ error }} .two.columns   .seven.columns.omega.field %label{ for: 'schedule_id'}= t('admin.schedule') - %input.ofn-select2.fullwidth#schedule_id{ name: 'schedule_id', type: 'number', data: 'schedules', required: true, placeholder: t('admin.choose'), ng: { model: 'standingOrder.schedule_id', disabled: 'standingOrder.id' } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_details_form.schedule_id.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.schedule', show: 'standing_order_details_form.schedule_id.$pristine'} } {{ error }} + %input.ofn-select2.fullwidth#schedule_id{ name: 'schedule_id', type: 'number', data: 'schedules', required: true, placeholder: t('admin.choose'), ng: { model: 'subscription.schedule_id', disabled: 'subscription.id' } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_details_form.schedule_id.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.schedule', show: 'subscription_details_form.schedule_id.$pristine'} } {{ error }} .row .columns.alpha.field{ ng: { class: '{four: cardRequired, seven: !cardRequired}' } } %label{ for: 'payment_method_id'} = t('admin.payment_method') %span.with-tip.icon-question-sign{ data: { powertip: "#{t('.allowed_payment_method_types_tip')}" } } - %input.ofn-select2.fullwidth#payment_method_id{ name: 'payment_method_id', type: 'number', data: 'paymentMethods', required: true, placeholder: t('admin.choose'), ng: { model: 'standingOrder.payment_method_id' } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_details_form.payment_method_id.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.payment_method', show: 'standing_order_details_form.payment_method_id.$pristine' } } {{ error }} + %input.ofn-select2.fullwidth#payment_method_id{ name: 'payment_method_id', type: 'number', data: 'paymentMethods', required: true, placeholder: t('admin.choose'), ng: { model: 'subscription.payment_method_id' } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_details_form.payment_method_id.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.payment_method', show: 'subscription_details_form.payment_method_id.$pristine' } } {{ error }} .three.columns.field{ ng: { show: 'cardRequired' } } %label{ for: 'credit_card_id'}= t('.credit_card') - %input.ofn-select2.fullwidth#credit_card_id{ name: 'credit_card_id', type: 'number', data: 'creditCards', text: 'formatted', placeholder: t('admin.choose'), ng: { model: 'standingOrder.credit_card_id', required: "cardRequired" } } + %input.ofn-select2.fullwidth#credit_card_id{ name: 'credit_card_id', type: 'number', data: 'creditCards', text: 'formatted', placeholder: t('admin.choose'), ng: { model: 'subscription.credit_card_id', required: "cardRequired" } } .error{ ng: { show: 'creditCards.$promise && creditCards.$resolved && creditCards.length == 0' } }= t('.no_cards_available') - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_details_form.credit_card_id.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.credit_card', show: 'standing_order_details_form.credit_card_id.$pristine' } } {{ error }} + .error{ ng: { show: 'subscription_form.$submitted && subscription_details_form.credit_card_id.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.credit_card', show: 'subscription_details_form.credit_card_id.$pristine' } } {{ error }} .two.columns   .seven.columns.omega.field %label{ for: 'shipping_method_id'}= t('admin.shipping_method') - %input.ofn-select2.fullwidth#shipping_method_id{ name: 'shipping_method_id', type: 'number', data: 'shippingMethods', required: true, placeholder: t('admin.choose'), ng: { model: 'standingOrder.shipping_method_id' } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_details_form.shipping_method_id.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.shipping_method', show: 'standing_order_details_form.shipping_method_id.$pristine' } } {{ error }} + %input.ofn-select2.fullwidth#shipping_method_id{ name: 'shipping_method_id', type: 'number', data: 'shippingMethods', required: true, placeholder: t('admin.choose'), ng: { model: 'subscription.shipping_method_id' } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_details_form.shipping_method_id.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.shipping_method', show: 'subscription_details_form.shipping_method_id.$pristine' } } {{ error }} .row .seven.columns.alpha.field %label{ for: 'begins_at'}= t('admin.begins_at') - %input.fullwidth#begins_at{ name: 'begins_at', type: 'text', placeholder: 'Select A Date', datepicker: 'standingOrder.begins_at', required: true, ng: { model: 'standingOrder.begins_at' } } - .error{ ng: { show: 'standing_order_form.$submitted && standing_order_details_form.begins_at.$error.required' } }= t(:error_required) - .error{ ng: { repeat: 'error in errors.begins_at', show: 'standing_order_details_form.begins_at.$pristine' } } {{ error }} + %input.fullwidth#begins_at{ name: 'begins_at', type: 'text', placeholder: 'Select A Date', datepicker: 'subscription.begins_at', required: true, ng: { model: 'subscription.begins_at' } } + .error{ ng: { show: 'subscription_form.$submitted && subscription_details_form.begins_at.$error.required' } }= t(:error_required) + .error{ ng: { repeat: 'error in errors.begins_at', show: 'subscription_details_form.begins_at.$pristine' } } {{ error }} .two.columns   .seven.columns.omega.field %label{ for: 'ends_at'}= t('admin.ends_at') - %input.fullwidth#ends_at{ name: 'ends_at', type: 'text', placeholder: 'Optional', datepicker: 'standingOrder.begins_at', ng: { model: 'standingOrder.ends_at' } } - .error{ ng: { repeat: 'error in errors.ends_at', show: 'standing_order_details_form.ends_at.$pristine' } } {{ error }} + %input.fullwidth#ends_at{ name: 'ends_at', type: 'text', placeholder: 'Optional', datepicker: 'subscription.begins_at', ng: { model: 'subscription.ends_at' } } + .error{ ng: { repeat: 'error in errors.ends_at', show: 'subscription_details_form.ends_at.$pristine' } } {{ error }} diff --git a/app/views/admin/subscriptions/_form.html.haml b/app/views/admin/subscriptions/_form.html.haml index 4b77c7dc63..ed4a2bb53e 100644 --- a/app/views/admin/subscriptions/_form.html.haml +++ b/app/views/admin/subscriptions/_form.html.haml @@ -1,20 +1,20 @@ -%form.margin-bottom-50{ name: 'standing_order_form', novalidate: true, ng: { submit: 'save()' } } +%form.margin-bottom-50{ name: 'subscription_form', novalidate: true, ng: { submit: 'save()' } } %save-bar{ persist: 'true' } - %a.button{ href: main_app.admin_standing_orders_path, ng: { show: "['details','review'].indexOf(view) >= 0", bind: "standingOrder.id? '#{t(:close)}' : '#{t(:cancel)}'" } } + %a.button{ href: main_app.admin_subscriptions_path, ng: { show: "['details','review'].indexOf(view) >= 0", bind: "subscription.id? '#{t(:close)}' : '#{t(:cancel)}'" } } %input{ type: "button", value: t(:back), ng: { click: 'back()', show: '!!backCallbacks[view]'} } %input.red{ type: "button", value: t(:next), ng: { click: 'next()', show: '!!nextCallbacks[view]' } } - %input.red{ type: "submit", value: t('admin.standing_orders.create'), ng: { show: "view=='review' && !standingOrder.id" } } - %input.red{ type: "submit", value: t(:save_changes), ng: { show: "view=='review' && standingOrder.id", disabled: 'standing_order_form.$pristine' } } + %input.red{ type: "submit", value: t('admin.subscriptions.create'), ng: { show: "view=='review' && !subscription.id" } } + %input.red{ type: "submit", value: t(:save_changes), ng: { show: "view=='review' && subscription.id", disabled: 'subscription_form.$pristine' } } .details{ ng: { show: "['details','review'].indexOf(view) >= 0" } } - %ng-form{ name: 'standing_order_details_form', ng: { controller: 'DetailsController' } } + %ng-form{ name: 'subscription_details_form', ng: { controller: 'DetailsController' } } = render 'details' .address{ ng: { show: "['address','review'].indexOf(view) >= 0" } } - %ng-form{ name: 'standing_order_address_form', ng: { controller: 'AddressController' } } + %ng-form{ name: 'subscription_address_form', ng: { controller: 'AddressController' } } = render 'address' .products{ ng: { show: "['products','review'].indexOf(view) >= 0" } } - %ng-form{ name: 'standing_order_products_form', ng: { controller: 'ProductsController' } } + %ng-form{ name: 'subscription_products_form', ng: { controller: 'ProductsController' } } = render :partial => "spree/admin/variants/autocomplete", :formats => :js = render 'products' diff --git a/app/views/admin/subscriptions/_no_results.html.haml b/app/views/admin/subscriptions/_no_results.html.haml index 70e2e2b88c..23ba6297fb 100644 --- a/app/views/admin/subscriptions/_no_results.html.haml +++ b/app/views/admin/subscriptions/_no_results.html.haml @@ -1,7 +1,7 @@ -%div.margin-top-30.text-center{ ng: { show: 'shop_id && !RequestMonitor.loading && filteredStandingOrders.length == 0' } } +%div.margin-top-30.text-center{ ng: { show: 'shop_id && !RequestMonitor.loading && filteredSubscriptions.length == 0' } } .no-results{ ng: { show: '!filtersApplied()' } } - %h1.margin-bottom-20=t('.no_standing_orders') + %h1.margin-bottom-20=t('.no_subscriptions') %span.text-big=t('.why_dont_you_add_one') .no-results{ ng: { show: 'filtersApplied()' } } - %h1=t('.no_matching_standing_orders') + %h1=t('.no_matching_subscriptions') diff --git a/app/views/admin/subscriptions/_order_update_issues_dialog.html.haml b/app/views/admin/subscriptions/_order_update_issues_dialog.html.haml index ed38b101e9..0bd1e9a9ad 100644 --- a/app/views/admin/subscriptions/_order_update_issues_dialog.html.haml +++ b/app/views/admin/subscriptions/_order_update_issues_dialog.html.haml @@ -1,16 +1,16 @@ %script{ type: "text/ng-template", id: "admin/order_update_issues_dialog.html" } #order_update_issues_dialog .message.clearfix.margin-bottom-30 - .text=t("admin.standing_orders.order_update_issues_msg") + .text=t("admin.subscriptions.order_update_issues_msg") %div{ ng: { controller: 'OrderUpdateIssuesController' } } %table %col{ style: 'width: 30%' } %col{ style: 'width: 30%' } %col{ style: 'width: 40%' } %thead - %th= t('admin.standing_orders.number') + %th= t('admin.subscriptions.number') %th= t('admin.order_cycle') - %th= t('admin.standing_orders.issue') + %th= t('admin.subscriptions.issue') %tbody %tr.proxy_order{ :id => "ppo_{{proxyOrder.id}}", ng: { repeat: 'proxyOrder in options.proxyOrders' } } %td diff --git a/app/views/admin/subscriptions/_orders_panel.html.haml b/app/views/admin/subscriptions/_orders_panel.html.haml index 206661e8d7..d21fa2c1cf 100644 --- a/app/views/admin/subscriptions/_orders_panel.html.haml +++ b/app/views/admin/subscriptions/_orders_panel.html.haml @@ -1,5 +1,5 @@ %script{ type: "text/ng-template", id: "admin/panels/proxy_orders.html" } - %form.margin-top-30{ name: 'standing_order_form', ng: { controller: 'OrdersPanelController' } } + %form.margin-top-30{ name: 'subscription_form', ng: { controller: 'OrdersPanelController' } } .row.standing-order-orders .fourteen.columns.offset-by-one %table @@ -13,7 +13,7 @@ %th= t('total') %th.actions %tbody - %tr.proxy_order{ :id => "po_{{proxyOrder.id}}", ng: { repeat: 'proxyOrder in standingOrder.not_closed_proxy_orders' } } + %tr.proxy_order{ :id => "po_{{proxyOrder.id}}", ng: { repeat: 'proxyOrder in subscription.not_closed_proxy_orders' } } %td %div{ ng: { bind: "::orderCycleName(proxyOrder.order_cycle_id)" } } %div{ ng: { bind: "::orderCycleCloses(proxyOrder.order_cycle_id)" } } diff --git a/app/views/admin/subscriptions/_products_panel.html.haml b/app/views/admin/subscriptions/_products_panel.html.haml index 5e1ce8d4ee..99ac81f984 100644 --- a/app/views/admin/subscriptions/_products_panel.html.haml +++ b/app/views/admin/subscriptions/_products_panel.html.haml @@ -1,6 +1,6 @@ = 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' } } +%script{ type: "text/ng-template", id: "admin/panels/subscription_products.html" } + %form{ name: 'subscription_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()" } } diff --git a/app/views/admin/subscriptions/_standing_line_items.html.haml b/app/views/admin/subscriptions/_standing_line_items.html.haml index 4d665d9f10..edc0a5edaf 100644 --- a/app/views/admin/subscriptions/_standing_line_items.html.haml +++ b/app/views/admin/subscriptions/_standing_line_items.html.haml @@ -14,7 +14,7 @@ %span= t(:total) %th.orders-actions.actions %tbody - %tr.item{ id: "sli_{{$index}}", ng: { repeat: "item in standingOrder.standing_line_items | filter:{ _destroy: '!true' }", class: { even: 'even', odd: 'odd' } } } + %tr.item{ id: "sli_{{$index}}", ng: { repeat: "item in subscription.standing_line_items | filter:{ _destroy: '!true' }", class: { even: 'even', odd: 'odd' } } } %td.description {{ item.description }} %td.price.align-center {{ item.price_estimate | currency }} %td.quantity diff --git a/app/views/admin/subscriptions/_table.html.haml b/app/views/admin/subscriptions/_table.html.haml index d96ae9df9f..7fc90e343b 100644 --- a/app/views/admin/subscriptions/_table.html.haml +++ b/app/views/admin/subscriptions/_table.html.haml @@ -1,7 +1,7 @@ = render 'products_panel' = render 'orders_panel' -%table.index#standing_orders{ ng: { cloak: true, show: 'shop_id && !RequestMonitor.loading && filteredStandingOrders.length > 0' } } +%table.index#subscriptions{ ng: { cloak: true, show: 'shop_id && !RequestMonitor.loading && filteredSubscriptions.length > 0' } } %col.customer{ width: "20%", 'ng-show' => 'columns.customer.visible' } %col.schedule{ width: "20%", 'ng-show' => 'columns.schedule.visible' } %col.items{ width: "10%", 'ng-show' => 'columns.items.visible' } @@ -36,24 +36,24 @@ = t('admin.shipping_method') %th.actions   - %tbody.panel-ctrl{ object: 'standingOrder', ng: { repeat: "standingOrder in standingOrders | filter:query as filteredStandingOrders track by standingOrder.id" } } - %tr.standing_order{ :id => "so_{{standingOrder.id}}", ng: { class: { even: "'even'", odd: "'odd'" } } } - %td.customer.text-center{ ng: { show: 'columns.customer.visible', bind: '::standingOrder.customer_email' } } - %td.schedule.text-center{ ng: { show: 'columns.schedule.visible', bind: '::standingOrder.schedule_name' } } + %tbody.panel-ctrl{ object: 'subscription', ng: { repeat: "subscription in subscriptions | filter:query as filteredSubscriptions track by subscription.id" } } + %tr.subscription{ :id => "so_{{subscription.id}}", ng: { class: { even: "'even'", odd: "'odd'" } } } + %td.customer.text-center{ ng: { show: 'columns.customer.visible', bind: '::subscription.customer_email' } } + %td.schedule.text-center{ ng: { show: 'columns.schedule.visible', bind: '::subscription.schedule_name' } } %td.items.panel-toggle.text-center{ name: 'products', ng: { show: 'columns.items.visible' } } - %h5{ ng: { bind: 'itemCount(standingOrder)' } } + %h5{ ng: { bind: 'itemCount(subscription)' } } %td.orders.panel-toggle.text-center{ name: 'orders', ng: { show: 'columns.orders.visible' } } - %h5{ ng: { bind: 'standingOrder.not_closed_proxy_orders.length + standingOrder.closed_proxy_orders.length' } } + %h5{ ng: { bind: 'subscription.not_closed_proxy_orders.length + subscription.closed_proxy_orders.length' } } %td.status.text-center{ ng: { show: 'columns.state.visible' } } - %span.state{ ng: { class: "standingOrder.state", bind: "'spree.standing_order_state.' + standingOrder.state | t" } } - %td.begins_on.text-center{ ng: { show: 'columns.begins_on.visible', bind: '::standingOrder.begins_at' } } - %td.ends_on.text-center{ ng: { show: 'columns.ends_on.visible', bind: '::standingOrder.ends_at' } } - %td.payment_method{ ng: { show: 'columns.payment_method.visible', bind: '::paymentMethodsByID[standingOrder.payment_method_id].name' } } - %td.shipping_method{ ng: { show: 'columns.shipping_method.visible', bind: '::shippingMethodsByID[standingOrder.shipping_method_id].name' } } + %span.state{ ng: { class: "subscription.state", bind: "'spree.subscription_state.' + subscription.state | t" } } + %td.begins_on.text-center{ ng: { show: 'columns.begins_on.visible', bind: '::subscription.begins_at' } } + %td.ends_on.text-center{ ng: { show: 'columns.ends_on.visible', bind: '::subscription.ends_at' } } + %td.payment_method{ ng: { show: 'columns.payment_method.visible', bind: '::paymentMethodsByID[subscription.payment_method_id].name' } } + %td.shipping_method{ ng: { show: 'columns.shipping_method.visible', bind: '::shippingMethodsByID[subscription.shipping_method_id].name' } } %td.actions - %a.edit-standing-order.icon-edit.no-text{ ng: { href: '{{standingOrder.edit_path}}'}, 'ofn-with-tip' => t('.edit_standing_order') } - %a.pause-standing-order.icon-pause.no-text{ ng: { click: 'standingOrder.pause()', hide: '!!standingOrder.paused_at' }, 'ofn-with-tip' => t('.pause_standing_order') , href: 'javascript:void(0)' } - %a.unpause-standing-order.icon-play.no-text{ ng: { click: 'standingOrder.unpause()', show: '!!standingOrder.paused_at' }, 'ofn-with-tip' => t('.unpause_standing_order') , href: 'javascript:void(0)' } - %a.cancel-standing-order.icon-remove.no-text{ ng: { click: 'standingOrder.cancel()', hide: '!!standingOrder.canceled_at'}, 'ofn-with-tip' => t('.cancel_standing_order') , href: 'javascript:void(0)' } + %a.edit-standing-order.icon-edit.no-text{ ng: { href: '{{subscription.edit_path}}'}, 'ofn-with-tip' => t('.edit_subscription') } + %a.pause-standing-order.icon-pause.no-text{ ng: { click: 'subscription.pause()', hide: '!!subscription.paused_at' }, 'ofn-with-tip' => t('.pause_subscription') , href: 'javascript:void(0)' } + %a.unpause-standing-order.icon-play.no-text{ ng: { click: 'subscription.unpause()', show: '!!subscription.paused_at' }, 'ofn-with-tip' => t('.unpause_subscription') , href: 'javascript:void(0)' } + %a.cancel-standing-order.icon-remove.no-text{ ng: { click: 'subscription.cancel()', hide: '!!subscription.canceled_at'}, 'ofn-with-tip' => t('.cancel_subscription') , href: 'javascript:void(0)' } - %tr.panel-row{ object: "standingOrder", panels: "{products: 'standing_order_products', orders: 'proxy_orders'}" } + %tr.panel-row{ object: "subscription", panels: "{products: 'subscription_products', orders: 'proxy_orders'}" } diff --git a/app/views/admin/subscriptions/edit.html.haml b/app/views/admin/subscriptions/edit.html.haml index 06856c00b8..2084e9d761 100644 --- a/app/views/admin/subscriptions/edit.html.haml +++ b/app/views/admin/subscriptions/edit.html.haml @@ -1,10 +1,10 @@ - content_for :page_title do - =t('admin.standing_orders.edit') + =t('admin.subscriptions.edit') -# - content_for :page_actions do --# %li= button_link_to "Back to standing orders list", main_app.admin_standing_orders_path, icon: 'icon-arrow-left' +-# %li= button_link_to "Back to subscriptions list", main_app.admin_subscriptions_path, icon: 'icon-arrow-left' -%div{ ng: { app: 'admin.standingOrders', controller: 'StandingOrderController', cloak: true } } +%div{ ng: { app: 'admin.subscriptions', controller: 'SubscriptionController', cloak: true } } = render 'data' = render 'order_update_issues_dialog' = render 'form' diff --git a/app/views/admin/subscriptions/index.html.haml b/app/views/admin/subscriptions/index.html.haml index effe1fc8cc..6d8ccda58f 100644 --- a/app/views/admin/subscriptions/index.html.haml +++ b/app/views/admin/subscriptions/index.html.haml @@ -1,21 +1,21 @@ - content_for :page_title do - = t('admin.standing_orders.standing_orders') + = t('admin.subscriptions.subscriptions') - content_for :app_wrapper_attrs do - = "ng-app='admin.standingOrders'" + = "ng-app='admin.subscriptions'" - content_for :page_actions do %li %a.button.icon-plus#new-standing-order{ href: "javascript:void(0)", "new-standing-order-dialog" => true } - = t('admin.standing_orders.new') + = t('admin.subscriptions.new') = render :partial => 'spree/admin/shared/order_sub_menu' -= admin_inject_column_preferences module: 'admin.standingOrders' += admin_inject_column_preferences module: 'admin.subscriptions' = render 'data' = render 'order_update_issues_dialog' -%div.margin-bottom-50{ ng: { controller: 'StandingOrdersController' } } +%div.margin-bottom-50{ ng: { controller: 'SubscriptionsController' } } %save-bar{ dirty: "false", persist: "false" } = render 'filters' = render 'controls' diff --git a/app/views/admin/subscriptions/new.html.haml b/app/views/admin/subscriptions/new.html.haml index c928c0e791..c82824891c 100644 --- a/app/views/admin/subscriptions/new.html.haml +++ b/app/views/admin/subscriptions/new.html.haml @@ -1,12 +1,12 @@ -# = render :partial => 'spree/shared/error_messages', :locals => { :target => @enterprise } - content_for :page_title do - =t('admin.standing_orders.new') + =t('admin.subscriptions.new') -# - content_for :page_actions do --# %li= button_link_to "Back to standing orders list", main_app.admin_standing_orders_path, icon: 'icon-arrow-left' +-# %li= button_link_to "Back to subscriptions list", main_app.admin_subscriptions_path, icon: 'icon-arrow-left' -%div{ ng: { app: 'admin.standingOrders', controller: 'StandingOrderController', cloak: true } } +%div{ ng: { app: 'admin.subscriptions', controller: 'SubscriptionController', cloak: true } } = render 'data' = render 'wizard_progress' = render 'order_update_issues_dialog' diff --git a/app/views/admin/subscriptions/setup_explanation.html.haml b/app/views/admin/subscriptions/setup_explanation.html.haml index 3c473a0dca..f771b6af1d 100644 --- a/app/views/admin/subscriptions/setup_explanation.html.haml +++ b/app/views/admin/subscriptions/setup_explanation.html.haml @@ -1,4 +1,4 @@ -%h1.text-center.margin-bottom-30= t('admin.standing_order.standing_orders') +%h1.text-center.margin-bottom-30= t('admin.subscription.subscriptions') .row .four.columns.alpha   @@ -10,12 +10,12 @@ %i.text-big.icon-check-empty .nine.columns.omega .title.text-normal - %strong= t('.enable_standing_orders') + %strong= t('.enable_subscriptions') .steps %div - = t('.enable_standing_orders_step_1_html', + = t('.enable_subscriptions_step_1_html', enterprises_link: link_to(t('admin.enterprises.title'), main_app.admin_enterprises_path, target: '_blank')) - %div= t('.enable_standing_orders_step_2') + %div= t('.enable_subscriptions_step_2') .row.margin-bottom-20.todo{ class: shipping_and_payment_methods_ok?(@shop) ? 'done' : '' } .one.columns.alpha @@ -51,4 +51,4 @@ %div= t('.create_at_least_one_schedule_step_3') .text-normal = t('.once_you_are_done_you_can_html', - reload_this_page_link: link_to(t('.reload_this_page'), main_app.admin_standing_orders_path)) + reload_this_page_link: link_to(t('.reload_this_page'), main_app.admin_subscriptions_path))