spree_backend 3.2.9 → 3.3.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend/admin.js +16 -15
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +25 -26
- data/app/assets/javascripts/spree/backend/general_settings.js.coffee +10 -12
- data/app/assets/javascripts/spree/backend/payments/edit.js.coffee +4 -6
- data/app/assets/javascripts/spree/backend/returns/return_item_selection.js +7 -1
- data/app/assets/javascripts/spree/backend/stock_transfer.js.coffee +4 -1
- data/app/assets/javascripts/spree/backend/user_picker.js +3 -1
- data/app/assets/javascripts/spree/backend.js +3 -3
- data/app/controllers/spree/admin/countries_controller.rb +1 -0
- data/app/controllers/spree/admin/log_entries_controller.rb +2 -2
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +5 -6
- data/app/controllers/spree/admin/orders_controller.rb +4 -4
- data/app/controllers/spree/admin/payments_controller.rb +21 -10
- data/app/controllers/spree/admin/products_controller.rb +5 -0
- data/app/controllers/spree/admin/promotion_rules_controller.rb +11 -7
- data/app/controllers/spree/admin/stock_transfers_controller.rb +1 -1
- data/app/controllers/spree/admin/taxons_controller.rb +31 -23
- data/app/helpers/spree/admin/base_helper.rb +1 -1
- data/app/helpers/spree/admin/navigation_helper.rb +10 -4
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/general_settings/edit.html.erb +8 -8
- data/app/views/spree/admin/images/_form.html.erb +2 -2
- data/app/views/spree/admin/images/edit.html.erb +2 -2
- data/app/views/spree/admin/images/new.html.erb +1 -1
- data/app/views/spree/admin/option_types/_form.html.erb +2 -2
- data/app/views/spree/admin/option_types/index.html.erb +4 -4
- data/app/views/spree/admin/orders/_line_items.html.erb +40 -38
- data/app/views/spree/admin/orders/_shipment.html.erb +77 -76
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +5 -5
- data/app/views/spree/admin/orders/index.html.erb +16 -16
- data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/products/_add_stock_form.html.erb +3 -3
- data/app/views/spree/admin/products/_form.html.erb +16 -16
- data/app/views/spree/admin/products/index.html.erb +4 -4
- data/app/views/spree/admin/products/new.html.erb +8 -8
- data/app/views/spree/admin/promotion_categories/index.html.erb +3 -3
- data/app/views/spree/admin/promotions/_form.html.erb +3 -3
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
- data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +2 -2
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +2 -2
- data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +2 -4
- data/app/views/spree/admin/promotions/edit.html.erb +3 -3
- data/app/views/spree/admin/promotions/index.html.erb +6 -6
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +2 -2
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +4 -4
- data/app/views/spree/admin/properties/_form.html.erb +2 -2
- data/app/views/spree/admin/properties/index.html.erb +6 -6
- data/app/views/spree/admin/prototypes/index.html.erb +4 -4
- data/app/views/spree/admin/reimbursement_types/_form.html.erb +4 -4
- data/app/views/spree/admin/reimbursements/edit.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +13 -1
- data/app/views/spree/admin/return_index/customer_returns.html.erb +2 -2
- data/app/views/spree/admin/return_index/return_authorizations.html.erb +5 -5
- data/app/views/spree/admin/shared/_content_header.html.erb +2 -2
- data/app/views/spree/admin/shared/_header.html.erb +2 -2
- data/app/views/spree/admin/shared/_index_table_options.html.erb +2 -2
- data/app/views/spree/admin/shared/_order_summary.html.erb +1 -1
- data/app/views/spree/admin/shared/_table_filter.html.erb +1 -1
- data/app/views/spree/admin/shared/_translations.html.erb +0 -1
- data/app/views/spree/admin/shared/_update_order_state.js.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +10 -10
- data/app/views/spree/admin/state_changes/index.html.erb +3 -3
- data/app/views/spree/admin/states/_form.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/_form.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +4 -4
- data/app/views/spree/admin/stock_transfers/index.html.erb +3 -3
- data/app/views/spree/admin/stock_transfers/new.html.erb +2 -2
- data/app/views/spree/admin/store_credits/index.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/_form.html.erb +2 -2
- data/app/views/spree/admin/taxonomies/_list.html.erb +2 -2
- data/app/views/spree/admin/taxonomies/{edit.erb → edit.html.erb} +0 -0
- data/app/views/spree/admin/taxonomies/index.html.erb +2 -2
- data/app/views/spree/admin/taxons/_form.html.erb +5 -5
- data/app/views/spree/admin/taxons/edit.html.erb +3 -0
- data/app/views/spree/admin/trackers/_form.html.erb +2 -2
- data/app/views/spree/admin/users/_addresses_form.html.erb +2 -2
- data/app/views/spree/admin/users/_form.html.erb +2 -2
- data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
- data/app/views/spree/admin/users/index.html.erb +5 -5
- data/app/views/spree/admin/users/items.html.erb +1 -1
- data/app/views/spree/admin/users/orders.html.erb +1 -1
- data/app/views/spree/admin/variants/_form.html.erb +2 -2
- data/app/views/spree/admin/zones/_form.html.erb +2 -2
- data/app/views/spree/layouts/admin.html.erb +3 -3
- data/config/initializers/assets.rb +1 -1
- data/lib/spree/backend/engine.rb +0 -1
- data/spec/controllers/spree/admin/base_controller_spec.rb +46 -0
- data/spec/controllers/spree/admin/customer_returns_controller_spec.rb +185 -0
- data/spec/controllers/spree/admin/general_settings_controller_spec.rb +41 -0
- data/spec/controllers/spree/admin/missing_products_controller_spec.rb +18 -0
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +199 -0
- data/spec/controllers/spree/admin/orders_controller_spec.rb +296 -0
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +64 -0
- data/spec/controllers/spree/admin/payments_controller_spec.rb +97 -0
- data/spec/controllers/spree/admin/products_controller_spec.rb +137 -0
- data/spec/controllers/spree/admin/promotion_actions_controller_spec.rb +21 -0
- data/spec/controllers/spree/admin/promotion_rules_controller_spec.rb +21 -0
- data/spec/controllers/spree/admin/promotions_controller_spec.rb +44 -0
- data/spec/controllers/spree/admin/refunds_controller_spec.rb +32 -0
- data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +74 -0
- data/spec/controllers/spree/admin/reports_controller_spec.rb +42 -0
- data/spec/controllers/spree/admin/resource_controller_spec.rb +252 -0
- data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +225 -0
- data/spec/controllers/spree/admin/return_index_controller_spec.rb +37 -0
- data/spec/controllers/spree/admin/return_items_controller_spec.rb +27 -0
- data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +14 -0
- data/spec/controllers/spree/admin/stock_items_controller_spec.rb +19 -0
- data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +41 -0
- data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +41 -0
- data/spec/controllers/spree/admin/tax_categories_controller_spec.rb +34 -0
- data/spec/controllers/spree/admin/users_controller_spec.rb +161 -0
- data/spec/controllers/spree/admin/variants_controller_spec.rb +32 -0
- data/spec/features/admin/configuration/analytics_tracker_spec.rb +47 -0
- data/spec/features/admin/configuration/countries_spec.rb +24 -0
- data/spec/features/admin/configuration/general_settings_spec.rb +44 -0
- data/spec/features/admin/configuration/payment_methods_spec.rb +63 -0
- data/spec/features/admin/configuration/roles_spec.rb +47 -0
- data/spec/features/admin/configuration/shipping_methods_spec.rb +62 -0
- data/spec/features/admin/configuration/states_spec.rb +68 -0
- data/spec/features/admin/configuration/stock_locations_spec.rb +48 -0
- data/spec/features/admin/configuration/store_credit_categories_spec.rb +50 -0
- data/spec/features/admin/configuration/tax_categories_spec.rb +56 -0
- data/spec/features/admin/configuration/tax_rates_spec.rb +18 -0
- data/spec/features/admin/configuration/zones_spec.rb +39 -0
- data/spec/features/admin/homepage_spec.rb +89 -0
- data/spec/features/admin/locale_spec.rb +31 -0
- data/spec/features/admin/orders/adjustments_promotions_spec.rb +53 -0
- data/spec/features/admin/orders/adjustments_spec.rb +124 -0
- data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +47 -0
- data/spec/features/admin/orders/customer_details_spec.rb +154 -0
- data/spec/features/admin/orders/line_items_spec.rb +51 -0
- data/spec/features/admin/orders/listing_spec.rb +224 -0
- data/spec/features/admin/orders/log_entries_spec.rb +55 -0
- data/spec/features/admin/orders/new_order_spec.rb +186 -0
- data/spec/features/admin/orders/order_details_spec.rb +660 -0
- data/spec/features/admin/orders/payments_spec.rb +244 -0
- data/spec/features/admin/orders/risk_analysis_spec.rb +48 -0
- data/spec/features/admin/orders/shipments_spec.rb +64 -0
- data/spec/features/admin/orders/state_changes_spec.rb +21 -0
- data/spec/features/admin/products/edit/images_spec.rb +86 -0
- data/spec/features/admin/products/edit/products_spec.rb +56 -0
- data/spec/features/admin/products/edit/taxons_spec.rb +41 -0
- data/spec/features/admin/products/edit/variants_spec.rb +56 -0
- data/spec/features/admin/products/option_types_spec.rb +114 -0
- data/spec/features/admin/products/products_spec.rb +445 -0
- data/spec/features/admin/products/properties_spec.rb +147 -0
- data/spec/features/admin/products/prototypes_spec.rb +112 -0
- data/spec/features/admin/products/stock_management_spec.rb +124 -0
- data/spec/features/admin/products/taxonomies_spec.rb +52 -0
- data/spec/features/admin/products/variant_spec.rb +50 -0
- data/spec/features/admin/promotions/adjustments_spec.rb +258 -0
- data/spec/features/admin/promotions/option_value_rule_spec.rb +70 -0
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +70 -0
- data/spec/features/admin/refund_reasons/refund_reasons_spec.rb +57 -0
- data/spec/features/admin/reimbursement_type/edit_reimbursement_type_spec.rb +36 -0
- data/spec/features/admin/reimbursement_type/new_reimbursement_type_spec.rb +62 -0
- data/spec/features/admin/reports_spec.rb +61 -0
- data/spec/features/admin/return_authorization_reasons/return_authorization_reasons_spec.rb +63 -0
- data/spec/features/admin/returns/customer_returns_spec.rb +80 -0
- data/spec/features/admin/returns/return_authorizations_spec.rb +152 -0
- data/spec/features/admin/stock_transfer_spec.rb +91 -0
- data/spec/features/admin/store_credits_spec.rb +93 -0
- data/spec/features/admin/taxons_spec.rb +53 -0
- data/spec/features/admin/users_spec.rb +286 -0
- data/spec/helpers/admin/base_helper_spec.rb +30 -0
- data/spec/helpers/admin/navigation_helper_spec.rb +111 -0
- data/spec/helpers/admin/promotion_rules_helper_spec.rb +12 -0
- data/spec/helpers/admin/stock_movements_helper_spec.rb +30 -0
- data/spec/models/spree/resource_spec.rb +48 -0
- data/spec/routing/admin_path_spec.rb +22 -0
- data/spec/spec_helper.rb +144 -0
- data/spec/support/appear_before_matcher.rb +8 -0
- data/spec/support/ror_ringer.jpeg +0 -0
- data/spec/test_views/spree/admin/submodule/posts/edit.html.erb +1 -0
- data/spec/test_views/spree/admin/submodule/posts/new.html.erb +1 -0
- data/spec/test_views/spree/admin/widgets/edit.html.erb +1 -0
- data/spec/test_views/spree/admin/widgets/new.html.erb +1 -0
- data/spree_backend.gemspec +4 -4
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +130 -154
- metadata +106 -29
- data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_55_ffffff_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_0073ea_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_666666_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_ff0084_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/vendor/assets/stylesheets/jquery-ui.datepicker.css.erb +0 -357
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
<div class="row">
|
5
5
|
|
6
|
-
<div class="col-md-8" data-hook="admin_product_form_left">
|
6
|
+
<div class="col-xs-12 col-md-8" data-hook="admin_product_form_left">
|
7
7
|
<div data-hook="admin_product_form_name">
|
8
8
|
<%= f.field_container :name, class: ['form-group'] do %>
|
9
9
|
<%= f.label :name, raw(Spree.t(:name) + content_tag(:span, ' *', class: 'required')) %>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
</div>
|
30
30
|
</div>
|
31
31
|
|
32
|
-
<div class="col-md-4" data-hook="admin_product_form_right">
|
32
|
+
<div class="col-xs-12 col-md-4" data-hook="admin_product_form_right">
|
33
33
|
<div data-hook="admin_product_form_price">
|
34
34
|
<%= f.field_container :price, class: ['form-group'] do %>
|
35
35
|
<%= f.label :price, raw(Spree.t(:master_price) + content_tag(:span, ' *', class: "required")) %>
|
@@ -69,14 +69,6 @@
|
|
69
69
|
<% end %>
|
70
70
|
</div>
|
71
71
|
|
72
|
-
<div data-hook="admin_product_form_promotionable">
|
73
|
-
<%= f.field_container :promotionable, class: ['form-group'] do %>
|
74
|
-
<%= f.label :promotionable, Spree.t(:promotionable) %>
|
75
|
-
<%= f.error_message_on :promotionable %>
|
76
|
-
<%= f.check_box :promotionable, class: 'form-control' %>
|
77
|
-
<% end %>
|
78
|
-
</div>
|
79
|
-
|
80
72
|
<% if @product.has_variants? %>
|
81
73
|
<div data-hook="admin_product_form_multiple_variants" class="well">
|
82
74
|
<%= f.label :skus, Spree.t(:sku).pluralize %>
|
@@ -107,29 +99,37 @@
|
|
107
99
|
<% end %>
|
108
100
|
</div>
|
109
101
|
|
102
|
+
<div data-hook="admin_product_form_promotionable">
|
103
|
+
<%= f.field_container :promotionable, class: ['form-group'] do %>
|
104
|
+
<%= f.label :promotionable, Spree.t(:promotionable) %>
|
105
|
+
<%= f.error_message_on :promotionable %>
|
106
|
+
<%= f.check_box :promotionable, class: 'form-control' %>
|
107
|
+
<% end %>
|
108
|
+
</div>
|
109
|
+
|
110
110
|
<div id="shipping_specs" class="row">
|
111
|
-
<div class="col-md-6">
|
111
|
+
<div class="col-xs-12 col-md-6">
|
112
112
|
<div id="shipping_specs_weight_field" data-hook="admin_product_form_weight" class="form-group">
|
113
113
|
<%= f.label :weight, Spree.t(:weight) %>
|
114
114
|
<%= f.text_field :weight, value: number_with_precision(@product.weight, precision: 2), size: 4, class: 'form-control' %>
|
115
115
|
</div>
|
116
116
|
</div>
|
117
117
|
|
118
|
-
<div class="col-md-6">
|
118
|
+
<div class="col-xs-12 col-md-6">
|
119
119
|
<div id="shipping_specs_height_field" data-hook="admin_product_form_height" class="form-group">
|
120
120
|
<%= f.label :height, Spree.t(:height) %>
|
121
121
|
<%= f.text_field :height, value: number_with_precision(@product.height, precision: 2), size: 4, class: 'form-control' %>
|
122
122
|
</div>
|
123
123
|
</div>
|
124
124
|
|
125
|
-
<div class="col-md-6">
|
125
|
+
<div class="col-xs-12 col-md-6">
|
126
126
|
<div id="shipping_specs_width_field" data-hook="admin_product_form_width" class="form-group">
|
127
127
|
<%= f.label :width, Spree.t(:width) %>
|
128
128
|
<%= f.text_field :width, value: number_with_precision(@product.width, precision: 2), size: 4, class: 'form-control' %>
|
129
129
|
</div>
|
130
130
|
</div>
|
131
131
|
|
132
|
-
<div class="col-md-6">
|
132
|
+
<div class="col-xs-12 col-md-6">
|
133
133
|
<div id="shipping_specs_depth_field" data-hook="admin_product_form_depth" class="form-group">
|
134
134
|
<%= f.label :depth, Spree.t(:depth) %>
|
135
135
|
<%= f.text_field :depth, value: number_with_precision(@product.depth, precision: 2), size: 4, class: 'form-control' %>
|
@@ -139,8 +139,8 @@
|
|
139
139
|
<% end %>
|
140
140
|
|
141
141
|
<div data-hook="admin_product_form_shipping_categories">
|
142
|
-
<%= f.field_container :
|
143
|
-
<%= f.label :shipping_category_id, Spree.t(:
|
142
|
+
<%= f.field_container :shipping_category, class: ['form-group'] do %>
|
143
|
+
<%= f.label :shipping_category_id, Spree.t(:shipping_category) %>
|
144
144
|
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
|
145
145
|
<%= f.error_message_on :shipping_category %>
|
146
146
|
<% end %>
|
@@ -12,19 +12,19 @@
|
|
12
12
|
<%= search_form_for [:admin, @search] do |f| %>
|
13
13
|
<%- locals = {f: f} %>
|
14
14
|
<div data-hook="admin_products_index_search" class="row">
|
15
|
-
<div class="col-md-6">
|
15
|
+
<div class="col-xs-12 col-md-6">
|
16
16
|
<div class="form-group">
|
17
17
|
<%= f.label :name_cont, Spree.t(:name) %>
|
18
18
|
<%= f.text_field :name_cont, size: 15, class: "form-control js-quick-search-target" %>
|
19
19
|
</div>
|
20
20
|
</div>
|
21
|
-
<div class="col-md-6">
|
21
|
+
<div class="col-xs-12 col-md-6">
|
22
22
|
<div class="form-group">
|
23
23
|
<%= f.label :variants_including_master_sku_cont, Spree.t(:sku) %>
|
24
24
|
<%= f.text_field :variants_including_master_sku_cont, size: 15, class: "form-control" %>
|
25
25
|
</div>
|
26
26
|
</div>
|
27
|
-
<div class="col-md-12">
|
27
|
+
<div class="col-xs-12 col-md-12">
|
28
28
|
<div class="field checkbox">
|
29
29
|
<label>
|
30
30
|
<%= f.check_box :deleted_at_null, {checked: params[:q][:deleted_at_null] == '0'}, '0', '1' %>
|
@@ -84,7 +84,7 @@
|
|
84
84
|
<% else %>
|
85
85
|
<div class="alert alert-info no-objects-found">
|
86
86
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Product)) %>,
|
87
|
-
<%= link_to Spree.t(:add_one), new_object_url %>!
|
87
|
+
<%= link_to Spree.t(:add_one), new_object_url if can?(:create, Spree::Product) %>!
|
88
88
|
</div>
|
89
89
|
<% end %>
|
90
90
|
|
@@ -9,13 +9,13 @@
|
|
9
9
|
<fieldset data-hook="new_product">
|
10
10
|
<%= f.field_container :name, class: ['form-group'] do %>
|
11
11
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
|
12
|
-
<%= f.text_field :name, class: 'form-control title' %>
|
12
|
+
<%= f.text_field :name, class: 'form-control title', required: :required %>
|
13
13
|
<%= f.error_message_on :name %>
|
14
14
|
<% end %>
|
15
15
|
|
16
16
|
<div data-hook="new_product_attrs" class="row">
|
17
17
|
<% unless @product.has_variants? %>
|
18
|
-
<div data-hook="new_product_sku" class="col-md-4">
|
18
|
+
<div data-hook="new_product_sku" class="col-xs-12 col-md-4">
|
19
19
|
<%= f.field_container :sku, class: ['form-group'] do %>
|
20
20
|
<%= f.label :sku, Spree.t(:sku) %>
|
21
21
|
<%= f.text_field :sku, size: 16, class: 'form-control' %>
|
@@ -24,22 +24,22 @@
|
|
24
24
|
</div>
|
25
25
|
<% end %>
|
26
26
|
|
27
|
-
<div data-hook="new_product_prototype" class="col-md-4">
|
27
|
+
<div data-hook="new_product_prototype" class="col-xs-12 col-md-4">
|
28
28
|
<%= f.field_container :prototype, class: ['form-group'] do %>
|
29
29
|
<%= f.label :prototype_id, Spree.t(:prototype) %>
|
30
30
|
<%= f.collection_select :prototype_id, Spree::Prototype.all, :id, :name, {include_blank: true}, {class: 'select2'} %>
|
31
31
|
<% end %>
|
32
32
|
</div>
|
33
33
|
|
34
|
-
<div data-hook="new_product_price" class="col-md-4">
|
34
|
+
<div data-hook="new_product_price" class="col-xs-12 col-md-4">
|
35
35
|
<%= f.field_container :price, class: ['form-group'] do %>
|
36
36
|
<%= f.label :price, Spree.t(:master_price) %> <span class="required">*</span>
|
37
|
-
<%= f.text_field :price, value: number_to_currency(@product.price, unit: ''), class: 'form-control' %>
|
37
|
+
<%= f.text_field :price, value: number_to_currency(@product.price, unit: ''), class: 'form-control', required: :required %>
|
38
38
|
<%= f.error_message_on :price %>
|
39
39
|
<% end %>
|
40
40
|
</div>
|
41
41
|
|
42
|
-
<div data-hook="new_product_available_on" class="col-md-4">
|
42
|
+
<div data-hook="new_product_available_on" class="col-xs-12 col-md-4">
|
43
43
|
<%= f.field_container :available_on, class: ['form-group'] do %>
|
44
44
|
<%= f.label :available_on, Spree.t(:available_on) %>
|
45
45
|
<%= f.error_message_on :available_on %>
|
@@ -47,10 +47,10 @@
|
|
47
47
|
<% end %>
|
48
48
|
</div>
|
49
49
|
|
50
|
-
<div data-hook="new_product_shipping_category" class="col-md-4">
|
50
|
+
<div data-hook="new_product_shipping_category" class="col-xs-12 col-md-4">
|
51
51
|
<%= f.field_container :shipping_category, class: ['form-group'] do %>
|
52
52
|
<%= f.label :shipping_category_id, Spree.t(:shipping_categories) %><span class="required">*</span>
|
53
|
-
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
|
53
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2', required: :required }) %>
|
54
54
|
<%= f.error_message_on :shipping_category_id %>
|
55
55
|
<% end %>
|
56
56
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
6
|
<%= button_link_to Spree.t(:new_promotion_category), new_object_url, icon: 'add', class: 'btn-success' %>
|
7
|
-
<% end %>
|
7
|
+
<% end if can?(:create, Spree::PromotionCategory) %>
|
8
8
|
|
9
9
|
<% if @promotion_categories.any? %>
|
10
10
|
<table class="table">
|
@@ -19,8 +19,8 @@
|
|
19
19
|
<td><%= promotion_category.name %></td>
|
20
20
|
<td><%= promotion_category.code %></td>
|
21
21
|
<td class="actions actions-2 text-right">
|
22
|
-
<%= link_to_edit promotion_category, no_text: true %>
|
23
|
-
<%= link_to_delete promotion_category, no_text: true %>
|
22
|
+
<%= link_to_edit promotion_category, no_text: true if can?(:edit, promotion_category) %>
|
23
|
+
<%= link_to_delete promotion_category, no_text: true if can?(:delete, promotion_category) %>
|
24
24
|
</td>
|
25
25
|
</tr>
|
26
26
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion } %>
|
2
2
|
|
3
3
|
<div class="row" id="general_fields" >
|
4
|
-
<div class="col-md-3">
|
4
|
+
<div class="col-xs-6 col-md-3">
|
5
5
|
<%= f.field_container :name, class: ['form-group'] do %>
|
6
6
|
<%= f.label :name %>
|
7
7
|
<%= f.text_field :name, class: 'form-control' %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<% end %>
|
27
27
|
</div>
|
28
28
|
|
29
|
-
<div class="col-md-6">
|
29
|
+
<div class="col-xs-12 col-md-6">
|
30
30
|
<%= f.field_container :description, class: ['form-group'] do %>
|
31
31
|
<%= f.label :description %>
|
32
32
|
<%= f.text_area :description, rows: 7, class: 'form-control' %>
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<% end %>
|
39
39
|
</div>
|
40
40
|
|
41
|
-
<div id="expiry_fields" class="col-md-3">
|
41
|
+
<div id="expiry_fields" class="col-xs-6 col-md-3">
|
42
42
|
<%= f.field_container :usage_limit do %>
|
43
43
|
<%= f.label :usage_limit %>
|
44
44
|
<%= f.number_field :usage_limit, min: 0, class: 'form-control' %>
|
@@ -7,5 +7,5 @@
|
|
7
7
|
<% param_prefix = "promotion[promotion_rules_attributes][#{promotion_rule.id}]" %>
|
8
8
|
<%= hidden_field_tag "#{param_prefix}[id]", promotion_rule.id %>
|
9
9
|
|
10
|
-
<%= render partial: "spree/admin/promotions/rules/#{type_name}", locals: { promotion_rule: promotion_rule, param_prefix: param_prefix } %>
|
10
|
+
<%= render partial: "spree/admin/promotions/rules/#{type_name}", locals: { promotion_rule: promotion_rule, param_prefix: param_prefix } rescue nil %>
|
11
11
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="panel-body calculator-fields">
|
2
2
|
<div class="row no-marginb">
|
3
|
-
<div class="form-group col-md-6 no-marginb">
|
3
|
+
<div class="form-group col-xs-12 col-md-6 no-marginb">
|
4
4
|
<% field_name = "#{param_prefix}[calculator_type]" %>
|
5
5
|
<%= label_tag field_name, Spree.t(:calculator) %>
|
6
6
|
<%= select_tag field_name,
|
@@ -8,7 +8,7 @@
|
|
8
8
|
class: 'type-select select2' %>
|
9
9
|
</div>
|
10
10
|
<% unless promotion_action.new_record? %>
|
11
|
-
<div class="form-group col-md-6 no-marginb settings">
|
11
|
+
<div class="form-group col-xs-12 col-md-6 no-marginb settings">
|
12
12
|
<% type_name = promotion_action.calculator.type.demodulize.underscore %>
|
13
13
|
<% if lookup_context.exists?("fields",
|
14
14
|
["spree/admin/promotions/calculators/#{type_name}"], true) %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="panel-body calculator-fields">
|
2
2
|
<div class="row no-marginb">
|
3
|
-
<div class="form-group col-md-6 no-marginb">
|
3
|
+
<div class="form-group col-xs-12 col-md-6 no-marginb">
|
4
4
|
<% field_name = "#{param_prefix}[calculator_type]" %>
|
5
5
|
<%= label_tag field_name, Spree.t(:calculator) %>
|
6
6
|
<%= select_tag field_name,
|
@@ -8,7 +8,7 @@
|
|
8
8
|
class: 'type-select select2' %>
|
9
9
|
</div>
|
10
10
|
<% unless promotion_action.new_record? %>
|
11
|
-
<div class="form-group col-md-6 no-marginb settings">
|
11
|
+
<div class="form-group col-xs-12 col-md-6 no-marginb settings">
|
12
12
|
<% promotion_action.calculator.preferences.keys.map do |key| %>
|
13
13
|
<% field_name = "#{param_prefix}[calculator_attributes][preferred_#{key}]" %>
|
14
14
|
<%= label_tag field_name, Spree.t(key.to_s) %>
|
@@ -1,9 +1,7 @@
|
|
1
1
|
<div class="panel-body calculator-fields">
|
2
2
|
<% promotion_action.promotion_action_line_items.each do |item| %>
|
3
|
-
|
4
|
-
|
5
|
-
<strong><%= item.quantity %> x <%= variant.name %></strong>
|
6
|
-
<%= variant.options_text %>
|
3
|
+
<strong><%= item.quantity %> x <%= item.name %></strong>
|
4
|
+
<%= item.variant.options_text %>
|
7
5
|
<% end %>
|
8
6
|
|
9
7
|
<% if promotion_action.promotion_action_line_items.empty? %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
<%= form_for @promotion, url: object_url, method: :put do |f| %>
|
7
7
|
<div class="row">
|
8
|
-
<div class="col-
|
8
|
+
<div class="col-xs-12">
|
9
9
|
<%= render partial: 'form', locals: { f: f } %>
|
10
10
|
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
11
11
|
</div>
|
@@ -14,13 +14,13 @@
|
|
14
14
|
<% end %>
|
15
15
|
|
16
16
|
<div id="promotion-filters" class="row">
|
17
|
-
<div id="rules_container" class="col-md-6">
|
17
|
+
<div id="rules_container" class="col-xs-12 col-md-6">
|
18
18
|
<div class="panel panel-default">
|
19
19
|
<%= render partial: 'rules' %>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
|
23
|
-
<div id="actions_container" class="col-md-6">
|
23
|
+
<div id="actions_container" class="col-xs-12 col-md-6">
|
24
24
|
<div class="panel panel-default">
|
25
25
|
<%= render partial: 'actions' %>
|
26
26
|
</div>
|
@@ -4,13 +4,13 @@
|
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
6
|
<%= button_link_to Spree.t(:new_promotion), new_object_url, class: "btn-success", icon: 'add' %>
|
7
|
-
<% end %>
|
7
|
+
<% end if can?(:create, Spree::Promotion) %>
|
8
8
|
|
9
9
|
<% content_for :table_filter do %>
|
10
10
|
<div data-hook="admin_promotions_index_search">
|
11
11
|
<%= search_form_for [:admin, @search] do |f| %>
|
12
12
|
<div class="row">
|
13
|
-
<div class="col-md-6">
|
13
|
+
<div class="col-xs-12 col-md-6">
|
14
14
|
<div class="form-group">
|
15
15
|
<%= label_tag :q_name_cont, Spree.t(:name) %>
|
16
16
|
<%= f.text_field :name_cont, tabindex: 1, class: "form-control js-quick-search-target" %>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
</div>
|
23
23
|
</div>
|
24
24
|
|
25
|
-
<div class="col-md-6">
|
25
|
+
<div class="col-xs-12 col-md-6">
|
26
26
|
<div class="form-group">
|
27
27
|
<%= label_tag :q_path_cont, Spree.t(:path) %>
|
28
28
|
<%= f.text_field :path_cont, tabindex: 1, class: "form-control" %>
|
@@ -67,8 +67,8 @@
|
|
67
67
|
<td><%= Spree.t(:current_promotion_usage, count: promotion.credits_count) %></td>
|
68
68
|
<td><%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %></td>
|
69
69
|
<td class="actions actions-2" data-hook="admin_promotions_index_row_actions">
|
70
|
-
<%= link_to_edit promotion, no_text: true %>
|
71
|
-
<%= link_to_delete promotion, no_text: true %>
|
70
|
+
<%= link_to_edit promotion, no_text: true if can?(:edit, promotion) %>
|
71
|
+
<%= link_to_delete promotion, no_text: true if can?(:delete, promotion) %>
|
72
72
|
</td>
|
73
73
|
</tr>
|
74
74
|
<% end %>
|
@@ -77,6 +77,6 @@
|
|
77
77
|
<% else %>
|
78
78
|
<div class="alert alert-info no-objects-found">
|
79
79
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Promotion)) %>,
|
80
|
-
<%= link_to Spree.t(:add_one), new_object_url %>!
|
80
|
+
<%= link_to Spree.t(:add_one), new_object_url if can?(:create, Spree::Promotion) %>!
|
81
81
|
</div>
|
82
82
|
<% end %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<div class="panel-body">
|
2
2
|
<div class="row no-marginb">
|
3
|
-
<div class="form-group col-md-6 no-marginb">
|
3
|
+
<div class="form-group col-xs-12 col-md-6 no-marginb">
|
4
4
|
<%= select_tag "#{param_prefix}[preferred_operator_min]", options_for_select(Spree::Promotion::Rules::ItemTotal::OPERATORS_MIN.map{|o| [Spree.t("item_total_rule.operators.#{o}"),o]}, promotion_rule.preferred_operator_min), { class: 'select2 select_item_total marginb' } %>
|
5
5
|
<%= select_tag "#{param_prefix}[preferred_operator_max]", options_for_select(Spree::Promotion::Rules::ItemTotal::OPERATORS_MAX.map{|o| [Spree.t("item_total_rule.operators.#{o}"),o]}, promotion_rule.preferred_operator_max), { class: 'select2 select_item_total' } %>
|
6
6
|
</div>
|
7
|
-
<div class="form-group col-md-6 no-marginb">
|
7
|
+
<div class="form-group col-xs-12 col-md-6 no-marginb">
|
8
8
|
<%= text_field_tag "#{param_prefix}[preferred_amount_min]", promotion_rule.preferred_amount_min, class: 'form-control marginb' %>
|
9
9
|
<%= text_field_tag "#{param_prefix}[preferred_amount_max]", promotion_rule.preferred_amount_max, class: 'form-control' %>
|
10
10
|
</div>
|
@@ -22,19 +22,19 @@
|
|
22
22
|
<a class="js-remove-promo-rule-option-value delete pull-right">
|
23
23
|
<span class="icon icon-delete"></span>
|
24
24
|
</a>
|
25
|
-
<div class="col-md-6">
|
25
|
+
<div class="col-xs-12 col-md-6">
|
26
26
|
<label><%= Spree.t(:product) %></label>
|
27
27
|
</div>
|
28
|
-
<div class="col-md-5">
|
28
|
+
<div class="col-xs-12 col-md-5">
|
29
29
|
<label><%= Spree.t(:option_values) %></label>
|
30
30
|
</div>
|
31
31
|
<div class="clearfix"></div>
|
32
32
|
</div>
|
33
33
|
<div class="panel-body row">
|
34
|
-
<div class="col-md-6">
|
34
|
+
<div class="col-xs-12 col-md-6">
|
35
35
|
<input class="js-promo-rule-option-value-product-select fullwidth" type="hidden" value="{{ productSelect.value }}">
|
36
36
|
</div>
|
37
|
-
<div class="col-md-6">
|
37
|
+
<div class="col-xs-12 col-md-6">
|
38
38
|
<input class="js-promo-rule-option-value-option-values-select fullwidth" name="<%= param_prefix %>[preferred_eligible_values][{{ productSelect.value }}]" type="hidden" value={{optionValuesSelect.value}}>
|
39
39
|
</div>
|
40
40
|
</div>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<div data-hook="admin_property_form" class="row">
|
2
|
-
<div class="col-md-6">
|
2
|
+
<div class="col-xs-12 col-md-6">
|
3
3
|
<%= f.field_container :name, class: ['form-group'] do %>
|
4
4
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
|
5
5
|
<%= f.text_field :name, class: 'form-control' %>
|
6
6
|
<%= f.error_message_on :name %>
|
7
7
|
<% end %>
|
8
8
|
</div>
|
9
|
-
<div class="col-md-6">
|
9
|
+
<div class="col-xs-12 col-md-6">
|
10
10
|
<%= f.field_container :presentation, class: ['form-group'] do %>
|
11
11
|
<%= f.label :presentation, Spree.t(:presentation) %> <span class="required">*</span>
|
12
12
|
<%= f.text_field :presentation, class: 'form-control' %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
6
|
<%= button_link_to Spree.t(:new_property), new_object_url, { class: "btn-success", icon: 'add', 'data-update' => 'new_property', id: 'new_property_link' } %>
|
7
|
-
<% end %>
|
7
|
+
<% end if can?(:create, Spree::Property) %>
|
8
8
|
|
9
9
|
<% content_for :table_filter do %>
|
10
10
|
<div data-hook="admin_property_sidebar">
|
@@ -13,14 +13,14 @@
|
|
13
13
|
<%- locals = {f: f} %>
|
14
14
|
|
15
15
|
<div class="row">
|
16
|
-
<div class="col col-md-6">
|
16
|
+
<div class="col-xs-12 col-md-6">
|
17
17
|
<div data-hook="admin_property_index_search" class="form-group">
|
18
18
|
<%= f.label :name_cont, Spree.t(:name) %>
|
19
19
|
<%= f.text_field :name_cont, class: "form-control js-quick-search-target" %>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
|
23
|
-
<div class="col-md-6">
|
23
|
+
<div class="col-xs-12 col-md-6">
|
24
24
|
<div class="form-group">
|
25
25
|
<%= f.label :presentation_cont, Spree.t(:presentation) %>
|
26
26
|
<%= f.text_field :presentation_cont, class: "form-control" %>
|
@@ -51,8 +51,8 @@
|
|
51
51
|
<td><%= property.name %></td>
|
52
52
|
<td><%= property.presentation %></td>
|
53
53
|
<td class="actions actions-2 text-right">
|
54
|
-
<%= link_to_edit(property, no_text: true) %>
|
55
|
-
<%= link_to_delete(property, no_text: true) %>
|
54
|
+
<%= link_to_edit(property, no_text: true) if can?(:edit, property) %>
|
55
|
+
<%= link_to_delete(property, no_text: true) if can?(:delete, property) %>
|
56
56
|
</td>
|
57
57
|
</tr>
|
58
58
|
<% end %>
|
@@ -61,7 +61,7 @@
|
|
61
61
|
<% else %>
|
62
62
|
<div class="alert alert-info no-objects-found">
|
63
63
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Property)) %>,
|
64
|
-
<%= link_to Spree.t(:add_one), new_object_url %>!
|
64
|
+
<%= link_to Spree.t(:add_one), new_object_url if can?(:create, Spree::OptionType) %>!
|
65
65
|
</div>
|
66
66
|
<% end %>
|
67
67
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
6
|
<%= button_link_to Spree.t(:new_prototype), new_object_url, { class: "btn-success", icon: 'add', 'data-update' => 'new_prototype', id: 'new_prototype_link'} %>
|
7
|
-
<% end %>
|
7
|
+
<% end if can?(:create, Spree::Prototype) %>
|
8
8
|
|
9
9
|
<% if @prototypes.any? %>
|
10
10
|
<table class="table" id='listing_prototypes' data-hook>
|
@@ -19,8 +19,8 @@
|
|
19
19
|
<tr id="<%= spree_dom_id prototype %>" data-hook="prototypes_row">
|
20
20
|
<td><%= prototype.name %></td>
|
21
21
|
<td class="actions actions-2 text-right">
|
22
|
-
<%= link_to_edit(prototype, no_text: true, class: 'admin_edit_prototype') %>
|
23
|
-
<%= link_to_delete(prototype, no_text: true) %>
|
22
|
+
<%= link_to_edit(prototype, no_text: true, class: 'admin_edit_prototype') if can?(:edit, prototype) %>
|
23
|
+
<%= link_to_delete(prototype, no_text: true) if can?(:delete, prototype) %>
|
24
24
|
</td>
|
25
25
|
</tr>
|
26
26
|
<% end %>
|
@@ -29,6 +29,6 @@
|
|
29
29
|
<% else %>
|
30
30
|
<div class="alert alert-info no-objects-found">
|
31
31
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Prototype)) %>,
|
32
|
-
<%= link_to Spree.t(:add_one), new_object_url %>!
|
32
|
+
<%= link_to Spree.t(:add_one), new_object_url if can?(:create, Spree::Prototype) %>!
|
33
33
|
</div>
|
34
34
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div data-hook="admin_reimbursement_type_form_fields" class="row">
|
2
|
-
<div class="col-md-8">
|
2
|
+
<div class="col-xs-12 col-md-8">
|
3
3
|
<%= f.field_container :name, class: ['form-group'] do %>
|
4
4
|
<%= f.label :name, Spree.t(:name) %>
|
5
5
|
<%= f.text_field :name, class:'form-control' %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% end %>
|
8
8
|
</div>
|
9
9
|
<%- if @reimbursement_type.new_record? %>
|
10
|
-
<div class="col-md-8">
|
10
|
+
<div class="col-xs-12 col-md-8">
|
11
11
|
<%= f.field_container :type, class: ['form-group'] do %>
|
12
12
|
<%= f.label :type, Spree.t(:type) %>
|
13
13
|
<%= f.select :type, options_for_select(Spree::ReimbursementType::KINDS), {:include_blank => false}, { :class => 'select2' } %>
|
@@ -15,14 +15,14 @@
|
|
15
15
|
<% end %>
|
16
16
|
</div>
|
17
17
|
<% end %>
|
18
|
-
<div class="col-md-5">
|
18
|
+
<div class="col-xs-12 col-md-5">
|
19
19
|
<%= f.field_container :active, class: ['form-inline'] do %>
|
20
20
|
<%= f.check_box :active, class: 'form-control' %>
|
21
21
|
<%= f.label :active, Spree.t(:active) %>
|
22
22
|
<%= f.error_message_on :active %>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
|
-
<div class="col-md-5">
|
25
|
+
<div class="col-xs-12 col-md-5">
|
26
26
|
<%= f.field_container :mutable, class: ['form-inline'] do %>
|
27
27
|
<%= f.check_box :mutable, class: 'form-control' %>
|
28
28
|
<%= f.label :mutable, Spree.t(:mutable) %>
|
@@ -96,7 +96,7 @@
|
|
96
96
|
<%= Spree.t(:reimburse) %>
|
97
97
|
<% end %>
|
98
98
|
<span class="or"><%= Spree.t(:or) %></span>
|
99
|
-
<%= button_link_to Spree.t('actions.cancel'), url_for([:admin, @order, @reimbursement.customer_return]), icon: 'remove-sign' %>
|
99
|
+
<%= button_link_to Spree.t('actions.cancel'), url_for([:edit, :admin, @order, @reimbursement.customer_return]), icon: 'remove-sign' %>
|
100
100
|
<% end %>
|
101
101
|
</div>
|
102
102
|
</fieldset>
|
@@ -12,6 +12,8 @@
|
|
12
12
|
<th><%= Spree.t(:product) %></th>
|
13
13
|
<th><%= Spree.t(:status) %></th>
|
14
14
|
<th><%= Spree.t(:charged) %></th>
|
15
|
+
<th><%= Spree.t(:purchased_quantity) %></th>
|
16
|
+
<th><%= Spree.t(:return_quantity) %></th>
|
15
17
|
<th><%= Spree.t(:pre_tax_refund_amount) %></th>
|
16
18
|
<th><%= Spree.t(:reimbursement_type) %></th>
|
17
19
|
<th><%= Spree.t(:exchange_for) %></th>
|
@@ -34,9 +36,19 @@
|
|
34
36
|
<div class="variant-options"><%= inventory_unit.variant.options_text %></div>
|
35
37
|
</td>
|
36
38
|
<td><%= inventory_unit.state.humanize %></td>
|
37
|
-
<td>
|
39
|
+
<td class="charged-amount" data-charged-amount="<%= return_item.pre_tax_amount %>">
|
38
40
|
<%= return_item.display_pre_tax_amount %>
|
39
41
|
</td>
|
42
|
+
<td class="purchased-quantity">
|
43
|
+
<%= inventory_unit.quantity %>
|
44
|
+
</td>
|
45
|
+
<td>
|
46
|
+
<% if editable %>
|
47
|
+
<%= item_fields.number_field :return_quantity, { class: 'refund-quantity-input form-control' } %>
|
48
|
+
<% else %>
|
49
|
+
<%= return_item.return_quantity %>
|
50
|
+
<% end %>
|
51
|
+
</td>
|
40
52
|
<td>
|
41
53
|
<% if editable %>
|
42
54
|
<%= item_fields.text_field :pre_tax_amount, { class: 'refund-amount-input form-control' } %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<div data-hook="admin_return_authorisations_index_filters">
|
7
7
|
<%= search_form_for [:admin, @search], url: spree.admin_customer_returns_path do |f| %>
|
8
8
|
<div class="row">
|
9
|
-
<div class="col-
|
9
|
+
<div class="col-xs-12">
|
10
10
|
<div class="form-group">
|
11
11
|
<%= f.label :number_cont, Spree.t(:number) %>
|
12
12
|
<%= f.text_field :number_cont, class: "form-control js-quick-search-target" %>
|
@@ -49,7 +49,7 @@
|
|
49
49
|
</td>
|
50
50
|
<td><%= customer_return.display_pre_tax_total.to_html %></td>
|
51
51
|
<td class="actions actions-1 text-right">
|
52
|
-
<%= link_to_edit_url spree.edit_admin_order_customer_return_path(customer_return.order, customer_return), no_text: true %>
|
52
|
+
<%= link_to_edit_url spree.edit_admin_order_customer_return_path(customer_return.order, customer_return), no_text: true if can?(:edit, customer_return) %>
|
53
53
|
</td>
|
54
54
|
</tr>
|
55
55
|
<% end %>
|
@@ -7,10 +7,10 @@
|
|
7
7
|
<%= link_to Spree.t(:all), spree.admin_return_authorizations_path %>
|
8
8
|
</li>
|
9
9
|
<li class="<%= "active" if params[:q][:state_eq] == "authorized" %>">
|
10
|
-
<%= link_to Spree.t(:authorized), params.
|
10
|
+
<%= link_to Spree.t(:authorized), params.merge({q: {state_eq: :authorized}}).permit! %>
|
11
11
|
</li>
|
12
12
|
<li class="<%= "active" if params[:q][:state_eq] == "canceled" %>">
|
13
|
-
<%= link_to Spree.t(:canceled), params.
|
13
|
+
<%= link_to Spree.t(:canceled), params.merge({q: {state_eq: :canceled}}).permit! %>
|
14
14
|
</li>
|
15
15
|
<% end %>
|
16
16
|
|
@@ -18,13 +18,13 @@
|
|
18
18
|
<div data-hook="admin_return_authorisations_index_filters">
|
19
19
|
<%= search_form_for [:admin, @search], url: spree.admin_return_authorizations_path do |f| %>
|
20
20
|
<div class="row">
|
21
|
-
<div class="col-md-6">
|
21
|
+
<div class="col-xs-12 col-md-6">
|
22
22
|
<div class="form-group">
|
23
23
|
<%= f.label :number_cont, Spree.t(:number) %>
|
24
24
|
<%= f.text_field :number_cont, class: "form-control js-quick-search-target" %>
|
25
25
|
</div>
|
26
26
|
</div>
|
27
|
-
<div class="col-md-6">
|
27
|
+
<div class="col-xs-12 col-md-6">
|
28
28
|
<div class="form-group">
|
29
29
|
<%= label_tag :q_state_eq, Spree.t(:status) %>
|
30
30
|
<%= f.select :state_eq, Spree::ReturnAuthorization.state_machines[:state].states.collect {|s| [Spree.t("return_authorization_states.#{s.name}"), s.value]}, {include_blank: true}, class: 'select2' %>
|
@@ -61,7 +61,7 @@
|
|
61
61
|
<span class="label label-<%= return_authorization.state %>"><%= Spree.t("return_authorization_states.#{return_authorization.state}") %></span>
|
62
62
|
</td>
|
63
63
|
<td class="actions actions-1 text-right">
|
64
|
-
<%= link_to_edit return_authorization, url: spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization), no_text: true %>
|
64
|
+
<%= link_to_edit return_authorization, url: spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization), no_text: true if can?(:edit, return_authorization) %>
|
65
65
|
</td>
|
66
66
|
</tr>
|
67
67
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="content-header <%= "with-page-tabs" if content_for?(:page_tabs) %> page-header">
|
3
3
|
<div class="row">
|
4
4
|
<% if content_for?(:page_title) %>
|
5
|
-
<h1 class="col-
|
5
|
+
<h1 class="col-xs-<%= content_for?(:page_actions) ? '6' : '12' %>">
|
6
6
|
<%= yield :page_title %>
|
7
7
|
<% if content_for?(:page_title_small) %>
|
8
8
|
<small><%= yield :page_title_small %></small>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<% end %>
|
12
12
|
|
13
13
|
<% if content_for?(:page_actions) %>
|
14
|
-
<div class="page-actions col-
|
14
|
+
<div class="page-actions col-xs-6" data-hook="toolbar">
|
15
15
|
<%= yield :page_actions %>
|
16
16
|
</div>
|
17
17
|
<% end %>
|