mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-14 04:04:23 +00:00
Upgrade HAML syntax with script
This commit is contained in:
@@ -4,48 +4,48 @@
|
||||
%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: "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 }}
|
||||
%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']", "ng-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: "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 }}
|
||||
%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']", "ng-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: "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 }}
|
||||
%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']", "ng-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: "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 }}
|
||||
%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', "ng-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: "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 }}
|
||||
%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', "ng-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: "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 }}
|
||||
%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', "ng-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: '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 }}
|
||||
%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', "ng-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: '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 }}
|
||||
%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', "ng-show" => 'subscription_address_form.bill_address_state_id.$pristine' } {{ error }}
|
||||
|
||||
|
||||
.two.columns
|
||||
%a.button.red.fullwidth{ href: 'javascript:void(0)', ng: { click: 'shipAddressFromBilling()' } }
|
||||
%a.button.red.fullwidth{ "href" => 'javascript:void(0)', "ng-click" => 'shipAddressFromBilling()' }
|
||||
= t('copy')
|
||||
%i.icon-chevron-right
|
||||
.seven.columns.omega
|
||||
@@ -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: "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 }}
|
||||
%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']", "ng-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: "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 }}
|
||||
%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']", "ng-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: "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 }}
|
||||
%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']", "ng-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: "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 }}
|
||||
%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', "ng-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: "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 }}
|
||||
%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', "ng-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: "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 }}
|
||||
%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', "ng-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: '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 }}
|
||||
%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', "ng-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: '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 }}
|
||||
%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', "ng-show" => 'subscription_address_form.ship_address_state_id.$pristine' } {{ error }}
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
%td.vertical-align-top
|
||||
.field
|
||||
= label_tag :add_variant_id, t('.name_or_sku')
|
||||
%input#add_variant_id.variant_autocomplete.fullwidth{ type: 'number', ng: { model: 'newItem.variant_id' } }
|
||||
%input#add_variant_id.variant_autocomplete.fullwidth{ "type" => 'number', "ng-model" => 'newItem.variant_id' }
|
||||
%td.vertical-align-top
|
||||
.field
|
||||
= label_tag :add_quantity, t('.quantity')
|
||||
%input#add_quantity.fullwidth{ type: 'number', min: 1, ng: { model: 'newItem.quantity' } }
|
||||
%input#add_quantity.fullwidth{ "type" => 'number', "min" => 1, "ng-model" => 'newItem.quantity' }
|
||||
%td
|
||||
.actions
|
||||
%a.icon-plus.button.fullwidth{ href: 'javascript:void(0)', ng: { click: 'addSubscriptionLineItem()' } }
|
||||
%a.icon-plus.button.fullwidth{ "href" => 'javascript:void(0)', "ng-click" => 'addSubscriptionLineItem()' }
|
||||
= t('.add')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%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' } }
|
||||
%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
|
||||
|
||||
@@ -3,42 +3,42 @@
|
||||
.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: '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 }}
|
||||
%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', "ng-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', "ng-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: '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 }}
|
||||
%input.ofn-select2.fullwidth#schedule_id{ "name" => 'schedule_id', "type" => 'number', "data" => 'schedules', "required" => true, "placeholder" => t('admin.choose'), "ng-model" => 'subscription.schedule_id', "ng-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', "ng-show" => 'subscription_details_form.schedule_id.$pristine' } {{ error }}
|
||||
|
||||
.row
|
||||
.seven.columns.alpha.field
|
||||
%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: '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 }}
|
||||
.error{ ng: { show: 'cardRequired && customer.$promise && customer.$resolved && !customer.allow_charges' } }= t('.charges_not_allowed')
|
||||
.error{ ng: { show: 'cardRequired && customer.$promise && customer.$resolved && customer.allow_charges && !customer.default_card_present' } }= t('.no_default_card')
|
||||
.error{ ng: { repeat: 'error in errors.credit_card', show: 'subscription_details_form.payment_method_id.$pristine' } } {{ error }}
|
||||
%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" => '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', "ng-show" => 'subscription_details_form.payment_method_id.$pristine' } {{ error }}
|
||||
.error{ "ng-show" => 'cardRequired && customer.$promise && customer.$resolved && !customer.allow_charges' }= t('.charges_not_allowed')
|
||||
.error{ "ng-show" => 'cardRequired && customer.$promise && customer.$resolved && customer.allow_charges && !customer.default_card_present' }= t('.no_default_card')
|
||||
.error{ "ng-repeat" => 'error in errors.credit_card', "ng-show" => 'subscription_details_form.payment_method_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: '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 }}
|
||||
%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', "ng-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: "#{t('.begins_at_placeholder')}", data: { controller: "flatpickr" }, 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 }}
|
||||
%input.fullwidth#begins_at{ "name" => 'begins_at', "type" => 'text', "placeholder" => "#{t('.begins_at_placeholder')}", "required" => true, "data-controller" => "flatpickr", "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', "ng-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: "#{t('.ends_at_placeholder')}", data: { controller: "flatpickr" }, ng: { model: 'subscription.ends_at' } }
|
||||
.error{ ng: { repeat: 'error in errors.ends_at', show: 'subscription_details_form.ends_at.$pristine' } } {{ error }}
|
||||
%input.fullwidth#ends_at{ "name" => 'ends_at', "type" => 'text', "placeholder" => "#{t('.ends_at_placeholder')}", "data-controller" => "flatpickr", "ng-model" => 'subscription.ends_at' }
|
||||
.error{ "ng-repeat" => 'error in errors.ends_at', "ng-show" => 'subscription_details_form.ends_at.$pristine' } {{ error }}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
.row.filters
|
||||
.sixteen.columns.alpha.omega
|
||||
.filter_select.five.columns.alpha
|
||||
%label{ :for => 'query', ng: {class: '{disabled: !shop_id}'} }=t('admin.quick_search')
|
||||
%label{ "for" => 'query', "ng-class" => '{disabled: !shop_id}' }=t('admin.quick_search')
|
||||
%br
|
||||
%input.fullwidth{ :type => "text", :id => 'query', ng: { model: 'query', disabled: '!shop_id'}, :placeholder => "#{t('.query_placeholder')}" }
|
||||
%input.fullwidth{ "type" => "text", "id" => 'query', "placeholder" => "#{t('.query_placeholder')}", "ng-model" => 'query', "ng-disabled" => '!shop_id' }
|
||||
.filter_select.four.columns
|
||||
%label{ :for => 'shop_id', ng: { bind: "shop_id ? '#{t('admin.shop')}' : '#{t('admin.variant_overrides.index.select_a_shop')}'" } }
|
||||
%label{ "for" => 'shop_id', "ng-bind" => "shop_id ? '#{t('admin.shop')}' : '#{t('admin.variant_overrides.index.select_a_shop')}'" }
|
||||
%br
|
||||
%input.ofn-select2.fullwidth#shop_id{ 'ng-model' => 'shop_id', name: 'shop_id', data: 'shops' }
|
||||
.seven.columns.omega
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
%form.margin-bottom-50{ name: 'subscription_form', novalidate: true, ng: { submit: 'save()' } }
|
||||
%form.margin-bottom-50{ "name" => 'subscription_form', "novalidate" => true, "ng-submit" => 'save()' }
|
||||
%save-bar{ persist: 'true' }
|
||||
%div{ ng: { hide: 'subscription.id' } }
|
||||
%a.button{ href: main_app.admin_subscriptions_path, ng: { show: "['details','review'].indexOf(view) >= 0" } }= 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('.create'), ng: { show: "view == 'review'" } }
|
||||
%div{ ng: { show: 'subscription.id' } }
|
||||
%div{ "ng-hide" => 'subscription.id' }
|
||||
%a.button{ "href" => main_app.admin_subscriptions_path, "ng-show" => "['details','review'].indexOf(view) >= 0" }= t(:cancel)
|
||||
%input{ "type" => "button", "value" => t(:back), "ng-click" => 'back()', "ng-show" => '!!backCallbacks[view]' }
|
||||
%input.red{ "type" => "button", "value" => t(:next), "ng-click" => 'next()', "ng-show" => '!!nextCallbacks[view]' }
|
||||
%input.red{ "type" => "submit", "value" => t('.create'), "ng-show" => "view == 'review'" }
|
||||
%div{ "ng-show" => 'subscription.id' }
|
||||
%a.button{ href: main_app.admin_subscriptions_path }= t(:close)
|
||||
%input.red{ type: "button", value: t(:review), ng: { click: "setView('review')", show: "view != 'review'" } }
|
||||
%input.red{ type: "submit", value: t(:save_changes), ng: { disabled: 'subscription_form.$pristine' } }
|
||||
%input.red{ "type" => "button", "value" => t(:review), "ng-click" => "setView('review')", "ng-show" => "view != 'review'" }
|
||||
%input.red{ "type" => "submit", "value" => t(:save_changes), "ng-disabled" => 'subscription_form.$pristine' }
|
||||
|
||||
.details{ ng: { show: "view == 'details'" } }
|
||||
%ng-form{ name: 'subscription_details_form', ng: { controller: 'DetailsController' } }
|
||||
.details{ "ng-show" => "view == 'details'" }
|
||||
%ng-form{ "name" => 'subscription_details_form', "ng-controller" => 'DetailsController' }
|
||||
= render 'details'
|
||||
|
||||
.address{ ng: { show: "view == 'address'" } }
|
||||
%ng-form{ name: 'subscription_address_form', ng: { controller: 'AddressController' } }
|
||||
.address{ "ng-show" => "view == 'address'" }
|
||||
%ng-form{ "name" => 'subscription_address_form', "ng-controller" => 'AddressController' }
|
||||
= render 'address'
|
||||
|
||||
.products{ ng: { show: "view == 'products'" } }
|
||||
%ng-form{ name: 'subscription_products_form', ng: { controller: 'ProductsController' } }
|
||||
.products{ "ng-show" => "view == 'products'" }
|
||||
%ng-form{ "name" => 'subscription_products_form', "ng-controller" => 'ProductsController' }
|
||||
= render :partial => "spree/admin/variants/autocomplete", :formats => :js
|
||||
= render 'products'
|
||||
|
||||
.review{ ng: { show: "view == 'review'", controller: 'ReviewController' } }
|
||||
.review{ "ng-show" => "view == 'review'", "ng-controller" => 'ReviewController' }
|
||||
= render 'review'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
%div.sixteen.columns.alpha.omega#loading{ ng: { cloak: true, if: 'shop_id && RequestMonitor.loading' } }
|
||||
%div.sixteen.columns.alpha.omega#loading{ "ng-cloak" => true, "ng-if" => 'shop_id && RequestMonitor.loading' }
|
||||
= render partial: "components/admin_spinner"
|
||||
%h1
|
||||
= t('.loading')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
%div.margin-top-30.text-center{ ng: { show: 'shop_id && !RequestMonitor.loading && filteredSubscriptions.length == 0' } }
|
||||
.no-results{ ng: { show: '!filtersApplied()' } }
|
||||
%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_subscriptions')
|
||||
%span.text-big=t('.why_dont_you_add_one')
|
||||
|
||||
.no-results{ ng: { show: 'filtersApplied()' } }
|
||||
.no-results{ "ng-show" => 'filtersApplied()' }
|
||||
%h1=t('.no_matching_subscriptions')
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#order_update_issues_dialog
|
||||
.message.clearfix.margin-bottom-30
|
||||
.text=t("admin.subscriptions.order_update_issues_msg")
|
||||
%div{ ng: { controller: 'OrderUpdateIssuesController' } }
|
||||
%div{ "ng-controller" => 'OrderUpdateIssuesController' }
|
||||
%table
|
||||
%col{ style: 'width: 30%' }
|
||||
%col{ style: 'width: 30%' }
|
||||
@@ -12,14 +12,14 @@
|
||||
%th= t('admin.order_cycle')
|
||||
%th= t('admin.subscriptions.issue')
|
||||
%tbody
|
||||
%tr.proxy_order{ :id => "ppo_{{proxyOrder.id}}", ng: { repeat: 'proxyOrder in options.proxyOrders' } }
|
||||
%tr.proxy_order{ "id" => "ppo_{{proxyOrder.id}}", "ng-repeat" => 'proxyOrder in options.proxyOrders' }
|
||||
%td
|
||||
%a{ href: '{{::proxyOrder.edit_path}}', target: '_blank', ng: { bind: '::proxyOrder.number' } }
|
||||
%a{ "href" => '{{::proxyOrder.edit_path}}', "target" => '_blank', "ng-bind" => '::proxyOrder.number' }
|
||||
%td
|
||||
%div{ ng: { bind: "::orderCycleName(proxyOrder.order_cycle_id)" } }
|
||||
%div{ ng: { bind: "::orderCycleCloses(proxyOrder.order_cycle_id)" } }
|
||||
%td.text-center{ ng: { bind: "proxyOrder.update_issues.join(', ')" } }
|
||||
%div{ "ng-bind" => "::orderCycleName(proxyOrder.order_cycle_id)" }
|
||||
%div{ "ng-bind" => "::orderCycleCloses(proxyOrder.order_cycle_id)" }
|
||||
%td.text-center{ "ng-bind" => "proxyOrder.update_issues.join(', ')" }
|
||||
|
||||
.action-buttons.text-center
|
||||
%button{ ng: { click: "close()" } }
|
||||
%button{ "ng-click" => "close()" }
|
||||
OK
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
%script{ type: "text/ng-template", id: "admin/panels/proxy_orders.html" }
|
||||
%form.margin-top-30{ name: 'subscription_form', ng: { controller: 'OrdersPanelController' } }
|
||||
%form.margin-top-30{ "name" => 'subscription_form', "ng-controller" => 'OrdersPanelController' }
|
||||
.row.subscription-orders
|
||||
.fourteen.columns.offset-by-one
|
||||
%table
|
||||
@@ -13,14 +13,14 @@
|
||||
%th= t('total')
|
||||
%th.actions
|
||||
%tbody
|
||||
%tr.proxy_order{ :id => "po_{{proxyOrder.id}}", ng: { repeat: 'proxyOrder in subscription.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)" } }
|
||||
%div{ "ng-bind" => "::orderCycleName(proxyOrder.order_cycle_id)" }
|
||||
%div{ "ng-bind" => "::orderCycleCloses(proxyOrder.order_cycle_id)" }
|
||||
%td.text-center
|
||||
%span.state{ ng: { class: "proxyOrder.state", bind: 'stateText(proxyOrder.state)' } }
|
||||
%td.text-center{ ng: { bind: '(proxyOrder.total || subscription.estimatedTotal()) | localizeCurrency' } }
|
||||
%span.state{ "ng-class" => "proxyOrder.state", "ng-bind" => 'stateText(proxyOrder.state)' }
|
||||
%td.text-center{ "ng-bind" => '(proxyOrder.total || subscription.estimatedTotal()) | localizeCurrency' }
|
||||
%td.actions
|
||||
%a.edit-order.icon-edit.no-text{ href: '{{::proxyOrder.edit_path}}', target: '_blank', 'ofn-with-tip' => t(:edit_order), confirm_order_edit: true }
|
||||
%a.cancel-order.icon-remove.no-text{ href: 'javascript:void(0)', ng: { hide: "proxyOrder.state == 'canceled'", click: "cancelOrder(proxyOrder)" }, 'ofn-with-tip' => t(:cancel_order) }
|
||||
%a.resume-order.icon-resume.no-text{ href: 'javascript:void(0)', ng: { show: "proxyOrder.state == 'canceled'", click: "resumeOrder(proxyOrder)" }, 'ofn-with-tip' => t(:resume_order) }
|
||||
%a.cancel-order.icon-remove.no-text{ "href" => 'javascript:void(0)', "ofn-with-tip" => t(:cancel_order), "ng-hide" => "proxyOrder.state == 'canceled'", "ng-click" => "cancelOrder(proxyOrder)" }
|
||||
%a.resume-order.icon-resume.no-text{ "href" => 'javascript:void(0)', "ofn-with-tip" => t(:resume_order), "ng-show" => "proxyOrder.state == 'canceled'", "ng-click" => "resumeOrder(proxyOrder)" }
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
%div{ ng: { controller: 'SubscriptionLineItemsController' } }
|
||||
%div{ "ng-controller" => 'SubscriptionLineItemsController' }
|
||||
= render 'autocomplete'
|
||||
= render 'subscription_line_items'
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
= render :partial => "spree/admin/variants/autocomplete", :formats => :js
|
||||
%script{ type: "text/ng-template", id: "admin/panels/subscription_products.html" }
|
||||
%form{ name: 'subscription_form', ng: { controller: 'ProductsPanelController' } }
|
||||
%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()" } }
|
||||
%span{ ng: {hide: "saved() || saving" } }
|
||||
%a.button.update.fullwidth{ "ng-class" => "{disabled: saved() && !saving, saving: saving}", "ng-click" => "save()" }
|
||||
%span{ "ng-hide" => "saved() || saving" }
|
||||
= t('.save')
|
||||
%i.icon-save
|
||||
%span{ ng: {show: "saved() && !saving" } }
|
||||
%span{ "ng-show" => "saved() && !saving" }
|
||||
= t('.saved')
|
||||
%i.icon-ok-sign
|
||||
%span{ ng: {show: "saving" } }
|
||||
%span{ "ng-show" => "saving" }
|
||||
= t('.saving')
|
||||
%i.icon-refresh
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
.five.columns.alpha
|
||||
%h3= t('.details')
|
||||
.eleven.columns.omega
|
||||
%input#edit-details{ type: "button", value: t(:edit), ng: { click: "setView('details')" } }
|
||||
%input#edit-details{ "type" => "button", "value" => t(:edit), "ng-click" => "setView('details')" }
|
||||
.row
|
||||
.five.columns.alpha
|
||||
%strong= t('admin.customer')
|
||||
@@ -35,7 +35,7 @@
|
||||
.five.columns.alpha
|
||||
%h3= t('.address')
|
||||
.eleven.columns.omega
|
||||
%input#edit-address{ type: "button", value: t(:edit), ng: { click: "setView('address')" } }
|
||||
%input#edit-address{ "type" => "button", "value" => t(:edit), "ng-click" => "setView('address')" }
|
||||
.row
|
||||
.five.columns.alpha
|
||||
%strong= t('admin.bill_address')
|
||||
@@ -53,7 +53,7 @@
|
||||
.five.columns.alpha
|
||||
%h3= t('.products')
|
||||
.eleven.columns.omega
|
||||
%input#edit-products{ type: "button", value: t(:edit), ng: { click: "setView('products')" } }
|
||||
%input#edit-products{ "type" => "button", "value" => t(:edit), "ng-click" => "setView('products')" }
|
||||
.row
|
||||
%table#subscription-line-items.admin-subscription-review-subscription-line-items
|
||||
%colgroup
|
||||
@@ -69,10 +69,10 @@
|
||||
%th.total
|
||||
%span= t(:total)
|
||||
%tbody
|
||||
%tr.item{ id: "sli_{{$index}}", ng: { repeat: "item in subscription.subscription_line_items | filter:{ _destroy: '!true' }", class: { even: 'even', odd: 'odd' } } }
|
||||
%tr.item{ "id" => "sli_{{$index}}", "ng-repeat" => "item in subscription.subscription_line_items | filter:{ _destroy: '!true' }", "ng-class-even" => 'even', "ng-class-odd" => 'odd' }
|
||||
%td
|
||||
.description {{ item.description }}
|
||||
.not-in-open-and-upcoming-order-cycles-warning{ ng: { if: '!item.in_open_and_upcoming_order_cycles' } }
|
||||
.not-in-open-and-upcoming-order-cycles-warning{ "ng-if" => '!item.in_open_and_upcoming_order_cycles' }
|
||||
= t(".no_open_or_upcoming_order_cycle")
|
||||
%td.price.align-center {{ item.price_estimate | localizeCurrency }}
|
||||
%td.quantity {{ item.quantity }}
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
%span= t(:total)
|
||||
%th.orders-actions.actions
|
||||
%tbody
|
||||
%tr.item{ id: "sli_{{$index}}", ng: { repeat: "item in subscription.subscription_line_items | filter:{ _destroy: '!true' }", class: { even: 'even', odd: 'odd' } } }
|
||||
%tr.item{ "id" => "sli_{{$index}}", "ng-repeat" => "item in subscription.subscription_line_items | filter:{ _destroy: '!true' }", "ng-class-even" => 'even', "ng-class-odd" => 'odd' }
|
||||
%td
|
||||
.description {{ item.description }}
|
||||
.not-in-open-and-upcoming-order-cycles-warning{ ng: { if: '!item.in_open_and_upcoming_order_cycles' } }
|
||||
.not-in-open-and-upcoming-order-cycles-warning{ "ng-if" => '!item.in_open_and_upcoming_order_cycles' }
|
||||
= t(".not_in_open_and_upcoming_order_cycles_warning")
|
||||
%td.price.align-center {{ item.price_estimate | localizeCurrency }}
|
||||
%td.quantity
|
||||
%input{ name: 'quantity', type: 'number', min: 0, ng: { model: 'item.quantity' } }
|
||||
%input{ "name" => 'quantity', "type" => 'number', "min" => 0, "ng-model" => 'item.quantity' }
|
||||
%td.total.align-center {{ (item.price_estimate * item.quantity) | localizeCurrency }}
|
||||
%td.actions
|
||||
%a.delete-item.icon-trash.no-text{ ng: { click: 'removeSubscriptionLineItem(item)'}, :href => "javascript:void(0)" }
|
||||
%a.delete-item.icon-trash.no-text{ "href" => "javascript:void(0)", "ng-click" => 'removeSubscriptionLineItem(item)' }
|
||||
%tbody#subtotal.no-border-top
|
||||
%tr#subtotal-row
|
||||
%td{:colspan => "3"}
|
||||
@@ -34,7 +34,7 @@
|
||||
%td.total.align-center
|
||||
%span#order_subtotal {{ subscription.estimatedSubtotal() | localizeCurrency }}
|
||||
%td.actions
|
||||
%tbody#fees.no-border-top{ ng: { show: "subscription.estimatedFees() > 0" } }
|
||||
%tbody#fees.no-border-top{ "ng-show" => "subscription.estimatedFees() > 0" }
|
||||
%tr#fees-row
|
||||
%td{:colspan => "3"}
|
||||
%b
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
= render 'products_panel'
|
||||
= render 'orders_panel'
|
||||
|
||||
%table.index#subscriptions{ ng: { cloak: true, show: 'shop_id && !RequestMonitor.loading && filteredSubscriptions.length > 0' } }
|
||||
%table.index#subscriptions{ "ng-cloak" => true, "ng-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' }
|
||||
@@ -16,47 +16,47 @@
|
||||
%tr
|
||||
-# %th.bulk
|
||||
-# %input{ :type => "checkbox", :name => 'toggle_bulk', 'ng-click' => 'toggleAllCheckboxes()', 'ng-checked' => "allBoxesChecked()" }
|
||||
%th.customer{ ng: { show: 'columns.customer.visible' } }
|
||||
%th.customer{ "ng-show" => 'columns.customer.visible' }
|
||||
= t('admin.customer')
|
||||
%th.schedule{ ng: { show: 'columns.schedule.visible', } }
|
||||
%th.schedule{ "ng-show" => 'columns.schedule.visible' }
|
||||
= t('admin.schedule')
|
||||
%th.items{ ng: { show: 'columns.items.visible', } }
|
||||
%th.items{ "ng-show" => 'columns.items.visible' }
|
||||
= t('admin.items')
|
||||
%th.orders{ ng: { show: 'columns.orders.visible', } }
|
||||
%th.orders{ "ng-show" => 'columns.orders.visible' }
|
||||
= t('orders')
|
||||
%th.status{ ng: { show: 'columns.state.visible', } }
|
||||
%th.status{ "ng-show" => 'columns.state.visible' }
|
||||
= t('admin.status_state')
|
||||
%th.begins_on{ ng: { show: 'columns.begins_on.visible', } }
|
||||
%th.begins_on{ "ng-show" => 'columns.begins_on.visible' }
|
||||
= t('admin.begins_on')
|
||||
%th.ends_on{ ng: { show: 'columns.ends_on.visible', } }
|
||||
%th.ends_on{ "ng-show" => 'columns.ends_on.visible' }
|
||||
= t('admin.ends_on')
|
||||
%th.payment_method{ ng: { show: 'columns.payment_method.visible', } }
|
||||
%th.payment_method{ "ng-show" => 'columns.payment_method.visible' }
|
||||
= t('admin.payment_method')
|
||||
%th.shipping_method{ ng: { show: 'columns.shipping_method.visible', } }
|
||||
%th.shipping_method{ "ng-show" => 'columns.shipping_method.visible' }
|
||||
= t('admin.shipping_method')
|
||||
%th.actions
|
||||
|
||||
%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{ ng: { show: 'columns.customer.visible'}}
|
||||
%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'", "ng-class-odd" => "'odd'" }
|
||||
%td.customer{ "ng-show" => 'columns.customer.visible' }
|
||||
%span{ "ng-bind": '::subscription.customer_email' }
|
||||
%br
|
||||
%span{ "ng-bind": '::subscription.customer_full_name' }
|
||||
%td.schedule{ ng: { show: 'columns.schedule.visible', bind: '::subscription.schedule_name' } }
|
||||
%td.items.panel-toggle{ name: 'products', ng: { show: 'columns.items.visible' } }
|
||||
%h5{ ng: { bind: 'itemCount(subscription)' } }
|
||||
%td.orders.panel-toggle{ name: 'orders', ng: { show: 'columns.orders.visible' } }
|
||||
%h5{ ng: { bind: 'subscription.not_closed_proxy_orders.length' } }
|
||||
%td.status{ ng: { show: 'columns.state.visible' } }
|
||||
%span.state{ ng: { class: "subscription.state", bind: "'spree.subscription_state.' + subscription.state | t" } }
|
||||
%td.begins_on{ ng: { show: 'columns.begins_on.visible', bind: '::subscription.begins_at' } }
|
||||
%td.ends_on{ 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.schedule{ "ng-show" => 'columns.schedule.visible', "ng-bind" => '::subscription.schedule_name' }
|
||||
%td.items.panel-toggle{ "name" => 'products', "ng-show" => 'columns.items.visible' }
|
||||
%h5{ "ng-bind" => 'itemCount(subscription)' }
|
||||
%td.orders.panel-toggle{ "name" => 'orders', "ng-show" => 'columns.orders.visible' }
|
||||
%h5{ "ng-bind" => 'subscription.not_closed_proxy_orders.length' }
|
||||
%td.status{ "ng-show" => 'columns.state.visible' }
|
||||
%span.state{ "ng-class" => "subscription.state", "ng-bind" => "'spree.subscription_state.' + subscription.state | t" }
|
||||
%td.begins_on{ "ng-show" => 'columns.begins_on.visible', "ng-bind" => '::subscription.begins_at' }
|
||||
%td.ends_on{ "ng-show" => 'columns.ends_on.visible', "ng-bind" => '::subscription.ends_at' }
|
||||
%td.payment_method{ "ng-show" => 'columns.payment_method.visible', "ng-bind" => '::paymentMethodsByID[subscription.payment_method_id].name' }
|
||||
%td.shipping_method{ "ng-show" => 'columns.shipping_method.visible', "ng-bind" => '::shippingMethodsByID[subscription.shipping_method_id].name' }
|
||||
%td.actions
|
||||
%a.edit-subscription.icon-edit.no-text{ ng: { href: '{{subscription.edit_path}}'}, 'ofn-with-tip' => t('.edit_subscription') }
|
||||
%a.pause-subscription.icon-pause.no-text{ ng: { click: 'subscription.pause()', hide: '!!subscription.paused_at' }, 'ofn-with-tip' => t('.pause_subscription') , href: 'javascript:void(0)' }
|
||||
%a.unpause-subscription.icon-play.no-text{ ng: { click: 'subscription.unpause()', show: '!!subscription.paused_at' }, 'ofn-with-tip' => t('.unpause_subscription') , href: 'javascript:void(0)' }
|
||||
%a.cancel-subscription.icon-remove.no-text{ ng: { click: 'subscription.cancel()', hide: '!!subscription.canceled_at'}, 'ofn-with-tip' => t('.cancel_subscription') , href: 'javascript:void(0)' }
|
||||
%a.edit-subscription.icon-edit.no-text{ "ofn-with-tip" => t('.edit_subscription'), "ng-href" => '{{subscription.edit_path}}' }
|
||||
%a.pause-subscription.icon-pause.no-text{ "ofn-with-tip" => t('.pause_subscription'), "href" => 'javascript:void(0)', "ng-click" => 'subscription.pause()', "ng-hide" => '!!subscription.paused_at' }
|
||||
%a.unpause-subscription.icon-play.no-text{ "ofn-with-tip" => t('.unpause_subscription'), "href" => 'javascript:void(0)', "ng-click" => 'subscription.unpause()', "ng-show" => '!!subscription.paused_at' }
|
||||
%a.cancel-subscription.icon-remove.no-text{ "ofn-with-tip" => t('.cancel_subscription'), "href" => 'javascript:void(0)', "ng-click" => 'subscription.cancel()', "ng-hide" => '!!subscription.canceled_at' }
|
||||
|
||||
%tr.panel-row{ object: "subscription", panels: "{products: 'subscription_products', orders: 'proxy_orders'}" }
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
%ul.wizard-progress
|
||||
%li{ ng: { repeat: "step in ['details','address','products','review']", class: '{current: view==step}' } }
|
||||
%li{ "ng-repeat" => "step in ['details','address','products','review']", "ng-class" => '{current: view==step}' }
|
||||
{{ stepTitleFor(step) }}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
-# - content_for :page_actions do
|
||||
-# %li= button_link_to "Back to subscriptions list", main_app.admin_subscriptions_path, icon: 'icon-arrow-left'
|
||||
|
||||
%div{ ng: { app: 'admin.subscriptions', controller: 'SubscriptionController', cloak: true } }
|
||||
%div{ "ng-app" => 'admin.subscriptions', "ng-controller" => 'SubscriptionController', "ng-cloak" => true }
|
||||
= render 'data'
|
||||
= render 'order_update_issues_dialog'
|
||||
= render 'form'
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
= render 'data'
|
||||
= render 'order_update_issues_dialog'
|
||||
|
||||
%div.margin-bottom-50{ ng: { controller: 'SubscriptionsController' } }
|
||||
%div.margin-bottom-50{ "ng-controller" => 'SubscriptionsController' }
|
||||
%save-bar{ dirty: "false", persist: "false" }
|
||||
= render 'filters'
|
||||
= render 'controls'
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
-# - content_for :page_actions do
|
||||
-# %li= button_link_to "Back to subscriptions list", main_app.admin_subscriptions_path, icon: 'icon-arrow-left'
|
||||
|
||||
%div{ ng: { app: 'admin.subscriptions', controller: 'SubscriptionController', cloak: true } }
|
||||
%div{ "ng-app" => 'admin.subscriptions', "ng-controller" => 'SubscriptionController', "ng-cloak" => true }
|
||||
= render 'data'
|
||||
= render 'wizard_progress'
|
||||
= render 'order_update_issues_dialog'
|
||||
|
||||
Reference in New Issue
Block a user