spree_backend 4.1.11 → 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.js +5 -2
- 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/stylesheets/spree/backend.css +1 -1
- 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/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 +2 -2
- 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 +137 -24
@@ -1,19 +1,31 @@
|
|
1
1
|
<tr class="product_property fields" id="spree_<%= dom_id(f.object) %>" data-hook="product_property">
|
2
|
+
<% if f.object.persisted? && can?(:edit, f.object) %>
|
2
3
|
<td class="move-handle">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
<%= svg_icon name: "sort.svg", width: '18', height: '18' %>
|
5
|
+
<%= f.hidden_field :id %>
|
6
|
+
</td>
|
7
|
+
<% else %>
|
8
|
+
<td style="opacity:0.2;">
|
9
|
+
<%= svg_icon name: "sort.svg", width: '18', height: '18' %>
|
10
|
+
<%= f.hidden_field :id %>
|
7
11
|
</td>
|
12
|
+
<% end %>
|
8
13
|
<td class='property_name'>
|
9
14
|
<%= f.text_field :property_name, class: 'autocomplete form-control' %>
|
10
15
|
</td>
|
11
16
|
<td class='value'>
|
12
17
|
<%= f.text_field :value, class: 'form-control' %>
|
13
18
|
</td>
|
19
|
+
<td class="show_property">
|
20
|
+
<%= f.check_box :show_property %>
|
21
|
+
</td>
|
14
22
|
<td class="actions actions-1">
|
15
23
|
<% if f.object.persisted? && can?(:destroy, f.object) %>
|
16
24
|
<%= link_to_delete f.object, no_text: true %>
|
25
|
+
<% else %>
|
26
|
+
<span class="btn btn-danger btn-sm icon-link disabled" style="opacity:0.2;">
|
27
|
+
<%= svg_icon name: "delete.svg", width: '18', height: '18' %>
|
28
|
+
</span>
|
17
29
|
<% end %>
|
18
30
|
</td>
|
19
31
|
</tr>
|
@@ -7,36 +7,36 @@
|
|
7
7
|
<%= button_link_to(
|
8
8
|
Spree.t(:add_product_properties),
|
9
9
|
"javascript:;",
|
10
|
-
{ icon: 'add', :'data-target' => "tbody#
|
10
|
+
{ icon: 'add.svg', :'data-target' => "tbody#sortVert", class: 'btn-success spree_add_fields' }) %>
|
11
11
|
|
12
12
|
<span class="js-new-ptype-link">
|
13
13
|
<%= button_link_to Spree.t(:select_from_prototype),
|
14
14
|
available_admin_prototypes_url,
|
15
|
-
{ icon: '
|
15
|
+
{ icon: 'list.svg', remote: true, 'data-update' => 'prototypes', class: 'btn-outline-secondary' } %>
|
16
16
|
</span>
|
17
17
|
<% end if can? :create, Spree::ProductProperty %>
|
18
18
|
|
19
19
|
<%= form_for @product, url: spree.admin_product_url(@product), method: :put do |f| %>
|
20
20
|
<fieldset>
|
21
21
|
<div id="prototypes" data-hook></div>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
<%=
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
22
|
+
<div class=" table-responsive">
|
23
|
+
<table id="product_properties" class="table sortable" data-hook data-sortable-link="<%= update_positions_admin_product_product_properties_url %>">
|
24
|
+
<thead>
|
25
|
+
<tr data-hook="product_properties_header">
|
26
|
+
<th colspan="2"><%= Spree.t(:property) %></th>
|
27
|
+
<th><%= Spree.t(:value) %></th>
|
28
|
+
<th><%= Spree.t(:show_property) %></th>
|
29
|
+
<th class="actions"></th>
|
30
|
+
</tr>
|
31
|
+
</thead>
|
32
|
+
<tbody id="sortVert">
|
33
|
+
<%= f.fields_for :product_properties do |pp_form| %>
|
34
|
+
<%= render 'product_property_fields', f: pp_form %>
|
35
|
+
<% end %>
|
36
|
+
</tbody>
|
37
|
+
</table>
|
38
|
+
</div>
|
38
39
|
<%= render('spree/admin/shared/edit_resource_links') if can? :update, Spree::ProductProperty %>
|
39
|
-
|
40
40
|
<%= hidden_field_tag 'clear_product_properties', 'true' %>
|
41
41
|
</fieldset>
|
42
42
|
<% end %>
|
@@ -51,3 +51,8 @@
|
|
51
51
|
}
|
52
52
|
});
|
53
53
|
<% end %>
|
54
|
+
|
55
|
+
|
56
|
+
<style>
|
57
|
+
div.ui-helper-hidden-accessible {display:none;}
|
58
|
+
</style>
|
@@ -1,25 +1,31 @@
|
|
1
1
|
<script type='text/template' id='product_template'>
|
2
|
-
<li id=
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
2
|
+
<li id="product_{{ product.id }}" data-product-id='{{ product.id }}' data-taxons="{{ product.taxon_ids }}" class="product p-2 col-6 col-md-3 col-lg-2">
|
3
|
+
<div class="m-1 p-2 card bg-light">
|
4
|
+
<nav class="navbar navbar-light bg-light justify-content-between px-0 pt-0" style="background-color:transparent !important;">
|
5
|
+
<a class=" sort-handle js-sort-handle">
|
6
|
+
<%= svg_icon name: "move.svg", width: '22', height: '22' %>
|
7
|
+
</a>
|
8
|
+
<div class="dropdown ">
|
9
|
+
<button class="btn btn-outline-secondary dropdown-toggle products-ddb btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
10
|
+
<%= svg_icon name: "chevron-down.svg", width: '18', height: '18' %>
|
11
|
+
</button>
|
12
|
+
<div class="dropdown-menu dropdown-menu-right p-0 mt-1" aria-labelledby="dropdownMenuButton">
|
13
|
+
<a href="{{ edit_product_url product.id }}" class="edit-product js-edit-product dropdown-item p-1"><%= Spree.t(:edit) %></a>
|
14
|
+
<a href="javascript:;" class="delete-product js-delete-product dropdown-item p-1"><%= Spree.t(:remove) %></a>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</nav>
|
18
|
+
<div class='image'>
|
19
|
+
{{#if product.image }}
|
20
|
+
<img src='{{product.image}}' alt='{{ product.name }}' class='thumbnail rounded border border' />
|
21
|
+
{{ else }}
|
22
|
+
<img src='<%= image_path("noimage/small.png") %>' alt='{{product.name }}' class='thumbnail' />
|
23
|
+
{{/if}}
|
24
|
+
</div>
|
25
|
+
<div class="p-0 pt-1 text-center product-info">
|
26
|
+
<p class="name card-text">{{ product.name }}</p>
|
27
|
+
<p class="price card-text">{{ product.display_current_currency_price }}</p>
|
28
|
+
</div>
|
23
29
|
</div>
|
24
30
|
</li>
|
25
31
|
</script>
|
@@ -38,6 +38,14 @@
|
|
38
38
|
<% end %>
|
39
39
|
</div>
|
40
40
|
|
41
|
+
<div>
|
42
|
+
<%= f.field_container :compare_at_price, class: ['form-group'] do %>
|
43
|
+
<%= f.label :compare_at_price, Spree.t(:compare_at_price) %>
|
44
|
+
<%= f.text_field :compare_at_price, value: number_to_currency(@product.compare_at_price, unit: ''), class: 'form-control' %>
|
45
|
+
<%= f.error_message_on :compare_at_price %>
|
46
|
+
<% end %>
|
47
|
+
</div>
|
48
|
+
|
41
49
|
<div data-hook="admin_product_form_cost_price" class="alpha two columns">
|
42
50
|
<%= f.field_container :cost_price, class: ['form-group'] do %>
|
43
51
|
<%= f.label :cost_price, Spree.t(:cost_price) %>
|
@@ -57,23 +65,48 @@
|
|
57
65
|
<%= f.field_container :available_on, class: ['form-group'] do %>
|
58
66
|
<%= f.label :available_on, Spree.t(:available_on) %>
|
59
67
|
<%= f.error_message_on :available_on %>
|
60
|
-
|
68
|
+
|
69
|
+
<div class="input-group datePickerFrom"
|
70
|
+
data-wrap="true"
|
71
|
+
data-max-date="<%= @product.discontinue_on %>" >
|
72
|
+
|
73
|
+
<%= f.text_field :available_on,
|
74
|
+
value: datepicker_field_value(@product.available_on),
|
75
|
+
placeholder: Spree.t(:select_a_date),
|
76
|
+
class: 'form-control shadow-none ',
|
77
|
+
'data-input':'' %>
|
78
|
+
|
79
|
+
<%= render partial: 'spree/admin/shared/cal_close' %>
|
80
|
+
</div>
|
61
81
|
<% end %>
|
62
82
|
</div>
|
63
83
|
|
84
|
+
|
64
85
|
<div data-hook="admin_product_form_discontinue_on">
|
65
86
|
<%= f.field_container :discontinue_on, class: ['form-group'] do %>
|
66
87
|
<%= f.label :discontinue_on, Spree.t(:discontinue_on) %>
|
67
88
|
<%= f.error_message_on :discontinue_on %>
|
68
|
-
|
89
|
+
|
90
|
+
<div class="input-group datePickerTo"
|
91
|
+
data-wrap="true"
|
92
|
+
data-min-date="<%= @product.available_on %>" >
|
93
|
+
|
94
|
+
<%= f.text_field :discontinue_on,
|
95
|
+
value: datepicker_field_value(@product.discontinue_on),
|
96
|
+
placeholder: Spree.t(:select_a_date),
|
97
|
+
class: 'form-control shadow-none ',
|
98
|
+
'data-input':'' %>
|
99
|
+
|
100
|
+
<%= render partial: 'spree/admin/shared/cal_close' %>
|
101
|
+
</div>
|
69
102
|
<% end %>
|
70
103
|
</div>
|
71
104
|
|
72
105
|
<div data-hook="admin_product_form_promotionable">
|
73
106
|
<%= f.field_container :promotionable, class: ['form-group'] do %>
|
107
|
+
<%= f.check_box :promotionable %>
|
74
108
|
<%= f.label :promotionable, Spree.t(:promotionable) %>
|
75
109
|
<%= f.error_message_on :promotionable %>
|
76
|
-
<%= f.check_box :promotionable, class: 'form-control' %>
|
77
110
|
<% end %>
|
78
111
|
</div>
|
79
112
|
|
@@ -87,10 +120,9 @@
|
|
87
120
|
<% if @product.has_variants? %>
|
88
121
|
<div data-hook="admin_product_form_multiple_variants" class="card bg-light mb-3">
|
89
122
|
<div class="card-body">
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
<ul class="text_list">
|
123
|
+
<h5 class="card-title"><%= f.label :skus, Spree.t(:sku).pluralize %></h5>
|
124
|
+
<h6 class="card-subtitle mb-2 text-muted"><%= Spree.t(:info_product_has_multiple_skus, count: @product.variants.size) %> </h6>
|
125
|
+
<ul class="list-unstyled">
|
94
126
|
<% @product.variants.first(5).each do |variant| %>
|
95
127
|
<li><%= variant.sku %></li>
|
96
128
|
<% end %>
|
@@ -100,10 +132,9 @@
|
|
100
132
|
<%= Spree.t(:info_number_of_skus_not_shown, count: @product.variants.size - 5) %>
|
101
133
|
</em>
|
102
134
|
<% end %>
|
103
|
-
</div>
|
104
135
|
<div class="info-actions">
|
105
136
|
<% if can?(:admin, Spree::Variant) %>
|
106
|
-
<%= link_to_with_icon '
|
137
|
+
<%= link_to_with_icon 'adjust.svg', Spree.t(:manage_variants), spree.admin_product_variants_url(@product), class: "btn btn-outline-secondary" %>
|
107
138
|
<% end %>
|
108
139
|
</div>
|
109
140
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% content_for :page_actions do %>
|
2
2
|
<%= product_preview_link(@product) %>
|
3
3
|
<% if can?(:create, Spree::Product) %>
|
4
|
-
<%= button_link_to Spree.t(:new_product), new_object_url, { class: "btn-success", icon: 'add', id: 'admin_new_product' } %>
|
4
|
+
<%= button_link_to Spree.t(:new_product), new_object_url, { class: "btn-success", icon: 'add.svg', id: 'admin_new_product' } %>
|
5
5
|
<% end %>
|
6
6
|
<% end %>
|
7
7
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_product), new_object_url, { class: "btn-success", icon: 'add', id: 'admin_new_product' } %>
|
6
|
+
<%= button_link_to Spree.t(:new_product), new_object_url, { class: "btn-success", icon: 'add.svg', id: 'admin_new_product' } %>
|
7
7
|
<% end if can?(:create, Spree::Product) %>
|
8
8
|
|
9
9
|
<% content_for :table_filter do %>
|
@@ -14,8 +14,8 @@
|
|
14
14
|
<div data-hook="admin_products_index_search" class="row">
|
15
15
|
<div class="col-12 col-lg-6">
|
16
16
|
<div class="form-group">
|
17
|
-
<%= f.label :
|
18
|
-
<%= f.text_field :
|
17
|
+
<%= f.label :search_by_name, Spree.t(:name) %>
|
18
|
+
<%= f.text_field :search_by_name, size: 15, class: "form-control js-quick-search-target js-filterable" %>
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
<div class="col-12 col-lg-6">
|
@@ -41,46 +41,51 @@
|
|
41
41
|
</div>
|
42
42
|
</div>
|
43
43
|
<div data-hook="admin_products_index_search_buttons" class="form-actions">
|
44
|
-
<%= button Spree.t(:search), 'search' %>
|
44
|
+
<%= button Spree.t(:search), 'search.svg' %>
|
45
45
|
</div>
|
46
46
|
<% end %>
|
47
47
|
|
48
48
|
</div>
|
49
49
|
<% end %>
|
50
50
|
|
51
|
-
<%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection } %>
|
52
|
-
|
53
51
|
<% if @collection.any? %>
|
52
|
+
<div class="table-responsive">
|
54
53
|
<table class="table" id="listing_products">
|
55
54
|
<thead>
|
56
55
|
<tr data-hook="admin_products_index_headers">
|
57
|
-
<th><%= Spree.t(:
|
58
|
-
<th><%= Spree.t(:
|
59
|
-
|
60
|
-
<th
|
61
|
-
<th class="text-center">
|
56
|
+
<th scope="col" colspan="2"><%= sort_link @search,:name, Spree.t(:name), { default_order: "desc" }, {title: 'admin_products_listing_name_title'} %></th>
|
57
|
+
<th scope="col"><%= Spree.t(:sku) %></th>
|
58
|
+
<th scope="col"><%= Spree.t(:status) %></th>
|
59
|
+
<th scope="col" class="text-center">
|
62
60
|
<%= sort_link @search, :master_default_price_amount, Spree.t(:master_price), {}, {title: 'admin_products_listing_price_title'} %>
|
63
61
|
</th>
|
64
|
-
<th data-hook="admin_products_index_header_actions" class="actions"></th>
|
62
|
+
<th scope="col" data-hook="admin_products_index_header_actions" class="actions"></th>
|
65
63
|
</tr>
|
66
64
|
</thead>
|
67
65
|
<tbody>
|
68
66
|
<% @collection.each do |product| %>
|
69
67
|
<tr <%== "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows" class="<%= cycle('odd', 'even') %>">
|
68
|
+
<td scope="row" class="image">
|
69
|
+
<%= link_to edit_admin_product_path(product) do %>
|
70
|
+
<%= mini_image product %>
|
71
|
+
<% end %>
|
72
|
+
</td>
|
73
|
+
<td><%= link_to product.try(:name), edit_admin_product_path(product) %></td>
|
70
74
|
<td class="sku"><%= product.sku rescue '' %></td>
|
71
75
|
<td class="status"><%= available_status(product) %> </td>
|
72
|
-
<td class="
|
73
|
-
<td
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
<td class="text-center"><%= display_price(product) %></td>
|
77
|
+
<td class="actions " data-hook="admin_products_index_row_actions">
|
78
|
+
<span class="d-flex">
|
79
|
+
<%= link_to_edit product, no_text: true, class: 'edit' if can?(:edit, product) && !product.deleted? %>
|
80
|
+
<%= link_to_clone product, no_text: true, class: 'clone' if can?(:clone, product) %>
|
81
|
+
<%= link_to_delete product, no_text: true if can?(:delete, product) && !product.deleted? %>
|
82
|
+
</span>
|
79
83
|
</td>
|
80
84
|
</tr>
|
81
85
|
<% end %>
|
82
86
|
</tbody>
|
83
87
|
</table>
|
88
|
+
</div>
|
84
89
|
<% else %>
|
85
90
|
<div class="alert alert-info no-objects-found">
|
86
91
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Product)) %>,
|
@@ -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>
|