spree_backend 4.2.4 → 4.3.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/app/assets/config/spree_backend_manifest.js +129 -0
- data/app/assets/images/backend-arrows-fullscreen.svg +3 -0
- data/app/assets/images/backend-box.svg +3 -0
- data/app/assets/images/backend-circle-fill.svg +3 -0
- data/app/assets/images/backend-circle.svg +3 -0
- data/app/assets/images/backend-default-layout.svg +6 -0
- data/app/assets/images/backend-eye-slash-fill.svg +4 -0
- data/app/assets/images/backend-file-richtext.svg +4 -0
- data/app/assets/images/backend-fullscreen-exit.svg +3 -0
- data/app/assets/images/backend-fullscreen.svg +3 -0
- data/app/assets/images/backend-mobile.svg +5 -0
- data/app/assets/images/backend-pages.svg +10 -0
- data/app/assets/images/backend-phone.svg +4 -0
- data/app/assets/images/backend-reversed-layout.svg +6 -0
- data/app/assets/images/backend-spree-icon.svg +1 -0
- data/app/assets/images/backend-spree-logo.svg +6 -0
- data/app/assets/images/backend-store.svg +2 -13
- data/app/assets/images/backend-translate.svg +4 -0
- data/app/assets/images/backend-users.svg +2 -5
- data/app/assets/images/backend-window-sidebar.svg +4 -0
- data/app/assets/images/noimage/backend-missing-image.svg +4 -0
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/javascripts/spree/backend/address_states.es6 +44 -0
- data/app/assets/javascripts/spree/backend/admin.js +45 -307
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +22 -13
- data/app/assets/javascripts/spree/backend/cms/_index.es6 +4 -0
- data/app/assets/javascripts/spree/backend/cms/links.es6 +25 -0
- data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +34 -0
- data/app/assets/javascripts/spree/backend/cms/page.es6 +133 -0
- data/app/assets/javascripts/spree/backend/cms/section.es6 +43 -0
- data/app/assets/javascripts/spree/backend/global/_index.js +11 -0
- data/app/assets/javascripts/spree/backend/global/alerts.es6 +66 -0
- data/app/assets/javascripts/spree/backend/global/api_functions.es6 +5 -0
- data/app/assets/javascripts/spree/backend/global/bootstrap.es6 +15 -0
- data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +22 -0
- data/app/assets/javascripts/spree/backend/global/info_alert.es6 +38 -0
- data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +18 -0
- data/app/assets/javascripts/spree/backend/global/ransack.es6 +108 -0
- data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +56 -0
- data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +156 -0
- data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +61 -0
- data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +137 -0
- data/app/assets/javascripts/spree/backend/global/sortable.es6 +35 -0
- data/app/assets/javascripts/spree/backend/global/tinymce.es6 +11 -0
- data/app/assets/javascripts/spree/backend/menus/_index.es6 +2 -0
- data/app/assets/javascripts/spree/backend/menus/menu.es6 +57 -0
- data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +26 -0
- data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +13 -17
- data/app/assets/javascripts/spree/backend/option_value_picker.js +10 -22
- data/app/assets/javascripts/spree/backend/payments/edit.js +1 -1
- data/app/assets/javascripts/spree/backend/payments/new.js +18 -5
- data/app/assets/javascripts/spree/backend/spree-select2.js +19 -1
- data/app/assets/javascripts/spree/backend/stock_location.js +1 -2
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +7 -1
- data/app/assets/javascripts/spree/backend/taxons.js +74 -73
- data/app/assets/javascripts/spree/backend/user_picker.js +7 -10
- data/app/assets/javascripts/spree/backend.js +28 -1
- data/app/assets/javascripts/spree.js +78 -0
- data/app/assets/stylesheets/spree/backend/components/_filters.scss +1 -3
- data/app/assets/stylesheets/spree/backend/components/_main.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_navbar.scss +35 -0
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +13 -0
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_tables.scss +4 -5
- data/app/assets/stylesheets/spree/backend/global/_mixins.scss +59 -0
- data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +95 -0
- data/app/assets/stylesheets/spree/backend/plugins/{select2_bootstrap4.scss → _select2_bootstrap4.scss} +0 -0
- data/app/assets/stylesheets/spree/backend/plugins/_sweetalert2_custom.scss +100 -0
- data/app/assets/stylesheets/spree/backend/plugins/_tinymce_custom.scss +4 -0
- data/app/assets/stylesheets/spree/backend/shared/_base.scss +75 -25
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +8 -0
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
- data/app/assets/stylesheets/spree/backend/views/_cms_pages.scss +148 -0
- data/app/assets/stylesheets/spree/backend/views/_menus.scss +61 -0
- data/app/controllers/concerns/spree/admin/order_concern.rb +24 -0
- data/app/controllers/concerns/spree/admin/product_concern.rb +11 -0
- data/app/controllers/spree/admin/base_controller.rb +63 -3
- data/app/controllers/spree/admin/cms_pages_controller.rb +29 -0
- data/app/controllers/spree/admin/cms_sections_controller.rb +15 -0
- data/app/controllers/spree/admin/customer_returns_controller.rb +4 -5
- data/app/controllers/spree/admin/errors_controller.rb +11 -0
- data/app/controllers/spree/admin/general_settings_controller.rb +1 -1
- data/app/controllers/spree/admin/images_controller.rb +8 -22
- data/app/controllers/spree/admin/log_entries_controller.rb +4 -3
- data/app/controllers/spree/admin/menu_items_controller.rb +33 -0
- data/app/controllers/spree/admin/menus_controller.rb +32 -0
- data/app/controllers/spree/admin/option_types_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +6 -11
- data/app/controllers/spree/admin/orders_controller.rb +23 -31
- data/app/controllers/spree/admin/payment_methods_controller.rb +17 -4
- data/app/controllers/spree/admin/payments_controller.rb +5 -10
- data/app/controllers/spree/admin/prices_controller.rb +2 -2
- data/app/controllers/spree/admin/products_controller.rb +21 -10
- data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
- data/app/controllers/spree/admin/promotion_rules_controller.rb +1 -1
- data/app/controllers/spree/admin/promotions_controller.rb +3 -3
- data/app/controllers/spree/admin/prototypes_controller.rb +1 -1
- data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
- data/app/controllers/spree/admin/reports_controller.rb +5 -1
- data/app/controllers/spree/admin/resource_controller.rb +32 -5
- data/app/controllers/spree/admin/return_index_controller.rb +1 -1
- data/app/controllers/spree/admin/state_changes_controller.rb +2 -7
- data/app/controllers/spree/admin/stock_items_controller.rb +2 -2
- data/app/controllers/spree/admin/stock_locations_controller.rb +2 -2
- data/app/controllers/spree/admin/stock_movements_controller.rb +1 -1
- data/app/controllers/spree/admin/stock_transfers_controller.rb +1 -1
- data/app/controllers/spree/admin/store_credits_controller.rb +13 -8
- data/app/controllers/spree/admin/stores_controller.rb +14 -17
- data/app/controllers/spree/admin/taxons_controller.rb +9 -5
- data/app/controllers/spree/admin/users_controller.rb +9 -7
- data/app/controllers/spree/admin/variants_controller.rb +16 -15
- data/app/helpers/spree/admin/base_helper.rb +52 -14
- data/app/helpers/spree/admin/cms_helper.rb +15 -0
- data/app/helpers/spree/admin/menu_helper.rb +30 -0
- data/app/helpers/spree/admin/stores_helper.rb +21 -0
- data/app/models/spree/backend_configuration.rb +2 -0
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +7 -5
- data/app/views/spree/admin/cms_pages/_form.html.erb +135 -0
- data/app/views/spree/admin/cms_pages/_live_preview_area.html.erb +61 -0
- data/app/views/spree/admin/cms_pages/_section_template.html.erb +16 -0
- data/app/views/spree/admin/cms_pages/edit.html.erb +21 -0
- data/app/views/spree/admin/cms_pages/index.html.erb +84 -0
- data/app/views/spree/admin/cms_pages/new.html.erb +8 -0
- data/app/views/spree/admin/cms_sections/_form.html.erb +69 -0
- data/app/views/spree/admin/cms_sections/edit.html.erb +19 -0
- data/app/views/spree/admin/cms_sections/new.html.erb +11 -0
- data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +50 -0
- data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +62 -0
- data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +177 -0
- data/app/views/spree/admin/cms_sections/types/_product_carousel.html.erb +5 -0
- data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +4 -0
- data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +121 -0
- data/app/views/spree/admin/countries/index.html.erb +5 -3
- data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +6 -4
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +9 -7
- data/app/views/spree/admin/customer_returns/index.html.erb +4 -2
- data/app/views/spree/admin/errors/forbidden.html.erb +0 -0
- data/app/views/spree/admin/images/index.html.erb +8 -4
- data/app/views/spree/admin/menu_items/_form.html.erb +115 -0
- data/app/views/spree/admin/menu_items/edit.html.erb +11 -0
- data/app/views/spree/admin/menu_items/new.html.erb +11 -0
- data/app/views/spree/admin/menus/_form.html.erb +19 -0
- data/app/views/spree/admin/menus/edit.html.erb +57 -0
- data/app/views/spree/admin/menus/index.html.erb +90 -0
- data/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erb +30 -0
- data/app/views/spree/admin/menus/new.html.erb +22 -0
- data/app/views/spree/admin/option_types/_form.html.erb +3 -0
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +5 -1
- data/app/views/spree/admin/option_types/index.html.erb +5 -3
- data/app/views/spree/admin/orders/_channel_form.html.erb +2 -2
- data/app/views/spree/admin/orders/_line_items.html.erb +10 -8
- data/app/views/spree/admin/orders/_shipment.html.erb +26 -18
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +11 -9
- data/app/views/spree/admin/orders/customer_details/_autocomplete.js.erb +2 -2
- data/app/views/spree/admin/orders/index.html.erb +100 -101
- data/app/views/spree/admin/payment_methods/_form.html.erb +6 -4
- data/app/views/spree/admin/payment_methods/edit.html.erb +1 -1
- data/app/views/spree/admin/payment_methods/index.html.erb +22 -3
- data/app/views/spree/admin/payment_methods/new.html.erb +1 -1
- data/app/views/spree/admin/payments/_list.html.erb +9 -7
- data/app/views/spree/admin/prices/_variant_prices.html.erb +7 -14
- data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +9 -7
- data/app/views/spree/admin/products/_autocomplete.js.erb +10 -6
- data/app/views/spree/admin/products/_form.html.erb +35 -5
- data/app/views/spree/admin/products/index.html.erb +15 -14
- data/app/views/spree/admin/products/new.html.erb +6 -1
- data/app/views/spree/admin/products/stock.html.erb +71 -68
- data/app/views/spree/admin/promotion_categories/index.html.erb +5 -3
- data/app/views/spree/admin/promotions/_form.html.erb +7 -0
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +1 -0
- data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +2 -1
- data/app/views/spree/admin/promotions/index.html.erb +33 -34
- data/app/views/spree/admin/properties/_form.html.erb +6 -0
- data/app/views/spree/admin/properties/index.html.erb +19 -3
- data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +8 -6
- data/app/views/spree/admin/prototypes/index.html.erb +5 -3
- data/app/views/spree/admin/reimbursement_types/index.html.erb +5 -3
- data/app/views/spree/admin/reports/index.html.erb +1 -1
- data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +2 -2
- data/app/views/spree/admin/return_authorizations/index.html.erb +7 -5
- data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -2
- data/app/views/spree/admin/return_index/return_authorizations.html.erb +5 -3
- data/app/views/spree/admin/roles/index.html.erb +5 -3
- data/app/views/spree/admin/shared/_account_nav.html.erb +5 -5
- data/app/views/spree/admin/shared/_address_form.html.erb +5 -4
- data/app/views/spree/admin/shared/_content_header.html.erb +20 -6
- data/app/views/spree/admin/shared/_head.html.erb +2 -1
- data/app/views/spree/admin/shared/_header.html.erb +7 -10
- data/app/views/spree/admin/shared/_link_fields.html.erb +22 -0
- data/app/views/spree/admin/shared/_main_menu.html.erb +19 -4
- data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -10
- data/app/views/spree/admin/shared/_paths.html.erb +8 -0
- data/app/views/spree/admin/shared/_refunds.html.erb +4 -2
- data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
- data/app/views/spree/admin/shared/_store_switcher.html.erb +23 -0
- data/app/views/spree/admin/shared/_table_filter.html.erb +6 -6
- data/app/views/spree/admin/shared/_translations.html.erb +2 -0
- data/app/views/spree/admin/shared/cms/_spree_product.html.erb +14 -0
- data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +14 -0
- data/app/views/spree/admin/shared/linkables/_home_page.html.erb +3 -0
- data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +28 -0
- data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +20 -0
- data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +22 -0
- data/app/views/spree/admin/shared/linkables/_url.html.erb +16 -0
- data/app/views/spree/admin/shared/named_types/_index.html.erb +7 -5
- data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +1 -3
- data/app/views/spree/admin/shared/sub_menu/_content.html.erb +4 -0
- data/app/views/spree/admin/shared/sub_menu/_stock.html.erb +4 -0
- data/app/views/spree/admin/shipping_categories/index.html.erb +5 -3
- data/app/views/spree/admin/shipping_methods/index.html.erb +5 -3
- data/app/views/spree/admin/states/_state_list.html.erb +5 -3
- data/app/views/spree/admin/stock_locations/index.html.erb +5 -3
- data/app/views/spree/admin/stock_transfers/index.html.erb +5 -4
- data/app/views/spree/admin/stock_transfers/new.html.erb +9 -7
- data/app/views/spree/admin/store_credit_categories/index.html.erb +5 -3
- data/app/views/spree/admin/store_credits/index.html.erb +7 -5
- data/app/views/spree/admin/stores/_form.html.erb +12 -2
- data/app/views/spree/admin/stores/index.html.erb +12 -10
- data/app/views/spree/admin/tax_categories/index.html.erb +5 -3
- data/app/views/spree/admin/tax_rates/index.html.erb +5 -3
- data/app/views/spree/admin/taxonomies/_list.html.erb +5 -3
- data/app/views/spree/admin/taxons/_form.html.erb +1 -1
- data/app/views/spree/admin/users/_addresses_form.html.erb +2 -4
- data/app/views/spree/admin/users/_lifetime_stats.html.erb +16 -4
- data/app/views/spree/admin/users/index.html.erb +5 -3
- data/app/views/spree/admin/users/items.html.erb +1 -1
- data/app/views/spree/admin/variants/_autocomplete.js.erb +6 -2
- data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +18 -12
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +12 -8
- data/app/views/spree/admin/variants/_split.js.erb +9 -7
- data/app/views/spree/admin/variants/index.html.erb +8 -5
- data/app/views/spree/admin/zones/index.html.erb +5 -3
- data/app/views/spree/layouts/admin.html.erb +16 -16
- data/config/initializers/assets.rb +5 -1
- data/config/routes.rb +14 -2
- data/lib/generators/spree/backend/install/install_generator.rb +22 -0
- data/lib/generators/spree/backend/install/templates/vendor/assets/javascripts/spree/backend/all.js +8 -0
- data/lib/generators/spree/backend/install/templates/vendor/assets/stylesheets/spree/backend/all.css +9 -0
- data/lib/spree/backend/engine.rb +4 -11
- data/lib/spree/backend.rb +7 -4
- data/lib/spree_backend.rb +0 -2
- data/spec/fixtures/files/favicon.ico +0 -0
- data/spec/fixtures/files/icon_512x512.png +0 -0
- data/spree_backend.gemspec +16 -11
- data/vendor/assets/javascripts/cleave.js +8 -0
- data/vendor/assets/javascripts/jsonapi-serializer.min.js +8 -0
- data/vendor/assets/javascripts/jsuri.js +458 -0
- data/vendor/assets/javascripts/sortable.js +2 -3709
- data/vendor/assets/javascripts/sweetalert2.js +2 -0
- metadata +208 -42
- data/app/assets/javascripts/spree/backend/address_states.js +0 -44
- data/app/assets/javascripts/spree/frontend/backend.js +0 -1
- data/app/assets/stylesheets/spree/frontend/backend.css +0 -1
- data/app/views/spree/admin/orders/_store_form.html.erb +0 -18
@@ -20,9 +20,11 @@
|
|
20
20
|
<tr>
|
21
21
|
<td><%= promotion_category.name %></td>
|
22
22
|
<td><%= promotion_category.code %></td>
|
23
|
-
<td class="actions
|
24
|
-
|
25
|
-
|
23
|
+
<td class="actions">
|
24
|
+
<span class="d-flex justify-content-end">
|
25
|
+
<%= link_to_edit promotion_category, no_text: true if can?(:edit, promotion_category) %>
|
26
|
+
<%= link_to_delete promotion_category, no_text: true if can?(:delete, promotion_category) %>
|
27
|
+
</span>
|
26
28
|
</td>
|
27
29
|
</tr>
|
28
30
|
<% end %>
|
@@ -45,6 +45,13 @@
|
|
45
45
|
<%= f.label :promotion_category %>
|
46
46
|
<%= f.collection_select(:promotion_category_id, @promotion_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2 w-100' }) %>
|
47
47
|
<% end %>
|
48
|
+
|
49
|
+
<% if @stores.count > 1 %>
|
50
|
+
<%= f.field_container :stores, class: ['form-group'] do %>
|
51
|
+
<%= f.label :promotion_stores, Spree.t(:stores) %>
|
52
|
+
<%= collection_select(:promotion, :store_ids, @stores, :id, :unique_name, {}, { multiple: true, class: 'select2' }) %>
|
53
|
+
<% end %>
|
54
|
+
<% end %>
|
48
55
|
</div>
|
49
56
|
|
50
57
|
<div id="expiry_fields" class="col-12 col-lg-4">
|
@@ -14,6 +14,7 @@
|
|
14
14
|
<%= label_tag field_name, Spree.t(key.to_s) %>
|
15
15
|
<%= preference_field_tag(field_name,
|
16
16
|
promotion_action.calculator.get_preference(key),
|
17
|
+
key: key,
|
17
18
|
type: promotion_action.calculator.preference_type(key)) %>
|
18
19
|
<% end %>
|
19
20
|
<%= hidden_field_tag "#{param_prefix}[calculator_attributes][id]", promotion_action.calculator.id %>
|
@@ -42,43 +42,42 @@
|
|
42
42
|
</div>
|
43
43
|
<% end %>
|
44
44
|
|
45
|
-
<%= paginate @promotions, theme: 'admin-twitter-bootstrap-4' %>
|
46
|
-
|
47
45
|
<% if @promotions.any? %>
|
48
|
-
<div class="table-responsive">
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
</tr>
|
60
|
-
</thead>
|
61
|
-
<tbody>
|
62
|
-
<% @promotions.each do |promotion| %>
|
63
|
-
<tr id="<%= spree_dom_id promotion %>">
|
64
|
-
<td><%= link_to promotion.name, edit_admin_promotion_path(promotion) %></td>
|
65
|
-
<td><%= promotion.code %></td>
|
66
|
-
<td><%= promotion.description %></td>
|
67
|
-
<td><%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %></td>
|
68
|
-
<td><%= Spree.t(:current_promotion_usage, count: promotion.credits_count) %></td>
|
69
|
-
<td><%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %></td>
|
70
|
-
<td class="actions" data-hook="admin_promotions_index_row_actions">
|
71
|
-
<span class="d-flex justify-content-end">
|
72
|
-
<%= link_to_edit promotion, no_text: true if can?(:edit, promotion) %>
|
73
|
-
<%= link_to_clone_promotion promotion, no_text: true if can?(:clone, promotion) %>
|
74
|
-
<%= link_to_delete promotion, no_text: true if can?(:delete, promotion) %>
|
75
|
-
</span>
|
76
|
-
</td>
|
46
|
+
<div class="table-responsive">
|
47
|
+
<table class="table">
|
48
|
+
<thead>
|
49
|
+
<tr>
|
50
|
+
<th><%= Spree.t(:name) %></th>
|
51
|
+
<th><%= Spree.t(:code) %></th>
|
52
|
+
<th><%= Spree.t(:description) %></th>
|
53
|
+
<th><%= Spree.t(:usage_limit) %></th>
|
54
|
+
<th><%= Spree.t(:promotion_uses) %></th>
|
55
|
+
<th><%= Spree.t(:expiration) %></th>
|
56
|
+
<th data-hook="admin_promotions_index_header_actions" class="actions"></th>
|
77
57
|
</tr>
|
78
|
-
|
79
|
-
|
80
|
-
|
58
|
+
</thead>
|
59
|
+
<tbody>
|
60
|
+
<% @promotions.each do |promotion| %>
|
61
|
+
<tr id="<%= spree_dom_id promotion %>">
|
62
|
+
<td><%= link_to promotion.name, spree.edit_admin_promotion_path(promotion) %></td>
|
63
|
+
<td><%= promotion.code %></td>
|
64
|
+
<td><%= promotion.description %></td>
|
65
|
+
<td><%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %></td>
|
66
|
+
<td><%= Spree.t(:current_promotion_usage, count: promotion.credits_count) %></td>
|
67
|
+
<td><%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %></td>
|
68
|
+
<td class="actions" data-hook="admin_promotions_index_row_actions">
|
69
|
+
<span class="d-flex justify-content-end">
|
70
|
+
<%= link_to_edit promotion, no_text: true if can?(:edit, promotion) %>
|
71
|
+
<%= link_to_clone_promotion promotion, no_text: true if can?(:clone, promotion) %>
|
72
|
+
<%= link_to_delete promotion, no_text: true if can?(:delete, promotion) %>
|
73
|
+
</span>
|
74
|
+
</td>
|
75
|
+
</tr>
|
76
|
+
<% end %>
|
77
|
+
</tbody>
|
78
|
+
</table>
|
81
79
|
</div>
|
80
|
+
<%= render 'spree/admin/shared/index_table_options', collection: @promotions, simple: true %>
|
82
81
|
<% else %>
|
83
82
|
<div class="alert alert-info no-objects-found">
|
84
83
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Promotion)) %>,
|
@@ -13,4 +13,10 @@
|
|
13
13
|
<%= f.error_message_on :presentation %>
|
14
14
|
<% end %>
|
15
15
|
</div>
|
16
|
+
<div class="col-12 col-md-6">
|
17
|
+
<%= f.field_container :filterable, class: ['form-group'] do %>
|
18
|
+
<%= f.label :filterable, Spree.t(:filterable) %>
|
19
|
+
<%= f.check_box :filterable %>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
16
22
|
</div>
|
@@ -28,6 +28,16 @@
|
|
28
28
|
</div>
|
29
29
|
</div>
|
30
30
|
|
31
|
+
<div class="row">
|
32
|
+
<div class="col-12 col-lg-6">
|
33
|
+
<div class="form-group">
|
34
|
+
<%= label_tag :q_filterable_eq, Spree.t(:filterable_status) %>
|
35
|
+
<%= f.select :filterable_eq, options_for_select([[Spree.t(:filterable), true], [Spree.t(:non_filterable), false]]), { include_blank: true }, class: 'select2-clear js-filterable' %>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
31
41
|
<div class="form-actions" data-hook="admin_pproperties_index_search_buttons">
|
32
42
|
<%= button Spree.t(:search), 'search.svg' %>
|
33
43
|
</div>
|
@@ -43,6 +53,8 @@
|
|
43
53
|
<tr data-hook="listing_properties_header">
|
44
54
|
<th><%= Spree.t(:name) %></th>
|
45
55
|
<th><%= Spree.t(:presentation) %></th>
|
56
|
+
<th><%= Spree.t(:filterable) %></th>
|
57
|
+
<th><%= Spree.t(:filter_param) %></th>
|
46
58
|
<th class="actions"></th>
|
47
59
|
</tr>
|
48
60
|
</thead>
|
@@ -51,9 +63,13 @@
|
|
51
63
|
<tr id="<%= spree_dom_id property %>" data-hook="listing_properties_row">
|
52
64
|
<td><%= property.name %></td>
|
53
65
|
<td><%= property.presentation %></td>
|
54
|
-
<td
|
55
|
-
|
56
|
-
|
66
|
+
<td><%= active_badge(property.filterable) %></td>
|
67
|
+
<td><%= property.filter_param %></td>
|
68
|
+
<td class="actions">
|
69
|
+
<span class="d-flex justify-content-end">
|
70
|
+
<%= link_to_edit(property, no_text: true) if can?(:edit, property) %>
|
71
|
+
<%= link_to_delete(property, no_text: true) if can?(:delete, property) %>
|
72
|
+
</span>
|
57
73
|
</td>
|
58
74
|
</tr>
|
59
75
|
<% end %>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<div id='taxons' data-hook>
|
23
23
|
<%= f.field_container :taxon_ids, class: ['form-group'] do %>
|
24
24
|
<%= f.label :taxon_ids, Spree.t(:taxons) %><br>
|
25
|
-
<%= f.select :taxon_ids,
|
25
|
+
<%= f.select :taxon_ids, current_store.taxons.pluck(:name, :id), {}, { multiple: true, class: "select2" } %>
|
26
26
|
<% end %>
|
27
27
|
</div>
|
28
28
|
</div>
|
@@ -10,12 +10,14 @@
|
|
10
10
|
<% @prototypes.each do |prototype| %>
|
11
11
|
<tr id="row_<%= prototype.id %>" data-hook="available_row">
|
12
12
|
<td><%= prototype.name %></td>
|
13
|
-
<td class="actions
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
<td class="actions">
|
14
|
+
<span class="d-flex justify-content-end">
|
15
|
+
<%= link_to_with_icon 'save.svg',
|
16
|
+
Spree.t(:select),
|
17
|
+
select_admin_prototype_url(prototype),
|
18
|
+
class: 'btn btn-success btn-sm ajax select_properties_from_prototype',
|
19
|
+
no_text: true %>
|
20
|
+
</span>
|
19
21
|
</td>
|
20
22
|
</tr>
|
21
23
|
<% end %>
|
@@ -19,9 +19,11 @@
|
|
19
19
|
<% @prototypes.each do |prototype| %>
|
20
20
|
<tr id="<%= spree_dom_id prototype %>" data-hook="prototypes_row">
|
21
21
|
<td><%= prototype.name %></td>
|
22
|
-
<td class="actions
|
23
|
-
|
24
|
-
|
22
|
+
<td class="actions">
|
23
|
+
<span class="d-flex justify-content-end">
|
24
|
+
<%= link_to_edit(prototype, no_text: true, class: 'admin_edit_prototype') if can?(:edit, prototype) %>
|
25
|
+
<%= link_to_delete(prototype, no_text: true) if can?(:delete, prototype) %>
|
26
|
+
</span>
|
25
27
|
</td>
|
26
28
|
</tr>
|
27
29
|
<% end %>
|
@@ -25,9 +25,11 @@
|
|
25
25
|
<td>
|
26
26
|
<%= reimbursement_type.type.split('::', 3).last %>
|
27
27
|
</td>
|
28
|
-
<td class="actions
|
29
|
-
|
30
|
-
|
28
|
+
<td class="actions">
|
29
|
+
<span class="d-flex justify-content-end">
|
30
|
+
<%= link_to_edit reimbursement_type, no_text: true, class: 'edit' if can?(:edit, reimbursement_type) %>
|
31
|
+
<%= link_to_delete reimbursement_type, no_text: true if can?(:delete, reimbursement_type) %>
|
32
|
+
</span>
|
31
33
|
</td>
|
32
34
|
</tr>
|
33
35
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% content_for :page_title do %>
|
2
2
|
<%= link_to Spree.t(:reports), spree.admin_reports_url %> /
|
3
|
-
<%= Spree.t(:sales_totals) %>
|
3
|
+
<%= Spree.t(:sales_totals) %> <%= Spree.t('admin.reports.for', store_name: current_store.unique_name) %>
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<div class="card bg-light mb-3">
|
@@ -14,8 +14,8 @@
|
|
14
14
|
<th><%= Spree.t(:status) %></th>
|
15
15
|
<th><%= Spree.t(:charged) %></th>
|
16
16
|
<th><%= Spree.t(:purchased_quantity) %></th>
|
17
|
-
<th><%= Spree.t(:return_quantity) %></th>
|
18
|
-
<th><%= Spree.t(:pre_tax_refund_amount) %></th>
|
17
|
+
<th style="min-width:130px;"><%= Spree.t(:return_quantity) %></th>
|
18
|
+
<th style="min-width:150px;"><%= Spree.t(:pre_tax_refund_amount) %></th>
|
19
19
|
<th><%= Spree.t(:reimbursement_type) %></th>
|
20
20
|
<th><%= Spree.t(:exchange_for) %></th>
|
21
21
|
</tr>
|
@@ -33,11 +33,13 @@
|
|
33
33
|
</td>
|
34
34
|
<td><%= return_authorization.display_pre_tax_total.to_html %></td>
|
35
35
|
<td><%= pretty_time(return_authorization.created_at) %></td>
|
36
|
-
<td class="actions
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
<td class="actions">
|
37
|
+
<span class="d-flex justify-content-end">
|
38
|
+
<%= link_to_edit(return_authorization, no_text: true, class: 'edit') if can?(:edit, return_authorization) %>
|
39
|
+
<% if can?(:delete, return_authorization) && !return_authorization.customer_returned_items? %>
|
40
|
+
<%= link_to_delete return_authorization, no_text: true %>
|
41
|
+
<% end %>
|
42
|
+
</span>
|
41
43
|
</td>
|
42
44
|
</tr>
|
43
45
|
<% end %>
|
@@ -47,8 +47,10 @@
|
|
47
47
|
<% end %>
|
48
48
|
</td>
|
49
49
|
<td><%= customer_return.display_pre_tax_total.to_html %></td>
|
50
|
-
<td class="actions
|
51
|
-
|
50
|
+
<td class="actions">
|
51
|
+
<span class="d-flex justify-content-end">
|
52
|
+
<%= link_to_edit_url spree.edit_admin_order_customer_return_path(customer_return.order, customer_return), no_text: true if can?(:edit, customer_return) %>
|
53
|
+
</span>
|
52
54
|
</td>
|
53
55
|
</tr>
|
54
56
|
<% end %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<div class="row">
|
27
27
|
<div class="col-12 col-lg-6">
|
28
28
|
<div class="form-group">
|
29
|
-
<%= f.label :number_cont, Spree.t(:
|
29
|
+
<%= f.label :number_cont, Spree.t(:return_number) %>
|
30
30
|
<%= f.text_field :number_cont, class: "form-control js-quick-search-target js-filterable" %>
|
31
31
|
</div>
|
32
32
|
</div>
|
@@ -65,8 +65,10 @@
|
|
65
65
|
<td>
|
66
66
|
<span class="badge badge-<%= return_authorization.state %> text-uppercase"><%= Spree.t("return_authorization_states.#{return_authorization.state}") %></span>
|
67
67
|
</td>
|
68
|
-
<td class="actions
|
69
|
-
|
68
|
+
<td class="actions">
|
69
|
+
<span class="d-flex justify-content-end">
|
70
|
+
<%= link_to_edit return_authorization, url: spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization), no_text: true if can?(:edit, return_authorization) %>
|
71
|
+
</span>
|
70
72
|
</td>
|
71
73
|
</tr>
|
72
74
|
<% end %>
|
@@ -19,9 +19,11 @@
|
|
19
19
|
<% @roles.each do |role| %>
|
20
20
|
<tr id="<%= spree_dom_id role %>" data-hook="admin_roles_index_rows">
|
21
21
|
<td><%= role.name %></td>
|
22
|
-
<td class="actions
|
23
|
-
|
24
|
-
|
22
|
+
<td class="actions">
|
23
|
+
<span class="d-flex justify-content-end">
|
24
|
+
<%= link_to_edit(role, no_text: true) if can? :edit, role %>
|
25
|
+
<%= link_to_delete(role, no_text: true) if can? :destroy, role %>
|
26
|
+
</span>
|
25
27
|
</td>
|
26
28
|
</tr>
|
27
29
|
<% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% if try_spree_current_user %>
|
2
2
|
<div class="btn-group">
|
3
3
|
|
4
|
-
<button id="accountNav" type="button" class="btn text-light" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
5
|
-
<%= svg_icon name: "user.svg", width: '24', height: '24' %>
|
4
|
+
<button id="accountNav" type="button" class="btn text-light px-3" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
5
|
+
<%= svg_icon name: "user.svg", width: '24', height: '24', classes: 'mb-0' %>
|
6
6
|
</button>
|
7
7
|
|
8
8
|
<div class="dropdown-menu dropdown-menu-right overflow-hidden mt-2 p-0 mr-2">
|
@@ -37,10 +37,10 @@
|
|
37
37
|
|
38
38
|
<div class="dropdown-divider m-0"></div>
|
39
39
|
|
40
|
-
<%= link_to 'http://
|
40
|
+
<%= link_to 'http://spreecommerce.org/contact', target: :blank, class: 'd-block text-dark py-3 px-4 dropdown-item' do %>
|
41
41
|
<%= svg_icon name: "info.svg", width: '18', height: '18' %>
|
42
42
|
|
43
|
-
<%= Spree.t(:
|
43
|
+
<%= Spree.t(:support) %>
|
44
44
|
<% end %>
|
45
45
|
|
46
46
|
<%= link_to 'http://slack.spreecommerce.org', target: :blank, class: 'd-block text-dark py-3 px-4 dropdown-item' do %>
|
@@ -49,7 +49,7 @@
|
|
49
49
|
<%= Spree.t(:join_slack) %>
|
50
50
|
<% end %>
|
51
51
|
|
52
|
-
<%= link_to 'https://
|
52
|
+
<%= link_to 'https://dev-docs.spreecommerce.org/extensions/extensions', target: :blank, class: 'd-block text-dark py-3 px-4 dropdown-item' do %>
|
53
53
|
<%= svg_icon name: "extensions.svg", width: '18', height: '18' %>
|
54
54
|
|
55
55
|
<%= Spree.t(:extensions_directory) %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= field_container (s_or_b + '_' + field), nil, class: ["form-group", "#{type}-row"] do %>
|
6
6
|
<%= f.label :country_id, Spree.t(:country) %>
|
7
7
|
<div id="<%= s_or_b %>country">
|
8
|
-
<%= f.collection_select :country_id,
|
8
|
+
<%= f.collection_select :country_id, all_countries, :id, :name, {}, { class: 'select2 w-100' } %>
|
9
9
|
</div>
|
10
10
|
<% end %>
|
11
11
|
<% elsif field == "state" %>
|
@@ -37,8 +37,9 @@
|
|
37
37
|
|
38
38
|
<% content_for :head do %>
|
39
39
|
<script>
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
document.addEventListener('DOMContentLoaded', function() {
|
41
|
+
updateAddressState('<%= s_or_b %>');
|
42
|
+
$('#<%= s_or_b %>country select').on('change', function() { updateAddressState('<%= s_or_b %>'); });
|
43
|
+
})
|
43
44
|
</script>
|
44
45
|
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<div id="contentHeader" class="row mb-
|
1
|
+
<div id="contentHeader" class="row mb-0 pb-0">
|
2
2
|
<% if content_for?(:page_title) || content_for?(:page_actions) %>
|
3
3
|
<div class="content-header col <%= "with-page-tabs" if content_for?(:page_tabs) %> page-header">
|
4
|
-
<div class="row align-items-center <%= if content_for?(:page_tabs) then "pb-
|
4
|
+
<div id="contentHeaderRow" class="row align-items-center <%= if content_for?(:page_tabs) then "border-bottom pb-2" else "border-bottom pb-2 mb-3" end %>">
|
5
5
|
|
6
6
|
<% if content_for?(:page_title) %>
|
7
7
|
<h1 class="contextual-title px-0 mb-0 col">
|
@@ -33,10 +33,24 @@
|
|
33
33
|
</div>
|
34
34
|
|
35
35
|
<% if content_for?(:page_tabs) %>
|
36
|
-
<div class="row">
|
37
|
-
<
|
38
|
-
|
39
|
-
|
36
|
+
<div class="row my-2 pb-1 pt-1 align-items-center" data-nav-x-wrapper>
|
37
|
+
<div data-nav-x-container>
|
38
|
+
<ul id="spreePageTabs" class="nav nav-pills flex-nowrap" data-nav-x-content>
|
39
|
+
<%= yield :page_tabs %>
|
40
|
+
</ul>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<button class="nav-x_Advancer nav-x_Advancer_Left" type="button">
|
44
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">
|
45
|
+
<path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z" />
|
46
|
+
</svg>
|
47
|
+
</button>
|
48
|
+
|
49
|
+
<button class="nav-x_Advancer nav-x_Advancer_Right" type="button">
|
50
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
|
51
|
+
<path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" />
|
52
|
+
</svg>
|
53
|
+
</button>
|
40
54
|
</div>
|
41
55
|
<% end %>
|
42
56
|
|
@@ -15,13 +15,14 @@
|
|
15
15
|
|
16
16
|
<%= stylesheet_link_tag 'spree/backend/all', media: :all %>
|
17
17
|
|
18
|
-
<%= render 'spree/shared/paths' %>
|
18
|
+
<%= render 'spree/admin/shared/paths' %>
|
19
19
|
<%= javascript_include_tag 'spree/backend/all' %>
|
20
20
|
<%= render "spree/admin/shared/translations" %>
|
21
21
|
|
22
22
|
<script>
|
23
23
|
<%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" %>
|
24
24
|
<%== "Spree.api_key = '#{try_spree_current_user.spree_api_key}';" if try_spree_current_user %>
|
25
|
+
<%== "var OAUTH_TOKEN = '#{admin_oauth_token}';" if defined?(admin_oauth_token) %>
|
25
26
|
<%== "var ADDRESS_FIELDS = #{Spree::Address::ADDRESS_FIELDS}" %>
|
26
27
|
<% if Rails.env.test? %>
|
27
28
|
jQuery.fx.off = false
|