spree_backend 3.0.10 → 3.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend.js +22 -19
- data/app/assets/javascripts/spree/backend/admin.js +10 -17
- data/app/assets/javascripts/spree/backend/handlebar_extensions.js +0 -2
- data/app/assets/javascripts/spree/backend/product_picker.js +1 -2
- data/app/assets/javascripts/spree/backend/spree-select2.js +0 -1
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +1 -0
- data/app/assets/javascripts/spree/backend/taxons.js.coffee +6 -1
- data/app/assets/stylesheets/spree/backend/components/_labels.scss +1 -0
- data/app/assets/stylesheets/spree/backend/components/_page_header.scss +15 -0
- data/app/assets/stylesheets/spree/backend/shared/_base.scss +9 -1
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +5 -1
- data/app/controllers/spree/admin/adjustments_controller.rb +2 -2
- data/app/controllers/spree/admin/customer_returns_controller.rb +5 -4
- data/app/controllers/spree/admin/option_types_controller.rb +1 -1
- data/app/controllers/spree/admin/option_values_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +37 -20
- data/app/controllers/spree/admin/orders_controller.rb +6 -6
- data/app/controllers/spree/admin/payment_methods_controller.rb +3 -3
- data/app/controllers/spree/admin/payments_controller.rb +2 -2
- data/app/controllers/spree/admin/products_controller.rb +11 -2
- data/app/controllers/spree/admin/promotions_controller.rb +0 -2
- data/app/controllers/spree/admin/properties_controller.rb +0 -2
- data/app/controllers/spree/admin/resource_controller.rb +6 -7
- data/app/controllers/spree/admin/return_index_controller.rb +28 -0
- data/app/controllers/spree/admin/stock_transfers_controller.rb +2 -4
- data/app/controllers/spree/admin/store_credit_categories_controller.rb +6 -0
- data/app/controllers/spree/admin/store_credits_controller.rb +94 -0
- data/app/controllers/spree/admin/taxons_controller.rb +14 -12
- data/app/controllers/spree/admin/users_controller.rb +4 -25
- data/app/controllers/spree/admin/variants_controller.rb +7 -4
- data/app/helpers/spree/admin/base_helper.rb +9 -0
- data/app/helpers/spree/admin/navigation_helper.rb +19 -8
- data/app/helpers/spree/admin/orders_helper.rb +11 -7
- data/app/views/spree/admin/countries/edit.html.erb +4 -0
- data/app/views/spree/admin/countries/new.html.erb +1 -1
- data/app/views/spree/admin/general_settings/edit.html.erb +19 -18
- data/app/views/spree/admin/option_types/edit.html.erb +2 -0
- data/app/views/spree/admin/option_types/new.html.erb +4 -0
- data/app/views/spree/admin/orders/_add_line_item.html.erb +3 -3
- data/app/views/spree/admin/orders/_add_product.html.erb +3 -3
- data/app/views/spree/admin/orders/_form.html.erb +22 -22
- data/app/views/spree/admin/orders/_line_items.html.erb +5 -5
- data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +19 -19
- data/app/views/spree/admin/orders/_order_actions.html.erb +12 -0
- data/app/views/spree/admin/orders/_risk_analysis.html.erb +2 -2
- data/app/views/spree/admin/orders/cart.html.erb +7 -11
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +4 -4
- data/app/views/spree/admin/orders/customer_details/edit.html.erb +3 -3
- data/app/views/spree/admin/orders/edit.html.erb +6 -10
- data/app/views/spree/admin/orders/index.html.erb +7 -5
- data/app/views/spree/admin/payment_methods/_form.html.erb +1 -1
- data/app/views/spree/admin/payment_methods/edit.html.erb +4 -0
- data/app/views/spree/admin/payment_methods/index.html.erb +8 -2
- data/app/views/spree/admin/payment_methods/new.html.erb +4 -0
- data/app/views/spree/admin/payments/index.html.erb +1 -1
- data/app/views/spree/admin/payments/source_forms/_storecredit.html.erb +9 -0
- data/app/views/spree/admin/payments/source_views/_storecredit.html.erb +29 -0
- data/app/views/spree/admin/products/_form.html.erb +12 -3
- data/app/views/spree/admin/products/edit.html.erb +1 -0
- data/app/views/spree/admin/products/index.html.erb +10 -0
- data/app/views/spree/admin/products/new.html.erb +4 -0
- data/app/views/spree/admin/promotion_categories/edit.html.erb +4 -0
- data/app/views/spree/admin/promotion_categories/new.html.erb +4 -0
- data/app/views/spree/admin/promotions/edit.html.erb +4 -0
- data/app/views/spree/admin/promotions/new.html.erb +4 -0
- data/app/views/spree/admin/properties/edit.html.erb +4 -0
- data/app/views/spree/admin/properties/new.html.erb +4 -0
- data/app/views/spree/admin/prototypes/edit.html.erb +4 -0
- data/app/views/spree/admin/prototypes/new.html.erb +4 -0
- data/app/views/spree/admin/refund_reasons/destroy.js.erb +1 -0
- data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
- data/app/views/spree/admin/return_authorization_reasons/destroy.js.erb +1 -0
- data/app/views/spree/admin/return_index/customer_returns.html.erb +64 -0
- data/app/views/spree/admin/return_index/return_authorizations.html.erb +76 -0
- data/app/views/spree/admin/roles/edit.html.erb +4 -0
- data/app/views/spree/admin/roles/new.html.erb +4 -0
- data/app/views/spree/admin/shared/_destroy.js.erb +6 -3
- data/app/views/spree/admin/shared/_error_messages.html.erb +1 -1
- data/app/views/spree/admin/shared/_index_table_options.html.erb +7 -1
- data/app/views/spree/admin/shared/_main_menu.html.erb +6 -0
- data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_index.html.erb +2 -1
- data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +1 -0
- data/app/views/spree/admin/shared/sub_menu/_returns.html.erb +4 -0
- data/app/views/spree/admin/shipping_categories/edit.html.erb +4 -0
- data/app/views/spree/admin/shipping_categories/new.html.erb +4 -0
- data/app/views/spree/admin/state_changes/index.html.erb +2 -2
- data/app/views/spree/admin/states/edit.html.erb +4 -0
- data/app/views/spree/admin/states/new.html.erb +4 -0
- data/app/views/spree/admin/stock_locations/edit.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/_form.html.erb +3 -3
- data/app/views/spree/admin/stock_movements/edit.html.erb +2 -1
- data/app/views/spree/admin/stock_movements/index.html.erb +2 -2
- data/app/views/spree/admin/stock_movements/new.html.erb +4 -4
- data/app/views/spree/admin/store_credit_categories/_form.html.erb +8 -0
- data/app/views/spree/admin/store_credit_categories/edit.html.erb +10 -0
- data/app/views/spree/admin/store_credit_categories/index.html.erb +34 -0
- data/app/views/spree/admin/store_credit_categories/new.html.erb +10 -0
- data/app/views/spree/admin/store_credits/_form.html.erb +18 -0
- data/app/views/spree/admin/store_credits/edit.html.erb +12 -0
- data/app/views/spree/admin/store_credits/index.html.erb +46 -0
- data/app/views/spree/admin/store_credits/new.html.erb +12 -0
- data/app/views/spree/admin/tax_categories/edit.html.erb +1 -1
- data/app/views/spree/admin/tax_categories/new.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/edit.html.erb +4 -0
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/new.html.erb +4 -0
- data/app/views/spree/admin/taxonomies/edit.erb +5 -1
- data/app/views/spree/admin/taxonomies/new.html.erb +4 -0
- data/app/views/spree/admin/taxons/_form.html.erb +1 -1
- data/app/views/spree/admin/users/_form.html.erb +5 -6
- data/app/views/spree/admin/users/_lifetime_stats.html.erb +6 -2
- data/app/views/spree/admin/users/_sidebar.html.erb +3 -0
- data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -1
- data/app/views/spree/admin/users/items.html.erb +1 -1
- data/app/views/spree/admin/users/new.html.erb +4 -0
- data/app/views/spree/admin/users/orders.html.erb +1 -1
- data/app/views/spree/admin/variants/_form.html.erb +8 -1
- data/app/views/spree/admin/variants/index.html.erb +4 -2
- data/app/views/spree/admin/zones/index.html.erb +1 -1
- data/config/routes.rb +19 -9
- data/lib/spree/backend/callbacks.rb +4 -8
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +164 -9
- data/spec/controllers/spree/admin/orders_controller_spec.rb +16 -9
- data/spec/controllers/spree/admin/payments_controller_spec.rb +10 -10
- data/spec/controllers/spree/admin/products_controller_spec.rb +61 -12
- data/spec/controllers/spree/admin/return_index_controller_spec.rb +37 -0
- data/spec/controllers/spree/admin/users_controller_spec.rb +3 -3
- data/spec/features/admin/configuration/analytics_tracker_spec.rb +3 -2
- data/spec/features/admin/configuration/countries_spec.rb +1 -1
- data/spec/features/admin/configuration/general_settings_spec.rb +1 -0
- data/spec/features/admin/configuration/payment_methods_spec.rb +4 -4
- data/spec/features/admin/configuration/store_credit_categories_spec.rb +50 -0
- data/spec/features/admin/homepage_spec.rb +19 -11
- data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +2 -2
- data/spec/features/admin/orders/customer_details_spec.rb +8 -21
- data/spec/features/admin/orders/line_items_spec.rb +2 -2
- data/spec/features/admin/orders/listing_spec.rb +3 -6
- data/spec/features/admin/orders/new_order_spec.rb +13 -14
- data/spec/features/admin/orders/payments_spec.rb +1 -1
- data/spec/features/admin/products/products_spec.rb +2 -2
- data/spec/features/admin/products/stock_management_spec.rb +5 -4
- data/spec/features/admin/refund_reasons/refund_reasons_spec.rb +57 -0
- data/spec/features/admin/reports_spec.rb +2 -2
- data/spec/features/admin/return_authorization_reasons/return_authorization_reasons_spec.rb +63 -0
- data/spec/features/admin/returns/customer_returns_spec.rb +80 -0
- data/spec/features/admin/returns/return_authorizations_spec.rb +152 -0
- data/spec/features/admin/store_credits_spec.rb +93 -0
- data/spec/features/admin/users_spec.rb +8 -6
- data/spec/helpers/admin/base_helper_spec.rb +6 -0
- data/spec/routing/admin_path_spec.rb +22 -0
- data/spec/spec_helper.rb +1 -0
- data/spree_backend.gemspec +0 -1
- metadata +36 -10
- data/CHANGELOG.md +0 -1
@@ -99,8 +99,8 @@
|
|
99
99
|
|
100
100
|
<div class="col-md-4">
|
101
101
|
<div class="form-group">
|
102
|
-
<%= label_tag :
|
103
|
-
<%= f.
|
102
|
+
<%= label_tag :q_line_items_variant_sku_eq, Spree.t(:sku) %>
|
103
|
+
<%= f.text_field :line_items_variant_sku_eq, class: 'form-control' %>
|
104
104
|
</div>
|
105
105
|
</div>
|
106
106
|
|
@@ -145,7 +145,7 @@
|
|
145
145
|
|
146
146
|
<% end %>
|
147
147
|
|
148
|
-
<%= render
|
148
|
+
<%= render 'spree/admin/shared/index_table_options', collection: @orders %>
|
149
149
|
|
150
150
|
<% if @orders.any? %>
|
151
151
|
<table class="table" id="listing_orders" data-hook>
|
@@ -171,7 +171,9 @@
|
|
171
171
|
<tbody>
|
172
172
|
<% @orders.each do |order| %>
|
173
173
|
<tr data-hook="admin_orders_index_rows" class="state-<%= order.state.downcase %> <%= cycle('odd', 'even') %>">
|
174
|
-
<td
|
174
|
+
<td>
|
175
|
+
<%= order_time(@show_only_completed ? order.completed_at : order.created_at) %>
|
176
|
+
</td>
|
175
177
|
<td><%= link_to order.number, edit_admin_order_path(order) %></td>
|
176
178
|
<td>
|
177
179
|
<span class="label label-<%= order.considered_risky ? 'considered_risky' : 'considered_safe' %>">
|
@@ -221,4 +223,4 @@
|
|
221
223
|
</div>
|
222
224
|
<% end %>
|
223
225
|
|
224
|
-
<%= render
|
226
|
+
<%= render 'spree/admin/shared/index_table_options', collection: @orders, simple: true %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</div>
|
18
18
|
<div data-hook="display" class="form-group">
|
19
19
|
<%= label_tag :payment_method_display_on, Spree.t(:display) %>
|
20
|
-
<%= select(:payment_method, :display_on, Spree::PaymentMethod::DISPLAY.collect { |display| [Spree.t(display), display
|
20
|
+
<%= select(:payment_method, :display_on, Spree::PaymentMethod::DISPLAY.collect { |display| [Spree.t(display), display.to_s] }, {}, {:class => 'select2'}) %>
|
21
21
|
</div>
|
22
22
|
<div data-hook="auto_capture" class="form-group">
|
23
23
|
<%= label_tag :payment_method_auto_capture, Spree.t(:auto_capture) %>
|
@@ -2,6 +2,10 @@
|
|
2
2
|
<%= Spree.t(:editing_resource, resource: Spree::PaymentMethod.model_name.human) %> / <%= @payment_method.name %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= back_to_list_button(Spree::PaymentMethod.model_name.human, admin_payment_methods_path) %>
|
7
|
+
<% end %>
|
8
|
+
|
5
9
|
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
|
6
10
|
|
7
11
|
<%= form_for @payment_method, url: admin_payment_method_path(@payment_method) do |f| %>
|
@@ -7,9 +7,10 @@
|
|
7
7
|
<% end if can? :create, Spree::PaymentMethod %>
|
8
8
|
|
9
9
|
<% if @payment_methods.any? %>
|
10
|
-
<table class="table" id='listing_payment_methods'>
|
10
|
+
<table class="table sortable" id='listing_payment_methods' data-hook data-sortable-link="<%= update_positions_admin_payment_methods_url %>">
|
11
11
|
<thead>
|
12
12
|
<tr data-hook="admin_payment_methods_index_headers">
|
13
|
+
<th></th>
|
13
14
|
<th><%= Spree.t(:name) %></th>
|
14
15
|
<th><%= Spree.t(:provider) %></th>
|
15
16
|
<th class="text-center"><%= Spree.t(:display) %></th>
|
@@ -20,9 +21,14 @@
|
|
20
21
|
<tbody>
|
21
22
|
<% @payment_methods.each do |method|%>
|
22
23
|
<tr id="<%= spree_dom_id method %>" data-hook="admin_payment_methods_index_rows">
|
24
|
+
<td class="move-handle text-center">
|
25
|
+
<% if can?(:edit, method) %>
|
26
|
+
<span class="icon icon-move handle"></span>
|
27
|
+
<% end %>
|
28
|
+
</td>
|
23
29
|
<td><%= method.name %></td>
|
24
30
|
<td><%= method.type %></td>
|
25
|
-
<td class="text-center"><%=
|
31
|
+
<td class="text-center"><%= Spree.t(method.display_on) %></td>
|
26
32
|
<td class="text-center"><%= method.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
|
27
33
|
<td data-hook="admin_payment_methods_index_row_actions" class="actions actions-2 text-right">
|
28
34
|
<%= link_to_edit(method, :no_text => true) if can? :edit, method %>
|
@@ -2,6 +2,10 @@
|
|
2
2
|
<%= Spree.t(:new_payment_method) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= back_to_list_button(Spree::PaymentMethod.model_name.human, admin_payment_methods_path) %>
|
7
|
+
<% end %>
|
8
|
+
|
5
9
|
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment_method } %>
|
6
10
|
|
7
11
|
<%= form_for @payment_method, url: collection_url do |f| %>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
<% if @payments.any? %>
|
22
22
|
|
23
|
-
<div data-hook="payment_list" class="panel panel-default no-border-bottom">
|
23
|
+
<div data-hook="payment_list" class="panel panel-default no-border-bottom table-wrapper">
|
24
24
|
<%= render partial: 'list', locals: { payments: @payments } %>
|
25
25
|
</div>
|
26
26
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<% if @order.could_use_store_credit? %>
|
2
|
+
<div class="alert alert-info text-center" data-hook="admin_payment_store_credit_available">
|
3
|
+
<h4><%= Spree.t('admin.user.available_store_credit', amount: @order.display_total_available_store_credit) %></h4>
|
4
|
+
</div>
|
5
|
+
<% else %>
|
6
|
+
<div class="alert alert-danger text-center" data-hook="admin_payment_no_store_credit">
|
7
|
+
<h4><strong><%= Spree.t('admin.user.no_store_credit') %></strong></h4>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<fieldset data-hook="store_credit">
|
2
|
+
<legend><%= Spree.t(:store_credit_name) %></legend>
|
3
|
+
<table class="table table-condensed table-bordered">
|
4
|
+
<tr>
|
5
|
+
<th width="20%"><%= Spree.t(:used) %>:</th>
|
6
|
+
<td><%= payment.source.display_amount_used %></td>
|
7
|
+
</tr>
|
8
|
+
<tr>
|
9
|
+
<th><%= Spree.t(:amount) %>:</th>
|
10
|
+
<td><%= payment.source.display_amount %></td>
|
11
|
+
</tr>
|
12
|
+
<tr>
|
13
|
+
<th><%= Spree.t(:memo) %>:</th>
|
14
|
+
<td><%= payment.source.memo %></td>
|
15
|
+
</tr>
|
16
|
+
<tr>
|
17
|
+
<th><%= Spree.t(:type) %>:</th>
|
18
|
+
<td><%= payment.source.category_name %></td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<th><%= Spree.t(:created_by) %>:</th>
|
22
|
+
<td><%= payment.source.created_by_email %></td>
|
23
|
+
</tr>
|
24
|
+
<tr>
|
25
|
+
<th><%= Spree.t(:issued_on) %>:</th>
|
26
|
+
<td><%= pretty_time(payment.source.created_at) %></td>
|
27
|
+
</tr>
|
28
|
+
</table>
|
29
|
+
</fieldset>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
|
1
2
|
<div data-hook="admin_product_form_fields">
|
2
3
|
|
3
4
|
<div class="row">
|
@@ -60,19 +61,27 @@
|
|
60
61
|
<% end %>
|
61
62
|
</div>
|
62
63
|
|
64
|
+
<div data-hook="admin_product_form_discontinue_on">
|
65
|
+
<%= f.field_container :discontinue_on, class: ['form-group'] do %>
|
66
|
+
<%= f.label :discontinue_on, Spree.t(:discontinue_on) %>
|
67
|
+
<%= f.error_message_on :discontinue_on %>
|
68
|
+
<%= f.text_field :discontinue_on, value: datepicker_field_value(@product.discontinue_on), class: 'datepicker form-control' %>
|
69
|
+
<% end %>
|
70
|
+
</div>
|
71
|
+
|
63
72
|
<% if @product.has_variants? %>
|
64
73
|
<div data-hook="admin_product_form_multiple_variants" class="well">
|
65
74
|
<%= f.label :skus, Spree.t(:sku).pluralize %>
|
66
75
|
<div class="info marginb">
|
67
|
-
<%= Spree.t(:info_product_has_multiple_skus, count: @product.variants.
|
76
|
+
<%= Spree.t(:info_product_has_multiple_skus, count: @product.variants.size) %>
|
68
77
|
<ul class="text_list">
|
69
78
|
<% @product.variants.first(5).each do |variant| %>
|
70
79
|
<li><%= variant.sku %></li>
|
71
80
|
<% end %>
|
72
81
|
</ul>
|
73
|
-
<% if @product.variants.
|
82
|
+
<% if @product.variants.size > 5 %>
|
74
83
|
<em>
|
75
|
-
<%= Spree.t(:info_number_of_skus_not_shown, count: @product.variants.
|
84
|
+
<%= Spree.t(:info_number_of_skus_not_shown, count: @product.variants.size - 5) %>
|
76
85
|
</em>
|
77
86
|
<% end %>
|
78
87
|
</div>
|
@@ -2,6 +2,7 @@
|
|
2
2
|
<% if can?(:create, Spree::Product) %>
|
3
3
|
<%= button_link_to Spree.t(:new_product), new_object_url, { class: "btn-success", icon: 'add', id: 'admin_new_product' } %>
|
4
4
|
<% end %>
|
5
|
+
<%= back_to_list_button(Spree::Product.model_name.human, admin_products_path) %>
|
5
6
|
<% end %>
|
6
7
|
|
7
8
|
<%= render partial: 'spree/admin/shared/product_tabs', locals: {current: :details} %>
|
@@ -31,6 +31,13 @@
|
|
31
31
|
<%= Spree.t(:show_deleted) %>
|
32
32
|
</label>
|
33
33
|
</div>
|
34
|
+
|
35
|
+
<div class="field checkbox">
|
36
|
+
<label>
|
37
|
+
<%= f.check_box :discontinue_on_null, {:checked => params[:q][:discontinue_on_null] == '0'}, '0', '1' %>
|
38
|
+
<%= Spree.t(:show_discontinued ) %>
|
39
|
+
</label>
|
40
|
+
</div>
|
34
41
|
</div>
|
35
42
|
</div>
|
36
43
|
<div data-hook="admin_products_index_search_buttons" class="form-actions">
|
@@ -48,6 +55,8 @@
|
|
48
55
|
<thead>
|
49
56
|
<tr data-hook="admin_products_index_headers">
|
50
57
|
<th><%= Spree.t(:sku) %></th>
|
58
|
+
<th><%= Spree.t(:status) %></th>
|
59
|
+
|
51
60
|
<th colspan="2"><%= sort_link @search,:name, Spree.t(:name), { default_order: "desc" }, {title: 'admin_products_listing_name_title'} %></th>
|
52
61
|
<th class="text-center">
|
53
62
|
<%= sort_link @search, :master_default_price_amount, Spree.t(:master_price), {}, {title: 'admin_products_listing_price_title'} %>
|
@@ -59,6 +68,7 @@
|
|
59
68
|
<% @collection.each do |product| %>
|
60
69
|
<tr <%== "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows" class="<%= cycle('odd', 'even') %>">
|
61
70
|
<td class="sku"><%= product.sku rescue '' %></td>
|
71
|
+
<td class="status"><%= available_status(product) %> </td>
|
62
72
|
<td class="image"><%= mini_image product %></td>
|
63
73
|
<td><%= link_to product.try(:name), edit_admin_product_path(product) %></td>
|
64
74
|
<td class="text-center"><%= product.display_price.to_html rescue '' %></td>
|
@@ -4,6 +4,10 @@
|
|
4
4
|
<%= Spree.t(:new_product) %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
+
<% content_for :page_actions do %>
|
8
|
+
<%= back_to_list_button(Spree::Product.model_name.human, admin_products_path) %>
|
9
|
+
<% end %>
|
10
|
+
|
7
11
|
<%= form_for [:admin, @product], :html => { :multipart => true } do |f| %>
|
8
12
|
<fieldset data-hook="new_product">
|
9
13
|
<%= f.field_container :name, :class => ['form-group'] do %>
|
@@ -2,6 +2,10 @@
|
|
2
2
|
<%= Spree.t(:editing_resource, resource: Spree::PromotionCategory.model_name.human) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= back_to_list_button(Spree::PromotionCategory.model_name.human, admin_promotion_categories_path) %>
|
7
|
+
<% end %>
|
8
|
+
|
5
9
|
<%= form_for @promotion_category, :url => object_url, :method => :put do |f| %>
|
6
10
|
<fieldset>
|
7
11
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
@@ -2,6 +2,10 @@
|
|
2
2
|
<%= Spree.t(:new_promotion_category) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= back_to_list_button(Spree::PromotionCategory.model_name.human, admin_promotion_categories_path) %>
|
7
|
+
<% end %>
|
8
|
+
|
5
9
|
<%= form_for :promotion_category, :url => collection_url do |f| %>
|
6
10
|
<fieldset>
|
7
11
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
@@ -2,6 +2,10 @@
|
|
2
2
|
<%= Spree.t(:editing_resource, resource: Spree::Promotion.model_name.human) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= back_to_list_button(Spree::Promotion.model_name.human, admin_promotions_path) %>
|
7
|
+
<% end %>
|
8
|
+
|
5
9
|
<%= form_for @promotion, :url => object_url, :method => :put do |f| %>
|
6
10
|
<div class="row">
|
7
11
|
<div class="col-md-12">
|
@@ -2,6 +2,10 @@
|
|
2
2
|
<%= Spree.t(:new_promotion) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= back_to_list_button(Spree::Promotion.model_name.human, admin_promotions_path) %>
|
7
|
+
<% end %>
|
8
|
+
|
5
9
|
<%= form_for :promotion, :url => collection_url do |f| %>
|
6
10
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
7
11
|
<div class="text-center">
|
@@ -2,6 +2,10 @@
|
|
2
2
|
<%= Spree.t(:editing_resource, resource: Spree::Property.model_name.human) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= back_to_list_button(Spree::Property.model_name.human, admin_properties_path) %>
|
7
|
+
<% end %>
|
8
|
+
|
5
9
|
<%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @property } %>
|
6
10
|
|
7
11
|
<%= form_for [:admin, @property] do |f| %>
|
@@ -4,6 +4,10 @@
|
|
4
4
|
<%= Spree.t(:new_property) %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
+
<% content_for :page_actions do %>
|
8
|
+
<%= back_to_list_button(Spree::Property.model_name.human, admin_properties_path) %>
|
9
|
+
<% end %>
|
10
|
+
|
7
11
|
<%= form_for [:admin, @property] do |f| %>
|
8
12
|
<fieldset data-hook="new_property">
|
9
13
|
<%= render partial: 'form', locals: { f: f } %>
|
@@ -2,6 +2,10 @@
|
|
2
2
|
<%= Spree.t(:editing_resource, resource: Spree::Prototype.model_name.human) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<%= back_to_list_button(Spree::Prototype.model_name.human, admin_prototypes_path) %>
|
7
|
+
<% end %>
|
8
|
+
|
5
9
|
<%= render :partial => 'spree/admin/shared/error_messages', :locals => { :target => @prototype } %>
|
6
10
|
|
7
11
|
<%= form_for [:admin, @prototype] do |f| %>
|
@@ -4,6 +4,10 @@
|
|
4
4
|
<%= Spree.t(:new_prototype) %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
+
<% content_for :page_actions do %>
|
8
|
+
<%= back_to_list_button(Spree::Prototype.model_name.human, admin_prototypes_path) %>
|
9
|
+
<% end %>
|
10
|
+
|
7
11
|
<%= form_for [:admin, @prototype] do |f| %>
|
8
12
|
<fieldset data-hook="new_prototype">
|
9
13
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'spree/admin/shared/destroy' %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%=
|
6
|
+
<%= back_to_list_button(Spree.t(:report), admin_reports_path) %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<div class="well">
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render partial: 'spree/admin/shared/destroy' %>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= Spree.t(:customer_returns) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :table_filter do %>
|
6
|
+
<div data-hook="admin_return_authorisations_index_filters">
|
7
|
+
<%= search_form_for [:admin, @search], url: spree.admin_customer_returns_path do |f| %>
|
8
|
+
<div class="row">
|
9
|
+
<div class="col-md-12">
|
10
|
+
<div class="form-group">
|
11
|
+
<%= f.label :number_cont, Spree.t(:number) %>
|
12
|
+
<%= f.text_field :number_cont, class: "form-control js-quick-search-target" %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div data-hook="admin_return_authorisations_index_filters_buttons" class="form-actions">
|
17
|
+
<%= button Spree.t(:search), 'search' %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection, per_page_action: :customer_returns } %>
|
24
|
+
|
25
|
+
<% if @collection.any? %>
|
26
|
+
<table class="table">
|
27
|
+
<thead>
|
28
|
+
<tr data-hook="rate_header">
|
29
|
+
<th><%= Spree.t(:created_at) %></th>
|
30
|
+
<th><%= Spree.t(:number) %></th>
|
31
|
+
<th><%= Spree.t(:order) %></th>
|
32
|
+
<th><%= Spree.t(:reimbursement_status) %></th>
|
33
|
+
<th><%= Spree.t(:pre_tax_total) %></th>
|
34
|
+
<th></th>
|
35
|
+
</tr>
|
36
|
+
</thead>
|
37
|
+
<tbody>
|
38
|
+
<% @collection.each do |customer_return| %>
|
39
|
+
<tr id="<%= spree_dom_id customer_return %>" data-hook="customer_return_row">
|
40
|
+
<td><%= customer_return.created_at.to_date %></td>
|
41
|
+
<td><%= link_to customer_return.number, spree.edit_admin_order_customer_return_path(customer_return.order, customer_return) %></td>
|
42
|
+
<td><%= link_to customer_return.order.number, spree.edit_admin_order_path(customer_return.order) %></td>
|
43
|
+
<td>
|
44
|
+
<% if customer_return.fully_reimbursed? %>
|
45
|
+
<span class="label label-success"><%= Spree.t(:reimbursed) %></span>
|
46
|
+
<% else %>
|
47
|
+
<span class="label label-info"><%= Spree.t(:incomplete) %></span>
|
48
|
+
<% end %>
|
49
|
+
</td>
|
50
|
+
<td><%= customer_return.display_pre_tax_total.to_html %></td>
|
51
|
+
<td class="actions actions-1 text-right">
|
52
|
+
<%= link_to_edit_url spree.edit_admin_order_customer_return_path(customer_return.order, customer_return), no_text: true %>
|
53
|
+
</td>
|
54
|
+
</tr>
|
55
|
+
<% end %>
|
56
|
+
</tbody>
|
57
|
+
</table>
|
58
|
+
<% else %>
|
59
|
+
<div class="alert alert-info no-objects-found">
|
60
|
+
<%= Spree.t(:no_resource_found, resource: Spree::CustomerReturn.model_name.human(count: :many)) %>.
|
61
|
+
</div>
|
62
|
+
<% end %>
|
63
|
+
|
64
|
+
<%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection, per_page_action: :customer_returns } %>
|
@@ -0,0 +1,76 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= Spree.t(:return_authorizations) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :page_tabs do %>
|
6
|
+
<li class="<%= "active" if params[:q][:state_eq].blank? %>">
|
7
|
+
<%= link_to Spree.t(:all), spree.admin_return_authorizations_path %>
|
8
|
+
</li>
|
9
|
+
<li class="<%= "active" if params[:q][:state_eq] == "authorized" %>">
|
10
|
+
<%= link_to Spree.t(:authorized), params.merge({q: {state_eq: :authorized}}) %>
|
11
|
+
</li>
|
12
|
+
<li class="<%= "active" if params[:q][:state_eq] == "canceled" %>">
|
13
|
+
<%= link_to Spree.t(:canceled), params.merge({q: {state_eq: :canceled}}) %>
|
14
|
+
</li>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<% content_for :table_filter do %>
|
18
|
+
<div data-hook="admin_return_authorisations_index_filters">
|
19
|
+
<%= search_form_for [:admin, @search], url: spree.admin_return_authorizations_path do |f| %>
|
20
|
+
<div class="row">
|
21
|
+
<div class="col-md-6">
|
22
|
+
<div class="form-group">
|
23
|
+
<%= f.label :number_cont, Spree.t(:number) %>
|
24
|
+
<%= f.text_field :number_cont, class: "form-control js-quick-search-target" %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<div class="col-md-6">
|
28
|
+
<div class="form-group">
|
29
|
+
<%= label_tag :q_state_eq, Spree.t(:status) %>
|
30
|
+
<%= f.select :state_eq, Spree::ReturnAuthorization.state_machines[:state].states.collect {|s| [Spree.t("return_authorization_states.#{s.name}"), s.value]}, {include_blank: true}, class: 'select2' %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<div data-hook="admin_return_authorisations_index_filters_buttons" class="form-actions">
|
35
|
+
<%= button Spree.t(:search), 'search' %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
<%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection, per_page_action: :return_authorizations } %>
|
42
|
+
|
43
|
+
<% if @collection.any? %>
|
44
|
+
<table class="table">
|
45
|
+
<thead>
|
46
|
+
<tr data-hook="rate_header">
|
47
|
+
<th><%= Spree.t(:created_at) %></th>
|
48
|
+
<th><%= Spree.t(:number) %></th>
|
49
|
+
<th><%= Spree.t(:order) %></th>
|
50
|
+
<th><%= Spree.t(:state) %></th>
|
51
|
+
<th></th>
|
52
|
+
</tr>
|
53
|
+
</thead>
|
54
|
+
<tbody>
|
55
|
+
<% @collection.each do |return_authorization| %>
|
56
|
+
<tr id="<%= spree_dom_id return_authorization %>" data-hook="return_authorization_row">
|
57
|
+
<td><%= return_authorization.created_at.to_date %></td>
|
58
|
+
<td><%= link_to return_authorization.number, spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization) %></td>
|
59
|
+
<td><%= link_to return_authorization.order.number, spree.edit_admin_order_path(return_authorization.order) %></td>
|
60
|
+
<td>
|
61
|
+
<span class="label label-<%= return_authorization.state %>"><%= Spree.t("return_authorization_states.#{return_authorization.state}") %></span>
|
62
|
+
</td>
|
63
|
+
<td class="actions actions-1 text-right">
|
64
|
+
<%= link_to_edit return_authorization, url: spree.edit_admin_order_return_authorization_path(return_authorization.order, return_authorization), no_text: true %>
|
65
|
+
</td>
|
66
|
+
</tr>
|
67
|
+
<% end %>
|
68
|
+
</tbody>
|
69
|
+
</table>
|
70
|
+
<% else %>
|
71
|
+
<div class="alert alert-info no-objects-found">
|
72
|
+
<%= Spree.t(:no_resource_found, resource: Spree::ReturnAuthorization.model_name.human(count: :many)) %>.
|
73
|
+
</div>
|
74
|
+
<% end %>
|
75
|
+
|
76
|
+
<%= render partial: 'spree/admin/shared/index_table_options', locals: { collection: @collection, per_page_action: :return_authorizations } %>
|