spree_backend 4.1.15 → 4.2.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/backend-add.svg +5 -0
- data/app/assets/images/backend-adjust.svg +5 -0
- data/app/assets/images/backend-approve.svg +3 -0
- data/app/assets/images/backend-arrow-down.svg +1 -0
- data/app/assets/images/backend-arrow-left.svg +1 -0
- data/app/assets/images/backend-arrow-right.svg +1 -0
- data/app/assets/images/backend-arrow-up.svg +1 -0
- data/app/assets/images/backend-calendar.svg +9 -0
- data/app/assets/images/backend-cancel.svg +7 -0
- data/app/assets/images/backend-capture.svg +3 -0
- data/app/assets/images/backend-cart.svg +1 -0
- data/app/assets/images/backend-chevron-down.svg +1 -0
- data/app/assets/images/backend-chevron-left.svg +1 -0
- data/app/assets/images/backend-chevron-right.svg +1 -0
- data/app/assets/images/backend-chevron-up.svg +1 -0
- data/app/assets/images/backend-clone.svg +7 -0
- data/app/assets/images/backend-close.svg +7 -0
- data/app/assets/images/backend-delete.svg +6 -0
- data/app/assets/images/backend-double-chevron-left.svg +15 -0
- data/app/assets/images/backend-double-chevron-right.svg +17 -0
- data/app/assets/images/backend-edit.svg +14 -0
- data/app/assets/images/backend-enter.svg +6 -0
- data/app/assets/images/backend-envelope.svg +3 -0
- data/app/assets/images/backend-exit.svg +13 -0
- data/app/assets/images/backend-extensions.svg +4 -0
- data/app/assets/images/backend-eye-open.svg +8 -0
- data/app/assets/images/backend-file.svg +6 -0
- data/app/assets/images/backend-filter.svg +3 -0
- data/app/assets/images/backend-folder.svg +4 -0
- data/app/assets/images/backend-images.svg +7 -0
- data/app/assets/images/backend-info.svg +7 -0
- data/app/assets/images/backend-items.svg +5 -0
- data/app/assets/images/backend-leaf.svg +7 -0
- data/app/assets/images/backend-list.svg +5 -0
- data/app/assets/images/backend-location.svg +4 -0
- data/app/assets/images/backend-menu.svg +5 -0
- data/app/assets/images/backend-money.svg +1 -0
- data/app/assets/images/backend-move.svg +5 -0
- data/app/assets/images/backend-ok.svg +3 -0
- data/app/assets/images/backend-pagination-double-arrow-right.svg +8 -0
- data/app/assets/images/backend-payments.svg +8 -0
- data/app/assets/images/backend-pencil.svg +1 -0
- data/app/assets/images/backend-products.svg +5 -0
- data/app/assets/images/backend-promotion.svg +8 -0
- data/app/assets/images/backend-recycle.svg +5 -0
- data/app/assets/images/backend-remove.svg +6 -0
- data/app/assets/images/backend-report.svg +6 -0
- data/app/assets/images/backend-resume.svg +5 -0
- data/app/assets/images/backend-returns.svg +3 -0
- data/app/assets/images/backend-save.svg +3 -0
- data/app/assets/images/backend-search.svg +1 -0
- data/app/assets/images/backend-settings.svg +6 -0
- data/app/assets/images/backend-shipping.svg +3 -0
- data/app/assets/images/backend-slack.svg +3 -0
- data/app/assets/images/backend-sort.svg +5 -0
- data/app/assets/images/backend-split.svg +3 -0
- data/app/assets/images/backend-store.svg +14 -0
- data/app/assets/images/backend-tick.svg +3 -0
- data/app/assets/images/backend-update.svg +3 -0
- data/app/assets/images/backend-user.svg +3 -0
- data/app/assets/images/backend-users.svg +6 -0
- data/app/assets/images/backend-view.svg +8 -0
- data/app/assets/images/backend-void.svg +7 -0
- data/app/assets/javascripts/spree/backend/admin.js +156 -147
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +1 -0
- data/app/assets/javascripts/spree/backend/flatpickr_locals.js +37 -0
- data/app/assets/javascripts/spree/backend/multi_currency.js +38 -0
- data/app/assets/javascripts/spree/backend/payments/edit.js +4 -3
- data/app/assets/javascripts/spree/backend/payments/new.js +18 -18
- data/app/assets/javascripts/spree/backend/promotions.js +1 -1
- data/app/assets/javascripts/spree/backend/spree-select2.js +18 -4
- data/app/assets/javascripts/spree/backend/stock_management.js +2 -1
- data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +4 -4
- data/app/assets/javascripts/spree/backend/taxonomy.js +8 -1
- data/app/assets/javascripts/spree/backend/taxons.js +25 -16
- data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +1 -1
- data/app/assets/javascripts/spree/backend/variant_management.js +2 -1
- data/app/assets/javascripts/spree/backend.js +5 -2
- data/app/assets/stylesheets/spree/backend/components/_buttons.scss +27 -11
- data/app/assets/stylesheets/spree/backend/components/_filters.scss +35 -5
- data/app/assets/stylesheets/spree/backend/components/_icons.scss +39 -4
- data/app/assets/stylesheets/spree/backend/components/_main.scss +32 -6
- data/app/assets/stylesheets/spree/backend/components/_navbar.scss +16 -8
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +119 -55
- data/app/assets/stylesheets/spree/backend/components/_tables.scss +62 -19
- data/app/assets/stylesheets/spree/backend/components/_taxon_products_view.scss +26 -63
- data/app/assets/stylesheets/spree/backend/global/_variables.scss +5 -1
- data/app/assets/stylesheets/spree/backend/plugins/_flatpickr.scss +95 -0
- data/app/assets/stylesheets/spree/backend/plugins/_jquery_ui.scss +0 -117
- data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +73 -24
- data/app/assets/stylesheets/spree/backend/shared/_base.scss +40 -0
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +38 -0
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
- data/app/assets/stylesheets/spree/backend/views/_order_payments.scss +12 -0
- data/app/assets/stylesheets/spree/backend/views/_product_properties.scss +11 -0
- data/app/assets/stylesheets/spree/backend/views/prototypes.scss +42 -0
- data/app/assets/stylesheets/spree/backend.css +1 -1
- data/app/controllers/spree/admin/general_settings_controller.rb +27 -0
- data/app/controllers/spree/admin/prices_controller.rb +39 -0
- data/app/controllers/spree/admin/stock_transfers_controller.rb +8 -1
- data/app/controllers/spree/admin/stores_controller.rb +61 -1
- data/app/controllers/spree/admin/taxons_controller.rb +5 -1
- data/app/helpers/spree/admin/base_helper.rb +25 -8
- data/app/helpers/spree/admin/navigation_helper.rb +50 -19
- data/app/helpers/spree/admin/orders_helper.rb +3 -3
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_first_page.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_gap.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_last_page.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_next_page.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_page.html.erb +0 -0
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_paginator.html.erb +1 -1
- data/app/views/kaminari/{twitter-bootstrap-4 → admin-twitter-bootstrap-4}/_prev_page.html.erb +1 -1
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +2 -2
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +16 -16
- data/app/views/spree/admin/adjustments/edit.html.erb +2 -2
- data/app/views/spree/admin/adjustments/index.html.erb +3 -3
- data/app/views/spree/admin/adjustments/new.html.erb +1 -1
- data/app/views/spree/admin/countries/_form.html.erb +9 -4
- data/app/views/spree/admin/countries/index.html.erb +27 -24
- data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +37 -35
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +2 -0
- data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +45 -43
- data/app/views/spree/admin/customer_returns/index.html.erb +3 -1
- data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
- data/app/views/spree/admin/general_settings/_form.html.erb +27 -0
- data/app/views/spree/admin/general_settings/edit.html.erb +4 -3
- data/app/views/spree/admin/images/edit.html.erb +2 -2
- data/app/views/spree/admin/images/index.html.erb +7 -7
- data/app/views/spree/admin/images/new.html.erb +2 -2
- data/app/views/spree/admin/log_entries/index.html.erb +4 -3
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +1 -1
- data/app/views/spree/admin/option_types/edit.html.erb +22 -20
- data/app/views/spree/admin/option_types/index.html.erb +27 -25
- data/app/views/spree/admin/orders/_adjustments.html.erb +26 -26
- data/app/views/spree/admin/orders/_line_items.html.erb +7 -7
- data/app/views/spree/admin/orders/_order_actions.html.erb +1 -1
- data/app/views/spree/admin/orders/_risk_analysis.html.erb +44 -42
- data/app/views/spree/admin/orders/_shipment.html.erb +6 -6
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +5 -5
- data/app/views/spree/admin/orders/_store_form.html.erb +3 -3
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +135 -127
- data/app/views/spree/admin/payment_methods/index.html.erb +6 -4
- data/app/views/spree/admin/payments/_capture_events.html.erb +18 -16
- data/app/views/spree/admin/payments/_form.html.erb +1 -1
- data/app/views/spree/admin/payments/_list.html.erb +39 -37
- data/app/views/spree/admin/payments/index.html.erb +2 -3
- data/app/views/spree/admin/payments/new.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 +30 -30
- data/app/views/spree/admin/payments/source_views/_gateway.html.erb +20 -18
- data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +28 -26
- data/app/views/spree/admin/prices/_variant_prices.html.erb +43 -0
- data/app/views/spree/admin/prices/index.html.erb +21 -0
- data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +16 -4
- data/app/views/spree/admin/product_properties/index.html.erb +24 -19
- data/app/views/spree/admin/products/_add_stock_form.html.erb +1 -1
- data/app/views/spree/admin/products/_autocomplete.js.erb +27 -21
- data/app/views/spree/admin/products/_form.html.erb +40 -9
- data/app/views/spree/admin/products/edit.html.erb +1 -1
- data/app/views/spree/admin/products/index.html.erb +24 -19
- data/app/views/spree/admin/products/new.html.erb +11 -2
- data/app/views/spree/admin/products/stock.html.erb +3 -3
- data/app/views/spree/admin/promotion_categories/index.html.erb +4 -1
- data/app/views/spree/admin/promotions/_actions.html.erb +2 -2
- data/app/views/spree/admin/promotions/_form.html.erb +44 -17
- data/app/views/spree/admin/promotions/_promotion_action.html.erb +1 -1
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
- data/app/views/spree/admin/promotions/_rules.html.erb +4 -4
- data/app/views/spree/admin/promotions/edit.html.erb +2 -2
- data/app/views/spree/admin/promotions/index.html.erb +5 -3
- data/app/views/spree/admin/promotions/new.html.erb +7 -6
- data/app/views/spree/admin/promotions/rules/_country.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +5 -5
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +6 -13
- 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/properties/index.html.erb +5 -3
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +30 -28
- data/app/views/spree/admin/prototypes/index.html.erb +21 -19
- data/app/views/spree/admin/prototypes/show.html.erb +21 -8
- data/app/views/spree/admin/refunds/edit.html.erb +2 -2
- data/app/views/spree/admin/refunds/new.html.erb +2 -2
- data/app/views/spree/admin/reimbursement_types/_form.html.erb +4 -4
- data/app/views/spree/admin/reimbursement_types/index.html.erb +4 -2
- data/app/views/spree/admin/reimbursements/edit.html.erb +66 -63
- data/app/views/spree/admin/reimbursements/index.html.erb +21 -20
- data/app/views/spree/admin/reimbursements/show.html.erb +66 -60
- data/app/views/spree/admin/reports/index.html.erb +18 -17
- data/app/views/spree/admin/reports/sales_total.html.erb +20 -19
- data/app/views/spree/admin/return_authorizations/_form.html.erb +3 -2
- data/app/views/spree/admin/return_authorizations/edit.html.erb +3 -3
- data/app/views/spree/admin/return_authorizations/index.html.erb +3 -1
- data/app/views/spree/admin/return_authorizations/new.html.erb +2 -2
- data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -4
- data/app/views/spree/admin/return_index/return_authorizations.html.erb +4 -4
- data/app/views/spree/admin/roles/index.html.erb +21 -19
- data/app/views/spree/admin/shared/_account_nav.html.erb +51 -65
- data/app/views/spree/admin/shared/_address_form.html.erb +31 -73
- data/app/views/spree/admin/shared/_cal_close.html.erb +10 -0
- data/app/views/spree/admin/shared/_content_header.html.erb +40 -21
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_header.html.erb +14 -11
- data/app/views/spree/admin/shared/_index_table_options.html.erb +5 -7
- data/app/views/spree/admin/shared/_main_menu.html.erb +25 -14
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_order_summary.html.erb +2 -0
- data/app/views/spree/admin/shared/_order_tabs.html.erb +9 -9
- data/app/views/spree/admin/shared/_product_tabs.html.erb +13 -5
- data/app/views/spree/admin/shared/_refunds.html.erb +31 -29
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +27 -6
- data/app/views/spree/admin/shared/_sidebar.html.erb +19 -1
- data/app/views/spree/admin/shared/_table_filter.html.erb +3 -3
- data/app/views/spree/admin/shared/_translations.html.erb +33 -1
- data/app/views/spree/admin/shared/_version.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_index.html.erb +3 -1
- data/app/views/spree/admin/shipping_categories/index.html.erb +3 -1
- data/app/views/spree/admin/shipping_methods/index.html.erb +3 -1
- data/app/views/spree/admin/state_changes/index.html.erb +5 -2
- data/app/views/spree/admin/states/_state_list.html.erb +25 -24
- data/app/views/spree/admin/states/index.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/index.html.erb +3 -1
- data/app/views/spree/admin/stock_movements/index.html.erb +28 -26
- data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +20 -18
- data/app/views/spree/admin/stock_transfers/index.html.erb +6 -4
- data/app/views/spree/admin/stock_transfers/new.html.erb +3 -3
- data/app/views/spree/admin/stock_transfers/show.html.erb +3 -3
- data/app/views/spree/admin/store_credit_categories/index.html.erb +3 -1
- data/app/views/spree/admin/store_credits/index.html.erb +3 -1
- data/app/views/spree/admin/stores/_form.html.erb +128 -68
- data/app/views/spree/admin/stores/edit.html.erb +1 -1
- data/app/views/spree/admin/stores/index.html.erb +4 -2
- data/app/views/spree/admin/tax_categories/index.html.erb +29 -27
- data/app/views/spree/admin/tax_rates/index.html.erb +3 -1
- data/app/views/spree/admin/taxonomies/_list.html.erb +24 -22
- data/app/views/spree/admin/taxonomies/edit.html.erb +2 -2
- data/app/views/spree/admin/taxonomies/index.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +3 -3
- data/app/views/spree/admin/taxons/_taxon_table.html.erb +24 -22
- data/app/views/spree/admin/taxons/edit.html.erb +6 -2
- data/app/views/spree/admin/taxons/index.html.erb +1 -1
- data/app/views/spree/admin/users/_lifetime_stats.html.erb +24 -23
- data/app/views/spree/admin/users/_sidebar.html.erb +5 -5
- data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
- data/app/views/spree/admin/users/edit.html.erb +2 -2
- data/app/views/spree/admin/users/index.html.erb +25 -23
- data/app/views/spree/admin/users/items.html.erb +3 -2
- data/app/views/spree/admin/users/orders.html.erb +30 -29
- data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +3 -3
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +2 -2
- data/app/views/spree/admin/variants/_form.html.erb +14 -2
- data/app/views/spree/admin/variants/_split.js.erb +2 -2
- data/app/views/spree/admin/variants/index.html.erb +7 -5
- data/app/views/spree/admin/zones/index.html.erb +4 -4
- data/app/views/spree/layouts/admin.html.erb +33 -27
- data/config/initializers/ransack.rb +31 -0
- data/config/routes.rb +1 -0
- data/lib/spree/backend.rb +2 -0
- data/lib/spree_backend.rb +0 -1
- data/spec/fixtures/thinking-cat.jpg +0 -0
- data/spree_backend.gemspec +6 -4
- data/vendor/assets/javascripts/js.cookie.js +154 -156
- data/vendor/assets/javascripts/purify.js +1217 -0
- data/vendor/assets/javascripts/sortable.js +3709 -0
- data/vendor/assets/stylesheets/animate.css +7 -3156
- data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +23 -9
- metadata +138 -25
@@ -43,14 +43,23 @@
|
|
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 %>
|
46
|
-
|
46
|
+
|
47
|
+
<div class="input-group datepicker" data-wrap="true">
|
48
|
+
<%= f.text_field :available_on,
|
49
|
+
value: datepicker_field_value(@product.available_on),
|
50
|
+
placeholder: Spree.t(:select_a_date),
|
51
|
+
class: 'form-control shadow-none',
|
52
|
+
'data-input':'' %>
|
53
|
+
|
54
|
+
<%= render partial: 'spree/admin/shared/cal_close' %>
|
55
|
+
</div>
|
47
56
|
<% end %>
|
48
57
|
</div>
|
49
58
|
|
50
59
|
<div data-hook="new_product_shipping_category" class="col-12 col-md-4">
|
51
60
|
<%= f.field_container :shipping_category, class: ['form-group'] do %>
|
52
61
|
<%= 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'
|
62
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
|
54
63
|
<%= f.error_message_on :shipping_category_id %>
|
55
64
|
<% end %>
|
56
65
|
</div>
|
@@ -7,8 +7,8 @@
|
|
7
7
|
</div>
|
8
8
|
<% end %>
|
9
9
|
|
10
|
-
<div class="card mb-3">
|
11
|
-
<table class="table
|
10
|
+
<div class="card mb-3 table-responsive">
|
11
|
+
<table class="table" id="listing_product_stock">
|
12
12
|
<thead>
|
13
13
|
<tr data-hook="admin_product_stock_management_index_headers">
|
14
14
|
<th colspan="2"><%= Spree.t(:variant) %></th>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
<% end if can? :update, item %>
|
64
64
|
</td>
|
65
65
|
<td class="actions actions-1 text-center">
|
66
|
-
<%= link_to_with_icon('delete', Spree.t(:remove), [:admin, item], method: :delete, remote: true, class: 'icon_link btn btn-danger btn-sm', data: { action: :remove, confirm: Spree.t(:are_you_sure) }, no_text: true) if can? :destroy, item %>
|
66
|
+
<%= link_to_with_icon('delete.svg', Spree.t(:remove), [:admin, item], method: :delete, remote: true, class: 'icon_link btn btn-danger btn-sm', data: { action: :remove, confirm: Spree.t(:are_you_sure) }, no_text: true) if can? :destroy, item %>
|
67
67
|
</td>
|
68
68
|
</tr>
|
69
69
|
<% end %>
|
@@ -3,10 +3,12 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_promotion_category), new_object_url, icon: 'add', class: 'btn-success' %>
|
6
|
+
<%= button_link_to Spree.t(:new_promotion_category), new_object_url, icon: 'add.svg', class: 'btn-success' %>
|
7
7
|
<% end if can?(:create, Spree::PromotionCategory) %>
|
8
8
|
|
9
9
|
<% if @promotion_categories.any? %>
|
10
|
+
|
11
|
+
<div class="table-responsive">
|
10
12
|
<table class="table">
|
11
13
|
<thead>
|
12
14
|
<th><%= Spree::PromotionCategory.human_attribute_name :name %></th>
|
@@ -26,6 +28,7 @@
|
|
26
28
|
<% end %>
|
27
29
|
</tbody>
|
28
30
|
</table>
|
31
|
+
</div>
|
29
32
|
<% else %>
|
30
33
|
<div class="alert alert-info no-objects-found">
|
31
34
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::PromotionCategory)) %>,
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<%= select_tag 'action_type', options, class: 'select2' %>
|
13
13
|
</div>
|
14
14
|
<div class="form-actions">
|
15
|
-
<%= button Spree.t(:add), '
|
15
|
+
<%= button Spree.t(:add), 'add.svg', 'submit', class: "btn-success" %>
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<% end %>
|
@@ -28,7 +28,7 @@
|
|
28
28
|
<% end %>
|
29
29
|
</div>
|
30
30
|
<div class="actions promotion-update">
|
31
|
-
<%= button Spree.t('actions.update'), 'save' %>
|
31
|
+
<%= button Spree.t('actions.update'), 'save.svg' %>
|
32
32
|
</div>
|
33
33
|
<% end %>
|
34
34
|
|
@@ -1,24 +1,26 @@
|
|
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-
|
4
|
+
<div class="col-12 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' %>
|
8
8
|
<%= f.error_message_on :name %>
|
9
9
|
<% end %>
|
10
10
|
|
11
|
-
|
12
|
-
<%= f.
|
13
|
-
|
14
|
-
|
11
|
+
<div class="form-group">
|
12
|
+
<%= f.field_container :code do %>
|
13
|
+
<%= f.label :code %>
|
14
|
+
<%= f.text_field :code, class: 'form-control' %>
|
15
|
+
<% end %>
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
<%= f.field_container :generate_code, class: ['checkbox'] do %>
|
18
|
+
<%= f.label :generate_code do %>
|
19
|
+
<%= f.check_box :generate_code %>
|
20
|
+
<%= Spree.t(:generate_code) %>
|
21
|
+
<% end %>
|
20
22
|
<% end %>
|
21
|
-
|
23
|
+
</div>
|
22
24
|
|
23
25
|
<%= f.field_container :path, class: ['form-group'] do %>
|
24
26
|
<%= f.label :path %>
|
@@ -45,23 +47,48 @@
|
|
45
47
|
<% end %>
|
46
48
|
</div>
|
47
49
|
|
48
|
-
<div id="expiry_fields" class="col-
|
49
|
-
|
50
|
-
<%= f.
|
51
|
-
|
50
|
+
<div id="expiry_fields" class="col-12 col-md-3">
|
51
|
+
<div class="form-group">
|
52
|
+
<%= f.field_container :usage_limit do %>
|
53
|
+
<%= f.label :usage_limit, Spree.t('limit_usage_to') %>
|
54
|
+
<%= f.number_field :usage_limit, min: 0, class: 'form-control hide-number-toggle' %>
|
55
|
+
<% end %>
|
52
56
|
<small class="form-text text-muted">
|
53
57
|
<%= Spree.t(:current_promotion_usage, count: @promotion.credits_count) %>
|
54
58
|
</small>
|
55
|
-
|
59
|
+
</div>
|
56
60
|
|
57
61
|
<div id="starts_at_field" class="form-group">
|
58
62
|
<%= f.label :starts_at %>
|
59
|
-
|
63
|
+
<div class="input-group datePickerFrom"
|
64
|
+
data-wrap="true"
|
65
|
+
data-enable-time="true"
|
66
|
+
data-date-format="<%= Spree.t('js_date_time', scope: 'date_picker') %>"
|
67
|
+
data-max-date="<%= @promotion.expires_at %>" >
|
68
|
+
<%= f.datetime_field :starts_at,
|
69
|
+
class: 'form-control shadow-none',
|
70
|
+
placeholder: Spree.t('starting_from'),
|
71
|
+
'data-input':'' %>
|
72
|
+
|
73
|
+
<%= render partial: 'spree/admin/shared/cal_close' %>
|
74
|
+
</div>
|
60
75
|
</div>
|
61
76
|
|
62
77
|
<div id="expires_at_field" class="form-group">
|
63
78
|
<%= f.label :expires_at %>
|
64
|
-
|
79
|
+
<div class="input-group datePickerTo"
|
80
|
+
data-wrap="true"
|
81
|
+
data-enable-time= 'true'
|
82
|
+
data-date-format= "<%= Spree.t('js_date_time', scope: 'date_picker') %>"
|
83
|
+
data-min-date="<%= @promotion.starts_at %>" >
|
84
|
+
<%= f.datetime_field :expires_at,
|
85
|
+
placeholder:Spree.t('ends_at'),
|
86
|
+
class: 'form-control shadow-none',
|
87
|
+
'data-input':'' %>
|
88
|
+
|
89
|
+
<%= render partial: 'spree/admin/shared/cal_close' %>
|
90
|
+
</div>
|
65
91
|
</div>
|
92
|
+
|
66
93
|
</div>
|
67
94
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="promotion_action promotion-block <%= promotion_action.type.to_s.demodulize.underscore %> card mb-3" id="<%= dom_id promotion_action %>">
|
2
2
|
<% type_name = promotion_action.class.name.demodulize.underscore %>
|
3
3
|
<div class="card-header d-flex justify-content-between">
|
4
|
-
<%= link_to_with_icon 'delete', '', spree.admin_promotion_promotion_action_path(@promotion, promotion_action), remote: true, method: :delete, class: 'delete order-2' %>
|
4
|
+
<%= link_to_with_icon 'delete.svg', '', spree.admin_promotion_promotion_action_path(@promotion, promotion_action), remote: true, method: :delete, class: 'delete order-2' %>
|
5
5
|
<h3 class="card-title h5 mb-0 promotion-title"><%= Spree.t("promotion_action_types.#{type_name}.description") %></h3>
|
6
6
|
</div>
|
7
7
|
<% param_prefix = "promotion[promotion_actions_attributes][#{promotion_action.id}]" %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="promotion_rule promotion-block card mb-3" id="<%= dom_id promotion_rule %>">
|
2
2
|
<% type_name = promotion_rule.class.name.demodulize.underscore %>
|
3
3
|
<div class="card-header d-flex justify-content-between">
|
4
|
-
<%= link_to_with_icon 'delete', '',
|
4
|
+
<%= link_to_with_icon 'delete.svg', '',
|
5
5
|
spree.admin_promotion_promotion_rule_path(@promotion, promotion_rule),
|
6
6
|
remote: true,
|
7
7
|
method: :delete,
|
@@ -6,13 +6,13 @@
|
|
6
6
|
<div id="rule_fields" class="card-body">
|
7
7
|
|
8
8
|
<%= form_tag spree.admin_promotion_promotion_rules_path(@promotion), remote: true, id: 'new_product_rule_form', class: 'mb-3' do %>
|
9
|
-
|
9
|
+
|
10
10
|
<div class="form-group">
|
11
11
|
<%= label_tag :promotion_rule_type, Spree.t(:add_rule_of_type) %>
|
12
12
|
<%= select_tag('promotion_rule[type]', options_for_promotion_rule_types(@promotion), class: 'select2') %>
|
13
13
|
</div>
|
14
14
|
<div class="form-actions">
|
15
|
-
<%= button Spree.t(:add), '
|
15
|
+
<%= button Spree.t(:add), 'add.svg', 'submit', class: "btn-success" %>
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<% end %>
|
@@ -40,7 +40,7 @@
|
|
40
40
|
</div>
|
41
41
|
|
42
42
|
<div class="promotion-update actions">
|
43
|
-
<%= button Spree.t('actions.update'), '
|
44
|
-
</div>
|
43
|
+
<%= button Spree.t('actions.update'), 'save.svg' %>
|
44
|
+
</div>
|
45
45
|
<% end %>
|
46
46
|
</div>
|
@@ -4,8 +4,8 @@
|
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<%= form_for @promotion, url: object_url, method: :put do |f| %>
|
7
|
-
|
8
|
-
|
7
|
+
<div class="card mb-4">
|
8
|
+
<div class="card-body">
|
9
9
|
<%= render partial: 'form', locals: { f: f } %>
|
10
10
|
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
11
11
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_promotion), new_object_url, class: "btn-success", icon: 'add' %>
|
6
|
+
<%= button_link_to Spree.t(:new_promotion), new_object_url, class: "btn-success", icon: 'add.svg' %>
|
7
7
|
<% end if can?(:create, Spree::Promotion) %>
|
8
8
|
|
9
9
|
<% content_for :table_filter do %>
|
@@ -36,15 +36,16 @@
|
|
36
36
|
</div>
|
37
37
|
|
38
38
|
<div data-hook="admin_promotions_index_search_buttons" class="form-actions">
|
39
|
-
<%= button Spree.t(:filter_results), 'search' %>
|
39
|
+
<%= button Spree.t(:filter_results), 'search.svg' %>
|
40
40
|
</div>
|
41
41
|
<% end %>
|
42
42
|
</div>
|
43
43
|
<% end %>
|
44
44
|
|
45
|
-
<%= paginate @promotions, theme: 'twitter-bootstrap-4' %>
|
45
|
+
<%= paginate @promotions, theme: 'admin-twitter-bootstrap-4' %>
|
46
46
|
|
47
47
|
<% if @promotions.any? %>
|
48
|
+
<div class="table-responsive">
|
48
49
|
<table class="table">
|
49
50
|
<thead>
|
50
51
|
<tr>
|
@@ -75,6 +76,7 @@
|
|
75
76
|
<% end %>
|
76
77
|
</tbody>
|
77
78
|
</table>
|
79
|
+
</div>
|
78
80
|
<% else %>
|
79
81
|
<div class="alert alert-info no-objects-found">
|
80
82
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Promotion)) %>,
|
@@ -2,10 +2,11 @@
|
|
2
2
|
<%= link_to Spree.t(:promotions), admin_promotions_url %> /
|
3
3
|
<%= Spree.t(:new_promotion) %>
|
4
4
|
<% end %>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
<div class="card">
|
6
|
+
<div class="card-body">
|
7
|
+
<%= form_for :promotion, url: collection_url do |f| %>
|
8
|
+
<%= render partial: 'form', locals: { f: f } %>
|
9
|
+
<%= render partial: 'spree/admin/shared/new_resource_links' %>
|
10
|
+
<% end %>
|
10
11
|
</div>
|
11
|
-
|
12
|
+
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="card-body">
|
2
2
|
<div class="form-group mb-0">
|
3
3
|
<%= label_tag Spree.t('country_rule.label') %>
|
4
|
-
<%= select_tag("#{param_prefix}[preferred_country_id]", options_for_select(Spree::Country.pluck(:name, :id), promotion_rule.preferred_country_id), { class: 'select_product form-control' }) %>
|
4
|
+
<%= select_tag("#{param_prefix}[preferred_country_id]", options_for_select(Spree::Country.pluck(:name, :id), promotion_rule.preferred_country_id), { class: 'select_product form-control custom-select' }) %>
|
5
5
|
</div>
|
6
6
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<div class="card-body">
|
2
2
|
<div class="row mb-0">
|
3
|
-
<div class="form-group col-
|
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: '
|
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: '
|
3
|
+
<div class="form-group col-6 mb-3">
|
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: 'custom-select select_item_total mb-3' } %>
|
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: 'custom-select select_item_total' } %>
|
6
6
|
</div>
|
7
|
-
<div class="form-group col-
|
8
|
-
<%= text_field_tag "#{param_prefix}[preferred_amount_min]", promotion_rule.preferred_amount_min, class: 'form-control
|
7
|
+
<div class="form-group col-6 mb-3">
|
8
|
+
<%= text_field_tag "#{param_prefix}[preferred_amount_min]", promotion_rule.preferred_amount_min, class: 'form-control mb-3' %>
|
9
9
|
<%= text_field_tag "#{param_prefix}[preferred_amount_max]", promotion_rule.preferred_amount_max, class: 'form-control' %>
|
10
10
|
</div>
|
11
11
|
</div>
|
@@ -1,9 +1,8 @@
|
|
1
1
|
<div class="card-body">
|
2
2
|
<div class="promo-rule-option-values">
|
3
3
|
<div class="js-promo-rule-option-values"></div>
|
4
|
-
|
5
4
|
<button class="btn btn-primary btn-success js-add-promo-rule-option-value">
|
6
|
-
|
5
|
+
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
7
6
|
<%= Spree.t(:add) %>
|
8
7
|
</button>
|
9
8
|
</div>
|
@@ -17,20 +16,14 @@
|
|
17
16
|
</script>
|
18
17
|
|
19
18
|
<script type="text/x-handlebars-template" id="promo-rule-option-value-template">
|
20
|
-
<div class="promo-rule-option-value panel
|
21
|
-
<div class="card-header">
|
19
|
+
<div class="promo-rule-option-value panel card mb-3">
|
20
|
+
<div class="card-header d-flex justify-content-between">
|
21
|
+
<label><%= Spree.t(:product) %> <%= Spree.t(:option_values) %></label>
|
22
22
|
<a class="js-remove-promo-rule-option-value delete pull-right">
|
23
|
-
|
23
|
+
<%= svg_icon name: "delete.svg", width: '16', height: '16' %>
|
24
24
|
</a>
|
25
|
-
<div class="col-12 col-md-6">
|
26
|
-
<label><%= Spree.t(:product) %></label>
|
27
|
-
</div>
|
28
|
-
<div class="col-12 col-md-5">
|
29
|
-
<label><%= Spree.t(:option_values) %></label>
|
30
|
-
</div>
|
31
|
-
<div class="clearfix"></div>
|
32
25
|
</div>
|
33
|
-
<div class="card-body row">
|
26
|
+
<div class="card-body row p-3">
|
34
27
|
<div class="col-12 col-md-6">
|
35
28
|
<input class="js-promo-rule-option-value-product-select fullwidth" type="hidden" value="{{ productSelect.value }}">
|
36
29
|
</div>
|
@@ -5,6 +5,6 @@
|
|
5
5
|
</div>
|
6
6
|
<div class="form-group mb-0">
|
7
7
|
<%= label_tag Spree.t('product_rule.label') %>
|
8
|
-
<%= 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 form-control'}) %>
|
8
|
+
<%= 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 form-control custom-select'}) %>
|
9
9
|
</div>
|
10
10
|
</div>
|
@@ -5,6 +5,6 @@
|
|
5
5
|
</div>
|
6
6
|
<div class="form-group mb-0">
|
7
7
|
<%= label_tag Spree.t('taxon_rule.label') %>
|
8
|
-
<%= 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 form-control'}) %>
|
8
|
+
<%= 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 form-control custom-select'}) %>
|
9
9
|
</div>
|
10
10
|
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_property), new_object_url, { class: "btn-success", icon: 'add', 'data-update' => 'new_property', id: 'new_property_link' } %>
|
6
|
+
<%= button_link_to Spree.t(:new_property), new_object_url, { class: "btn-success", icon: 'add.svg', 'data-update' => 'new_property', id: 'new_property_link' } %>
|
7
7
|
<% end if can?(:create, Spree::Property) %>
|
8
8
|
|
9
9
|
<% content_for :table_filter do %>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
</div>
|
30
30
|
|
31
31
|
<div class="form-actions" data-hook="admin_pproperties_index_search_buttons">
|
32
|
-
<%= button Spree.t(:search), 'search' %>
|
32
|
+
<%= button Spree.t(:search), 'search.svg' %>
|
33
33
|
</div>
|
34
34
|
|
35
35
|
<% end %>
|
@@ -37,6 +37,7 @@
|
|
37
37
|
<% end %>
|
38
38
|
|
39
39
|
<% if @properties.any? %>
|
40
|
+
<div class="table-responsive">
|
40
41
|
<table class="table" id='listing_properties' data-hook>
|
41
42
|
<thead>
|
42
43
|
<tr data-hook="listing_properties_header">
|
@@ -58,6 +59,7 @@
|
|
58
59
|
<% end %>
|
59
60
|
</tbody>
|
60
61
|
</table>
|
62
|
+
</div>
|
61
63
|
<% else %>
|
62
64
|
<div class="alert alert-info no-objects-found">
|
63
65
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Property)) %>,
|
@@ -65,4 +67,4 @@
|
|
65
67
|
</div>
|
66
68
|
<% end %>
|
67
69
|
|
68
|
-
<%= paginate @collection, theme: 'twitter-bootstrap-4' %>
|
70
|
+
<%= paginate @collection, theme: 'admin-twitter-bootstrap-4' %>
|
@@ -1,29 +1,31 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
</thead>
|
8
|
-
<tbody>
|
9
|
-
<% @prototypes.each do |prototype| %>
|
10
|
-
<tr id="row_<%= prototype.id %>" data-hook="available_row">
|
11
|
-
<td><%= prototype.name %></td>
|
12
|
-
<td class="actions actions-1">
|
13
|
-
<%= link_to_with_icon 'save',
|
14
|
-
Spree.t(:select),
|
15
|
-
select_admin_prototype_url(prototype),
|
16
|
-
class: 'btn btn-success btn-sm ajax select_properties_from_prototype',
|
17
|
-
no_text: true %>
|
18
|
-
</td>
|
1
|
+
<div class="table-responsive">
|
2
|
+
<table class="table table-condensed table-bordered">
|
3
|
+
<thead>
|
4
|
+
<tr data-hook="available_header">
|
5
|
+
<th><%= Spree.t(:name) %></th>
|
6
|
+
<th class="actions"></th>
|
19
7
|
</tr>
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
8
|
+
</thead>
|
9
|
+
<tbody>
|
10
|
+
<% @prototypes.each do |prototype| %>
|
11
|
+
<tr id="row_<%= prototype.id %>" data-hook="available_row">
|
12
|
+
<td><%= prototype.name %></td>
|
13
|
+
<td class="actions actions-1">
|
14
|
+
<%= link_to_with_icon 'save.svg',
|
15
|
+
Spree.t(:select),
|
16
|
+
select_admin_prototype_url(prototype),
|
17
|
+
class: 'btn btn-success btn-sm ajax select_properties_from_prototype',
|
18
|
+
no_text: true %>
|
19
|
+
</td>
|
20
|
+
</tr>
|
21
|
+
<% end %>
|
22
|
+
<% if @prototypes.empty? %>
|
23
|
+
<tr data-hook="available_none">
|
24
|
+
<td colspan="2">
|
25
|
+
<% Spree.t(:none) %>.
|
26
|
+
</td>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
31
|
+
</div>
|
@@ -3,29 +3,31 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_prototype), new_object_url, { class: "btn-success", icon: 'add', 'data-update' => 'new_prototype', id: 'new_prototype_link'} %>
|
6
|
+
<%= button_link_to Spree.t(:new_prototype), new_object_url, { class: "btn-success", icon: 'add.svg', 'data-update' => 'new_prototype', id: 'new_prototype_link'} %>
|
7
7
|
<% end if can?(:create, Spree::Prototype) %>
|
8
8
|
|
9
9
|
<% if @prototypes.any? %>
|
10
|
-
<
|
11
|
-
<
|
12
|
-
<
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
</thead>
|
17
|
-
<tbody>
|
18
|
-
<% @prototypes.each do |prototype| %>
|
19
|
-
<tr id="<%= spree_dom_id prototype %>" data-hook="prototypes_row">
|
20
|
-
<td><%= prototype.name %></td>
|
21
|
-
<td class="actions actions-2 text-right">
|
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
|
-
</td>
|
10
|
+
<div class="table-responsive">
|
11
|
+
<table class="table" id='listing_prototypes' data-hook>
|
12
|
+
<thead>
|
13
|
+
<tr data-hook="prototypes_header">
|
14
|
+
<th><%= Spree.t(:name) %></th>
|
15
|
+
<th class="actions"></th>
|
25
16
|
</tr>
|
26
|
-
|
27
|
-
|
28
|
-
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<% @prototypes.each do |prototype| %>
|
20
|
+
<tr id="<%= spree_dom_id prototype %>" data-hook="prototypes_row">
|
21
|
+
<td><%= prototype.name %></td>
|
22
|
+
<td class="actions actions-2 text-right">
|
23
|
+
<%= link_to_edit(prototype, no_text: true, class: 'admin_edit_prototype') if can?(:edit, prototype) %>
|
24
|
+
<%= link_to_delete(prototype, no_text: true) if can?(:delete, prototype) %>
|
25
|
+
</td>
|
26
|
+
</tr>
|
27
|
+
<% end %>
|
28
|
+
</tbody>
|
29
|
+
</table>
|
30
|
+
</div>
|
29
31
|
<% else %>
|
30
32
|
<div class="alert alert-info no-objects-found">
|
31
33
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Prototype)) %>,
|
@@ -8,14 +8,27 @@
|
|
8
8
|
<%= check_box_tag "option_types[]", ot.id, (params[:option_types] || []).include?(ot.id.to_s), id: "option_type_#{ot.id}", class: "option-type" %>
|
9
9
|
<%= label_tag "option_type_#{ot.id}", ot.presentation %>
|
10
10
|
</b>
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
11
|
+
<% if Spree::OptionType.color&.name == ot[:name] %>
|
12
|
+
<ul class="option-type-values option-type-values__color">
|
13
|
+
<% ot.option_values.each do |ov| %>
|
14
|
+
<li>
|
15
|
+
<%= label_tag "option_value_#{ov.id}" do %>
|
16
|
+
<%= check_box_tag "product[option_values_hash[#{ot.id}]][]", ov.id, params[:product] && (params[:product][:option_values_hash] || {}).values.flatten.include?(ov.id.to_s), id: "option_value_#{ov.id}", class: "option-value" %>
|
17
|
+
<div class="option-value__color" style="--presentation: <%= ov.presentation %>"></div>
|
18
|
+
<% end %>
|
19
|
+
</li>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
22
|
+
<% else %>
|
23
|
+
<ul class="option-type-values">
|
24
|
+
<% ot.option_values.each do |ov| %>
|
25
|
+
<li>
|
26
|
+
<%= check_box_tag "product[option_values_hash[#{ot.id}]][]", ov.id, params[:product] && (params[:product][:option_values_hash] || {}).values.flatten.include?(ov.id.to_s), id: "option_value_#{ov.id}", class: "option-value" %>
|
27
|
+
<%= label_tag "option_value_#{ov.id}", ov.presentation %>
|
28
|
+
</li>
|
29
|
+
<% end %>
|
30
|
+
</ul>
|
31
|
+
<% end %>
|
19
32
|
</li>
|
20
33
|
<% end %>
|
21
34
|
</ul>
|
@@ -21,9 +21,9 @@
|
|
21
21
|
</div>
|
22
22
|
|
23
23
|
<div class="form-actions" data-hook="buttons">
|
24
|
-
<%= button Spree.t('actions.save'), 'save' %>
|
24
|
+
<%= button Spree.t('actions.save'), 'save.svg' %>
|
25
25
|
<span class="or"><%= Spree.t(:or) %></span>
|
26
|
-
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_payments_url(@refund.payment.order), icon: "delete" %>
|
26
|
+
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_payments_url(@refund.payment.order), icon: "delete.svg" %>
|
27
27
|
</div>
|
28
28
|
</fieldset>
|
29
29
|
<% end %>
|
@@ -31,9 +31,9 @@
|
|
31
31
|
</div>
|
32
32
|
|
33
33
|
<div class="form-actions" data-hook="buttons">
|
34
|
-
<%= button Spree.t(:refund), 'save' %>
|
34
|
+
<%= button Spree.t(:refund), 'save.svg' %>
|
35
35
|
<span class="or"><%= Spree.t(:or) %></span>
|
36
|
-
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_payments_url(@refund.payment.order), icon: "
|
36
|
+
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_payments_url(@refund.payment.order), icon: "cancel.svg" %>
|
37
37
|
</div>
|
38
38
|
</fieldset>
|
39
39
|
<% end %>
|
@@ -16,15 +16,15 @@
|
|
16
16
|
</div>
|
17
17
|
<% end %>
|
18
18
|
<div class="col-12 col-md-5">
|
19
|
-
<%= f.field_container :active, class: ['form-inline'] do %>
|
20
|
-
<%= f.check_box :active, class: 'form-control mr-1' %>
|
19
|
+
<%= f.field_container :active, class: ['form-inline flex-row p-1'] do %>
|
20
|
+
<%= f.check_box :active, class: 'form-control w-auto h-auto mr-1' %>
|
21
21
|
<%= f.label :active, Spree.t(:active) %>
|
22
22
|
<%= f.error_message_on :active %>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
25
|
<div class="col-12 col-md-5">
|
26
|
-
<%= f.field_container :mutable, class: ['form-inline'] do %>
|
27
|
-
<%= f.check_box :mutable, class: 'form-control mr-1' %>
|
26
|
+
<%= f.field_container :mutable, class: ['form-inline flex-row p-1'] do %>
|
27
|
+
<%= f.check_box :mutable, class: 'form-control w-auto h-auto mr-1' %>
|
28
28
|
<%= f.label :mutable, Spree.t(:mutable) %>
|
29
29
|
<%= f.error_message_on :mutable %>
|
30
30
|
<% end %>
|