solidus_backend 2.0.3 → 2.1.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/handlebars_extensions.coffee +14 -6
- data/app/assets/javascripts/spree/backend/images/upload.js +203 -0
- data/app/assets/javascripts/spree/backend/option_value_picker.js +2 -1
- data/app/assets/javascripts/spree/backend/stock_management/index_update_forms.coffee +1 -1
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +5 -1
- data/app/assets/javascripts/spree/backend/taxons.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/templates/index.js +15 -0
- data/app/assets/javascripts/spree/backend/templates/products/upload_progress.hbs +12 -0
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs +13 -11
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs +12 -10
- data/app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs +7 -5
- data/app/assets/javascripts/spree/backend.js +57 -3
- data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +1 -1
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +2 -0
- data/app/assets/stylesheets/spree/backend/components/_table-filter.scss +3 -1
- data/app/assets/stylesheets/spree/backend/components/_tabs.scss +2 -0
- data/app/assets/stylesheets/spree/backend/sections/_adjustments.scss +3 -0
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +29 -17
- data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +6 -0
- data/app/assets/stylesheets/spree/backend/shared/_header.scss +2 -0
- data/app/assets/stylesheets/spree/backend/shared/_layout.scss +5 -0
- data/app/assets/stylesheets/spree/backend/shared/_utilities.scss +1 -2
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +1 -3
- data/app/controllers/spree/admin/orders_controller.rb +2 -0
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/prices_controller.rb +7 -1
- data/app/controllers/spree/admin/products_controller.rb +0 -6
- data/app/controllers/spree/admin/promotions_controller.rb +0 -2
- data/app/controllers/spree/admin/users_controller.rb +3 -0
- data/app/helpers/spree/admin/adjustments_helper.rb +1 -1
- data/app/helpers/spree/admin/base_helper.rb +0 -35
- data/app/helpers/spree/admin/stock_transfers_helper.rb +14 -0
- data/app/models/spree/backend_configuration.rb +2 -2
- data/app/views/spree/admin/adjustment_reasons/index.html.erb +1 -1
- data/app/views/spree/admin/adjustment_reasons/shared/_form.html.erb +14 -16
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +4 -1
- data/app/views/spree/admin/adjustments/_form.html.erb +24 -20
- data/app/views/spree/admin/cancellations/index.html.erb +2 -3
- data/app/views/spree/admin/countries/_form.html.erb +4 -4
- data/app/views/spree/admin/customer_returns/index.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/new.html.erb +5 -7
- data/app/views/spree/admin/general_settings/edit.html.erb +55 -46
- data/app/views/spree/admin/images/_form.html.erb +13 -11
- data/app/views/spree/admin/images/_image_row.html.erb +22 -0
- data/app/views/spree/admin/images/create.js.erb +9 -0
- data/app/views/spree/admin/images/edit.html.erb +12 -8
- data/app/views/spree/admin/images/index.html.erb +57 -49
- data/app/views/spree/admin/option_types/_form.html.erb +2 -2
- data/app/views/spree/admin/option_types/index.html.erb +1 -1
- data/app/views/spree/admin/orders/_add_line_item.html.erb +5 -3
- data/app/views/spree/admin/orders/_add_product.html.erb +5 -3
- data/app/views/spree/admin/orders/_shipment.html.erb +14 -6
- data/app/views/spree/admin/orders/cart.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm/_customer_details.html.erb +17 -15
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +28 -26
- data/app/views/spree/admin/orders/customer_details/show.html.erb +1 -1
- data/app/views/spree/admin/orders/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +70 -63
- data/app/views/spree/admin/payment_methods/_form.html.erb +54 -48
- data/app/views/spree/admin/payment_methods/index.html.erb +7 -5
- data/app/views/spree/admin/payments/_form.html.erb +2 -2
- data/app/views/spree/admin/payments/index.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +32 -30
- data/app/views/spree/admin/payments/source_forms/_storecredit.html.erb +1 -0
- data/app/views/spree/admin/payments/source_views/_gateway.html.erb +1 -1
- data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +8 -1
- data/app/views/spree/admin/prices/_form.html.erb +38 -43
- data/app/views/spree/admin/prices/_master_variant_table.html.erb +41 -0
- data/app/views/spree/admin/prices/_table.html.erb +35 -33
- data/app/views/spree/admin/prices/index.html.erb +37 -35
- data/app/views/spree/admin/product_properties/index.html.erb +0 -7
- data/app/views/spree/admin/products/_form.html.erb +153 -144
- data/app/views/spree/admin/products/edit.html.erb +1 -1
- data/app/views/spree/admin/products/index.html.erb +19 -13
- data/app/views/spree/admin/products/new.html.erb +5 -38
- data/app/views/spree/admin/promotion_categories/_form.html.erb +1 -1
- data/app/views/spree/admin/promotion_rules/create.js.erb +6 -0
- data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
- data/app/views/spree/admin/promotions/_form.html.erb +48 -44
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
- data/app/views/spree/admin/promotions/_rules.html.erb +8 -4
- data/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb +9 -5
- data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +30 -24
- data/app/views/spree/admin/promotions/edit.html.erb +2 -2
- data/app/views/spree/admin/promotions/index.html.erb +22 -20
- data/app/views/spree/admin/promotions/new.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +11 -5
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +18 -8
- data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +7 -5
- data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +13 -6
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +11 -7
- data/app/views/spree/admin/promotions/rules/_product.html.erb +11 -7
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +15 -9
- data/app/views/spree/admin/promotions/rules/_user.html.erb +5 -3
- data/app/views/spree/admin/promotions/rules/_user_role.html.erb +12 -0
- data/app/views/spree/admin/properties/_form.html.erb +2 -2
- data/app/views/spree/admin/properties/index.html.erb +7 -5
- data/app/views/spree/admin/refund_reasons/index.html.erb +1 -1
- data/app/views/spree/admin/refund_reasons/shared/_form.html.erb +14 -16
- data/app/views/spree/admin/refunds/edit.html.erb +2 -2
- data/app/views/spree/admin/refunds/new.html.erb +4 -4
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +0 -4
- data/app/views/spree/admin/shared/_head.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +0 -3
- data/app/views/spree/admin/shared/_rebuild_vat_prices_checkbox.html.erb +1 -1
- data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +2 -2
- data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
- data/app/views/spree/admin/shared/_variant_search.html.erb +12 -8
- data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_index.html.erb +1 -1
- data/app/views/spree/admin/shipping_categories/index.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +74 -81
- data/app/views/spree/admin/shipping_methods/index.html.erb +3 -3
- data/app/views/spree/admin/states/_form.html.erb +2 -2
- data/app/views/spree/admin/states/index.html.erb +9 -5
- data/app/views/spree/admin/stock_locations/_form.html.erb +42 -28
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +4 -4
- data/app/views/spree/admin/stock_locations/index.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/_form.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +10 -1
- data/app/views/spree/admin/stock_transfers/index.html.erb +29 -27
- data/app/views/spree/admin/stock_transfers/show.html.erb +26 -24
- data/app/views/spree/admin/store_credits/_form.html.erb +3 -3
- data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +1 -1
- data/app/views/spree/admin/store_credits/edit_amount.html.erb +1 -1
- data/app/views/spree/admin/store_credits/index.html.erb +2 -2
- data/app/views/spree/admin/style_guide/topics/forms/_building_forms.html.erb +49 -47
- data/app/views/spree/admin/style_guide/topics/messaging/_loading.html.erb +11 -1
- data/app/views/spree/admin/tax_categories/_form.html.erb +4 -4
- data/app/views/spree/admin/tax_categories/index.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/_form.html.erb +28 -28
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +6 -6
- data/app/views/spree/admin/taxons/index.html.erb +2 -2
- data/app/views/spree/admin/users/_addresses_form.html.erb +19 -15
- data/app/views/spree/admin/users/_form.html.erb +9 -6
- data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
- data/app/views/spree/admin/users/addresses.html.erb +1 -1
- data/app/views/spree/admin/users/edit.html.erb +2 -2
- data/app/views/spree/admin/users/items.html.erb +2 -2
- data/app/views/spree/admin/users/orders.html.erb +2 -2
- data/app/views/spree/admin/variants/_form.html.erb +73 -49
- data/app/views/spree/admin/variants/_table_filter.html.erb +12 -8
- data/app/views/spree/admin/variants/index.html.erb +2 -2
- data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +34 -31
- data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
- data/app/views/spree/admin/zones/index.html.erb +1 -3
- data/app/views/spree/layouts/admin.html.erb +4 -4
- data/config/routes.rb +0 -11
- data/solidus_backend.gemspec +4 -1
- data/spec/controllers/spree/admin/payments_controller_spec.rb +2 -3
- data/spec/controllers/spree/admin/prices_controller_spec.rb +5 -3
- data/spec/features/admin/configuration/general_settings_spec.rb +12 -0
- data/spec/features/admin/configuration/payment_methods_spec.rb +3 -2
- data/spec/features/admin/configuration/shipping_methods_spec.rb +1 -1
- data/spec/features/admin/homepage_spec.rb +0 -3
- data/spec/features/admin/orders/adjustments_spec.rb +28 -25
- data/spec/features/admin/orders/customer_details_spec.rb +1 -1
- data/spec/features/admin/orders/order_details_spec.rb +27 -1
- data/spec/features/admin/orders/payments_spec.rb +1 -1
- data/spec/features/admin/products/edit/images_spec.rb +28 -1
- data/spec/features/admin/products/pricing_spec.rb +17 -2
- data/spec/features/admin/products/products_spec.rb +0 -104
- data/spec/features/admin/store_credits_spec.rb +3 -3
- data/spec/features/admin/users_spec.rb +7 -1
- metadata +21 -32
- data/app/assets/javascripts/spree/backend/nested-attribute.js +0 -27
- data/app/assets/stylesheets/spree/backend/sections/_adjustments_table.scss +0 -8
- data/app/assets/stylesheets/spree/backend/sections/_edit_checkouts.scss +0 -72
- data/app/assets/stylesheets/spree/backend/sections/_tax_zones.scss +0 -15
- data/app/controllers/spree/admin/prototypes_controller.rb +0 -26
- data/app/controllers/spree/admin/trackers_controller.rb +0 -6
- data/app/views/spree/admin/prototypes/_form.html.erb +0 -36
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +0 -25
- data/app/views/spree/admin/prototypes/available.js.erb +0 -2
- data/app/views/spree/admin/prototypes/edit.html.erb +0 -15
- data/app/views/spree/admin/prototypes/index.html.erb +0 -50
- data/app/views/spree/admin/prototypes/new.html.erb +0 -9
- data/app/views/spree/admin/prototypes/new.js.erb +0 -5
- data/app/views/spree/admin/prototypes/select.js.erb +0 -4
- data/app/views/spree/admin/prototypes/show.html.erb +0 -42
- data/app/views/spree/admin/trackers/_form.html.erb +0 -28
- data/app/views/spree/admin/trackers/edit.html.erb +0 -19
- data/app/views/spree/admin/trackers/index.html.erb +0 -54
- data/app/views/spree/admin/trackers/new.html.erb +0 -18
- data/spec/features/admin/configuration/analytics_tracker_spec.rb +0 -50
- data/spec/features/admin/products/prototypes_spec.rb +0 -110
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="promotion_rule promotion-block
|
1
|
+
<div class="promotion_rule promotion-block col-xs-12" id="<%= dom_id promotion_rule %>">
|
2
2
|
<% type_name = promotion_rule.class.name.demodulize.underscore %>
|
3
3
|
<h6 class='promotion-title <%= 'no-text' if type_name == 'user_logged_in' || type_name == 'first_order'%>'><%= Spree.t("promotion_rule_types.#{type_name}.description") %></h6>
|
4
4
|
<% if can?(:destroy, promotion_rule) %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<fieldset id="rule_fields" class ="
|
1
|
+
<fieldset id="rule_fields" class ="no-border-bottom no-border-top">
|
2
2
|
|
3
3
|
<%= form_tag spree.admin_promotion_promotion_rules_path(@promotion), :remote => true, :id => 'new_product_rule_form' do %>
|
4
4
|
<fieldset>
|
@@ -21,15 +21,19 @@
|
|
21
21
|
<fieldset class="no-border-top">
|
22
22
|
<div id="promotion-pilicy-select" class="align-center row">
|
23
23
|
<% Spree::Promotion::MATCH_POLICIES.each do |policy| %>
|
24
|
-
<div class="
|
24
|
+
<div class="col-xs-6">
|
25
25
|
<label><%= f.radio_button :match_policy, policy %> <%= Spree.t "promotion_form.match_policies.#{policy}" %></label>
|
26
26
|
</div>
|
27
27
|
<% end %>
|
28
28
|
</div>
|
29
29
|
|
30
|
-
<div id="rules" class="filter_list
|
30
|
+
<div id="rules" class="filter_list">
|
31
31
|
<% if @promotion.rules.any? %>
|
32
|
-
|
32
|
+
<div class="col-xs-12">
|
33
|
+
<div class="row">
|
34
|
+
<%= render :partial => 'promotion_rule', :collection => @promotion.rules, :locals => {} %>
|
35
|
+
</div>
|
36
|
+
</div>
|
33
37
|
<% else %>
|
34
38
|
<div class="no-objects-found">
|
35
39
|
<%= Spree.t(:no_rules_added) %>
|
@@ -1,8 +1,12 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<div class="col-xs-12">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-xs-12">
|
4
|
+
<div class="field">
|
5
|
+
<% field_name = "#{param_prefix}[preferred_group_size]" %>
|
6
|
+
<%= label_tag field_name, Spree.t(:group_size) %>
|
7
|
+
<%= number_field_tag field_name, promotion_action.preferred_group_size, class: "fullwidth", min: 1 %>
|
8
|
+
</div>
|
9
|
+
</div>
|
6
10
|
</div>
|
7
11
|
</div>
|
8
12
|
|
data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb
CHANGED
@@ -1,28 +1,34 @@
|
|
1
|
-
<div class="
|
1
|
+
<div class="col-xs-12">
|
2
|
+
<div class="calculator-fields row">
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
<div class="col-xs-6">
|
5
|
+
<div class="field">
|
6
|
+
<% field_name = "#{param_prefix}[calculator_type]" %>
|
7
|
+
<%= label_tag field_name, Spree::Calculator.model_name.human %>
|
8
|
+
<%= select_tag field_name,
|
9
|
+
options_from_collection_for_select(calculators, :to_s, :description, promotion_action.calculator.type),
|
10
|
+
:class => 'type-select select2 fullwidth' %>
|
11
|
+
<% if promotion_action.calculator.respond_to?(:preferences) %>
|
12
|
+
<span class="warning info"><%= Spree.t(:calculator_settings_warning) %></span>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<% unless promotion_action.new_record? %>
|
18
|
+
<div class="col-xs-6">
|
19
|
+
<div class="settings field">
|
20
|
+
<% type_name = promotion_action.calculator.type.demodulize.underscore %>
|
21
|
+
<% if lookup_context.exists?("fields",
|
22
|
+
["spree/admin/promotions/calculators/#{type_name}"], true) %>
|
23
|
+
<%= render "spree/admin/promotions/calculators/#{type_name}/fields",
|
24
|
+
calculator: promotion_action.calculator, prefix: param_prefix %>
|
25
|
+
<% else %>
|
26
|
+
<%= render "spree/admin/promotions/calculators/default_fields",
|
27
|
+
calculator: promotion_action.calculator, prefix: param_prefix %>
|
28
|
+
<% end %>
|
29
|
+
<%= hidden_field_tag "#{param_prefix}[calculator_attributes][id]", promotion_action.calculator.id %>
|
30
|
+
</div>
|
31
|
+
</div>
|
11
32
|
<% end %>
|
12
33
|
</div>
|
13
|
-
|
14
|
-
<% unless promotion_action.new_record? %>
|
15
|
-
<div class="settings field omega four columns">
|
16
|
-
<% type_name = promotion_action.calculator.type.demodulize.underscore %>
|
17
|
-
<% if lookup_context.exists?("fields",
|
18
|
-
["spree/admin/promotions/calculators/#{type_name}"], true) %>
|
19
|
-
<%= render "spree/admin/promotions/calculators/#{type_name}/fields",
|
20
|
-
calculator: promotion_action.calculator, prefix: param_prefix %>
|
21
|
-
<% else %>
|
22
|
-
<%= render "spree/admin/promotions/calculators/default_fields",
|
23
|
-
calculator: promotion_action.calculator, prefix: param_prefix %>
|
24
|
-
<% end %>
|
25
|
-
<%= hidden_field_tag "#{param_prefix}[calculator_attributes][id]", promotion_action.calculator.id %>
|
26
|
-
</div>
|
27
|
-
<% end %>
|
28
34
|
</div>
|
@@ -20,11 +20,11 @@
|
|
20
20
|
<% end %>
|
21
21
|
|
22
22
|
<div id="promotion-filters" class="row">
|
23
|
-
<div id="rules_container" class="
|
23
|
+
<div id="rules_container" class="col-xs-6">
|
24
24
|
<%= render :partial => 'rules' %>
|
25
25
|
</div>
|
26
26
|
|
27
|
-
<div id="actions_container" class="
|
27
|
+
<div id="actions_container" class="col-xs-6">
|
28
28
|
<%= render :partial => 'actions' %>
|
29
29
|
</div>
|
30
30
|
</div>
|
@@ -15,31 +15,33 @@
|
|
15
15
|
<% content_for :table_filter do %>
|
16
16
|
<div data-hook="admin_promotions_index_search">
|
17
17
|
<%= search_form_for [:admin, @search] do |f| %>
|
18
|
-
<div class="
|
19
|
-
<div class="
|
20
|
-
|
21
|
-
|
18
|
+
<div class="row">
|
19
|
+
<div class="col-xs-3">
|
20
|
+
<div class="field">
|
21
|
+
<%= label_tag :q_name_cont, Spree::Promotion.human_attribute_name(:name) %>
|
22
|
+
<%= f.text_field :name_cont, tabindex: 1 %>
|
23
|
+
</div>
|
22
24
|
</div>
|
23
|
-
</div>
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
<div class="col-xs-3">
|
27
|
+
<div class="field">
|
28
|
+
<%= label_tag :q_codes_value_cont, Spree::Promotion.human_attribute_name(:code) %>
|
29
|
+
<%= f.text_field :codes_value_cont, tabindex: 1 %>
|
30
|
+
</div>
|
29
31
|
</div>
|
30
|
-
</div>
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
<div class="col-xs-3">
|
34
|
+
<div class="field">
|
35
|
+
<%= label_tag :q_path_cont, Spree::Promotion.human_attribute_name(:path) %>
|
36
|
+
<%= f.text_field :path_cont, tabindex: 1 %>
|
37
|
+
</div>
|
36
38
|
</div>
|
37
|
-
</div>
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
<div class="col-xs-3">
|
41
|
+
<div class="field">
|
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 => 'select2 fullwidth' }) %>
|
44
|
+
</div>
|
43
45
|
</div>
|
44
46
|
</div>
|
45
47
|
|
@@ -101,7 +103,7 @@
|
|
101
103
|
</tbody>
|
102
104
|
</table>
|
103
105
|
<% else %>
|
104
|
-
<div class="
|
106
|
+
<div class="col-xs-9 no-objects-found">
|
105
107
|
<%= render 'spree/admin/shared/no_objects_found',
|
106
108
|
resource: Spree::Promotion,
|
107
109
|
new_resource_url: new_object_url %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% admin_breadcrumb(Spree.t(:new_promotion)) %>
|
3
3
|
|
4
4
|
|
5
|
-
<%= form_for
|
5
|
+
<%= form_for @promotion, :url => collection_url do |f| %>
|
6
6
|
<fieldset class="no-border-top">
|
7
7
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
8
8
|
<%= render :partial => 'spree/admin/shared/new_resource_links' %>
|
@@ -1,7 +1,13 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-xs-6">
|
3
|
+
<div class="field">
|
4
|
+
<%= Spree.t(:form_text, scope: "promotion_rule_types.first_repeat_purchase_since") %>
|
5
|
+
</div>
|
6
|
+
</div>
|
4
7
|
|
5
|
-
<div class="
|
6
|
-
|
8
|
+
<div class="col-xs-6">
|
9
|
+
<div class="field">
|
10
|
+
<%= number_field_tag "#{param_prefix}[preferred_days_ago]", promotion_rule.preferred_days_ago, :class => 'fullwidth' %>
|
11
|
+
</div>
|
12
|
+
</div>
|
7
13
|
</div>
|
@@ -1,9 +1,19 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
<div class="field
|
5
|
-
|
6
|
-
</div>
|
7
|
-
|
8
|
-
|
1
|
+
<div class="col-xs-12">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-xs-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 => 'select2 select_item_total fullwidth'} %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<div class="col-xs-4">
|
9
|
+
<div class="field">
|
10
|
+
<%= text_field_tag "#{param_prefix}[preferred_amount]", promotion_rule.preferred_amount, :class => 'fullwidth' %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<div class="col-xs-4">
|
14
|
+
<div class="field">
|
15
|
+
<%= text_field_tag "#{param_prefix}[preferred_currency]", promotion_rule.preferred_currency, :class => 'fullwidth' %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
9
19
|
</div>
|
@@ -1,5 +1,7 @@
|
|
1
|
-
<div class="
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<div class="col-xs-12">
|
2
|
+
<div class="field">
|
3
|
+
<label for="<%= "#{param_prefix}_preferred_path" %>"><%= Spree.t('promotion_rule_types.landing_page.description') %>:</label>
|
4
|
+
<%= text_field_tag "#{param_prefix}[preferred_path]", promotion_rule.preferred_path, :class => 'fullwidth' %>
|
5
|
+
<span class="info"><%= Spree.t('landing_page_rule.must_have_visited_path') %></span>
|
6
|
+
</div>
|
7
|
+
</div>
|
@@ -1,7 +1,14 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
<div class="col-xs-12">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-xs-6">
|
4
|
+
<div class="field">
|
5
|
+
<%= Spree.t(:form_text, scope: "promotion_rule_types.nth_order") %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<div class="col-xs-6">
|
9
|
+
<div class="field">
|
10
|
+
<%= number_field_tag "#{param_prefix}[preferred_nth_order]", promotion_rule.preferred_nth_order, :class => 'fullwidth' %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
7
14
|
</div>
|
@@ -1,12 +1,16 @@
|
|
1
|
-
<div class="
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<div class="col-xs-12">
|
2
|
+
<div class="field promo-rule-option-values">
|
3
|
+
<div class="param-prefix hidden" data-param-prefix="<%= param_prefix %>"></div>
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-xs-6"><%= label_tag nil, Spree::Product.model_name.human %></div>
|
6
|
+
<div class="col-xs-6"><%= label_tag nil, plural_resource_name(Spree::OptionValue) %></div>
|
7
|
+
</div>
|
8
|
+
<div class="clear"></div>
|
6
9
|
|
7
|
-
|
10
|
+
<div class="js-promo-rule-option-values"></div>
|
8
11
|
|
9
|
-
|
12
|
+
<button class="button js-add-promo-rule-option-value"><%= Spree.t('actions.add') %></button>
|
13
|
+
</div>
|
10
14
|
</div>
|
11
15
|
|
12
16
|
<%= content_tag :div, nil, class: "hidden js-original-promo-rule-option-values",
|
@@ -1,9 +1,13 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
1
|
+
<div class="col-xs-12">
|
2
|
+
<div class="field products_rule_products">
|
3
|
+
<%= label_tag "#{param_prefix}_product_ids_string", Spree.t('product_rule.choose_products') %>
|
4
|
+
<%= hidden_field_tag "#{param_prefix}[product_ids_string]", promotion_rule.product_ids.join(","), :class => "product_picker fullwidth" %>
|
5
|
+
</div>
|
4
6
|
</div>
|
5
|
-
<div class="
|
6
|
-
<
|
7
|
-
|
8
|
-
|
7
|
+
<div class="col-xs-12">
|
8
|
+
<div class="field">
|
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 select2'})).html_safe %>
|
11
|
+
</label>
|
12
|
+
</div>
|
9
13
|
</div>
|
@@ -1,9 +1,15 @@
|
|
1
|
-
<div class="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-xs-11">
|
3
|
+
<div class="field taxons_rule_taxons">
|
4
|
+
<%= label_tag "#{param_prefix}_taxon_ids_string", Spree.t('taxon_rule.choose_taxons') %>
|
5
|
+
<%= hidden_field_tag "#{param_prefix}[taxon_ids_string]", promotion_rule.taxon_ids.join(","), :class => "taxon_picker fullwidth", id: 'product_taxon_ids' %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<div class="col-xs-12">
|
9
|
+
<div class="field">
|
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 select2'})).html_safe %>
|
12
|
+
</label>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -1,4 +1,6 @@
|
|
1
|
-
<div class="
|
2
|
-
<
|
3
|
-
|
1
|
+
<div class="col-xs-12">
|
2
|
+
<div class="field">
|
3
|
+
<label><%= Spree.t('user_rule.choose_users') %></label><br>
|
4
|
+
<input type='hidden' name='<%= param_prefix %>[user_ids_string]' class='user_picker fullwidth' value='<%= promotion_rule.user_ids.join(",") %>'>
|
5
|
+
</div>
|
4
6
|
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="field alpha omega eight columns">
|
2
|
+
<%= label_tag "#{param_prefix}_preferred_role_ids", Spree.t('user_role_rule.choose_roles') %>
|
3
|
+
<%= select_tag "#{param_prefix}[preferred_role_ids]",
|
4
|
+
options_from_collection_for_select(
|
5
|
+
Spree::Role.all, :id, :name, promotion_rule.preferred_role_ids
|
6
|
+
), class: 'select2 fullwidth', multiple: true %>
|
7
|
+
</div>
|
8
|
+
<div class="field alpha omega eight columns">
|
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: 'select2'})).html_safe %>
|
11
|
+
</label>
|
12
|
+
</div>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<div data-hook="admin_property_form" class="align-center row">
|
2
|
-
<div class="
|
2
|
+
<div class="col-xs-6">
|
3
3
|
<%= f.field_container :name do %>
|
4
4
|
<%= f.label :name, class: 'required' %><br />
|
5
5
|
<%= f.text_field :name, :class => 'fullwidth' %>
|
6
6
|
<%= f.error_message_on :name %>
|
7
7
|
<% end %>
|
8
8
|
</div>
|
9
|
-
<div class="
|
9
|
+
<div class="col-xs-6">
|
10
10
|
<%= f.field_container :presentation do %>
|
11
11
|
<%= f.label :presentation, class: 'required' %><br />
|
12
12
|
<%= f.text_field :presentation, :class => 'fullwidth' %>
|
@@ -22,10 +22,12 @@
|
|
22
22
|
<%- locals = {:f => f} %>
|
23
23
|
|
24
24
|
<div data-hook="admin_property_index_search">
|
25
|
-
<div class="
|
26
|
-
<div class="
|
27
|
-
|
28
|
-
|
25
|
+
<div class="row">
|
26
|
+
<div class="col-xs-6">
|
27
|
+
<div class="field">
|
28
|
+
<%= f.label :name_cont, Spree.t(:name) %>
|
29
|
+
<%= f.text_field :name_cont, :size => 15 %>
|
30
|
+
</div>
|
29
31
|
</div>
|
30
32
|
</div>
|
31
33
|
</div>
|
@@ -73,7 +75,7 @@
|
|
73
75
|
</tbody>
|
74
76
|
</table>
|
75
77
|
<% else %>
|
76
|
-
<div class="
|
78
|
+
<div class="col-xs-9 no-objects-found">
|
77
79
|
<%= render 'spree/admin/shared/no_objects_found',
|
78
80
|
resource: Spree::Property,
|
79
81
|
new_resource_url: new_object_url %>
|
@@ -48,7 +48,7 @@
|
|
48
48
|
</tbody>
|
49
49
|
</table>
|
50
50
|
<% else %>
|
51
|
-
<div class="
|
51
|
+
<div class="col-xs-9 no-objects-found">
|
52
52
|
<%= render 'spree/admin/shared/no_objects_found',
|
53
53
|
resource: Spree::RefundReason,
|
54
54
|
new_resource_url: new_object_url %>
|
@@ -1,22 +1,20 @@
|
|
1
1
|
<div data-hook="admin_named_type_form_fields" class="row">
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
<%= f.
|
5
|
-
|
6
|
-
|
7
|
-
<% end %>
|
2
|
+
<div class="col-xs-3">
|
3
|
+
<%= f.field_container :name do %>
|
4
|
+
<%= f.label :name, class: 'required' %><br />
|
5
|
+
<%= f.text_field :name, :class => 'fullwidth' %>
|
6
|
+
<% end %>
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
<%= f.field_container :code do %>
|
9
|
+
<%= f.label :code, class: 'required' %><br />
|
10
|
+
<%= f.text_field :code, :class => 'fullwidth' %>
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
</div>
|
12
|
+
<% end %>
|
13
|
+
<div class="checkbox">
|
14
|
+
<label>
|
15
|
+
<%= f.check_box :active %>
|
16
|
+
<%= Spree.t(:active) %>
|
17
|
+
</label>
|
20
18
|
</div>
|
21
19
|
</div>
|
22
20
|
</div>
|
@@ -7,13 +7,13 @@
|
|
7
7
|
<%= form_for [:admin, @refund.payment.order, @refund.payment, @refund] do |f| %>
|
8
8
|
<fieldset class="no-border-top">
|
9
9
|
<div data-hook="admin_refund_form_fields" class="row">
|
10
|
-
<div class="
|
10
|
+
<div class="col-xs-3">
|
11
11
|
<div class="field">
|
12
12
|
<%= f.label :amount %><br/>
|
13
13
|
<%= @refund.amount %>
|
14
14
|
</div>
|
15
15
|
</div>
|
16
|
-
<div class="
|
16
|
+
<div class="col-xs-3">
|
17
17
|
<div class="field">
|
18
18
|
<%= f.label :refund_reason_id %><br/>
|
19
19
|
<%= f.collection_select(:refund_reason_id, refund_reasons, :id, :name, {}, {class: 'select2 fullwidth'}) %>
|
@@ -8,25 +8,25 @@
|
|
8
8
|
<%= form_for [:admin, @refund.payment.order, @refund.payment, @refund] do |f| %>
|
9
9
|
<fieldset class="no-border-top">
|
10
10
|
<div data-hook="admin_refund_form_fields" class="row">
|
11
|
-
<div class="
|
11
|
+
<div class="col-xs-3">
|
12
12
|
<div class="field">
|
13
13
|
<%= Spree.t(:payment_amount) %><br/>
|
14
14
|
<%= @refund.payment.amount %>
|
15
15
|
</div>
|
16
16
|
</div>
|
17
|
-
<div class="
|
17
|
+
<div class="col-xs-3">
|
18
18
|
<div class="field">
|
19
19
|
<%= Spree.t(:credit_allowed) %><br/>
|
20
20
|
<%= @refund.payment.credit_allowed %>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
|
-
<div class="
|
23
|
+
<div class="col-xs-3">
|
24
24
|
<div class="field">
|
25
25
|
<%= f.label :amount %><br/>
|
26
26
|
<%= f.text_field :amount, class: 'fullwidth' %>
|
27
27
|
</div>
|
28
28
|
</div>
|
29
|
-
<div class="
|
29
|
+
<div class="col-xs-3">
|
30
30
|
<div class="field">
|
31
31
|
<%= f.label :refund_reason_id %><br/>
|
32
32
|
<%= f.collection_select(:refund_reason_id, refund_reasons, :id, :name, {include_blank: true}, {class: 'select2 fullwidth'}) %>
|
@@ -7,10 +7,6 @@
|
|
7
7
|
<% if can?(:edit, :general_settings) %>
|
8
8
|
<%= settings_tab_item Spree.t(:settings), edit_admin_general_settings_path %>
|
9
9
|
<% end %>
|
10
|
-
|
11
|
-
<% if can?(:display, Spree::Tracker) %>
|
12
|
-
<%= settings_tab_item plural_resource_name(Spree::Tracker), admin_trackers_path %>
|
13
|
-
<% end %>
|
14
10
|
</ul>
|
15
11
|
</nav>
|
16
12
|
<% end %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<!-- Get "Open Sans" font from Google -->
|
8
8
|
<link href='//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese' rel='stylesheet' type='text/css'>
|
9
9
|
|
10
|
-
<%= stylesheet_link_tag 'spree/backend/all' %>
|
10
|
+
<%= stylesheet_link_tag 'spree/backend/all', media: 'all' %>
|
11
11
|
|
12
12
|
<%- if Rails.env.test? %>
|
13
13
|
<style>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div data-hook="admin_<%= model_name %>_form_generate_vat_prices" class="<%= wrapper_class %> checkbox">
|
1
|
+
<div data-hook="admin_<%= model_name %>_form_generate_vat_prices" class="<%= local_assigns[:wrapper_class] %> checkbox">
|
2
2
|
<%= form.label :rebuild_vat_prices do %>
|
3
3
|
<%= form.check_box :rebuild_vat_prices, checked: form.object.prices.size <= 1 %>
|
4
4
|
<%= Spree::Variant.human_attribute_name(:rebuild_vat_prices) %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<ul class="admin-subnav" data-hook="admin_settings_sub_tabs">
|
2
|
-
<% if can?(:edit, :general_settings)
|
3
|
-
<%= tab :general_settings, label: :general, url: spree.edit_admin_general_settings_path, match_path: /\/general_settings
|
2
|
+
<% if can?(:edit, :general_settings) %>
|
3
|
+
<%= tab :general_settings, label: :general, url: spree.edit_admin_general_settings_path, match_path: /\/general_settings/ %>
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<% if can?(:display, Spree::PaymentMethod) %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if content_for?(:sidebar) %>
|
2
|
-
<aside id="sidebar" data-hook class="content-sidebar
|
2
|
+
<aside id="sidebar" data-hook class="content-sidebar col-xs-3">
|
3
3
|
|
4
4
|
<% if content_for?(:sidebar_title) %>
|
5
5
|
<h5 class="sidebar-title"><span><%= yield :sidebar_title %></span></h5>
|
@@ -1,14 +1,18 @@
|
|
1
1
|
<div data-hook="admin_orders_index_search">
|
2
2
|
<%= form_for :variant_search, url: form_path, method: :get do |f| %>
|
3
|
-
<div class="
|
4
|
-
<div class="field">
|
5
|
-
|
6
|
-
|
3
|
+
<div class="row">
|
4
|
+
<div class="field-block col-xs-3">
|
5
|
+
<div class="field">
|
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 => 'select2 fullwidth', "data-placeholder" => Spree.t(:select_a_stock_location) } %>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
<div class="<%= if content_for?(:sidebar) then 'col-xs-6' else 'col-xs-9' end %>">
|
11
|
+
<div data-hook="add_product_name" class="field">
|
12
|
+
<%= label_tag :add_variant_id, Spree::Variant.model_name.human %>
|
13
|
+
<%= text_field_tag :variant_search_term, params[:variant_search_term], :class => "fullwidth", :placeholder => Spree.t(:variant_search_placeholder) %>
|
14
|
+
</div>
|
7
15
|
</div>
|
8
|
-
</div>
|
9
|
-
<div data-hook="add_product_name" class="field <%= if content_for?(:sidebar) then 'eight' else 'twelve' end %> columns alpha">
|
10
|
-
<%= label_tag :add_variant_id, Spree::Variant.model_name.human %>
|
11
|
-
<%= text_field_tag :variant_search_term, params[:variant_search_term], :class => "fullwidth", :placeholder => Spree.t(:variant_search_placeholder) %>
|
12
16
|
</div>
|
13
17
|
|
14
18
|
<div class="clearfix"></div>
|