spree_backend 3.2.2 → 3.2.3
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/admin.js +3 -1
- data/app/assets/javascripts/spree/backend/general_settings.js.coffee +12 -10
- data/app/controllers/spree/admin/payments_controller.rb +2 -0
- data/app/controllers/spree/admin/return_authorizations_controller.rb +1 -1
- data/app/controllers/spree/admin/stock_movements_controller.rb +6 -3
- data/app/controllers/spree/admin/store_credits_controller.rb +1 -0
- data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
- data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +4 -2
- data/app/views/spree/admin/return_authorizations/_form.html.erb +1 -1
- data/app/views/spree/admin/shared/_translations.html.erb +1 -0
- data/app/views/spree/admin/users/index.html.erb +27 -20
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d801c5f1b0396e899a96ed4f58d18bcfb90c468
|
4
|
+
data.tar.gz: 90e9ad63e4997b01b32b22a193615b821f0c55ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b38d0855b707ffc57db08422e2de4fa0f57e398225ed138ed982a6bb681d0cccbc75112744d5c56d16486b87fe33fa18e6be365843a6f64ca0307fed8e720f14
|
7
|
+
data.tar.gz: 7fc64de8301dc03fe4a87903def2f09ad71c2baac23fd9cbe31f6333e7bec603fada85a1f4242d8373225255d68320d6170b1bd29dd469440260feba52c3c7d4
|
@@ -288,7 +288,9 @@ $(document).ready(function(){
|
|
288
288
|
authenticity_token: AUTH_TOKEN
|
289
289
|
},
|
290
290
|
success: function(response) {
|
291
|
-
el.parents("tr").fadeOut('hide')
|
291
|
+
el.parents("tr").fadeOut('hide', function() {
|
292
|
+
$(this).remove();
|
293
|
+
});
|
292
294
|
},
|
293
295
|
error: function(response, textStatus, errorThrown) {
|
294
296
|
show_flash('error', response.responseText);
|
@@ -1,13 +1,15 @@
|
|
1
1
|
$(@).ready( ->
|
2
2
|
$('[data-hook=general_settings_clear_cache] #clear_cache').click ->
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
response = confirm(Spree.translations.are_you_sure)
|
4
|
+
if response
|
5
|
+
$.ajax
|
6
|
+
type: 'POST'
|
7
|
+
url: Spree.routes.clear_cache
|
8
|
+
success: ->
|
9
|
+
show_flash 'success', "Cache was flushed."
|
10
|
+
error: (msg) ->
|
11
|
+
if msg.responseJSON["error"]
|
12
|
+
show_flash 'error', msg.responseJSON["error"]
|
13
|
+
else
|
14
|
+
show_flash 'error', "There was a problem while flushing cache."
|
13
15
|
)
|
@@ -10,7 +10,7 @@ module Spree
|
|
10
10
|
def fire
|
11
11
|
@return_authorization.send("#{params[:e]}!")
|
12
12
|
flash[:success] = Spree.t(:return_authorization_updated)
|
13
|
-
|
13
|
+
redirect_to :back
|
14
14
|
end
|
15
15
|
|
16
16
|
private
|
@@ -16,9 +16,12 @@ module Spree
|
|
16
16
|
|
17
17
|
def create
|
18
18
|
@stock_movement = stock_location.stock_movements.build(stock_movement_params)
|
19
|
-
@stock_movement.save
|
20
|
-
|
21
|
-
|
19
|
+
if @stock_movement.save
|
20
|
+
flash[:success] = flash_message_for(@stock_movement, :successfully_created)
|
21
|
+
redirect_to admin_stock_location_stock_movements_path(stock_location)
|
22
|
+
else
|
23
|
+
render :new
|
24
|
+
end
|
22
25
|
end
|
23
26
|
|
24
27
|
private
|
@@ -49,6 +49,7 @@ module Spree
|
|
49
49
|
ensure_unused_store_credit
|
50
50
|
|
51
51
|
if @store_credit.destroy
|
52
|
+
flash[:success] = flash_message_for(@store_credit, :successfully_removed)
|
52
53
|
respond_with(@store_credit) do |format|
|
53
54
|
format.html { redirect_to admin_user_store_credits_path(@user) }
|
54
55
|
format.js { render_js_for_destroy }
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<%= f.field_container :stock_location, class: ['form-group'] do %>
|
26
26
|
<%= f.label :stock_location, Spree.t(:stock_location) %> <span class="required">*</span>
|
27
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)} %>
|
28
|
-
<%= f.error_message_on :
|
28
|
+
<%= f.error_message_on :stock_location %>
|
29
29
|
<% end %>
|
30
30
|
</div>
|
31
31
|
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<div class="panel-body calculator-fields">
|
2
2
|
<% promotion_action.promotion_action_line_items.each do |item| %>
|
3
|
-
|
4
|
-
|
3
|
+
<% variant = item.variant %>
|
4
|
+
|
5
|
+
<strong><%= item.quantity %> x <%= variant.name %></strong>
|
6
|
+
<%= variant.options_text %>
|
5
7
|
<% end %>
|
6
8
|
|
7
9
|
<% if promotion_action.promotion_action_line_items.empty? %>
|
@@ -70,7 +70,7 @@
|
|
70
70
|
<%= f.field_container :stock_location, class: ['form-group'] do %>
|
71
71
|
<%= f.label :stock_location, Spree.t(:stock_location) %> <span class="required">*</span>
|
72
72
|
<%= f.select :stock_location_id, Spree::StockLocation.order_default.active.to_a.collect{|l|[l.name, l.id]}, {include_blank: true}, {class: 'select2', "data-placeholder" => Spree.t(:select_a_stock_location)} %>
|
73
|
-
<%= f.error_message_on :
|
73
|
+
<%= f.error_message_on :stock_location %>
|
74
74
|
<% end %>
|
75
75
|
|
76
76
|
<%= f.field_container :reason, class: ['form-group'] do %>
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Spree.translations = <%==
|
3
3
|
{ abbr_day_names: I18n.t(:abbr_day_names, scope: :date),
|
4
4
|
add: Spree.t(:add),
|
5
|
+
are_you_sure: Spree.t(:are_you_sure),
|
5
6
|
are_you_sure_delete: Spree.t(:are_you_sure_delete),
|
6
7
|
bill_address: Spree.t(:bill_address),
|
7
8
|
cancel: Spree.t(:cancel, scope: :actions),
|
@@ -42,26 +42,33 @@
|
|
42
42
|
</div>
|
43
43
|
<% end %>
|
44
44
|
|
45
|
-
|
46
|
-
<
|
47
|
-
<
|
48
|
-
<
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
</thead>
|
54
|
-
<tbody>
|
55
|
-
<% @users.each do |user|%>
|
56
|
-
<tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows">
|
57
|
-
<td class='user_email'><%=link_to user.email, edit_admin_user_url(user) %></td>
|
58
|
-
<td data-hook="admin_users_index_row_actions" class="actions actions-2 text-right">
|
59
|
-
<%= link_to_edit user, no_text: true %>
|
60
|
-
<%= link_to_delete user, no_text: true %>
|
61
|
-
</td>
|
45
|
+
<% if @users.any? %>
|
46
|
+
<table class="table" id="listing_users" data-hook>
|
47
|
+
<thead>
|
48
|
+
<tr data-hook="admin_users_index_headers">
|
49
|
+
<th>
|
50
|
+
<%= sort_link @search,:email, Spree.t(:user), {}, {title: 'users_email_title'} %>
|
51
|
+
</th>
|
52
|
+
<th data-hook="admin_users_index_header_actions" class="actions"></th>
|
62
53
|
</tr>
|
63
|
-
|
64
|
-
|
65
|
-
|
54
|
+
</thead>
|
55
|
+
<tbody>
|
56
|
+
<% @users.each do |user|%>
|
57
|
+
<tr id="<%= spree_dom_id user %>" data-hook="admin_users_index_rows">
|
58
|
+
<td class='user_email'><%=link_to user.email, edit_admin_user_url(user) %></td>
|
59
|
+
<td data-hook="admin_users_index_row_actions" class="actions actions-2 text-right">
|
60
|
+
<%= link_to_edit user, no_text: true %>
|
61
|
+
<%= link_to_delete user, no_text: true %>
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
<% end %>
|
65
|
+
</tbody>
|
66
|
+
</table>
|
67
|
+
<% else %>
|
68
|
+
<div class="alert alert-info no-objects-found">
|
69
|
+
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::User)) %>,
|
70
|
+
<%= link_to Spree.t(:add_one), new_object_url %>!
|
71
|
+
</div>
|
72
|
+
<% end %>
|
66
73
|
|
67
74
|
<%= paginate @users %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.2.
|
19
|
+
version: 3.2.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.2.
|
26
|
+
version: 3.2.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: spree_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.2.
|
33
|
+
version: 3.2.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.2.
|
40
|
+
version: 3.2.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bootstrap-sass
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|