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
@@ -3,10 +3,11 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_payment_method), new_object_url, class: "btn-success", icon: 'add', id: 'admin_new_payment_methods_link' %>
|
6
|
+
<%= button_link_to Spree.t(:new_payment_method), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_payment_methods_link' %>
|
7
7
|
<% end if can? :create, Spree::PaymentMethod %>
|
8
8
|
|
9
9
|
<% if @payment_methods.any? %>
|
10
|
+
<div class="table-responsive">
|
10
11
|
<table class="table sortable" id='listing_payment_methods' data-hook data-sortable-link="<%= update_positions_admin_payment_methods_url %>">
|
11
12
|
<thead>
|
12
13
|
<tr data-hook="admin_payment_methods_index_headers">
|
@@ -18,16 +19,16 @@
|
|
18
19
|
<th data-hook="admin_payment_methods_index_header_actions" class="actions"></th>
|
19
20
|
</tr>
|
20
21
|
</thead>
|
21
|
-
<tbody>
|
22
|
+
<tbody id="sortVert">
|
22
23
|
<% @payment_methods.each do |method|%>
|
23
24
|
<tr id="<%= spree_dom_id method %>" data-hook="admin_payment_methods_index_rows">
|
24
25
|
<td class="move-handle text-center">
|
25
26
|
<% if can?(:edit, method) %>
|
26
|
-
|
27
|
+
<%= svg_icon name: "sort.svg", width: '18', height: '18' %>
|
27
28
|
<% end %>
|
28
29
|
</td>
|
29
30
|
<td><%= method.name %></td>
|
30
|
-
<td><%= method.type %></td>
|
31
|
+
<td><%= method.type.split('::', 3).last %></td>
|
31
32
|
<td class="text-center"><%= Spree.t(method.display_on) %></td>
|
32
33
|
<td class="text-center"><%= method.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
|
33
34
|
<td data-hook="admin_payment_methods_index_row_actions" class="actions actions-2 text-right">
|
@@ -38,6 +39,7 @@
|
|
38
39
|
<% end %>
|
39
40
|
</tbody>
|
40
41
|
</table>
|
42
|
+
</div>
|
41
43
|
<% else %>
|
42
44
|
<div class="alert alert-info no-objects-found">
|
43
45
|
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::PaymentMethod)) %>,
|
@@ -1,19 +1,21 @@
|
|
1
1
|
<% if @payment.capture_events.exists? %>
|
2
2
|
<h3><%= Spree.t(:capture_events) %></h3>
|
3
|
-
<
|
4
|
-
<
|
5
|
-
<
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
</thead>
|
10
|
-
<tbody>
|
11
|
-
<% @payment.capture_events.each do |capture_event| %>
|
12
|
-
<tr id="<%= dom_id(capture_event) %>" data-hook="capture_events_row">
|
13
|
-
<td><%= pretty_time(capture_event.created_at) %></td>
|
14
|
-
<td><%= capture_event.display_amount %></td>
|
3
|
+
<div class="table-responsive">
|
4
|
+
<table class="table table-condensed table-bordered" id="capture_events">
|
5
|
+
<thead>
|
6
|
+
<tr data-hook="payments_header">
|
7
|
+
<th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
|
8
|
+
<th><%= Spree.t(:amount) %></th>
|
15
9
|
</tr>
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
</thead>
|
11
|
+
<tbody>
|
12
|
+
<% @payment.capture_events.each do |capture_event| %>
|
13
|
+
<tr id="<%= dom_id(capture_event) %>" data-hook="capture_events_row">
|
14
|
+
<td><%= pretty_time(capture_event.created_at) %></td>
|
15
|
+
<td><%= capture_event.display_amount %></td>
|
16
|
+
</tr>
|
17
|
+
<% end %>
|
18
|
+
</tbody>
|
19
|
+
</table>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<div class="payment-method-settings">
|
18
18
|
<% @payment_methods.each do |method| %>
|
19
19
|
|
20
|
-
<div class="payment-methods" id="payment_method_<%= method.id %>">
|
20
|
+
<div class="payment-methods my-3" id="payment_method_<%= method.id %>">
|
21
21
|
<% if method.source_required? %>
|
22
22
|
<%=render partial: "spree/admin/payments/source_forms/#{method.method_type}",
|
23
23
|
locals: {
|
@@ -1,38 +1,40 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
</thead>
|
13
|
-
<tbody>
|
14
|
-
<% payments.each do |payment| %>
|
15
|
-
<tr id="<%= dom_id(payment) %>" data-hook="payments_row" data-number="<%= payment.number %>">
|
16
|
-
<td><%= link_to payment.number, spree.admin_order_payment_path(@order, payment) %></td>
|
17
|
-
<td><%= pretty_time(payment.created_at) %></td>
|
18
|
-
<td class="amount text-center"><%= payment.display_amount %></td>
|
19
|
-
<td class="text-center"><%= payment_method_name(payment) %></td>
|
20
|
-
<td class="text-center"><%= payment.transaction_id %></td>
|
21
|
-
<td class="text-center">
|
22
|
-
<span class="badge badge-<%= payment.state %>">
|
23
|
-
<%= Spree.t(payment.state, scope: :payment_states, default: payment.state.capitalize) %>
|
24
|
-
</span>
|
25
|
-
</td>
|
26
|
-
<td class="actions actions-2 text-center">
|
27
|
-
<% payment.actions.each do |action| %>
|
28
|
-
<% if action == 'credit' %>
|
29
|
-
<%= link_to_with_icon('refund', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true, class: "btn btn-outline-secondary btn-sm") if can?(:create, Spree::Refund) %>
|
30
|
-
<% else %>
|
31
|
-
<%= link_to_with_icon(action, Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: { action: action }, class: "btn btn-outline-secondary btn-sm") if can?(action.to_sym, payment) %>
|
32
|
-
<% end %>
|
33
|
-
<% end %>
|
34
|
-
</td>
|
1
|
+
<div class="table-responsive">
|
2
|
+
<table class="table table-bordered" id='payments' data-order-id='<%= @order.number %>'>
|
3
|
+
<thead>
|
4
|
+
<tr data-hook="payments_header">
|
5
|
+
<th><%= Spree::Payment.human_attribute_name(:number) %></th>
|
6
|
+
<th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
|
7
|
+
<th class="text-center"><%= Spree.t(:amount) %></th>
|
8
|
+
<th class="text-center"><%= Spree.t(:payment_method) %></th>
|
9
|
+
<th class="text-center"><%= Spree.t(:transaction_id) %></th>
|
10
|
+
<th class="text-center"><%= Spree.t(:payment_state) %></th>
|
11
|
+
<th class="actions text-center"></th>
|
35
12
|
</tr>
|
36
|
-
|
37
|
-
|
38
|
-
|
13
|
+
</thead>
|
14
|
+
<tbody>
|
15
|
+
<% payments.each do |payment| %>
|
16
|
+
<tr id="<%= dom_id(payment) %>" data-hook="payments_row" data-number="<%= payment.number %>">
|
17
|
+
<td><%= link_to payment.number, spree.admin_order_payment_path(@order, payment) %></td>
|
18
|
+
<td><%= pretty_time(payment.created_at) %></td>
|
19
|
+
<td class="amount text-center"><%= payment.display_amount %></td>
|
20
|
+
<td class="text-center"><%= payment_method_name(payment) %></td>
|
21
|
+
<td class="text-center"><%= payment.transaction_id %></td>
|
22
|
+
<td class="text-center">
|
23
|
+
<span class="badge badge-<%= payment.state %>">
|
24
|
+
<%= Spree.t(payment.state, scope: :payment_states, default: payment.state.capitalize) %>
|
25
|
+
</span>
|
26
|
+
</td>
|
27
|
+
<td class="actions actions-2 text-center no-wrap">
|
28
|
+
<% payment.actions.each do |action| %>
|
29
|
+
<% if action == 'credit' %>
|
30
|
+
<%= link_to_with_icon('exit.svg', Spree.t(:refund), new_admin_order_payment_refund_path(@order, payment), no_text: true, class: "btn btn-outline-secondary btn-sm") if can?(:create, Spree::Refund) %>
|
31
|
+
<% else %>
|
32
|
+
<%= link_to_with_icon(action + '.svg', Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: { action: action }, class: "btn btn-outline-secondary btn-sm") if can?(action.to_sym, payment) %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
</tbody>
|
39
|
+
</table>
|
40
|
+
</div>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% content_for :page_actions do %>
|
4
4
|
<% if @order.outstanding_balance? && can?(:create, Spree::Payment) %>
|
5
5
|
<span id="new_payment_section">
|
6
|
-
<%= button_link_to Spree.t(:new_payment), new_admin_order_payment_url(@order), class: "btn-success", icon: 'add' %>
|
6
|
+
<%= button_link_to Spree.t(:new_payment), new_admin_order_payment_url(@order), class: "btn-success", icon: 'add.svg' %>
|
7
7
|
</span>
|
8
8
|
<% end %>
|
9
9
|
<% end %>
|
@@ -19,8 +19,7 @@
|
|
19
19
|
<% end %>
|
20
20
|
|
21
21
|
<% if @payments.any? %>
|
22
|
-
|
23
|
-
<div data-hook="payment_list" class="mb-3">
|
22
|
+
<div data-hook="payment_list" class="mb-3 table-responsive">
|
24
23
|
<%= render partial: 'list', locals: { payments: @payments } %>
|
25
24
|
</div>
|
26
25
|
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<%= render partial: 'form', locals: { f: f } %>
|
13
13
|
|
14
14
|
<div class="form-actions" data-hook="buttons">
|
15
|
-
<%= button @order.cart? ? Spree.t('actions.continue') : Spree.t('actions.update'), @order.cart? ? 'arrow-right' : 'save' %>
|
15
|
+
<%= button @order.cart? ? Spree.t('actions.continue') : Spree.t('actions.update'), @order.cart? ? 'arrow-right.svg' : 'save.svg' %>
|
16
16
|
</div>
|
17
17
|
</fieldset>
|
18
18
|
<% end %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% end %>
|
13
13
|
|
14
14
|
<% content_for :page_actions do %>
|
15
|
-
<%= button_link_to Spree.t(:logs), spree.admin_order_payment_log_entries_url(@order, @payment), icon: 'file' %>
|
15
|
+
<%= button_link_to Spree.t(:logs), spree.admin_order_payment_log_entries_url(@order, @payment), icon: 'file.svg' %>
|
16
16
|
<% end %>
|
17
17
|
|
18
18
|
<%= render partial: "spree/admin/payments/source_views/#{@payment.payment_method.method_type}",
|
@@ -1,27 +1,33 @@
|
|
1
1
|
<fieldset data-id="credit-card">
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</label>
|
10
|
-
</li>
|
11
|
-
<% end %>
|
12
|
-
<li>
|
13
|
-
<label>
|
14
|
-
<%= radio_button_tag :card, 'new', false, { id: "card_new#{payment_method.id}" } %> <%= Spree.t(:use_new_cc) %>
|
15
|
-
</label>
|
16
|
-
</li>
|
17
|
-
<% end %>
|
18
|
-
</ul>
|
19
|
-
</div>
|
2
|
+
<% if previous_cards.any? %>
|
3
|
+
<div class="card my-3">
|
4
|
+
<div class="card-header">
|
5
|
+
<h1 class="card-title mb-0 h5"><%= Spree.t(:previously_used_card) %></h1>
|
6
|
+
</div>
|
7
|
+
<div class="form-group previous_cards card-body mb-0" data-hook="previous_cards">
|
8
|
+
<ul class="m-0 p-0">
|
20
9
|
|
21
|
-
|
10
|
+
<% previous_cards.each do |card| %>
|
11
|
+
<li>
|
12
|
+
<label>
|
13
|
+
<%= radio_button_tag :card, card.id, card == previous_cards.first %> <%= card.brand.upcase + ' - ' + card.display_number %>
|
14
|
+
</label>
|
15
|
+
</li>
|
16
|
+
<% end %>
|
17
|
+
<li>
|
18
|
+
<hr>
|
19
|
+
<label>
|
20
|
+
<%= radio_button_tag :card, 'new', false, { id: "card_new#{payment_method.id}" } %> <%= Spree.t(:use_new_cc) %>
|
21
|
+
</label>
|
22
|
+
</li>
|
23
|
+
</ul>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
<div id="card_form<%= payment_method.id %>" class="margint row" data-hook>
|
22
28
|
<% param_prefix = "payment_source[#{payment_method.id}]" %>
|
23
29
|
|
24
|
-
<div data-hook="card_number" class="form-group">
|
30
|
+
<div data-hook="card_number" class="form-group col-12">
|
25
31
|
<%= hidden_field_tag "#{param_prefix}[cc_type]", '', {class: 'ccType'} %>
|
26
32
|
<%= label_tag "card_number#{payment_method.id}", raw(Spree.t(:card_number) + required_span_tag) %>
|
27
33
|
<%= text_field_tag "#{param_prefix}[number]", '', class: 'required form-control cardNumber', id: "card_number#{payment_method.id}", maxlength: 19 %>
|
@@ -32,25 +38,19 @@
|
|
32
38
|
</span>
|
33
39
|
</div>
|
34
40
|
|
35
|
-
<div data-hook="card_name" class="form-group">
|
41
|
+
<div data-hook="card_name" class="form-group col-12">
|
36
42
|
<%= label_tag "card_name#{payment_method.id}", raw(Spree.t(:name) + required_span_tag) %>
|
37
43
|
<%= text_field_tag "#{param_prefix}[name]", '', id: "card_name#{payment_method.id}", class: 'required form-control', maxlength: 19 %>
|
38
44
|
</div>
|
39
45
|
|
40
|
-
<div data-hook="card_expiration" class="form-group">
|
46
|
+
<div data-hook="card_expiration" class="form-group col-6">
|
41
47
|
<%= label_tag "card_expiry#{payment_method.id}", raw(Spree.t(:expiration) + required_span_tag) %><br>
|
42
|
-
<%= text_field_tag "#{param_prefix}[expiry]", '', id: "card_expiry#{payment_method.id}", class: "required cardExpiry form-control", placeholder: "MM
|
48
|
+
<%= text_field_tag "#{param_prefix}[expiry]", '', id: "card_expiry#{payment_method.id}", class: "required cardExpiry form-control", placeholder: "MM/YYYY" %>
|
43
49
|
</div>
|
44
50
|
|
45
|
-
<div data-hook="card_code" class="form-group">
|
51
|
+
<div data-hook="card_code" class="form-group col-6">
|
46
52
|
<%= label_tag "card_code#{payment_method.id}", raw(Spree.t(:card_code) + required_span_tag) %>
|
47
53
|
<%= text_field_tag "#{param_prefix}[verification_value]", '', id: "card_code#{payment_method.id}", class: 'required form-control cardCode', size: 5 %>
|
48
|
-
<a href="/content/cvv" class="info cvvLink" target="_blank">
|
49
|
-
(<%= Spree.t(:what_is_this) %>)
|
50
|
-
</a>
|
51
54
|
</div>
|
52
|
-
|
53
|
-
<%= image_tag 'credit_cards/credit_card.gif', class: 'credit-card-image' %>
|
54
|
-
|
55
55
|
</div>
|
56
56
|
</fieldset>
|
@@ -1,21 +1,23 @@
|
|
1
1
|
<fieldset data-hook="credit_card">
|
2
2
|
<legend><%= Spree.t(:credit_card) %></legend>
|
3
|
-
<
|
4
|
-
<
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<
|
18
|
-
|
19
|
-
|
20
|
-
|
3
|
+
<div class="table-responsive">
|
4
|
+
<table class="table table-condensed table-bordered">
|
5
|
+
<tr>
|
6
|
+
<th width="20%"><%= Spree.t(:name_on_card) %>:</th>
|
7
|
+
<td><%= payment.source.name %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<th><%= Spree.t(:card_type) %>:</th>
|
11
|
+
<td><%= payment.source.cc_type %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<th><%= Spree.t(:card_number) %>:</th>
|
15
|
+
<td><%= payment.source.display_number %></td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<th><%= Spree.t(:expiration) %>:</th>
|
19
|
+
<td><%= payment.source.month %>/<%= payment.source.year %></td>
|
20
|
+
</tr>
|
21
|
+
</table>
|
22
|
+
</div>
|
21
23
|
</fieldset>
|
@@ -1,29 +1,31 @@
|
|
1
1
|
<fieldset data-hook="store_credit">
|
2
2
|
<legend><%= Spree.t(:store_credit_name) %></legend>
|
3
|
-
<
|
4
|
-
<
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
3
|
+
<div class="table-responsive">
|
4
|
+
<table class="table table-condensed table-bordered">
|
5
|
+
<tr>
|
6
|
+
<th width="20%"><%= Spree.t(:used) %>:</th>
|
7
|
+
<td><%= payment.source.display_amount_used %></td>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<th><%= Spree.t(:amount) %>:</th>
|
11
|
+
<td><%= payment.source.display_amount %></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<th><%= Spree.t(:memo) %>:</th>
|
15
|
+
<td><%= payment.source.memo %></td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<th><%= Spree.t(:type) %>:</th>
|
19
|
+
<td><%= payment.source.category_name %></td>
|
20
|
+
</tr>
|
21
|
+
<tr>
|
22
|
+
<th><%= Spree.t(:created_by) %>:</th>
|
23
|
+
<td><%= payment.source.created_by_email %></td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<th><%= Spree.t(:issued_on) %>:</th>
|
27
|
+
<td><%= pretty_time(payment.source.created_at) %></td>
|
28
|
+
</tr>
|
29
|
+
</table>
|
30
|
+
</div>
|
29
31
|
</fieldset>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<div class="panel-body no-padding-bottom panel-default table-responsive">
|
2
|
+
<div id="variant_prices-table-wrapper">
|
3
|
+
<table class="table sortable">
|
4
|
+
<colgroup>
|
5
|
+
<col style="width: 15%" />
|
6
|
+
<col style="width: 30%" />
|
7
|
+
<col style="width: 15%" />
|
8
|
+
<col style="width: 20%" />
|
9
|
+
<col style="width: 20%" />
|
10
|
+
</colgroup>
|
11
|
+
<thead>
|
12
|
+
<tr data-hook="variant_prices_header">
|
13
|
+
<th><%= Spree.t(:options) %></th>
|
14
|
+
<th><%= Spree.t(:sku) %></th>
|
15
|
+
<th><%= Spree.t(:currency) %></th>
|
16
|
+
<th><%= Spree.t(:price) %></th>
|
17
|
+
<th><%= Spree.t(:compare_at_price) %></th>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
<tbody id="variant-prices" data-hook="variant_prices_body">
|
21
|
+
<% supported_currencies_for_all_stores.each do |currency| %>
|
22
|
+
<% code = currency.iso_code %>
|
23
|
+
<% @product.variants_including_master.each do |variant| %>
|
24
|
+
<% price = variant.price_in(code) %>
|
25
|
+
<tr id="variant_prices_row" data-hook="variant_prices_row">
|
26
|
+
<td class="panel">
|
27
|
+
<%= variant.is_master? ? Spree.t(:master) : variant.options_text.blank? ? Spree.t(:variant) : variant.options_text %>
|
28
|
+
</td>
|
29
|
+
<td class="panel-title"><%= variant.sku %></td>
|
30
|
+
<td><%= label_tag "vp[#{variant.id}][#{code}]", code %></td>
|
31
|
+
<td>
|
32
|
+
<%= text_field_tag "vp[#{variant.id}][#{code}][price]", (price && price.price ? price.display_amount.money : ''), class: 'form-control' %>
|
33
|
+
</td>
|
34
|
+
<td>
|
35
|
+
<%= text_field_tag "vp[#{variant.id}][#{code}][compare_at_price]", (price && price.compare_at_price ? price.display_compare_at_amount.money : ''), class: 'form-control' %>
|
36
|
+
</td>
|
37
|
+
</tr>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
40
|
+
</tbody>
|
41
|
+
</table>
|
42
|
+
</div>
|
43
|
+
</div>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<%= render partial: 'spree/admin/shared/product_tabs', locals: { current: :prices } %>
|
2
|
+
|
3
|
+
<% content_for :page_actions do %>
|
4
|
+
<%= yield :page_actions %>
|
5
|
+
<%= product_preview_link(@product) %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<form>
|
9
|
+
<input class="form-control" placeholder="<%= Spree.t('variant_prices_search_placeholder') %>" type="text" id="variant-price-search"/>
|
10
|
+
</form>
|
11
|
+
|
12
|
+
<%= form_tag nil, { class: 'form-horizontal' } do %>
|
13
|
+
<div class="mt-3">
|
14
|
+
<%= render 'variant_prices', variant: @product.master %>
|
15
|
+
</div>
|
16
|
+
<div class="form-actions" data-hook="buttons">
|
17
|
+
<%= button Spree.t('actions.update'), 'update.svg' %>
|
18
|
+
<span class="or"><%= Spree.t(:or) %></span>
|
19
|
+
<%= button_link_to Spree.t('actions.cancel'), admin_product_path(@product), icon: 'delete.svg' %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|