spree_backend 3.0.1 → 3.0.2
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/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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f7a3c77c32e65dbb87985040ca75f40d0e0f327
|
4
|
+
data.tar.gz: 75b2abe1f25585718df75ee767103549197ad6fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43ec69aa6377070470ea0fd2ae5d1cd69e909d517a570f4787a2d1b774d49bfba5ea4909420186f871a22176067c8460a7731ea1f3f35dac26a2fbd049f37833
|
7
|
+
data.tar.gz: 704abf9631c214c94f4c1ddcf55ab9718dc0a50096e43e76d25882a4c8e8cd2f7f95377c8b09f4f510a1a5cb701e681b1e2298aa70b1f933154ec90dadc9114b
|
@@ -7,9 +7,9 @@ jQuery ($) ->
|
|
7
7
|
@json = $.getJSON @url.toString(), (data) =>
|
8
8
|
@data = data
|
9
9
|
|
10
|
-
|
10
|
+
if_editable: (callback) ->
|
11
11
|
@json.done (data) ->
|
12
|
-
callback() if data.state
|
12
|
+
callback() if data.state in ['checkout', 'pending']
|
13
13
|
|
14
14
|
update: (attributes, success) ->
|
15
15
|
jqXHR = $.ajax
|
@@ -138,8 +138,8 @@ jQuery ($) ->
|
|
138
138
|
separator = Spree.translations.currency_separator
|
139
139
|
amount.replace(///[^\d#{separator}]///g, '')
|
140
140
|
|
141
|
-
# Attach ShowPaymentView to each
|
141
|
+
# Attach ShowPaymentView to each editable payment in the table
|
142
142
|
$('.admin tr[data-hook=payments_row]').each ->
|
143
143
|
$el = $(@)
|
144
144
|
payment = new Payment($el.prop('id').match(/\d+$/))
|
145
|
-
payment.
|
145
|
+
payment.if_editable -> new ShowPaymentView($el, payment)
|
@@ -8,15 +8,15 @@ root.taxon_tree_menu = (obj, context) ->
|
|
8
8
|
edit_url.setPath(edit_url.path() + '/' + obj.attr("id") + "/edit");
|
9
9
|
|
10
10
|
create:
|
11
|
-
label: Spree.translations.add,
|
11
|
+
label: "<span class='icon icon-plus'></span> " + Spree.translations.add,
|
12
12
|
action: (obj) -> context.create(obj)
|
13
13
|
rename:
|
14
|
-
label: Spree.translations.rename,
|
14
|
+
label: "<span class='icon icon-pencil'></span> " + Spree.translations.rename,
|
15
15
|
action: (obj) -> context.rename(obj)
|
16
16
|
remove:
|
17
|
-
label: Spree.translations.remove,
|
17
|
+
label: "<span class='icon icon-trash'></span> " + Spree.translations.remove,
|
18
18
|
action: (obj) -> context.remove(obj)
|
19
19
|
edit:
|
20
20
|
separator_before: true,
|
21
|
-
label: Spree.translations.edit,
|
21
|
+
label: "<span class='icon icon-cog'></span> " + Spree.translations.edit,
|
22
22
|
action: (obj) -> window.location = edit_url.toString()
|
@@ -86,6 +86,8 @@ handle_delete = (e, data) ->
|
|
86
86
|
|
87
87
|
root = exports ? this
|
88
88
|
root.setup_taxonomy_tree = (taxonomy_id) ->
|
89
|
+
$taxonomy_tree = $("#taxonomy_tree")
|
90
|
+
|
89
91
|
if taxonomy_id != undefined
|
90
92
|
# this is defined within admin/taxonomies/edit
|
91
93
|
root.base_url = Spree.url(Spree.routes.taxonomy_taxons_path)
|
@@ -104,7 +106,7 @@ root.setup_taxonomy_tree = (taxonomy_id) ->
|
|
104
106
|
url: (e) ->
|
105
107
|
Spree.url(base_url.path() + '/' + e.prop('id') + '/jstree' + '?token=' + Spree.api_key).toString()
|
106
108
|
themes:
|
107
|
-
theme: "
|
109
|
+
theme: "spree",
|
108
110
|
url: Spree.url(Spree.routes.jstree_theme_path)
|
109
111
|
strings:
|
110
112
|
new_node: new_taxon,
|
@@ -130,7 +132,7 @@ root.setup_taxonomy_tree = (taxonomy_id) ->
|
|
130
132
|
taxon_tree_menu(obj, this)
|
131
133
|
plugins: ["themes", "json_data", "dnd", "crrm", "contextmenu"]
|
132
134
|
|
133
|
-
$
|
135
|
+
$taxonomy_tree.jstree(conf)
|
134
136
|
.bind("move_node.jstree", handle_move)
|
135
137
|
.bind("remove.jstree", handle_delete)
|
136
138
|
.bind("create.jstree", handle_create)
|
@@ -138,8 +140,8 @@ root.setup_taxonomy_tree = (taxonomy_id) ->
|
|
138
140
|
.bind "loaded.jstree", ->
|
139
141
|
$(this).jstree("core").toggle_node($('.jstree-icon').first())
|
140
142
|
|
141
|
-
$
|
142
|
-
$
|
143
|
+
$taxonomy_tree.on "dblclick", "a", (e) ->
|
144
|
+
$taxonomy_tree.jstree("rename", this)
|
143
145
|
|
144
146
|
# surpress form submit on enter/return
|
145
147
|
$(document).keypress (e) ->
|
@@ -55,14 +55,20 @@ $(document).ready ->
|
|
55
55
|
el.append(productTemplate({ product: product }))
|
56
56
|
|
57
57
|
$('#taxon_products').on "click", ".js-delete-product", (e) ->
|
58
|
-
current_taxon_id = $("#taxon_id").val()
|
58
|
+
current_taxon_id = $("#taxon_id").val()
|
59
59
|
product = $(this).parents(".product")
|
60
|
-
product_id = product.data("product-id")
|
61
|
-
product_taxons = String(product.data("taxons")).split(',').map(Number)
|
62
|
-
product_index = product_taxons.indexOf(parseFloat(current_taxon_id))
|
63
|
-
product_taxons.splice(product_index, 1)
|
60
|
+
product_id = product.data("product-id")
|
61
|
+
product_taxons = String(product.data("taxons")).split(',').map(Number)
|
62
|
+
product_index = product_taxons.indexOf(parseFloat(current_taxon_id))
|
63
|
+
product_taxons.splice(product_index, 1)
|
64
|
+
taxon_ids = if product_taxons.length > 0 then product_taxons else [""]
|
65
|
+
|
64
66
|
$.ajax
|
65
|
-
url: Spree.routes.products_api + "/" + product_id
|
67
|
+
url: Spree.routes.products_api + "/" + product_id
|
68
|
+
data:
|
69
|
+
product:
|
70
|
+
taxon_ids: taxon_ids
|
71
|
+
token: Spree.api_key
|
66
72
|
type: "PUT",
|
67
73
|
success: (data) ->
|
68
74
|
product.fadeOut 400, (e) ->
|
@@ -44,7 +44,7 @@ module Spree
|
|
44
44
|
|
45
45
|
def load_form_data
|
46
46
|
return_items = @order.inventory_units.map(&:current_or_new_return_item).reject(&:customer_return_id)
|
47
|
-
@rma_return_items
|
47
|
+
@rma_return_items = return_items.select(&:return_authorization_id)
|
48
48
|
end
|
49
49
|
|
50
50
|
def permitted_resource_params
|
@@ -100,17 +100,20 @@ module Spree
|
|
100
100
|
|
101
101
|
params[:q][:s] ||= "name asc"
|
102
102
|
@collection = super
|
103
|
-
|
103
|
+
# Don't delete params[:q][:deleted_at_null] here because it is used in view to check the
|
104
|
+
# checkbox for 'q[deleted_at_null]'. This also messed with pagination when deleted_at_null is checked.
|
105
|
+
if params[:q][:deleted_at_null] == '0'
|
104
106
|
@collection = @collection.with_deleted
|
105
107
|
end
|
106
108
|
# @search needs to be defined as this is passed to search_form_for
|
107
|
-
|
109
|
+
# Temporarily remove params[:q][:deleted_at_null] from params[:q] to ransack products.
|
110
|
+
# This is to include all products and not just deleted products.
|
111
|
+
@search = @collection.ransack(params[:q].reject { |k, _v| k.to_s == 'deleted_at_null' })
|
108
112
|
@collection = @search.result.
|
109
113
|
distinct_by_product_ids(params[:q][:s]).
|
110
114
|
includes(product_includes).
|
111
115
|
page(params[:page]).
|
112
116
|
per(params[:per_page] || Spree::Config[:admin_products_per_page])
|
113
|
-
|
114
117
|
@collection
|
115
118
|
end
|
116
119
|
|
@@ -1,9 +1,11 @@
|
|
1
1
|
module Spree
|
2
2
|
module Admin
|
3
3
|
class SearchController < Spree::Admin::BaseController
|
4
|
+
respond_to :json
|
5
|
+
layout false
|
6
|
+
|
4
7
|
# http://spreecommerce.com/blog/2010/11/02/json-hijacking-vulnerability/
|
5
8
|
before_action :check_json_authenticity, only: :index
|
6
|
-
respond_to :json
|
7
9
|
|
8
10
|
# TODO: Clean this up by moving searching out to user_class_extensions
|
9
11
|
# And then JSON building with something like Active Model Serializers
|
@@ -118,10 +118,10 @@ module Spree
|
|
118
118
|
def preference_fields(object, form)
|
119
119
|
return unless object.respond_to?(:preferences)
|
120
120
|
object.preferences.keys.map{ |key|
|
121
|
-
|
121
|
+
if object.has_preference?(key)
|
122
122
|
form.label("preferred_#{key}", Spree.t(key) + ": ") +
|
123
123
|
preference_field_for(form, "preferred_#{key}", type: object.preference_type(key))
|
124
|
-
|
124
|
+
end
|
125
125
|
}.join("<br />").html_safe
|
126
126
|
end
|
127
127
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= render :
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :adjustments } %>
|
2
2
|
|
3
3
|
<% content_for :page_title do %>
|
4
4
|
/ <%= Spree.t(:edit) %> <%= Spree.t(:adjustment) %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current:
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :adjustments} %>
|
2
2
|
|
3
3
|
<% content_for :page_title do %>
|
4
4
|
/ <%= plural_resource_name(Spree::Adjustment) %>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<% if @adjustments.present? %>
|
12
12
|
<div class="panel panel-default">
|
13
|
-
<%= render :
|
13
|
+
<%= render partial: 'adjustments_table' %>
|
14
14
|
</div>
|
15
15
|
<% else %>
|
16
16
|
<div class="alert alert-warning">
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<div class="form-group">
|
24
24
|
<%= text_field_tag "coupon_code", "", placeholder: Spree.t(:coupon_code), class: "form-control" %>
|
25
25
|
</div>
|
26
|
-
<%= button Spree.t(:add_coupon_code), 'plus', 'submit', :
|
26
|
+
<%= button Spree.t(:add_coupon_code), 'plus', 'submit', id: "add_coupon_code" %>
|
27
27
|
</div>
|
28
28
|
<% end %>
|
29
29
|
|
@@ -1,19 +1,19 @@
|
|
1
|
-
<%= render :
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :adjustments } %>
|
2
2
|
|
3
3
|
<% content_for :page_title do %>
|
4
4
|
/ <%= Spree.t(:new_adjustment) %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<%= render :
|
7
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @adjustment } %>
|
8
8
|
|
9
|
-
<%= form_for @adjustment, :
|
9
|
+
<%= form_for @adjustment, url: admin_order_adjustments_path do |f| %>
|
10
10
|
<fieldset>
|
11
|
-
<%= render :
|
11
|
+
<%= render partial: 'form', locals: { f: f } %>
|
12
12
|
|
13
13
|
<div class="form-actions" data-hook="buttons">
|
14
14
|
<%= button Spree.t(:continue), 'save' %>
|
15
15
|
<span class="or"><%= Spree.t(:or) %></span>
|
16
|
-
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_adjustments_url(@order), :
|
16
|
+
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_adjustments_url(@order), icon: 'delete' %>
|
17
17
|
</div>
|
18
18
|
</fieldset>
|
19
19
|
<% end %>
|
@@ -1,4 +1,4 @@
|
|
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(:customer_return) %> #<%= @customer_return.number %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= render :
|
1
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :customer_returns } %>
|
2
2
|
|
3
3
|
<% content_for :page_actions do %>
|
4
4
|
<% if @order.shipments.any?(&:shipped?) && can?(:create, Spree::CustomerReturn) %>
|
@@ -1,12 +1,12 @@
|
|
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(:new_customer_return) %>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<% if @rma_return_items.any?
|
7
|
+
<% if @rma_return_items.any? %>
|
8
8
|
|
9
|
-
<%= render :
|
9
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @customer_return } %>
|
10
10
|
|
11
11
|
<%= form_for [:admin, @order, @customer_return] do |f| %>
|
12
12
|
<fieldset class="no-border-top">
|
@@ -22,29 +22,17 @@
|
|
22
22
|
<% end %>
|
23
23
|
</fieldset>
|
24
24
|
|
25
|
-
<fieldset>
|
26
|
-
<legend><%= Spree.t(:other_items_in_other) %></legend>
|
27
|
-
<% if @new_return_items.any? %>
|
28
|
-
<%= render partial: 'return_item_selection', locals: {f: f, return_items: @new_return_items} %>
|
29
|
-
<% else %>
|
30
|
-
<div class="alert alert-info no-objects-found">
|
31
|
-
<%= Spree.t(:none) %>
|
32
|
-
</div>
|
33
|
-
<% end %>
|
34
|
-
</fieldset>
|
35
|
-
|
36
25
|
<%= f.field_container :stock_location, class: ['form-group'] do %>
|
37
26
|
<%= f.label :stock_location, Spree.t(:stock_location) %>
|
38
27
|
<%= f.select :stock_location_id, Spree::StockLocation.order_default.active.to_a.collect{|l|[l.name.humanize, l.id]}, {include_blank: true}, {class: 'select2', "data-placeholder" => Spree.t(:select_a_stock_location)} %>
|
39
28
|
<%= f.error_message_on :stock_location_id %>
|
40
29
|
<% end %>
|
41
|
-
|
42
30
|
</div>
|
43
31
|
|
44
32
|
<div class="form-actions" data-hook="buttons">
|
45
33
|
<%= button Spree.t(:create), 'save' %>
|
46
34
|
<span class="or"><%= Spree.t(:or) %></span>
|
47
|
-
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_customer_returns_url(@order), :
|
35
|
+
<%= button_link_to Spree.t('actions.cancel'), spree.admin_order_customer_returns_url(@order), icon: 'delete' %>
|
48
36
|
</div>
|
49
37
|
</fieldset>
|
50
38
|
<% end %>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<%= render :
|
1
|
+
<%= render partial: 'spree/admin/shared/product_tabs', locals: { current: :images } %>
|
2
2
|
|
3
|
-
<%= render :
|
3
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @image } %>
|
4
4
|
|
5
|
-
<%= form_for [:admin, @product, @image], :
|
5
|
+
<%= form_for [:admin, @product, @image], html: { multipart: true } do |f| %>
|
6
6
|
<div data-hook="edit_image" class="panel panel-default">
|
7
7
|
<div class="panel-heading">
|
8
8
|
<h1 class="panel-title">
|
@@ -16,13 +16,13 @@
|
|
16
16
|
<%= link_to image_tag(@image.attachment.url(:small)), @image.attachment.url(:product) %>
|
17
17
|
</div>
|
18
18
|
<div class="col-md-9">
|
19
|
-
<%= render :
|
19
|
+
<%= render partial: 'form', locals: { f: f } %>
|
20
20
|
</div>
|
21
21
|
|
22
22
|
<div class="form-actions" data-hook="buttons">
|
23
23
|
<%= button Spree.t('actions.update'), 'save' %>
|
24
24
|
<span class="or"><%= Spree.t(:or) %></span>
|
25
|
-
<%= button_link_to Spree.t('actions.cancel'), spree.admin_product_images_url(@product), :
|
25
|
+
<%= button_link_to Spree.t('actions.cancel'), spree.admin_product_images_url(@product), id: 'cancel_link', icon: 'delete' %>
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= render partial: 'spree/admin/shared/product_tabs', locals: { current:
|
1
|
+
<%= render partial: 'spree/admin/shared/product_tabs', locals: { current: :images } %>
|
2
2
|
|
3
3
|
<% content_for :page_actions do %>
|
4
4
|
<%= button_link_to(Spree.t(:new_image), spree.new_admin_product_image_url(@product), { class: "btn-success", icon: 'add', id: 'new_image_link' }) if can? :create, Spree::Image %>
|
@@ -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
|
/
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<% content_for :page_actions do %>
|
11
|
-
<%= button_link_to Spree.t(:logs), spree.admin_order_payment_log_entries_url(@order, @payment), :
|
11
|
+
<%= button_link_to Spree.t(:logs), spree.admin_order_payment_log_entries_url(@order, @payment), icon: 'file' %>
|
12
12
|
<% end %>
|
13
13
|
|
14
14
|
<table class="table" id='listing_log_entries'>
|
@@ -23,8 +23,8 @@
|
|
23
23
|
<table class="table table-condensed table-bordered sortable" data-hook data-sortable-link="<%= update_values_positions_admin_option_types_url %>">
|
24
24
|
<thead data-hook="option_header">
|
25
25
|
<tr>
|
26
|
-
<th colspan="2"><%= Spree.t(:name)
|
27
|
-
<th><%= Spree.t(:display)
|
26
|
+
<th colspan="2"><%= Spree.t(:name) %> <span class="required">*</span></th>
|
27
|
+
<th><%= Spree.t(:display) %> <span class="required">*</span></th>
|
28
28
|
<th class="actions"></th>
|
29
29
|
</tr>
|
30
30
|
</thead>
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<div class="panel-body">
|
10
10
|
<div data-hook="add_product_name" class="form-group">
|
11
11
|
<%= label_tag :add_line_item_variant_id, Spree.t(:name_or_sku) %>
|
12
|
-
<%= hidden_field_tag :add_line_item_variant_id, "", :
|
12
|
+
<%= hidden_field_tag :add_line_item_variant_id, "", class: "variant_autocomplete fullwidth-input" %>
|
13
13
|
</div>
|
14
14
|
|
15
15
|
<div id="stock_details"></div>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<div class="panel-body">
|
11
11
|
<div data-hook="add_product_name">
|
12
12
|
<%= label_tag :add_variant_id, Spree.t(:name_or_sku) %>
|
13
|
-
<%= hidden_field_tag :add_variant_id, "", :
|
13
|
+
<%= hidden_field_tag :add_variant_id, "", class: "variant_autocomplete fullwidth-input" %>
|
14
14
|
</div>
|
15
15
|
|
16
16
|
<div id="stock_details"></div>
|
@@ -3,21 +3,21 @@
|
|
3
3
|
<%= event_links %>
|
4
4
|
<% end %>
|
5
5
|
<% if can?(:resend, @order) %>
|
6
|
-
<%= button_link_to Spree.t(:resend), resend_admin_order_url(@order), :
|
6
|
+
<%= button_link_to Spree.t(:resend), resend_admin_order_url(@order), method: :post, icon: 'envelope' %>
|
7
7
|
<% end %>
|
8
8
|
<% end %>
|
9
9
|
|
10
|
-
<%= render :
|
10
|
+
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: :cart } %>
|
11
11
|
|
12
12
|
<div data-hook="admin_order_edit_header">
|
13
|
-
<%= render :
|
13
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @order } %>
|
14
14
|
</div>
|
15
15
|
|
16
16
|
<% if @order.payments.exists? && @order.considered_risky? %>
|
17
17
|
<%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.order("created_at DESC").first %>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<%= render :
|
20
|
+
<%= render partial: 'add_line_item' if can?(:update, @order) %>
|
21
21
|
|
22
22
|
<% if @order.line_items.empty? %>
|
23
23
|
<div class="alert alert-warning">
|
@@ -27,7 +27,7 @@
|
|
27
27
|
|
28
28
|
<div data-hook="admin_order_edit_form">
|
29
29
|
<div id="order-form-wrapper">
|
30
|
-
<%= render :
|
30
|
+
<%= render partial: 'line_items_edit_form', locals: { order: @order } %>
|
31
31
|
</div>
|
32
32
|
</div>
|
33
33
|
|