spree_backend 4.1.13 → 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,23 +1,25 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</thead>
|
9
|
-
<tbody>
|
10
|
-
<% taxons.each do |taxon| %>
|
11
|
-
<tr id="<%= spree_dom_id(taxon) %>" data-hook="taxons_row">
|
12
|
-
<td><%= taxon.name %></td>
|
13
|
-
<td><%= taxon_path taxon %></td>
|
14
|
-
<td class="actions">
|
15
|
-
<%= link_to_delete taxon, url: remove_admin_product_taxon_url(@product, taxon), name: icon('delete') + ' ' + Spree.t(:remove) %>
|
16
|
-
</td>
|
1
|
+
<div class="table-responsive">
|
2
|
+
<table class="table table-condensed table-bordered">
|
3
|
+
<thead>
|
4
|
+
<tr data-hook="taxons_header">
|
5
|
+
<th><%= Spree.t(:name) %></th>
|
6
|
+
<th><%= Spree.t(:path) %></th>
|
7
|
+
<th></th>
|
17
8
|
</tr>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<% taxons.each do |taxon| %>
|
12
|
+
<tr id="<%= spree_dom_id(taxon) %>" data-hook="taxons_row">
|
13
|
+
<td><%= taxon.name %></td>
|
14
|
+
<td><%= taxon_path taxon %></td>
|
15
|
+
<td class="actions">
|
16
|
+
<%= link_to_delete taxon, url: remove_admin_product_taxon_url(@product, taxon), name: icon('delete.svg) + ' ' + Spree.t(:remove) %>
|
17
|
+
</td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
<% if taxons.empty? %>
|
21
|
+
<tr data-hook="taxons_none"><td colspan="3"><%= Spree.t(:none) %>.</td></tr>
|
22
|
+
<% end %>
|
23
|
+
</tbody>
|
24
|
+
</table>
|
25
|
+
</div>
|
@@ -4,6 +4,10 @@
|
|
4
4
|
<%= @taxon.name %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
+
<% content_for :page_actions do %>
|
8
|
+
<%= taxon_preview_link(@taxon) %>
|
9
|
+
<% end %>
|
10
|
+
|
7
11
|
<%# Because otherwise the form would attempt to use to_param of @taxon %>
|
8
12
|
<% form_url = admin_taxonomy_taxon_path(@taxonomy.id, @taxon.id) %>
|
9
13
|
|
@@ -13,8 +17,8 @@
|
|
13
17
|
<%= render 'form', f: f %>
|
14
18
|
|
15
19
|
<div class="form-actions" data-hook="buttons">
|
16
|
-
<%= button Spree.t('actions.update'), 'save' %>
|
20
|
+
<%= button Spree.t('actions.update'), 'save.svg' %>
|
17
21
|
<span class="or"><%= Spree.t(:or) %></span>
|
18
|
-
<%= button_link_to Spree.t('actions.cancel'), edit_admin_taxonomy_url(@taxonomy), icon: "
|
22
|
+
<%= button_link_to Spree.t('actions.cancel'), edit_admin_taxonomy_url(@taxonomy), icon: "cancel.svg" %>
|
19
23
|
</div>
|
20
24
|
<% end %>
|
@@ -4,27 +4,28 @@
|
|
4
4
|
<%= Spree.t(:lifetime_stats) %>
|
5
5
|
</h1>
|
6
6
|
</div>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
7
|
+
<div class="table-responsive">
|
8
|
+
<table class="table" id="user-lifetime-stats" data-hook>
|
9
|
+
<tr>
|
10
|
+
<td width="30%"><%= Spree.t(:total_sales) %>:</td>
|
11
|
+
<td><%= @user.display_lifetime_value.to_html %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td><%= Spree.t(:num_orders) %>:</td>
|
15
|
+
<td><%= @user.order_count %></td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<td><%= Spree.t(:average_order_value) %>:</td>
|
19
|
+
<td><%= @user.display_average_order_value.to_html %></td>
|
20
|
+
</tr>
|
21
|
+
<tr>
|
22
|
+
<td><%= Spree.t('admin.user.store_credits') %>:</td>
|
23
|
+
<td id="store_credit"><%= Spree::Money.new(@user.total_available_store_credit) %></td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<td><%= Spree.t(:member_since) %>:</td>
|
27
|
+
<td><%= pretty_time(@user.created_at) %></td>
|
28
|
+
</tr>
|
29
|
+
</table>
|
30
|
+
</div>
|
30
31
|
</div>
|
@@ -5,31 +5,31 @@
|
|
5
5
|
<% content_for :sidebar do %>
|
6
6
|
<ul class="nav flex-column nav-pills" data-hook="admin_user_tab_options">
|
7
7
|
<li>
|
8
|
-
<%= link_to_with_icon 'user',
|
8
|
+
<%= link_to_with_icon 'user.svg',
|
9
9
|
Spree.t(:"admin.user.account"),
|
10
10
|
spree.edit_admin_user_path(@user),
|
11
11
|
class: "nav-link #{'active' if current == :account}" %>
|
12
12
|
</li>
|
13
13
|
<li>
|
14
|
-
<%= link_to_with_icon '
|
14
|
+
<%= link_to_with_icon 'location.svg',
|
15
15
|
Spree.t(:"admin.user.addresses"),
|
16
16
|
spree.addresses_admin_user_path(@user),
|
17
17
|
class: "nav-link #{'active' if current == :address}" %>
|
18
18
|
</li>
|
19
19
|
<li>
|
20
|
-
<%= link_to_with_icon '
|
20
|
+
<%= link_to_with_icon 'list.svg',
|
21
21
|
Spree.t(:"admin.user.orders"),
|
22
22
|
spree.orders_admin_user_path(@user),
|
23
23
|
class: "nav-link #{'active' if current == :orders}" %>
|
24
24
|
</li>
|
25
25
|
<li>
|
26
|
-
<%= link_to_with_icon '
|
26
|
+
<%= link_to_with_icon 'items.svg',
|
27
27
|
Spree.t(:"admin.user.items"),
|
28
28
|
spree.items_admin_user_path(@user),
|
29
29
|
class: "nav-link #{'active' if current == :items}" %>
|
30
30
|
</li>
|
31
31
|
<li>
|
32
|
-
<%= link_to_with_icon '
|
32
|
+
<%= link_to_with_icon 'payments.svg',
|
33
33
|
Spree.t(:"admin.user.store_credits"),
|
34
34
|
spree.admin_user_store_credits_path(@user),
|
35
35
|
class: "nav-link #{'active' if current == :store_credits}" %>
|
@@ -1,3 +1,3 @@
|
|
1
1
|
<% content_for :page_actions do %>
|
2
|
-
<%= button_link_to Spree.t(:create_new_order), spree.new_admin_order_path(user_id: @user.id), class: "btn-success", icon: 'add' if can?(:create, Spree::Order) %>
|
2
|
+
<%= button_link_to Spree.t(:create_new_order), spree.new_admin_order_path(user_id: @user.id), class: "btn-success", icon: 'add.svg' if can?(:create, Spree::Order) %>
|
3
3
|
<% end %>
|
@@ -46,13 +46,13 @@
|
|
46
46
|
</div>
|
47
47
|
<div class="form-actions">
|
48
48
|
<%= form_tag spree.clear_api_key_admin_user_path(@user), method: :put do %>
|
49
|
-
<%= button Spree.t('clear_key', scope: 'api'), 'delete', 'submit', class: "btn-danger" %>
|
49
|
+
<%= button Spree.t('clear_key', scope: 'api'), 'delete.svg', 'submit', class: "btn-danger" %>
|
50
50
|
<% end %>
|
51
51
|
|
52
52
|
<span class="or"><%= Spree.t(:or)%></span>
|
53
53
|
|
54
54
|
<%= form_tag spree.generate_api_key_admin_user_path(@user), method: :put do %>
|
55
|
-
<%= button Spree.t('regenerate_key', scope: 'api'), '
|
55
|
+
<%= button Spree.t('regenerate_key', scope: 'api'), 'recycle.svg' %>
|
56
56
|
<% end %>
|
57
57
|
</div>
|
58
58
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_user), new_admin_user_url, class: "btn-success", icon: 'add', id: 'admin_new_user_link' %>
|
6
|
+
<%= button_link_to Spree.t(:new_user), new_admin_user_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_user_link' %>
|
7
7
|
<% end if can? :create, Spree::user_class %>
|
8
8
|
|
9
9
|
<% content_for :table_filter_title do %>
|
@@ -38,34 +38,36 @@
|
|
38
38
|
</div>
|
39
39
|
<% end %>
|
40
40
|
<div data-hook="admin_users_index_search_buttons" class="form-actions">
|
41
|
-
<%= button Spree.t(:search), 'search' %>
|
41
|
+
<%= button Spree.t(:search), 'search.svg' %>
|
42
42
|
</div>
|
43
43
|
<% end %>
|
44
44
|
</div>
|
45
45
|
<% end %>
|
46
46
|
|
47
47
|
<% if @users.any? %>
|
48
|
-
<
|
49
|
-
<
|
50
|
-
<
|
51
|
-
<
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
</thead>
|
57
|
-
<tbody>
|
58
|
-
<% @users.each do |user|%>
|
59
|
-
<tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows">
|
60
|
-
<td class='user_email'><%=link_to user.email, edit_admin_user_url(user) %></td>
|
61
|
-
<td data-hook="admin_users_index_row_actions" class="actions actions-2 text-right">
|
62
|
-
<%= link_to_edit user, no_text: true if can?(:edit, user) %>
|
63
|
-
<%= link_to_delete user, no_text: true if can?(:delete, user) %>
|
64
|
-
</td>
|
48
|
+
<div class="table-responsive">
|
49
|
+
<table class="table" id="listing_users" data-hook>
|
50
|
+
<thead>
|
51
|
+
<tr data-hook="admin_users_index_headers">
|
52
|
+
<th>
|
53
|
+
<%= sort_link @search,:email, Spree.t(:user), {}, {title: 'users_email_title'} %>
|
54
|
+
</th>
|
55
|
+
<th data-hook="admin_users_index_header_actions" class="actions"></th>
|
65
56
|
</tr>
|
66
|
-
|
67
|
-
|
68
|
-
|
57
|
+
</thead>
|
58
|
+
<tbody>
|
59
|
+
<% @users.each do |user|%>
|
60
|
+
<tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows">
|
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 actions-2 text-right">
|
63
|
+
<%= link_to_edit user, no_text: true if can?(:edit, user) %>
|
64
|
+
<%= link_to_delete user, no_text: true if can?(:delete, user) %>
|
65
|
+
</td>
|
66
|
+
</tr>
|
67
|
+
<% end %>
|
68
|
+
</tbody>
|
69
|
+
</table>
|
70
|
+
</div>
|
69
71
|
<% else %>
|
70
72
|
<div class="alert alert-info no-objects-found">
|
71
73
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree.user_class)) %>,
|
@@ -73,4 +75,4 @@
|
|
73
75
|
</div>
|
74
76
|
<% end %>
|
75
77
|
|
76
|
-
<%= paginate @users, theme: 'twitter-bootstrap-4' %>
|
78
|
+
<%= paginate @users, theme: 'admin-twitter-bootstrap-4' %>
|
@@ -7,10 +7,10 @@
|
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<fieldset data-hook="admin_user_items_purchased">
|
10
|
-
<%= paginate @orders, theme: 'twitter-bootstrap-4' %>
|
11
10
|
|
12
11
|
<% if @orders.any? %>
|
13
12
|
<%# TODO add search interface %>
|
13
|
+
<div class="table-responsive">
|
14
14
|
<table class="table table-condensed table-bordered stock-contents" id="listing_items" data-hook="stock-contents">
|
15
15
|
<thead>
|
16
16
|
<th><%= sort_link @search, :completed_at, I18n.t(:completed_at, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_completed_at_title'} %></th>
|
@@ -54,13 +54,14 @@
|
|
54
54
|
<% end %>
|
55
55
|
<% end %>
|
56
56
|
</table>
|
57
|
+
</div>
|
57
58
|
<% else %>
|
58
59
|
<div class="alert alert-info no-objects-found">
|
59
60
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Order)) %>,
|
60
61
|
<%= link_to Spree.t(:add_one), spree.new_admin_order_path %>!
|
61
62
|
</div>
|
62
63
|
<% end %>
|
63
|
-
<%= paginate @orders, theme: 'twitter-bootstrap-4' %>
|
64
|
+
<%= paginate @orders, theme: 'admin-twitter-bootstrap-4' %>
|
64
65
|
</fieldset>
|
65
66
|
|
66
67
|
<%= render 'spree/admin/users/lifetime_stats' %>
|
@@ -7,38 +7,39 @@
|
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<fieldset data-hook="admin_user_order_history">
|
10
|
-
<%= paginate @orders, theme: 'twitter-bootstrap-4' %>
|
11
10
|
|
12
11
|
<% if @orders.any? %>
|
13
12
|
<%# TODO add search interface %>
|
14
|
-
<
|
15
|
-
<
|
16
|
-
<
|
17
|
-
<
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
<
|
27
|
-
|
28
|
-
|
29
|
-
<
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
13
|
+
<div class="table-responsive">
|
14
|
+
<table class="table table-condensed table-bordered" id="listing_orders" data-hook>
|
15
|
+
<thead>
|
16
|
+
<tr data-hook="admin_orders_index_headers">
|
17
|
+
<th><%= sort_link @search, :completed_at, I18n.t(:completed_at, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_completed_at_title'} %></th>
|
18
|
+
<th><%= sort_link @search, :number, I18n.t(:number, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_number_title'} %></th>
|
19
|
+
<th><%= sort_link @search, :state, I18n.t(:state, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_state_title'} %></th>
|
20
|
+
<th><%= sort_link @search, :total, I18n.t(:total, scope: 'activerecord.attributes.spree/order'), {}, {title: 'orders_total_title'} %></th>
|
21
|
+
</tr>
|
22
|
+
</thead>
|
23
|
+
<tbody>
|
24
|
+
<% @orders.each do |order| %>
|
25
|
+
<tr data-hook="admin_orders_index_rows" class="state-<%= order.state.downcase %> <%= cycle('odd', 'even') %>">
|
26
|
+
<td class="order-completed-at"><%= order_time(order.completed_at) if order.completed_at %></td>
|
27
|
+
<td class="order-number"><%= link_to order.number, edit_admin_order_path(order) %></td>
|
28
|
+
<td class="order-state">
|
29
|
+
<div class="state <%= order.state.downcase %>"><%= Spree.t("order_state.#{order.state.downcase}") %></div>
|
30
|
+
<% if order.payment_state %>
|
31
|
+
<div class="state <%= order.payment_state %>"><%= link_to Spree.t("payment_states.#{order.payment_state}"), admin_order_payments_path(order) %></div>
|
32
|
+
<% end %>
|
33
|
+
<% if Spree::Order.checkout_step_names.include?(:delivery) && order.shipment_state %>
|
34
|
+
<div class="state <%= order.shipment_state %>"><%= Spree.t("shipment_states.#{order.shipment_state}") %></div>
|
35
|
+
<% end %>
|
36
|
+
</td>
|
37
|
+
<td class="order-total"><%= order.display_total.to_html %></td>
|
38
|
+
</tr>
|
39
|
+
<% end %>
|
40
|
+
</tbody>
|
41
41
|
</table>
|
42
|
+
</div>
|
42
43
|
<% else %>
|
43
44
|
<div class="alert alert-info no-objects-found">
|
44
45
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Order)) %>,
|
@@ -46,7 +47,7 @@
|
|
46
47
|
</div>
|
47
48
|
<% end %>
|
48
49
|
|
49
|
-
<%= paginate @orders, theme: 'twitter-bootstrap-4' %>
|
50
|
+
<%= paginate @orders, theme: 'admin-twitter-bootstrap-4' %>
|
50
51
|
</fieldset>
|
51
52
|
|
52
53
|
<%= render 'spree/admin/users/lifetime_stats' %>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
</td>
|
24
24
|
<td class="actions actions-1 text-center">
|
25
25
|
<button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
26
|
-
|
26
|
+
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
27
27
|
</button>
|
28
28
|
</td>
|
29
29
|
{{else}}
|
@@ -37,7 +37,7 @@
|
|
37
37
|
</td>
|
38
38
|
<td class="actions actions-1 text-center">
|
39
39
|
<button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
40
|
-
|
40
|
+
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
41
41
|
</button>
|
42
42
|
</td>
|
43
43
|
{{else}}
|
@@ -53,7 +53,7 @@
|
|
53
53
|
</td>
|
54
54
|
<td class="actions actions-1 text-center">
|
55
55
|
<button class="btn btn-sm btn-success add_variant with-tip" data-variant-id="{{variant.id}}" title="<%= Spree.t(:add) %>" data-action="add">
|
56
|
-
|
56
|
+
<%= svg_icon name: "add.svg", width: '16', height: '16' %>
|
57
57
|
</button>
|
58
58
|
</td>
|
59
59
|
{{/if}}
|
@@ -19,7 +19,7 @@
|
|
19
19
|
</td>
|
20
20
|
<td class="actions actions-1">
|
21
21
|
<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">
|
22
|
-
|
22
|
+
<%= svg_icon name: "add", width: '16', height: '16' %>
|
23
23
|
</button>
|
24
24
|
</td>
|
25
25
|
{{else}}
|
@@ -33,7 +33,7 @@
|
|
33
33
|
</td>
|
34
34
|
<td class="actions actions-1">
|
35
35
|
<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">
|
36
|
-
|
36
|
+
<%= svg_icon name: "add", width: '16', height: '16' %>
|
37
37
|
</button>
|
38
38
|
</td>
|
39
39
|
{{else}}
|
@@ -24,6 +24,11 @@
|
|
24
24
|
<%= f.text_field :price, value: number_to_currency(@variant.price, unit: ''), class: 'form-control' %>
|
25
25
|
</div>
|
26
26
|
|
27
|
+
<div class="form-group" data-hook="compare_at_price">
|
28
|
+
<%= f.label :compare_at_price, Spree.t(:compare_at_price) %>
|
29
|
+
<%= f.text_field :compare_at_price, value: number_to_currency(@variant.compare_at_price, unit: ''), class: 'form-control' %>
|
30
|
+
</div>
|
31
|
+
|
27
32
|
<div class="form-group" data-hook="cost_price">
|
28
33
|
<%= f.label :cost_price, Spree.t(:cost_price) %>
|
29
34
|
<%= f.text_field :cost_price, value: number_to_currency(@variant.cost_price, unit: ''), class: 'form-control' %>
|
@@ -35,10 +40,17 @@
|
|
35
40
|
</div>
|
36
41
|
|
37
42
|
<div class="form-group" data-hook="discontinue_on">
|
38
|
-
|
39
43
|
<%= f.label :discontinue_on, Spree.t(:discontinue_on) %>
|
40
44
|
<%= f.error_message_on :discontinue_on %>
|
41
|
-
|
45
|
+
<div class="input-group datepicker" data-wrap="true" >
|
46
|
+
<%= f.text_field :discontinue_on,
|
47
|
+
value: datepicker_field_value(@variant.discontinue_on),
|
48
|
+
placeholder: Spree.t(:select_a_date),
|
49
|
+
class: 'form-control shadow-none',
|
50
|
+
'data-input':'' %>
|
51
|
+
|
52
|
+
<%= render partial: 'spree/admin/shared/cal_close' %>
|
53
|
+
</div>
|
42
54
|
</div>
|
43
55
|
</div>
|
44
56
|
</div>
|