spree_backend 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree/backend/payments/edit.js.coffee +4 -4
- data/app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee +4 -4
- data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +6 -4
- data/app/assets/javascripts/spree/backend/taxons.js.coffee +12 -6
- data/app/assets/stylesheets/spree/backend/components/_main.scss +2 -1
- data/app/controllers/spree/admin/customer_returns_controller.rb +1 -1
- data/app/controllers/spree/admin/orders_controller.rb +1 -1
- data/app/controllers/spree/admin/products_controller.rb +6 -3
- data/app/controllers/spree/admin/search_controller.rb +3 -1
- data/app/controllers/spree/admin/taxonomies_controller.rb +0 -6
- data/app/helpers/spree/admin/base_helper.rb +2 -2
- data/app/views/spree/admin/adjustments/edit.html.erb +1 -1
- data/app/views/spree/admin/adjustments/index.html.erb +3 -3
- data/app/views/spree/admin/adjustments/new.html.erb +5 -5
- data/app/views/spree/admin/customer_returns/edit.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/index.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/new.html.erb +4 -16
- data/app/views/spree/admin/images/edit.html.erb +5 -5
- data/app/views/spree/admin/images/index.html.erb +1 -1
- data/app/views/spree/admin/log_entries/index.html.erb +2 -2
- data/app/views/spree/admin/option_types/edit.html.erb +2 -2
- data/app/views/spree/admin/orders/_add_line_item.html.erb +1 -1
- data/app/views/spree/admin/orders/_add_product.html.erb +1 -1
- data/app/views/spree/admin/orders/cart.html.erb +5 -5
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/edit.html.erb +1 -1
- data/app/views/spree/admin/payments/credit.html.erb +1 -1
- data/app/views/spree/admin/payments/index.html.erb +1 -1
- data/app/views/spree/admin/payments/new.html.erb +4 -4
- data/app/views/spree/admin/payments/show.html.erb +6 -6
- data/app/views/spree/admin/product_properties/index.html.erb +6 -6
- data/app/views/spree/admin/products/_add_stock_form.html.erb +0 -2
- data/app/views/spree/admin/products/_form.html.erb +30 -21
- data/app/views/spree/admin/products/edit.html.erb +6 -6
- data/app/views/spree/admin/products/stock.html.erb +2 -2
- data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +1 -1
- 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/reimbursements/edit.html.erb +3 -3
- data/app/views/spree/admin/reimbursements/index.html.erb +2 -2
- data/app/views/spree/admin/reimbursements/show.html.erb +2 -2
- data/app/views/spree/admin/return_authorizations/_form.html.erb +2 -2
- data/app/views/spree/admin/return_authorizations/edit.html.erb +5 -5
- data/app/views/spree/admin/return_authorizations/index.html.erb +4 -4
- data/app/views/spree/admin/return_authorizations/new.html.erb +4 -4
- data/app/views/spree/admin/shared/_order_tabs.html.erb +9 -9
- data/app/views/spree/admin/shared/_product_tabs.html.erb +5 -5
- data/app/views/spree/admin/shared/_table_filter.html.erb +1 -1
- data/app/views/spree/admin/shared/_translations.html.erb +2 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +17 -13
- data/app/views/spree/admin/state_changes/index.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/edit.erb +8 -4
- data/app/views/spree/admin/taxons/edit.html.erb +2 -2
- data/app/views/spree/admin/users/addresses.html.erb +5 -5
- data/app/views/spree/admin/users/edit.html.erb +14 -14
- data/app/views/spree/admin/users/items.html.erb +7 -7
- data/app/views/spree/admin/users/orders.html.erb +6 -6
- data/app/views/spree/admin/variants/_autocomplete.js.erb +5 -7
- data/app/views/spree/admin/variants/edit.html.erb +4 -4
- data/app/views/spree/admin/variants/index.html.erb +5 -5
- data/config/routes.rb +1 -4
- data/lib/spree/backend/engine.rb +1 -1
- data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +216 -0
- data/vendor/assets/{javascripts/jquery.jstree/themes/apple → stylesheets/jquery.jstree/themes/spree}/throbber.gif +0 -0
- metadata +8 -13
- data/app/assets/javascripts/spree/backend/select_payments.js.coffee +0 -7
- data/app/views/spree/admin/shared/_report_criteria.html.erb +0 -17
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/bg.jpg +0 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/d.png +0 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/dot_for_ie.gif +0 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/style.scss +0 -61
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<% end %>
|
|
8
8
|
<% end %>
|
|
9
9
|
|
|
10
|
-
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current:
|
|
10
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :shipments } %>
|
|
11
11
|
|
|
12
12
|
<% content_for :page_title do %>
|
|
13
13
|
/ <%= plural_resource_name(Spree::Shipment) %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current:
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :payments } %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_actions do %>
|
|
4
4
|
<% if @order.outstanding_balance? && can?(:create, Spree::Payment) %>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<%= render :
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :payments } %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_title do %>
|
|
4
4
|
/ <%= Spree.t(:new_payment) %>
|
|
5
5
|
<% end %>
|
|
6
6
|
|
|
7
7
|
<% if @payment_methods.any? %>
|
|
8
|
-
<%= render :
|
|
8
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @payment } %>
|
|
9
9
|
|
|
10
|
-
<%= form_for @payment, :
|
|
10
|
+
<%= form_for @payment, url: admin_order_payments_path(@order) do |f| %>
|
|
11
11
|
<fieldset>
|
|
12
|
-
<%= render :
|
|
12
|
+
<%= render partial: 'form', locals: { f: f } %>
|
|
13
13
|
|
|
14
14
|
<div class="form-actions" data-hook="buttons">
|
|
15
15
|
<%= button @order.cart? ? Spree.t('actions.continue') : Spree.t('actions.update'), @order.cart? ? 'arrow-right' : 'save' %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%= render :
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :payments } %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_title do %>
|
|
4
4
|
/
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
<%= payment_method_name(@payment) %>
|
|
8
8
|
/
|
|
9
9
|
<span class="state <%= @payment.state %>">
|
|
10
|
-
<%= Spree.t(@payment.state, :
|
|
10
|
+
<%= Spree.t(@payment.state, scope: :payment_states, default: @payment.state.capitalize) %>
|
|
11
11
|
</span>
|
|
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), :
|
|
15
|
+
<%= button_link_to Spree.t(:logs), spree.admin_order_payment_log_entries_url(@order, @payment), icon: 'file' %>
|
|
16
16
|
<% end %>
|
|
17
17
|
|
|
18
|
-
<%= render :
|
|
19
|
-
:
|
|
20
|
-
:
|
|
18
|
+
<%= render partial: "spree/admin/payments/source_views/#{@payment.payment_method.method_type}",
|
|
19
|
+
locals: {
|
|
20
|
+
payment: @payment.source.is_a?(Spree::Payment) ? @payment.source : @payment
|
|
21
21
|
}
|
|
22
22
|
%>
|
|
23
23
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<%= render 'spree/admin/shared/product_tabs', :
|
|
2
|
-
<%= render 'spree/admin/shared/error_messages', :
|
|
1
|
+
<%= render 'spree/admin/shared/product_tabs', current: :properties %>
|
|
2
|
+
<%= render 'spree/admin/shared/error_messages', target: @product %>
|
|
3
3
|
|
|
4
4
|
<% content_for :page_actions do %>
|
|
5
|
-
<%= button_link_to(Spree.t(:add_product_properties), "javascript:;", { :
|
|
6
|
-
<span class="js-new-ptype-link"><%= button_link_to Spree.t(:select_from_prototype), available_admin_prototypes_url, { :
|
|
5
|
+
<%= button_link_to(Spree.t(:add_product_properties), "javascript:;", { icon: 'add', :'data-target' => "tbody#product_properties", class: 'btn-success spree_add_fields' }) %>
|
|
6
|
+
<span class="js-new-ptype-link"><%= button_link_to Spree.t(:select_from_prototype), available_admin_prototypes_url, { icon: 'properties', remote: true, 'data-update' => 'prototypes', class: 'btn-default' } %></span>
|
|
7
7
|
<% end if can? :create, Spree::ProductProperty %>
|
|
8
8
|
|
|
9
|
-
<%= form_for @product, :
|
|
9
|
+
<%= form_for @product, url: spree.admin_product_url(@product), method: :put do |f| %>
|
|
10
10
|
<fieldset>
|
|
11
11
|
<div id="prototypes" data-hook></div>
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</thead>
|
|
21
21
|
<tbody id="product_properties" data-hook>
|
|
22
22
|
<%= f.fields_for :product_properties do |pp_form| %>
|
|
23
|
-
<%= render 'product_property_fields', :
|
|
23
|
+
<%= render 'product_property_fields', f: pp_form %>
|
|
24
24
|
<% end %>
|
|
25
25
|
</tbody>
|
|
26
26
|
</table>
|
|
@@ -37,8 +37,6 @@
|
|
|
37
37
|
|
|
38
38
|
<div class="form-actions text-center" data-hook="buttons">
|
|
39
39
|
<%= button Spree.t(:add_stock), 'plus' %>
|
|
40
|
-
<span class="or"><%= Spree.t(:or) %></span>
|
|
41
|
-
<%= button_link_to Spree.t('actions.cancel'), collection_url, :icon => 'delete' %>
|
|
42
40
|
</div>
|
|
43
41
|
<% end %>
|
|
44
42
|
</div>
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
</div>
|
|
79
79
|
<div class="info-actions">
|
|
80
80
|
<% if can?(:admin, Spree::Variant) %>
|
|
81
|
-
<%= link_to_with_icon 'variants',
|
|
81
|
+
<%= link_to_with_icon 'variants', Spree.t(:manage_variants), spree.admin_product_variants_url(@product), class: "btn btn-default" %>
|
|
82
82
|
<% end %>
|
|
83
83
|
</div>
|
|
84
84
|
</div>
|
|
@@ -90,6 +90,14 @@
|
|
|
90
90
|
<% end %>
|
|
91
91
|
</div>
|
|
92
92
|
|
|
93
|
+
<div data-hook="admin_product_form_promotionable">
|
|
94
|
+
<%= f.field_container :promotionable, class: ['form-group'] do %>
|
|
95
|
+
<%= f.label :promotionable %>
|
|
96
|
+
<%= f.error_message_on :promotionable %>
|
|
97
|
+
<%= f.check_box :promotionable, class: 'form-control' %>
|
|
98
|
+
<% end %>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
93
101
|
<div id="shipping_specs" class="row">
|
|
94
102
|
<div class="col-md-6">
|
|
95
103
|
<div id="shipping_specs_weight_field" data-hook="admin_product_form_weight" class="form-group">
|
|
@@ -179,28 +187,29 @@
|
|
|
179
187
|
</div>
|
|
180
188
|
|
|
181
189
|
|
|
182
|
-
<div data-hook="admin_product_form_meta">
|
|
190
|
+
<div data-hook="admin_product_form_meta">
|
|
183
191
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
192
|
+
<div data-hook="admin_product_form_meta_keywords">
|
|
193
|
+
<%= f.field_container :meta_keywords, class: ['form-group'] do %>
|
|
194
|
+
<%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
|
|
195
|
+
<%= f.text_field :meta_keywords, class: 'form-control' %>
|
|
196
|
+
<% end %>
|
|
197
|
+
</div>
|
|
190
198
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
199
|
+
<div data-hook="admin_product_form_meta_description">
|
|
200
|
+
<%= f.field_container :meta_description, class: ['form-group'] do %>
|
|
201
|
+
<%= f.label :meta_description, Spree.t(:meta_description) %>
|
|
202
|
+
<%= f.text_field :meta_description, class: 'form-control' %>
|
|
203
|
+
<% end %>
|
|
204
|
+
</div>
|
|
197
205
|
|
|
198
|
-
|
|
206
|
+
<div data-hook="admin_product_form_additional_fields"></div>
|
|
199
207
|
|
|
200
|
-
</div>
|
|
208
|
+
</div>
|
|
201
209
|
|
|
202
|
-
<% unless Rails.env.test? %>
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
<% end %>
|
|
210
|
+
<% unless Rails.env.test? %>
|
|
211
|
+
<script>
|
|
212
|
+
$('.select2-container').css();
|
|
213
|
+
</script>
|
|
214
|
+
<% end %>
|
|
215
|
+
</div>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<% content_for :page_actions do %>
|
|
2
2
|
<% if can?(:create, Spree::Product) %>
|
|
3
|
-
<%= button_link_to Spree.t(:new_product), new_object_url, { :
|
|
3
|
+
<%= button_link_to Spree.t(:new_product), new_object_url, { class: "btn-success", icon: 'add', id: 'admin_new_product' } %>
|
|
4
4
|
<% end %>
|
|
5
5
|
<% end %>
|
|
6
6
|
|
|
7
|
-
<%= render :
|
|
8
|
-
<%= render :
|
|
7
|
+
<%= render partial: 'spree/admin/shared/product_tabs', locals: {current: :details} %>
|
|
8
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @product } %>
|
|
9
9
|
|
|
10
|
-
<%= form_for [:admin, @product], :
|
|
10
|
+
<%= form_for [:admin, @product], method: :put, html: { multipart: true } do |f| %>
|
|
11
11
|
<fieldset>
|
|
12
|
-
<%= render :
|
|
13
|
-
<%= render :
|
|
12
|
+
<%= render partial: 'form', locals: { f: f } %>
|
|
13
|
+
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
|
14
14
|
</fieldset>
|
|
15
15
|
<% end %>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<%= render :
|
|
2
|
-
<%= render :
|
|
1
|
+
<%= render partial: 'spree/admin/shared/product_tabs', locals: {current: :stock} %>
|
|
2
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @product } %>
|
|
3
3
|
|
|
4
4
|
<% if can? :create, Spree::StockMovement %>
|
|
5
5
|
<div id="add_stock_form" class="panel panel-default">
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<% line_item_prefix = "#{param_prefix}[promotion_action_line_items_attributes][#{index}]" %>
|
|
14
14
|
<div class="form-group">
|
|
15
15
|
<%= label_tag "#{line_item_prefix}_variant_id", Spree.t(:variant) %>
|
|
16
|
-
<%= hidden_field_tag "#{line_item_prefix}[variant_id]", line_item.variant_id, class: "variant_autocomplete" %>
|
|
16
|
+
<%= hidden_field_tag "#{line_item_prefix}[variant_id]", line_item.variant_id, class: "variant_autocomplete fullwidth-input" %>
|
|
17
17
|
</div>
|
|
18
18
|
<div class="form-group no-marginb">
|
|
19
19
|
<%= label_tag "#{line_item_prefix}_quantity", Spree.t(:quantity) %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current:
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :payments } %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_title do %>
|
|
4
4
|
/ <%= link_to "#{Spree.t(:payment)} #{@refund.payment.id}", admin_order_payment_path(@refund.payment.order, @refund.payment) %>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<div class="form-actions" data-hook="buttons">
|
|
22
22
|
<%= button Spree.t('actions.save'), 'save' %>
|
|
23
23
|
<span class="or"><%= Spree.t(:or) %></span>
|
|
24
|
-
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_payments_url(@refund.payment.order), :
|
|
24
|
+
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_payments_url(@refund.payment.order), icon: "delete" %>
|
|
25
25
|
</div>
|
|
26
26
|
</fieldset>
|
|
27
27
|
<% end %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%= render partial: 'spree/admin/shared/order_tabs', locals: {current:
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: {current: :payments} %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_title do %>
|
|
4
4
|
/ <%= link_to "#{Spree.t(:payment)} #{@refund.payment.id}", admin_order_payment_path(@refund.payment.order, @refund.payment) %>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<div class="form-actions" data-hook="buttons">
|
|
30
30
|
<%= button Spree.t(:refund), 'save' %>
|
|
31
31
|
<span class="or"><%= Spree.t(:or) %></span>
|
|
32
|
-
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_payments_url(@refund.payment.order), :
|
|
32
|
+
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_payments_url(@refund.payment.order), icon: "delete" %>
|
|
33
33
|
</div>
|
|
34
34
|
</fieldset>
|
|
35
35
|
<% end %>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<%= render :
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :customer_returns } %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_title do %>
|
|
4
4
|
/ <%= Spree.t(:editing_resource, resource: Spree::Reimbursement.model_name.human) %> #<%= @reimbursement.number %>
|
|
5
5
|
<% end %>
|
|
6
6
|
|
|
7
|
-
<%= render :
|
|
7
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @reimbursement } %>
|
|
8
8
|
|
|
9
9
|
<%= form_for [:admin, @order, @reimbursement] do |f| %>
|
|
10
10
|
<fieldset class='no-border-bottom'>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
<%= Spree.t(:reimburse) %>
|
|
97
97
|
<% end %>
|
|
98
98
|
<span class="or"><%= Spree.t(:or) %></span>
|
|
99
|
-
<%= button_link_to Spree.t('actions.cancel'), url_for([:admin, @order, @reimbursement.customer_return]), :
|
|
99
|
+
<%= button_link_to Spree.t('actions.cancel'), url_for([:admin, @order, @reimbursement.customer_return]), icon: 'remove-sign' %>
|
|
100
100
|
<% end %>
|
|
101
101
|
</div>
|
|
102
102
|
</fieldset>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<%= render :
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :reimbursements } %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_title do %>
|
|
4
4
|
/ <%= Spree.t(:edit_reimbursement) %>
|
|
5
5
|
<% end %>
|
|
6
6
|
|
|
7
|
-
<%= render :
|
|
7
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @customer_return } %>
|
|
8
8
|
|
|
9
9
|
<table class="table">
|
|
10
10
|
<thead data-hook="customer_return_header">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<%= render :
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :customer_returns } %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_title do %>
|
|
4
4
|
/ <%= Spree::Reimbursement.model_name.human %> #<%= @reimbursement.number %>
|
|
5
5
|
<% end %>
|
|
6
6
|
|
|
7
|
-
<%= render :
|
|
7
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @reimbursement } %>
|
|
8
8
|
|
|
9
9
|
<fieldset class='no-border-bottom'>
|
|
10
10
|
<legend><%= Spree.t(:items_reimbursed) %></legend>
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
<td>
|
|
53
53
|
<% if editable %>
|
|
54
54
|
<% if return_item.exchange_processed? %>
|
|
55
|
-
<%= return_item.exchange_variant.
|
|
55
|
+
<%= return_item.exchange_variant.exchange_name %>
|
|
56
56
|
<% else %>
|
|
57
|
-
<%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants, :id, :
|
|
57
|
+
<%= item_fields.collection_select :exchange_variant_id, return_item.eligible_exchange_variants, :id, :exchange_name, { include_blank: true }, { class: "select2 return-item-exchange-selection" } %>
|
|
58
58
|
<% end %>
|
|
59
59
|
<% end %>
|
|
60
60
|
</td>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
<% content_for :page_actions do %>
|
|
2
2
|
<% if @return_authorization.can_cancel? %>
|
|
3
|
-
<%= button_link_to Spree.t('actions.cancel'), fire_admin_order_return_authorization_url(@order, @return_authorization, e: 'cancel'), method: :put, data: { confirm: Spree.t(:are_you_sure) }, :
|
|
3
|
+
<%= button_link_to Spree.t('actions.cancel'), fire_admin_order_return_authorization_url(@order, @return_authorization, e: 'cancel'), method: :put, data: { confirm: Spree.t(:are_you_sure) }, icon: "delete" %>
|
|
4
4
|
<% end %>
|
|
5
5
|
<%= button_link_to Spree.t(:back), spree.admin_order_return_authorizations_url(@order), icon: 'arrow-left' %>
|
|
6
6
|
<% end %>
|
|
7
7
|
|
|
8
|
-
<%= render :
|
|
8
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :return_authorizations } %>
|
|
9
9
|
|
|
10
10
|
<% content_for :page_title do %>
|
|
11
11
|
/ <%= Spree.t(:return_authorization) %> <%= @return_authorization.number %> (<%= Spree.t(@return_authorization.state.downcase) %>)
|
|
12
12
|
<% end %>
|
|
13
13
|
|
|
14
|
-
<%= render :
|
|
14
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @return_authorization } %>
|
|
15
15
|
|
|
16
16
|
<%= form_for [:admin, @order, @return_authorization] do |f| %>
|
|
17
17
|
<fieldset>
|
|
18
|
-
<%= render :
|
|
18
|
+
<%= render partial: 'form', locals: { f: f } %>
|
|
19
19
|
|
|
20
20
|
<div class="form-actions" data-hook="buttons">
|
|
21
21
|
<%= button Spree.t('actions.update'), 'repeat' %>
|
|
22
22
|
<span class="or"><%= Spree.t(:or) %></span>
|
|
23
|
-
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_return_authorizations_url(@order), :
|
|
23
|
+
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_return_authorizations_url(@order), icon: 'delete' %>
|
|
24
24
|
</div>
|
|
25
25
|
</fieldset>
|
|
26
26
|
<% end %>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<%= render :
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :return_authorizations } %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_actions do %>
|
|
4
4
|
<% if @order.shipments.any?(&:shipped?) && can?(:create, Spree::ReturnAuthorization) %>
|
|
5
|
-
<%= button_link_to Spree.t(:new_return_authorization), new_admin_order_return_authorization_url(@order), :
|
|
5
|
+
<%= button_link_to Spree.t(:new_return_authorization), new_admin_order_return_authorization_url(@order), class: "btn-success", icon: 'add' %>
|
|
6
6
|
<% end %>
|
|
7
7
|
<% end %>
|
|
8
8
|
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
<td><%= return_authorization.display_pre_tax_total.to_html %></td>
|
|
30
30
|
<td><%= pretty_time(return_authorization.created_at) %></td>
|
|
31
31
|
<td class="actions actions-2">
|
|
32
|
-
<%= link_to_edit(return_authorization, :
|
|
32
|
+
<%= link_to_edit(return_authorization, no_text: true, class: 'edit') if can?(:edit, return_authorization) %>
|
|
33
33
|
<% if can?(:delete, return_authorization) && !return_authorization.customer_returned_items? %>
|
|
34
|
-
<%= link_to_delete return_authorization, :
|
|
34
|
+
<%= link_to_delete return_authorization, no_text: true %>
|
|
35
35
|
<% end %>
|
|
36
36
|
</td>
|
|
37
37
|
</tr>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<%= render :
|
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :return_authorizations } %>
|
|
2
2
|
|
|
3
3
|
<% content_for :page_title do %>
|
|
4
4
|
/ <%= Spree.t(:new_return_authorization) %>
|
|
5
5
|
<% end %>
|
|
6
6
|
|
|
7
|
-
<%= render :
|
|
7
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @return_authorization } %>
|
|
8
8
|
<%= form_for [:admin, @order, @return_authorization] do |f| %>
|
|
9
9
|
<fieldset>
|
|
10
|
-
<%= render :
|
|
10
|
+
<%= render partial: 'form', locals: { f: f } %>
|
|
11
11
|
|
|
12
12
|
<div class="form-actions" data-hook="buttons">
|
|
13
13
|
<%= button Spree.t(:create), 'save' %>
|
|
14
14
|
<span class="or"><%= Spree.t(:or) %></span>
|
|
15
|
-
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_return_authorizations_url(@order), :
|
|
15
|
+
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_return_authorizations_url(@order), icon: 'delete' %>
|
|
16
16
|
</div>
|
|
17
17
|
</fieldset>
|
|
18
18
|
<% end %>
|
|
@@ -6,53 +6,53 @@
|
|
|
6
6
|
<% content_for :sidebar do %>
|
|
7
7
|
<ul class="nav nav-pills nav-stacked" data-hook="admin_order_tabs">
|
|
8
8
|
<% if ((can? :update, @order) && (@order.shipments.count == 0 || @order.shipments.shipped.count == 0)) %>
|
|
9
|
-
<li<%== ' class="active"' if current ==
|
|
9
|
+
<li<%== ' class="active"' if current == :cart %> data-hook='admin_order_tabs_cart_details'>
|
|
10
10
|
<%= link_to_with_icon 'edit', Spree.t(:cart), cart_admin_order_url(@order) %>
|
|
11
11
|
</li>
|
|
12
12
|
<% end %>
|
|
13
13
|
|
|
14
14
|
<% if can?(:update, @order) && @order.checkout_steps.include?("address") %>
|
|
15
|
-
<li<%== ' class="active"' if current ==
|
|
15
|
+
<li<%== ' class="active"' if current == :customer_details %> data-hook='admin_order_tabs_customer_details'>
|
|
16
16
|
<%= link_to_with_icon 'user', Spree.t(:customer), spree.admin_order_customer_url(@order) %>
|
|
17
17
|
</li>
|
|
18
18
|
<% end %>
|
|
19
19
|
|
|
20
20
|
<% if can? :update, @order %>
|
|
21
|
-
<li<%== ' class="active"' if current ==
|
|
21
|
+
<li<%== ' class="active"' if current == :shipments %> data-hook='admin_order_tabs_shipment_details'>
|
|
22
22
|
<%= link_to_with_icon 'road', Spree.t(:shipments), edit_admin_order_url(@order) %>
|
|
23
23
|
</li>
|
|
24
24
|
<% end %>
|
|
25
25
|
|
|
26
26
|
<% if can? :index, Spree::Adjustment %>
|
|
27
|
-
<li<%== ' class="active"' if current ==
|
|
27
|
+
<li<%== ' class="active"' if current == :adjustments %> data-hook='admin_order_tabs_adjustments'>
|
|
28
28
|
<%= link_to_with_icon 'wrench', Spree.t(:adjustments), spree.admin_order_adjustments_url(@order) %>
|
|
29
29
|
</li>
|
|
30
30
|
<% end %>
|
|
31
31
|
|
|
32
32
|
<% if can?(:index, Spree::Payment) %>
|
|
33
|
-
<li<%== ' class="active"' if current ==
|
|
33
|
+
<li<%== ' class="active"' if current == :payments %> data-hook='admin_order_tabs_payments'>
|
|
34
34
|
<%= link_to_with_icon 'credit-card', Spree.t(:payments), spree.admin_order_payments_url(@order) %>
|
|
35
35
|
</li>
|
|
36
36
|
<% end %>
|
|
37
37
|
|
|
38
38
|
<% if can? :index, Spree::ReturnAuthorization %>
|
|
39
39
|
<% if @order.completed? %>
|
|
40
|
-
<li<%== ' class="active"' if current ==
|
|
41
|
-
<%= link_to_with_icon 'transfer', Spree.t(:
|
|
40
|
+
<li<%== ' class="active"' if current == :return_authorizations %> data-hook='admin_order_tabs_return_authorizations'>
|
|
41
|
+
<%= link_to_with_icon 'transfer', Spree.t(:return_authorizations), spree.admin_order_return_authorizations_url(@order) %>
|
|
42
42
|
</li>
|
|
43
43
|
<% end %>
|
|
44
44
|
<% end %>
|
|
45
45
|
|
|
46
46
|
<% if can? :index, Spree::CustomerReturn %>
|
|
47
47
|
<% if @order.completed? %>
|
|
48
|
-
<li<%== ' class="active"' if current ==
|
|
48
|
+
<li<%== ' class="active"' if current == :customer_returns %>>
|
|
49
49
|
<%= link_to_with_icon 'transfer', Spree.t(:customer_returns), spree.admin_order_customer_returns_url(@order) %>
|
|
50
50
|
</li>
|
|
51
51
|
<% end %>
|
|
52
52
|
<% end %>
|
|
53
53
|
|
|
54
54
|
<% if can? :update, @order %>
|
|
55
|
-
<li<%== ' class="active"' if current ==
|
|
55
|
+
<li<%== ' class="active"' if current == :state_changes %> data-hook='admin_order_tabs_state_changes'>
|
|
56
56
|
<%= link_to_with_icon 'refresh', Spree::StateChange.human_attribute_name(:state_changes), spree.admin_order_state_changes_url(@order) %>
|
|
57
57
|
</li>
|
|
58
58
|
<% end %>
|