solidus_backend 2.2.2 → 2.3.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_backend might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend.js +1 -2
- data/app/assets/javascripts/spree/backend/address_states.js +1 -1
- data/app/assets/javascripts/spree/backend/adjustments.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/admin.js +37 -41
- data/app/assets/javascripts/spree/backend/components/editable_table.js.coffee +3 -0
- data/app/assets/javascripts/spree/backend/images/index.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/images/upload.js +13 -189
- data/app/assets/javascripts/spree/backend/models/image_upload.js +76 -0
- data/app/assets/javascripts/spree/backend/models/index.js +2 -0
- data/app/assets/javascripts/spree/backend/models/taxonomy.js +3 -0
- data/app/assets/javascripts/spree/backend/namespaces.js +3 -1
- data/app/assets/javascripts/spree/backend/payments/new.js +8 -36
- data/app/assets/javascripts/spree/backend/promotions.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/select_payments.js.coffee +0 -12
- data/app/assets/javascripts/spree/backend/shipments.js +1 -1
- data/app/assets/javascripts/spree/backend/spree-select2.js +1 -1
- data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +101 -95
- data/app/assets/javascripts/spree/backend/templates/products/upload_progress.hbs +5 -3
- data/app/assets/javascripts/spree/backend/views/images/upload_progress.js +48 -0
- data/app/assets/javascripts/spree/backend/views/images/upload_zone.js +39 -0
- data/app/assets/javascripts/spree/backend/views/index.js +6 -0
- data/app/assets/javascripts/spree/backend/views/order/address.js +1 -5
- data/app/assets/javascripts/spree/backend/views/payment/edit_credit_card.js +23 -0
- data/app/assets/javascripts/spree/backend/views/payment/new.js +25 -0
- data/app/assets/javascripts/spree/backend/views/state_select.js +4 -4
- data/app/assets/javascripts/spree/backend/views/tables/editable_table.js.coffee +14 -0
- data/app/assets/javascripts/spree/backend/views/tables/editable_table_row.js.coffee +45 -0
- data/app/assets/stylesheets/spree/backend/components/_date-picker.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_editable_table.scss +37 -0
- data/app/assets/stylesheets/spree/backend/plugins/_bootstrap_tooltip.scss +2 -2
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +0 -8
- data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +15 -9
- data/app/assets/stylesheets/spree/backend/shared/_icons.scss +14 -14
- data/app/assets/stylesheets/spree/backend/shared/_tables.scss +1 -2
- data/app/assets/stylesheets/spree/backend/shared/_utilities.scss +13 -0
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +1 -1
- data/app/controllers/spree/admin/cancellations_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +1 -1
- data/app/controllers/spree/admin/orders_controller.rb +3 -10
- data/app/controllers/spree/admin/payment_methods_controller.rb +19 -6
- data/app/controllers/spree/admin/payments_controller.rb +2 -2
- data/app/controllers/spree/admin/products_controller.rb +3 -9
- data/app/controllers/spree/admin/promotion_rules_controller.rb +5 -1
- data/app/controllers/spree/admin/promotions_controller.rb +1 -1
- data/app/controllers/spree/admin/properties_controller.rb +1 -1
- data/app/controllers/spree/admin/reports_controller.rb +24 -21
- data/app/controllers/spree/admin/resource_controller.rb +25 -14
- data/app/controllers/spree/admin/style_guide_controller.rb +4 -0
- data/app/controllers/spree/admin/users_controller.rb +1 -1
- data/app/controllers/spree/admin/variants_controller.rb +5 -0
- data/app/helpers/spree/admin/navigation_helper.rb +6 -2
- data/app/helpers/spree/promotion_rules_helper.rb +2 -2
- data/app/models/spree/backend_configuration.rb +1 -0
- data/app/views/spree/admin/adjustments/_form.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +2 -2
- data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
- data/app/views/spree/admin/images/_form.html.erb +1 -1
- data/app/views/spree/admin/images/_image_row.html.erb +22 -4
- data/app/views/spree/admin/images/create.js.erb +8 -5
- data/app/views/spree/admin/images/index.html.erb +4 -8
- data/app/views/spree/admin/orders/_risk_analysis.html.erb +6 -7
- data/app/views/spree/admin/orders/_shipment.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm/_customer_details.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm/_payments.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +3 -3
- data/app/views/spree/admin/payment_methods/_form.html.erb +5 -5
- data/app/views/spree/admin/payments/_form.html.erb +2 -2
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/payments/show.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +2 -7
- data/app/views/spree/admin/prices/_form.html.erb +2 -2
- data/app/views/spree/admin/prices/edit.html.erb +2 -0
- data/app/views/spree/admin/prices/index.html.erb +5 -4
- data/app/views/spree/admin/prices/new.html.erb +4 -0
- data/app/views/spree/admin/product_properties/index.html.erb +1 -1
- data/app/views/spree/admin/products/_form.html.erb +4 -3
- data/app/views/spree/admin/products/index.html.erb +3 -3
- data/app/views/spree/admin/products/new.html.erb +2 -2
- data/app/views/spree/admin/products/new.js.erb +0 -3
- data/app/views/spree/admin/promotion_actions/create.js.erb +2 -6
- data/app/views/spree/admin/promotion_rules/create.js.erb +0 -8
- data/app/views/spree/admin/promotions/_actions.html.erb +2 -2
- data/app/views/spree/admin/promotions/_form.html.erb +1 -1
- data/app/views/spree/admin/promotions/_promotion_action.html.erb +3 -4
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +3 -3
- data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +6 -2
- data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb +54 -0
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +33 -14
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +33 -14
- data/app/views/spree/admin/promotions/index.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_product.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_user_role.html.erb +2 -2
- data/app/views/spree/admin/refunds/edit.html.erb +1 -1
- data/app/views/spree/admin/refunds/new.html.erb +1 -1
- data/app/views/spree/admin/reimbursements/edit.html.erb +2 -2
- data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +4 -4
- data/app/views/spree/admin/shared/_address_form.html.erb +2 -2
- data/app/views/spree/admin/shared/_calculator_fields.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_tabs.html.erb +4 -4
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +1 -1
- data/app/views/spree/admin/shared/_variant_search.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +1 -1
- data/app/views/spree/admin/states/index.html.erb +1 -1
- data/app/views/spree/admin/stock_items/_stock_management.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/_form.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/edit.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/new.html.erb +1 -1
- data/app/views/spree/admin/store_credits/_form.html.erb +1 -1
- data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +1 -1
- data/app/views/spree/admin/stores/_form.html.erb +1 -1
- data/app/views/spree/admin/style_guide/topics/forms/_building_forms.html.erb +4 -8
- data/app/views/spree/admin/style_guide/topics/forms/_buttons.html.erb +6 -0
- data/app/views/spree/admin/style_guide/topics/forms/_helper_text.html.erb +13 -0
- data/app/views/spree/admin/style_guide/topics/forms/_inputs.html.erb +96 -0
- data/app/views/spree/admin/style_guide/topics/forms/_labels.html.erb +6 -0
- data/app/views/spree/admin/style_guide/topics/forms/_validation.html.erb +8 -1
- data/app/views/spree/admin/style_guide/topics/layout/_full_width_table_layout.html.erb +10 -0
- data/app/views/spree/admin/style_guide/topics/layout/_helpful_layout.html.erb +0 -0
- data/app/views/spree/admin/style_guide/topics/layout/_sidebar_layout.html.erb +4 -0
- data/app/views/spree/admin/style_guide/topics/messaging/_flashes.html.erb +10 -4
- data/app/views/spree/admin/style_guide/topics/messaging/_tooltips.html.erb +45 -0
- data/app/views/spree/admin/style_guide/topics/tables/_forms_in_tables.html.erb +4 -0
- data/app/views/spree/admin/style_guide/topics/typography/_lists.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/_form.html.erb +17 -3
- data/app/views/spree/admin/tax_rates/index.html.erb +12 -3
- data/app/views/spree/admin/taxonomies/edit.erb +1 -8
- data/app/views/spree/admin/taxons/_form.html.erb +6 -4
- data/app/views/spree/admin/taxons/edit.html.erb +0 -15
- data/app/views/spree/admin/taxons/index.html.erb +1 -1
- data/app/views/spree/admin/variants/_form.html.erb +8 -9
- data/app/views/spree/admin/variants/new.js.erb +0 -1
- data/config/routes.rb +1 -1
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/orders_controller_spec.rb +16 -4
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/payments_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/products_controller_spec.rb +33 -0
- data/spec/controllers/spree/admin/variants_controller_spec.rb +39 -13
- data/spec/features/admin/configuration/payment_methods_spec.rb +11 -11
- data/spec/features/admin/configuration/shipping_methods_spec.rb +1 -1
- data/spec/features/admin/configuration/states_spec.rb +4 -4
- data/spec/features/admin/configuration/store_spec.rb +3 -3
- data/spec/features/admin/configuration/tax_rates_spec.rb +1 -1
- data/spec/features/admin/orders/adjustments_spec.rb +1 -1
- data/spec/features/admin/orders/customer_details_spec.rb +10 -11
- data/spec/features/admin/orders/listing_spec.rb +1 -1
- data/spec/features/admin/orders/new_order_spec.rb +4 -11
- data/spec/features/admin/orders/order_details_spec.rb +20 -30
- data/spec/features/admin/orders/return_payment_state_spec.rb +60 -0
- data/spec/features/admin/orders/shipments_spec.rb +7 -0
- data/spec/features/admin/products/edit/images_spec.rb +48 -9
- data/spec/features/admin/products/edit/variants_spec.rb +1 -1
- data/spec/features/admin/products/option_types_spec.rb +2 -2
- data/spec/features/admin/products/products_spec.rb +49 -3
- data/spec/features/admin/products/stock_management_spec.rb +1 -3
- data/spec/features/admin/products/variant_spec.rb +20 -0
- data/spec/features/admin/promotion_adjustments_spec.rb +35 -34
- data/spec/features/admin/promotions/option_value_rule_spec.rb +2 -2
- data/spec/features/admin/promotions/product_rule_spec.rb +1 -1
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +2 -2
- data/spec/features/admin/promotions/user_rule_spec.rb +2 -2
- data/spec/features/admin/stock_transfer_spec.rb +11 -8
- data/spec/helpers/admin/navigation_helper_spec.rb +23 -0
- metadata +26 -18
- data/app/assets/javascripts/spree/backend/images/new.js.coffee +0 -7
- data/app/assets/stylesheets/spree/backend/sections/_payments.scss +0 -14
- data/app/helpers/spree/admin/images_helper.rb +0 -17
- data/app/views/spree/admin/orders/_add_line_item.html.erb +0 -15
- data/app/views/spree/admin/prices/new.js.erb +0 -2
- data/app/views/spree/admin/products/_properties_form.erb +0 -10
- data/app/views/spree/admin/promotions/_tab.html.erb +0 -1
- data/app/views/spree/admin/shared/_report_criteria.html.erb +0 -17
- data/app/views/spree/admin/states/_new.html.erb +0 -7
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +0 -38
- data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +0 -27
- data/app/views/spree/admin/taxons/_taxon_table.html.erb +0 -23
@@ -7,7 +7,7 @@
|
|
7
7
|
<% if can?(:update, @promotion) %>
|
8
8
|
<div class="field">
|
9
9
|
<%= label_tag :promotion_rule_type, Spree.t(:add_rule_of_type) %>
|
10
|
-
<%= select_tag('promotion_rule[type]', options_for_promotion_rule_types(@promotion), class: '
|
10
|
+
<%= select_tag('promotion_rule[type]', options_for_promotion_rule_types(@promotion), class: 'custom-select fullwidth') %>
|
11
11
|
</div>
|
12
12
|
<div class="filter-actions actions">
|
13
13
|
<%= button Spree.t('actions.add') %>
|
@@ -1,2 +1,6 @@
|
|
1
|
-
<%= render
|
2
|
-
|
1
|
+
<%= render(
|
2
|
+
"spree/admin/promotions/actions/promotion_calculators_with_custom_fields",
|
3
|
+
calculators: Spree::Promotion::Actions::CreateItemAdjustments.calculators,
|
4
|
+
promotion_action: promotion_action,
|
5
|
+
param_prefix: param_prefix
|
6
|
+
) %>
|
data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
<%= label_tag field_name, Spree::Calculator.model_name.human %>
|
8
8
|
<%= select_tag field_name,
|
9
9
|
options_from_collection_for_select(calculators, :to_s, :description, promotion_action.calculator.type),
|
10
|
-
class: 'type-select js-calculator-type
|
10
|
+
class: 'type-select js-calculator-type custom-select fullwidth' %>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<%= fields_for "#{prefix}[calculator_attributes]", calculator do |f| %>
|
2
|
+
<%= f.label :preferred_amount %>
|
3
|
+
<%= render "spree/admin/shared/number_with_currency", f: f, amount_attr: :preferred_amount, currency_attr: :preferred_currency %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<p>
|
8
|
+
<%= admin_hint(
|
9
|
+
calculator.model_name.human,
|
10
|
+
"""
|
11
|
+
<p>
|
12
|
+
This amount will be distributed to line items weighted relative to
|
13
|
+
their price. More expensive line items will receive a greater share
|
14
|
+
of the adjustment.
|
15
|
+
</p>
|
16
|
+
|
17
|
+
<p>
|
18
|
+
For example, with three line items and a preferred amount of $15 we
|
19
|
+
would end up with the following distribution:
|
20
|
+
</p>
|
21
|
+
|
22
|
+
<table>
|
23
|
+
<thead>
|
24
|
+
<tr>
|
25
|
+
<th></th>
|
26
|
+
<th>Price</th>
|
27
|
+
<th>Weighted Adj.</th>
|
28
|
+
</tr>
|
29
|
+
</thead>
|
30
|
+
<tbody>
|
31
|
+
<tr>
|
32
|
+
<td>Socks</td>
|
33
|
+
<td>$5</td>
|
34
|
+
<td>-$1.5</td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td>Shoes</td>
|
38
|
+
<td>$30</td>
|
39
|
+
<td>-$9</td>
|
40
|
+
</tr>
|
41
|
+
<tr>
|
42
|
+
<td>Slippers</td>
|
43
|
+
<td>$15</td>
|
44
|
+
<td>-$4.5</td>
|
45
|
+
</tr>
|
46
|
+
</tbody>
|
47
|
+
</table>
|
48
|
+
"""
|
49
|
+
) %>
|
50
|
+
|
51
|
+
This amount will be the <strong>total</strong> discount spread amongst all
|
52
|
+
of the line items.
|
53
|
+
</p>
|
54
|
+
</div>
|
@@ -1,16 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<div class="field">
|
2
|
+
<%= label_tag "#{prefix}[calculator_attributes][preferred_base_amount]",
|
3
|
+
Spree.t(:base_amount) %>
|
4
|
+
<%= preference_field_tag(
|
5
|
+
"#{prefix}[calculator_attributes][preferred_base_amount]",
|
6
|
+
calculator.preferred_base_amount,
|
7
|
+
type: calculator.preference_type(:base_amount)) %>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="field">
|
11
|
+
<%= label_tag(
|
12
|
+
"#{prefix}[calculator_attributes][preferred_currency]",
|
13
|
+
Spree.t(:currency)
|
14
|
+
) %>
|
15
|
+
<%= select_tag(
|
16
|
+
"#{prefix}[calculator_attributes][preferred_currency]",
|
17
|
+
options_for_select(
|
18
|
+
Money::Currency.all,
|
19
|
+
calculator.preferred_currency || Spree::Config[:currency]
|
20
|
+
),
|
21
|
+
{ class: 'custom-select fullwidth' }
|
22
|
+
) %>
|
23
|
+
</div>
|
7
24
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
25
|
+
<div class="field">
|
26
|
+
<%= label_tag nil, Spree.t(:tiers) %>
|
27
|
+
<div class="js-tiered-calculator">
|
28
|
+
<%= content_tag :div, nil, class: "js-tiers", data: {
|
29
|
+
'original-tiers' => Hash[calculator.preferred_tiers.sort],
|
30
|
+
'form-prefix' => prefix,
|
31
|
+
'calculator' => 'tiered_flat_rate'
|
32
|
+
} %>
|
33
|
+
<button class="button js-add-tier"><%= Spree.t('actions.add') %></button>
|
34
|
+
</div>
|
16
35
|
</div>
|
@@ -1,16 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<div class="field">
|
2
|
+
<%= label_tag "#{prefix}[calculator_attributes][preferred_base_percent]",
|
3
|
+
Spree.t(:base_percent) %>
|
4
|
+
<%= preference_field_tag(
|
5
|
+
"#{prefix}[calculator_attributes][preferred_base_percent]",
|
6
|
+
calculator.preferred_base_percent,
|
7
|
+
type: calculator.preference_type(:base_percent)) %>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="field">
|
11
|
+
<%= label_tag(
|
12
|
+
"#{prefix}[calculator_attributes][preferred_currency]",
|
13
|
+
Spree.t(:currency)
|
14
|
+
) %>
|
15
|
+
<%= select_tag(
|
16
|
+
"#{prefix}[calculator_attributes][preferred_currency]",
|
17
|
+
options_for_select(
|
18
|
+
Money::Currency.all,
|
19
|
+
calculator.preferred_currency || Spree::Config[:currency]
|
20
|
+
),
|
21
|
+
{ class: 'custom-select fullwidth' }
|
22
|
+
) %>
|
23
|
+
</div>
|
7
24
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
25
|
+
<div class="field">
|
26
|
+
<%= label_tag nil, Spree.t(:tiers) %>
|
27
|
+
<div class="js-tiered-calculator">
|
28
|
+
<%= content_tag :div, nil, class: "js-tiers", data: {
|
29
|
+
'original-tiers' => Hash[calculator.preferred_tiers.sort],
|
30
|
+
'form-prefix' => prefix,
|
31
|
+
'calculator' => 'tiered_percent'
|
32
|
+
} %>
|
33
|
+
<button class="button js-add-tier"><%= Spree.t('actions.add') %></button>
|
34
|
+
</div>
|
16
35
|
</div>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
<div class="col-3">
|
41
41
|
<div class="field">
|
42
42
|
<%= label_tag :q_promotion_category_id_eq, Spree::PromotionCategory.model_name.human %><br>
|
43
|
-
<%= f.collection_select(:promotion_category_id_eq, @promotion_categories, :id, :name, { include_blank: Spree.t('match_choices.all') }, { class: '
|
43
|
+
<%= f.collection_select(:promotion_category_id_eq, @promotion_categories, :id, :name, { include_blank: Spree.t('match_choices.all') }, { class: 'custom-select fullwidth' }) %>
|
44
44
|
</div>
|
45
45
|
</div>
|
46
46
|
</div>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="row">
|
3
3
|
<div class="col-6">
|
4
4
|
<div class="field">
|
5
|
-
<%= select_tag "#{param_prefix}[preferred_operator]", options_for_select(Spree::Promotion::Rules::ItemTotal::OPERATORS.map{|o| [Spree.t("item_total_rule.operators.#{o}"),o]}, promotion_rule.preferred_operator), {class: '
|
5
|
+
<%= select_tag "#{param_prefix}[preferred_operator]", options_for_select(Spree::Promotion::Rules::ItemTotal::OPERATORS.map{|o| [Spree.t("item_total_rule.operators.#{o}"),o]}, promotion_rule.preferred_operator), {class: 'custom-select select_item_total fullwidth'} %>
|
6
6
|
</div>
|
7
7
|
</div>
|
8
8
|
<div class="col-6">
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="col-12">
|
2
2
|
<div class="field">
|
3
|
-
<label for="<%= "#{param_prefix}_preferred_path" %>"><%= Spree.
|
3
|
+
<label for="<%= "#{param_prefix}_preferred_path" %>"><%= Spree::Promotion::Rules::LandingPage.human_attribute_name(:description) %>:</label>
|
4
4
|
<%= text_field_tag "#{param_prefix}[preferred_path]", promotion_rule.preferred_path, class: 'fullwidth' %>
|
5
5
|
<span class="info"><%= Spree.t('landing_page_rule.must_have_visited_path') %></span>
|
6
6
|
</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<div class="col-12">
|
8
8
|
<div class="field">
|
9
9
|
<label>
|
10
|
-
<%= Spree.t('product_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Product::MATCH_POLICIES.map{|s| [Spree.t("product_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_product
|
10
|
+
<%= Spree.t('product_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Product::MATCH_POLICIES.map{|s| [Spree.t("product_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_product custom-select'})).html_safe %>
|
11
11
|
</label>
|
12
12
|
</div>
|
13
13
|
</div>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<div class="col-12">
|
9
9
|
<div class="field">
|
10
10
|
<label>
|
11
|
-
<%= Spree.t('taxon_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Taxon::MATCH_POLICIES.map{|s| [Spree.t("taxon_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_taxon
|
11
|
+
<%= Spree.t('taxon_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Taxon::MATCH_POLICIES.map{|s| [Spree.t("taxon_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_taxon custom-select'})).html_safe %>
|
12
12
|
</label>
|
13
13
|
</div>
|
14
14
|
</div>
|
@@ -3,10 +3,10 @@
|
|
3
3
|
<%= select_tag "#{param_prefix}[preferred_role_ids]",
|
4
4
|
options_from_collection_for_select(
|
5
5
|
Spree::Role.all, :id, :name, promotion_rule.preferred_role_ids
|
6
|
-
), class: '
|
6
|
+
), class: 'custom-select fullwidth', multiple: true %>
|
7
7
|
</div>
|
8
8
|
<div class="field alpha omega eight columns">
|
9
9
|
<label>
|
10
|
-
<%= Spree.t('user_role_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::UserRole::MATCH_POLICIES.map{ |s| [Spree.t("user_role_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), { class: '
|
10
|
+
<%= Spree.t('user_role_rule.label', select: select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::UserRole::MATCH_POLICIES.map{ |s| [Spree.t("user_role_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), { class: 'custom-select'})).html_safe %>
|
11
11
|
</label>
|
12
12
|
</div>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<div class="col-3">
|
17
17
|
<div class="field">
|
18
18
|
<%= f.label :refund_reason_id %><br/>
|
19
|
-
<%= f.collection_select(:refund_reason_id, refund_reasons, :id, :name, {}, {class: '
|
19
|
+
<%= f.collection_select(:refund_reason_id, refund_reasons, :id, :name, {}, {class: 'custom-select fullwidth'}) %>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
</div>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
<div class="col-3">
|
30
30
|
<div class="field">
|
31
31
|
<%= f.label :refund_reason_id %><br/>
|
32
|
-
<%= f.collection_select(:refund_reason_id, refund_reasons, :id, :name, {include_blank: true}, {class: '
|
32
|
+
<%= f.collection_select(:refund_reason_id, refund_reasons, :id, :name, {include_blank: true}, {class: 'custom-select fullwidth'}) %>
|
33
33
|
</div>
|
34
34
|
</div>
|
35
35
|
</div>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<%= item_fields.select(:override_reimbursement_type_id,
|
40
40
|
reimbursement_types.collect { |r| [r.name.humanize, r.id] },
|
41
41
|
{include_blank: true},
|
42
|
-
{class: '
|
42
|
+
{class: 'custom-select fullwidth'}
|
43
43
|
) %>
|
44
44
|
</td>
|
45
45
|
<td class="align-center">
|
@@ -52,7 +52,7 @@
|
|
52
52
|
<% if return_item.exchange_processed? %>
|
53
53
|
<%= return_item.exchange_variant.exchange_name %>
|
54
54
|
<% else %>
|
55
|
-
<%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants(@stock_locations), :id, :exchange_name, { include_blank: true }, { class: "
|
55
|
+
<%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants(@stock_locations), :id, :exchange_name, { include_blank: true }, { class: "custom-select fullwidth return-item-exchange-selection" } %>
|
56
56
|
<% end %>
|
57
57
|
</td>
|
58
58
|
</tr>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<% end %>
|
11
11
|
|
12
12
|
<% content_for :table_filter do %>
|
13
|
-
<%= render partial: 'spree/admin/shared/report_order_criteria', locals: {} %>
|
13
|
+
<%= render partial: 'spree/admin/shared/report_order_criteria', locals: { action: :sales_total } %>
|
14
14
|
<% end %>
|
15
15
|
|
16
16
|
<table class="admin-report" data-hook="sales_total">
|
@@ -47,21 +47,21 @@
|
|
47
47
|
</td>
|
48
48
|
<td class="return-item-reimbursement-type">
|
49
49
|
<% if editable %>
|
50
|
-
<%= item_fields.select :preferred_reimbursement_type_id, @reimbursement_types.collect{|r|[r.name.humanize, r.id]}, {include_blank: true}, {class: '
|
50
|
+
<%= item_fields.select :preferred_reimbursement_type_id, @reimbursement_types.collect{|r|[r.name.humanize, r.id]}, {include_blank: true}, {class: 'custom-select fullwidth'} %>
|
51
51
|
<% else %>
|
52
52
|
<%= return_item.preferred_reimbursement_type.try(:name) %>
|
53
53
|
<% end %>
|
54
54
|
</td>
|
55
55
|
<td class="return-item-exchange-for align-center">
|
56
56
|
<% if editable %>
|
57
|
-
<%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants(@stock_locations), :id, :exchange_name, { include_blank: true }, { class: "
|
57
|
+
<%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants(@stock_locations), :id, :exchange_name, { include_blank: true }, { class: "custom-select fullwidth return-item-exchange-selection" } %>
|
58
58
|
<% elsif return_item.exchange_processed? %>
|
59
59
|
<%= return_item.exchange_variant.exchange_name %>
|
60
60
|
<% end %>
|
61
61
|
</td>
|
62
62
|
<td class="return-item-reason">
|
63
63
|
<% if editable %>
|
64
|
-
<%= item_fields.select :return_reason_id, @reasons.collect{|r|[r.name, r.id]}, {include_blank: true}, {class: '
|
64
|
+
<%= item_fields.select :return_reason_id, @reasons.collect{|r|[r.name, r.id]}, {include_blank: true}, {class: 'custom-select fullwidth'} %>
|
65
65
|
<% else %>
|
66
66
|
<%= return_item.return_reason.try(:name) %>
|
67
67
|
<% end %>
|
@@ -77,7 +77,7 @@
|
|
77
77
|
|
78
78
|
<%= f.field_container :stock_location do %>
|
79
79
|
<%= f.label :stock_location_id, Spree::StockLocation.model_name.human %>
|
80
|
-
<%= f.select :stock_location_id, @stock_locations.to_a.collect{|l|[l.name, l.id]}, {include_blank: true}, {class: '
|
80
|
+
<%= f.select :stock_location_id, @stock_locations.to_a.collect{|l|[l.name, l.id]}, {include_blank: true}, {class: 'custom-select fullwidth', "data-placeholder" => Spree.t(:select_a_stock_location)} %>
|
81
81
|
<%= f.error_message_on :stock_location_id %>
|
82
82
|
<% end %>
|
83
83
|
|
@@ -41,7 +41,7 @@
|
|
41
41
|
<div class="field <%= "#{type}-row" %>">
|
42
42
|
<%= f.label :country_id, Spree::Country.model_name.human %>
|
43
43
|
<span id="<%= s_or_b %>country">
|
44
|
-
<%= f.collection_select :country_id, available_countries, :id, :name, {}, {class: '
|
44
|
+
<%= f.collection_select :country_id, available_countries, :id, :name, {}, {class: 'custom-select fullwidth js-country_id'} %>
|
45
45
|
</span>
|
46
46
|
</div>
|
47
47
|
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<%= f.text_field :state_name,
|
52
52
|
style: "display: #{f.object.country.states.empty? ? 'block' : 'none' };",
|
53
53
|
disabled: !f.object.country.states.empty?, class: 'fullwidth state_name js-state_name' %>
|
54
|
-
<%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, {include_blank: true}, {class: '
|
54
|
+
<%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, {include_blank: true}, {class: 'custom-select fullwidth js-state_id', style: "display: #{f.object.country.states.empty? ? 'none' : 'block' };", disabled: f.object.country.states.empty?} %>
|
55
55
|
</span>
|
56
56
|
</div>
|
57
57
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div id="preference-settings">
|
5
5
|
<div class="field">
|
6
6
|
<%= f.label(:calculator_type, Spree::Calculator.model_name.human) %>
|
7
|
-
<%= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {class: '
|
7
|
+
<%= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {class: 'custom-select fullwidth js-calculator-type'}) %>
|
8
8
|
</div>
|
9
9
|
|
10
10
|
<% @calculators.each do |calculator_class| %>
|
@@ -9,19 +9,19 @@
|
|
9
9
|
<% end if can?(:admin, Spree::Product) %>
|
10
10
|
<%= content_tag :li, class: ('active' if current == 'Images') do %>
|
11
11
|
<%= link_to Spree.t(:images), spree.admin_product_images_url(@product) %>
|
12
|
-
<% end if can?(:admin, Spree::Image) %>
|
12
|
+
<% end if can?(:admin, Spree::Image) && !@product.deleted? %>
|
13
13
|
<%= content_tag :li, class: ('active' if current == 'Variants') do %>
|
14
14
|
<%= link_to plural_resource_name(Spree::Variant), spree.admin_product_variants_url(@product) %>
|
15
15
|
<% end if can?(:admin, Spree::Variant) %>
|
16
16
|
<%= content_tag :li, class: ('active' if current == 'Prices') do %>
|
17
17
|
<%= link_to plural_resource_name(Spree::Price), spree.admin_product_prices_url(@product) %>
|
18
|
-
<% end if can?(:admin, Spree::Price) %>
|
18
|
+
<% end if can?(:admin, Spree::Price) && !@product.deleted? %>
|
19
19
|
<%= content_tag :li, class: ('active' if current == 'Product Properties') do %>
|
20
20
|
<%= link_to plural_resource_name(Spree::ProductProperty), spree.admin_product_product_properties_url(@product) %>
|
21
|
-
<% end if can?(:admin, Spree::ProductProperty) %>
|
21
|
+
<% end if can?(:admin, Spree::ProductProperty) && !@product.deleted? %>
|
22
22
|
<%= content_tag :li, class: ('active' if current == 'Stock Management') do %>
|
23
23
|
<%= link_to Spree.t(:stock_management), spree.admin_product_stock_url(@product) %>
|
24
|
-
<% end if can?(:admin, Spree::StockItem) %>
|
24
|
+
<% end if can?(:admin, Spree::StockItem) && !@product.deleted? %>
|
25
25
|
</ul>
|
26
26
|
</nav>
|
27
27
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= search_form_for @search, url: spree.
|
1
|
+
<%= search_form_for @search, url: spree.url_for(controller: 'admin/reports', action: action) do |s| %>
|
2
2
|
<div class="date-range-filter field">
|
3
3
|
<div class="date-range-fields input-group">
|
4
4
|
<%= s.text_field :completed_at_gt, class: 'datepicker datepicker-from form-control', value: datepicker_field_value(params[:q][:completed_at_gt]), placeholder: Spree.t(:start) %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="field-block col-3">
|
5
5
|
<div class="field">
|
6
6
|
<%= label_tag nil, Spree::StockLocation.model_name.human %>
|
7
|
-
<%= select_tag :stock_location_id, options_from_collection_for_select(stock_locations, :id, :name, params[:stock_location_id]), { include_blank: true, class: '
|
7
|
+
<%= select_tag :stock_location_id, options_from_collection_for_select(stock_locations, :id, :name, params[:stock_location_id]), { include_blank: true, class: 'custom-select fullwidth', "data-placeholder" => Spree.t(:select_a_stock_location) } %>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="<%= if content_for?(:sidebar) then 'col-6' else 'col-9' end %>">
|
@@ -96,7 +96,7 @@
|
|
96
96
|
<fieldset class="tax_categories no-border-bottom">
|
97
97
|
<legend align="center"><%= Spree::TaxCategory.model_name.human %></legend>
|
98
98
|
<%= f.field_container :tax_categories do %>
|
99
|
-
<%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {include_blank: true}, class: "
|
99
|
+
<%= f.select :tax_category_id, @tax_categories.map { |tc| [tc.name, tc.id] }, {include_blank: true}, class: "custom-select fullwidth" %>
|
100
100
|
<%= error_message_on :shipping_method, :tax_category_id %>
|
101
101
|
<% end %>
|
102
102
|
</fieldset>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<div class="col-12">
|
18
18
|
<div data-hook="country" class="field">
|
19
19
|
<%= label_tag :country, Spree::Country.model_name.human %>
|
20
|
-
<select id="country" class='observe_field
|
20
|
+
<select id="country" class='observe_field custom-select fullwidth' data-base-url="<%=admin_states_path(format: :js) %>?country_id=" data-update="#state-list">
|
21
21
|
<%= options_from_collection_for_select(@countries, :id, :name, @country.id) %>
|
22
22
|
</select>
|
23
23
|
</div>
|