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
@@ -13,9 +13,11 @@
|
|
13
13
|
<tr id="<%= spree_dom_id state %>" data-hook="states_row">
|
14
14
|
<td><%= state.name %></td>
|
15
15
|
<td class="text-center"><%= state.abbr %></td>
|
16
|
-
<td class="actions
|
17
|
-
|
18
|
-
|
16
|
+
<td class="actions">
|
17
|
+
<span class="d-flex justify-content-end">
|
18
|
+
<%= link_to_edit(state, no_text: true) if can? :edit, state %>
|
19
|
+
<%= link_to_delete(state, no_text: true) if can? :delete, state %>
|
20
|
+
</span>
|
19
21
|
</td>
|
20
22
|
</tr>
|
21
23
|
<% end %>
|
@@ -26,9 +26,11 @@
|
|
26
26
|
<td><%= display_name(stock_location) %></td>
|
27
27
|
<td><%= link_to Spree.t(:stock_movements), spree.admin_stock_location_stock_movements_path(stock_location.id) %> </td>
|
28
28
|
<td><%= active_badge(stock_location.active, label: Spree.t(state(stock_location))) %></td>
|
29
|
-
<td class="actions
|
30
|
-
|
31
|
-
|
29
|
+
<td class="actions">
|
30
|
+
<span class="d-flex justify-content-end">
|
31
|
+
<%= link_to_edit(stock_location, no_text: true) if can? :create, stock_location %>
|
32
|
+
<%= link_to_delete(stock_location, no_text: true) if can? :create, stock_location %>
|
33
|
+
</span>
|
32
34
|
</td>
|
33
35
|
</tr>
|
34
36
|
<% end %>
|
@@ -9,12 +9,11 @@
|
|
9
9
|
<% content_for :table_filter do %>
|
10
10
|
<div data-hook="admin_orders_index_search">
|
11
11
|
<%= search_form_for @q, url: admin_stock_transfers_path do |f| %>
|
12
|
-
|
13
12
|
<div class="row mb-0">
|
14
13
|
<div class="col-12 col-lg-4">
|
15
14
|
<div class="form-group">
|
16
15
|
<%= f.label :reference_cont, Spree.t(:reference_contains) %>
|
17
|
-
<%= f.text_field :reference_cont, class: 'form-control' %>
|
16
|
+
<%= f.text_field :reference_cont, class: 'form-control js-filterable js-quick-search-target' %>
|
18
17
|
</div>
|
19
18
|
</div>
|
20
19
|
|
@@ -73,8 +72,10 @@
|
|
73
72
|
<% end %>
|
74
73
|
</td>
|
75
74
|
<td><%= stock_transfer.created_at.strftime('%F %T %Z') %></td>
|
76
|
-
<td class="actions
|
77
|
-
|
75
|
+
<td class="actions">
|
76
|
+
<span class="d-flex justify-content-end">
|
77
|
+
<%= link_to_with_icon 'view.svg', Spree.t(:show), admin_stock_transfer_path(stock_transfer), class: 'btn btn-outline-secondary btn-sm', no_text: true, data: {action: 'view'} %>
|
78
|
+
</span>
|
78
79
|
</td>
|
79
80
|
</tr>
|
80
81
|
<% end %>
|
@@ -8,12 +8,14 @@
|
|
8
8
|
<tr>
|
9
9
|
<td>{{name}}</td>
|
10
10
|
<td class='text-center'>{{quantity}}</td>
|
11
|
-
<td class='actions
|
12
|
-
<
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
<td class='actions'>
|
12
|
+
<span class='d-flex justify-content-center'>
|
13
|
+
<button class='icon_link btn btn-danger btn-sm transfer_remove_variant' data-variant-id='{{id}}'>
|
14
|
+
<span class='icon icon-delete' data-variant-id='{{id}}'></span>
|
15
|
+
</button>
|
16
|
+
<input type='hidden' id='variant[]' name='variant[]' value='{{id}}'>
|
17
|
+
<input type='hidden' id='quantity[]' name='quantity[]' value='{{quantity}}'>
|
18
|
+
</span>
|
17
19
|
</td>
|
18
20
|
</tr>
|
19
21
|
{{/each}}
|
@@ -76,7 +78,7 @@
|
|
76
78
|
<%= label_tag :transfer_variant_quantity, Spree.t(:quantity) %>
|
77
79
|
<div class="input-group">
|
78
80
|
<%= number_field_tag :transfer_variant_quantity, 1, class: 'form-control', min: 1 %>
|
79
|
-
<span class="input-group-btn">
|
81
|
+
<span class="input-group-btn ml-2">
|
80
82
|
<%= button Spree.t(:add), 'add.svg', 'submit', class: "transfer_add_variant" %>
|
81
83
|
</span>
|
82
84
|
</div>
|
@@ -19,9 +19,11 @@
|
|
19
19
|
<% @store_credit_categories.each do |store_credit_category| %>
|
20
20
|
<tr id="<%= spree_dom_id store_credit_category %>" data-hook="admin_store_credit_categories_index_rows">
|
21
21
|
<td><%= store_credit_category.name %></td>
|
22
|
-
<td class="actions
|
23
|
-
|
24
|
-
|
22
|
+
<td class="actions">
|
23
|
+
<span class="d-flex justify-content-end">
|
24
|
+
<%= link_to_edit(store_credit_category, no_text: true) if can? :edit, store_credit_category %>
|
25
|
+
<%= link_to_delete(store_credit_category, no_text: true) if can? :destroy, store_credit_category %>
|
26
|
+
</span>
|
25
27
|
</td>
|
26
28
|
</tr>
|
27
29
|
<% end %>
|
@@ -32,11 +32,13 @@
|
|
32
32
|
<td><%= store_credit.category_name %></td>
|
33
33
|
<td><%= store_credit.created_by_email %></td>
|
34
34
|
<td><%= l store_credit.created_at.to_date %></td>
|
35
|
-
<td class="actions
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
<td class="actions" data-hook="admin_store_credits_index_row_actions">
|
36
|
+
<span class="d-flex justify-content-end">
|
37
|
+
<% if store_credit.amount_used.zero? %>
|
38
|
+
<%= link_to_edit_url spree.edit_admin_user_store_credit_path(@user, store_credit), no_text: true if can?(:edit, store_credit) %>
|
39
|
+
<%= link_to_delete store_credit, no_text: true, url: spree.admin_user_store_credit_path(@user, store_credit) if can?(:destroy, store_credit) %>
|
40
|
+
<% end %>
|
41
|
+
</span>
|
40
42
|
</td>
|
41
43
|
</tr>
|
42
44
|
<% end %>
|
@@ -25,10 +25,20 @@
|
|
25
25
|
<% end %>
|
26
26
|
<%= f.field_container :mailer_logo, class: ['form-group'] do %>
|
27
27
|
<%= f.label :mailer_logo, Spree.t(:mailer_logo) %><br>
|
28
|
-
<%= f.file_field :mailer_logo, accept: '
|
28
|
+
<%= f.file_field :mailer_logo, accept: Spree::Store::MAILER_LOGO_CONTENT_TYPES.join(',') %>
|
29
29
|
<%= f.error_message_on :mailer_logo %>
|
30
30
|
<% end %>
|
31
31
|
<% end %>
|
32
|
+
<%= f.field_container :favicon_image, class: ['form-group'] do %>
|
33
|
+
<% if @store.favicon_image.attached? && @store.favicon_image.variable? %>
|
34
|
+
<%= image_tag main_app.url_for(@store.favicon_image.variant(resize: '104x104')) %>
|
35
|
+
<% end %>
|
36
|
+
<%= f.field_container :favicon_image, class: ['form-group'] do %>
|
37
|
+
<%= f.label :favicon_image, "#{Spree.t(:favicon)} (#{Spree.t(:favicon_upload_info)})" %><br>
|
38
|
+
<%= f.file_field :favicon_image, accept: Spree::Store::FAVICON_CONTENT_TYPES.join(',') %>
|
39
|
+
<%= f.error_message_on :favicon_image %>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
32
42
|
<%= f.field_container :name, class: ['form-group'] do %>
|
33
43
|
<%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
|
34
44
|
<%= f.text_field :name, class: 'form-control', required: true %>
|
@@ -166,7 +176,7 @@
|
|
166
176
|
<% end %>
|
167
177
|
<%= f.field_container :default_country_id, class: ['form-group'] do %>
|
168
178
|
<%= f.label :default_country_id, Spree.t('i18n.default_country') %>
|
169
|
-
<%= f.select :default_country_id, options_from_collection_for_select(@countries, :id, :name, @store.default_country_id
|
179
|
+
<%= f.select :default_country_id, options_from_collection_for_select(@countries, :id, :name, @store.default_country_id), {}, { class: 'select2' } %>
|
170
180
|
<%= f.error_message_on :default_country_id %>
|
171
181
|
<small class="form-text text-muted">
|
172
182
|
<%= Spree.t('store_form.default_country_help') %>
|
@@ -25,17 +25,19 @@
|
|
25
25
|
<td><%= store.supported_currencies_list.map(&:iso_code).join(', ') %></td>
|
26
26
|
<td><%= store.supported_locales_list.map {|l| locale_presentation(l).first }.join(', ') %></td>
|
27
27
|
<td><%= active_badge(store.default) %></td>
|
28
|
-
<td class="actions
|
29
|
-
|
28
|
+
<td class="actions" data-hook="admin_stores_index_row_actions">
|
29
|
+
<span class="d-flex justify-content-end">
|
30
|
+
<%= link_to_edit_url spree.edit_admin_store_path(store), no_text: true if can?(:edit, store) %>
|
30
31
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
<% if can?(:edit, store) %>
|
33
|
+
<% btn_url = store.default? ? '#' : spree.set_default_admin_store_path(store) %>
|
34
|
+
<% btn_class = store.default? ? 'outline-secondary disabled' : 'warning' %>
|
35
|
+
<% btn_label = store.default? ? nil : Spree.t(:store_set_default_button) %>
|
36
|
+
<%= link_to_with_icon('save.svg', btn_label, btn_url, no_text: true, method: (store.default? ? nil : :put), class: "btn btn-#{btn_class} btn-sm with-tip", aria: {disabled: store.default?}) %>
|
37
|
+
<% end %>
|
37
38
|
|
38
|
-
|
39
|
+
<%= link_to_delete store, no_text: true, url: spree.admin_store_path(store) if can?(:destroy, store) %>
|
40
|
+
</span>
|
39
41
|
</td>
|
40
42
|
</tr>
|
41
43
|
<% end %>
|
@@ -44,6 +46,6 @@
|
|
44
46
|
</div>
|
45
47
|
<% else %>
|
46
48
|
<div class="alert alert-info no-objects-found">
|
47
|
-
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::
|
49
|
+
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Store)) %>
|
48
50
|
</div>
|
49
51
|
<% end %>
|
@@ -28,9 +28,11 @@
|
|
28
28
|
<td><%= tax_category.tax_code %></td>
|
29
29
|
<td><%= tax_category.description %></td>
|
30
30
|
<td><%= active_badge(tax_category.is_default?) %></td>
|
31
|
-
<td class="actions
|
32
|
-
|
33
|
-
|
31
|
+
<td class="actions">
|
32
|
+
<span class="d-flex justify-content-end">
|
33
|
+
<%= link_to_edit(tax_category, no_text: true) if can? :edit, tax_category %>
|
34
|
+
<%= link_to_delete(tax_category, no_text: true) if can? :delete, tax_category %>
|
35
|
+
</span>
|
34
36
|
</tr>
|
35
37
|
<% end %>
|
36
38
|
</tbody>
|
@@ -31,9 +31,11 @@
|
|
31
31
|
<td><%= active_badge(tax_rate.included_in_price?) %></td>
|
32
32
|
<td><%= active_badge(tax_rate.show_rate_in_label?) %></td>
|
33
33
|
<td><%= tax_rate.calculator.to_s %></td>
|
34
|
-
<td class="actions
|
35
|
-
|
36
|
-
|
34
|
+
<td class="actions">
|
35
|
+
<span class="d-flex justify-content-end">
|
36
|
+
<%= link_to_edit(tax_rate, no_text: true) if can? :edit, tax_rate %>
|
37
|
+
<%= link_to_delete(tax_rate, no_text: true) if can? :delete, tax_rate %>
|
38
|
+
</span>
|
37
39
|
</td>
|
38
40
|
</tr>
|
39
41
|
<% end %>
|
@@ -14,9 +14,11 @@
|
|
14
14
|
<%= svg_icon name: "sort.svg", width: '18', height: '18' %>
|
15
15
|
</td>
|
16
16
|
<td><%= taxonomy.name %></td>
|
17
|
-
<td class="actions
|
18
|
-
|
19
|
-
|
17
|
+
<td class="actions">
|
18
|
+
<span class="d-flex justify-content-end">
|
19
|
+
<%= link_to_edit taxonomy.id, no_text: true if can?(:edit, taxonomy) %>
|
20
|
+
<%= link_to_delete taxonomy, no_text: true if can?(:delete, taxonomy) %>
|
21
|
+
</span>
|
20
22
|
</td>
|
21
23
|
</tr>
|
22
24
|
<% end %>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
|
40
40
|
<%= f.field_container :description, class: ['form-group'] do %>
|
41
41
|
<%= f.label :description, Spree.t(:description) %>
|
42
|
-
<%= f.text_area :description, class:
|
42
|
+
<%= f.text_area :description, class: "form-control #{'spree-rte' if taxon_wysiwyg_editor_enabled? }", rows: 20 %>
|
43
43
|
<% end %>
|
44
44
|
|
45
45
|
<%= f.field_container :meta_title, class: ['form-group'] do %>
|
@@ -8,8 +8,7 @@
|
|
8
8
|
</div>
|
9
9
|
|
10
10
|
<div class="card-body">
|
11
|
-
<%= f.fields_for :bill_address,
|
12
|
-
<% ba_form.object ||= Spree::Address.new(country: Spree::Country.new) %>
|
11
|
+
<%= f.fields_for :bill_address, @user.bill_address || @user.addresses.new(country: current_store.default_country) do |ba_form| %>
|
13
12
|
<%= render partial: 'spree/admin/shared/address_form', locals: { f: ba_form, type: "billing" } %>
|
14
13
|
<% end %>
|
15
14
|
</div>
|
@@ -30,8 +29,7 @@
|
|
30
29
|
<%= check_box_tag 'user[use_billing]', '1', checked, class: 'checkbox' %>
|
31
30
|
<%= label_tag :use_billing, Spree.t(:use_billing_address), for: 'user_use_billing', id: 'use_billing', class: 'form-check-label' %>
|
32
31
|
</p>
|
33
|
-
<%= f.fields_for :ship_address,
|
34
|
-
<% sa_form.object ||= Spree::Address.new(country: Spree::Country.new) %>
|
32
|
+
<%= f.fields_for :ship_address, @user.ship_address || @user.addresses.new(country: current_store.default_country) do |sa_form| %>
|
35
33
|
<%= render partial: 'spree/admin/shared/address_form', locals: { f: sa_form, type: "shipping" } %>
|
36
34
|
<% end %>
|
37
35
|
</div>
|
@@ -8,19 +8,31 @@
|
|
8
8
|
<table class="table" id="user-lifetime-stats" data-hook>
|
9
9
|
<tr>
|
10
10
|
<td width="30%"><%= Spree.t(:total_sales) %>:</td>
|
11
|
-
<td
|
11
|
+
<td>
|
12
|
+
<% @user.report_values_for(:lifetime_value, current_store).each do |value| %>
|
13
|
+
<div><%= value %></div>
|
14
|
+
<% end %>
|
15
|
+
</td>
|
12
16
|
</tr>
|
13
17
|
<tr>
|
14
18
|
<td><%= Spree.t(:num_orders) %>:</td>
|
15
|
-
<td><%= @user.order_count %></td>
|
19
|
+
<td><%= @user.order_count(current_store) %></td>
|
16
20
|
</tr>
|
17
21
|
<tr>
|
18
22
|
<td><%= Spree.t(:average_order_value) %>:</td>
|
19
|
-
<td
|
23
|
+
<td>
|
24
|
+
<% @user.report_values_for(:average_order_value, current_store).each do |value| %>
|
25
|
+
<div><%= value %></div>
|
26
|
+
<% end %>
|
27
|
+
</td>
|
20
28
|
</tr>
|
21
29
|
<tr>
|
22
30
|
<td><%= Spree.t('admin.user.store_credits') %>:</td>
|
23
|
-
<td id="store_credit"
|
31
|
+
<td id="store_credit">
|
32
|
+
<% @user.available_store_credits(current_store).each do |value| %>
|
33
|
+
<div><%= value %></div>
|
34
|
+
<% end %>
|
35
|
+
</td>
|
24
36
|
</tr>
|
25
37
|
<tr>
|
26
38
|
<td><%= Spree.t(:member_since) %>:</td>
|
@@ -59,9 +59,11 @@
|
|
59
59
|
<% @users.each do |user| %>
|
60
60
|
<tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows">
|
61
61
|
<td class='user_email'><%= link_to user.email, edit_admin_user_url(user) %></td>
|
62
|
-
<td data-hook="admin_users_index_row_actions" class="actions
|
63
|
-
|
64
|
-
|
62
|
+
<td data-hook="admin_users_index_row_actions" class="actions">
|
63
|
+
<span class="d-flex justify-content-end">
|
64
|
+
<%= link_to_edit user, no_text: true if can?(:edit, user) %>
|
65
|
+
<%= link_to_delete user, no_text: true if can?(:delete, user) %>
|
66
|
+
</span>
|
65
67
|
</td>
|
66
68
|
</tr>
|
67
69
|
<% end %>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<tr class="stock-item" data-item-quantity="<%= item.quantity %>">
|
28
28
|
<td class="order-completed-at"><%= order_time(order.completed_at) if order.completed_at %></td>
|
29
29
|
<td class="item-image">
|
30
|
-
<%=
|
30
|
+
<%= small_image(item.variant) %>
|
31
31
|
</td>
|
32
32
|
<td class="item-name">
|
33
33
|
<%= item.name %>
|
@@ -2,9 +2,13 @@
|
|
2
2
|
<div class='variant-autocomplete-item media align-items-center'>
|
3
3
|
<figure class='variant-image media-left mb-0 mr-3'>
|
4
4
|
{{#if variant.image }}
|
5
|
-
<
|
5
|
+
<div class="admin-product-image-container small-img">
|
6
|
+
<img src='{{variant.image}}' class="thumbnail mb-0" />
|
7
|
+
</div>
|
6
8
|
{{ else }}
|
7
|
-
<
|
9
|
+
<div class="admin-product-image-container small-img">
|
10
|
+
<%= inline_svg_tag "noimage/backend-missing-image.svg", class: "noimage", size: "60%*60%" %>
|
11
|
+
</div>
|
8
12
|
{{/if}}
|
9
13
|
</figure>
|
10
14
|
|
@@ -21,10 +21,12 @@
|
|
21
21
|
<td class="text-center">
|
22
22
|
<input class="quantity form-control" id="variant_quantity" data-variant-id="{{variant.id}}" type="number" min="1" value="1">
|
23
23
|
</td>
|
24
|
-
<td class="actions
|
25
|
-
<
|
26
|
-
|
27
|
-
|
24
|
+
<td class="actions">
|
25
|
+
<span class="d-flex justify-content-center">
|
26
|
+
<button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
27
|
+
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
28
|
+
</button>
|
29
|
+
</span>
|
28
30
|
</td>
|
29
31
|
{{else}}
|
30
32
|
{{#if variant.is_backorderable}}
|
@@ -35,10 +37,12 @@
|
|
35
37
|
<td class="text-center">
|
36
38
|
<input class="quantity form-control" id="variant_quantity" data-variant-id="{{variant.id}}" type="number" min="1" value="1">
|
37
39
|
</td>
|
38
|
-
<td class="actions
|
39
|
-
<
|
40
|
-
|
41
|
-
|
40
|
+
<td class="actions">
|
41
|
+
<span class="d-flex justify-content-center">
|
42
|
+
<button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
43
|
+
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
44
|
+
</button>
|
45
|
+
</span>
|
42
46
|
</td>
|
43
47
|
{{else}}
|
44
48
|
<td class="text-center"><%= Spree.t(:out_of_stock) %></td>
|
@@ -51,10 +55,12 @@
|
|
51
55
|
<td class="text-center">
|
52
56
|
<input class="quantity form-control" id="variant_quantity" data-variant-id="{{variant.id}}" type="number" min="1" value="1">
|
53
57
|
</td>
|
54
|
-
<td class="actions
|
55
|
-
<
|
56
|
-
|
57
|
-
|
58
|
+
<td class="actions">
|
59
|
+
<span class="d-flex justify-content-center">
|
60
|
+
<button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
61
|
+
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
62
|
+
</button>
|
63
|
+
</span>
|
58
64
|
</td>
|
59
65
|
{{/if}}
|
60
66
|
</tr>
|
@@ -17,10 +17,12 @@
|
|
17
17
|
<td>
|
18
18
|
<input class="quantity form-control input-sm" id="stock_item_quantity" data-stock-location-id="{{this.stock_location_id}}" type="number" min="1" value="1">
|
19
19
|
</td>
|
20
|
-
<td class="actions
|
21
|
-
<
|
22
|
-
|
23
|
-
|
20
|
+
<td class="actions">
|
21
|
+
<span class="d-flex justify-content-center">
|
22
|
+
<button class="btn btn-sm btn-success add_variant with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
23
|
+
<%= svg_icon name: "add", width: '16', height: '16' %>
|
24
|
+
</button>
|
25
|
+
</span>
|
24
26
|
</td>
|
25
27
|
{{else}}
|
26
28
|
{{#if this.available}}
|
@@ -31,10 +33,12 @@
|
|
31
33
|
<td>
|
32
34
|
<input class="quantity form-control input-sm" id="stock_item_quantity" data-stock-location-id="{{this.stock_location_id}}" type="number" min="1" value="1">
|
33
35
|
</td>
|
34
|
-
<td class="actions
|
35
|
-
<
|
36
|
-
|
37
|
-
|
36
|
+
<td class="actions">
|
37
|
+
<span class="d-flex justify-content-center">
|
38
|
+
<button class="btn btn-sm btn-success add_variant with-tip" data-stock-location-id="{{this.stock_location_id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
39
|
+
<%= svg_icon name: "add", width: '16', height: '16' %>
|
40
|
+
</button>
|
41
|
+
</span>
|
38
42
|
</td>
|
39
43
|
{{else}}
|
40
44
|
<td><%= Spree.t(:out_of_stock) %></td>
|
@@ -21,13 +21,15 @@
|
|
21
21
|
<td>
|
22
22
|
<input class="quantity form-control" id="item_quantity" type="number" min="1" value="1" max="{{max_quantity}}">
|
23
23
|
</td>
|
24
|
-
<td class='actions
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
<td class='actions'>
|
25
|
+
<span class='d-flex justify-content-center'>
|
26
|
+
<a href='#' class='cancel-split with-tip btn btn-sm btn-outline-secondary' title='Cancel'>
|
27
|
+
<%= svg_icon name: "cancel", classes: 'icon-cancel', width: '16', height: '16' %>
|
28
|
+
</a>
|
29
|
+
<a href='#' class='icon-save-split save-split with-tip btn btn-sm btn-success' title='Save'>
|
30
|
+
<%= svg_icon name: "split", classes: 'icon-save', width: '16', height: '16' %>
|
31
|
+
</a>
|
32
|
+
</span>
|
31
33
|
</td>
|
32
34
|
</tr>
|
33
35
|
</script>
|