spree_backend 2.0.10 → 2.0.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce03c4d42683c7d58447f8a7c84a49e4bebc30d8
4
- data.tar.gz: 949afcf9ba387119aaa88311a3ca889bec37ee5f
3
+ metadata.gz: ac38a1c8eb982af397a8ee7870733b7bfba622d9
4
+ data.tar.gz: 3539ac302b1a4e238e64e07c658bb5201d078d62
5
5
  SHA512:
6
- metadata.gz: 814cac3783d97f52e06c8aa19d8c97e7a676275414ff8211ea6915337ddfd631ffe263bc0e0b061b3b36242419941634a1141b65c0578cbf48686247f140e87d
7
- data.tar.gz: c0c1ba7b357ed69a6071d005cb71a8dbd390fa3b611251e716b1538c13a4762ac5913af22b9c7b57f372ca7a4140163893bdbd0794c7e371f7b94290fa2231b9
6
+ metadata.gz: 0aa87b4dbe801f0f789d92b78cba799587016a7fd9560c20af848023a7b073cdf453f8944d36d9667484d039c358b98bdf1a49ccb9c69033280d3247e1b07f18
7
+ data.tar.gz: fc7d0eb712de1855a734545c8c776b10e13f7edf1a184a2045337496e7ecc95f6c2f2e207444439ca67f7a258b26f5e3d95dfeeb7ce52e818b96fedadf2883e5
@@ -32,17 +32,15 @@ module Spree
32
32
  if @order.completed?
33
33
  @payment.process!
34
34
  flash[:success] = flash_message_for(@payment, :successfully_created)
35
-
36
- redirect_to admin_order_payments_path(@order)
37
35
  else
38
36
  #This is the first payment (admin created order)
39
37
  until @order.completed?
40
38
  @order.next!
41
39
  end
42
40
  flash[:success] = Spree.t(:new_order_completed)
43
- redirect_to edit_admin_order_url(@order)
44
41
  end
45
42
 
43
+ redirect_to admin_order_payments_path(@order)
46
44
  rescue Spree::Core::GatewayError => e
47
45
  flash[:error] = "#{e.message}"
48
46
  redirect_to new_admin_order_payment_path(@order)
@@ -1,5 +1,5 @@
1
1
  <div data-hook="admin_shipping_method_form_fields" class="alpha twelve columns">
2
- <div class="alpha six columns">
2
+ <div data-hook="admin_shipping_method_form_name_field" class="alpha six columns">
3
3
  <%= f.field_container :name do %>
4
4
  <%= f.label :name, Spree.t(:name) %><br />
5
5
  <%= f.text_field :name, :class => 'fullwidth' %>
@@ -7,7 +7,7 @@
7
7
  <% end %>
8
8
  </div>
9
9
 
10
- <div class="omega six columns">
10
+ <div data-hook="admin_shipping_method_form_display_field" class="omega six columns">
11
11
  <%= f.field_container :display_on do %>
12
12
  <%= f.label :display_on, Spree.t(:display) %><br />
13
13
  <%= select(:shipping_method, :display_on, Spree::ShippingMethod::DISPLAY.collect { |display| [Spree.t(display), display == :both ? nil : display.to_s] }, {}, {:class => 'select2 fullwidth'}) %>
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
 
18
18
  <div class="alpha omega twelve columns">
19
- <div class="alpha six columns">
19
+ <div data-hook="admin_shipping_method_form_internal_name_field" class="alpha six columns">
20
20
  <%= f.field_container :admin_name do %>
21
21
  <%= f.label :admin_name, Spree.t(:internal_name) %><br />
22
22
  <%= f.text_field :admin_name, :class => 'fullwidth', :label => false %>
@@ -25,7 +25,7 @@
25
25
  </div>
26
26
  </div>
27
27
 
28
- <div class="alpha twelve columns">
28
+ <div data-hook="admin_shipping_method_form_tracking_url_field" class="alpha twelve columns">
29
29
  <%= f.field_container :tracking_url do %>
30
30
  <%= f.label :tracking_url, Spree.t(:tracking_url) %><br />
31
31
  <%= f.text_field :tracking_url, :class => 'fullwidth', :placeholder => Spree.t(:tracking_url_placeholder) %>
@@ -54,9 +54,10 @@
54
54
  <fieldset class="no-border-bottom">
55
55
  <legend align="center"><%= Spree.t(:zones) %></legend>
56
56
  <%= f.field_container :zones do %>
57
+ <% shipping_method_zones = @shipping_method.zones.to_a %>
57
58
  <% Spree::Zone.all.each do |zone| %>
58
59
  <%= label_tag do %>
59
- <%= check_box_tag('shipping_method[zones][]', zone.id, @shipping_method.zones.include?(zone)) %>
60
+ <%= check_box_tag('shipping_method[zones][]', zone.id, shipping_method_zones.include?(zone)) %>
60
61
  <%= zone.name %>
61
62
  <% end %>
62
63
  <br>
@@ -29,7 +29,7 @@
29
29
  </tr>
30
30
  </thead>
31
31
  <tbody>
32
- <% @shipping_methods.each do |shipping_method|%>
32
+ <% @shipping_methods.includes(:zones, :calculator).each do |shipping_method|%>
33
33
  <tr id="<%= spree_dom_id shipping_method %>" data-hook="admin_shipping_methods_index_rows" class="<%= cycle('odd', 'even')%>">
34
34
  <td class="align-center"><%= shipping_method.admin_name + ' / ' if shipping_method.admin_name.present? %><%= shipping_method.name %></td>
35
35
  <td class="align-center"><%= shipping_method.zones.collect(&:name).join(", ") if shipping_method.zones %></td>
@@ -42,7 +42,7 @@
42
42
  <% else %>
43
43
  <div class="alpha twelve columns no-objects-found">
44
44
  <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/stock_movement')) %>,
45
- <%= link_to Spree.t(:add_one), spree.new_admin_stock_movement_path %>!
45
+ <%= link_to Spree.t(:add_one), spree.new_admin_stock_location_stock_movement_path(@stock_location) %>!
46
46
  </div>
47
47
  <% end %>
48
48
 
data/config/routes.rb CHANGED
@@ -144,7 +144,6 @@ Spree::Core::Engine.routes.draw do
144
144
  end
145
145
  end
146
146
 
147
- resources :stock_movements
148
147
  resources :stock_items, :only => [:create, :update, :destroy]
149
148
  resources :tax_rates
150
149
  resource :tax_settings
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: 2.0.10
4
+ version: 2.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-25 00:00:00.000000000 Z
11
+ date: 2014-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.10
19
+ version: 2.0.11
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: 2.0.10
26
+ version: 2.0.11
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_api
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.10
33
+ version: 2.0.11
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: 2.0.10
40
+ version: 2.0.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jquery-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -498,7 +498,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
498
498
  requirements:
499
499
  - none
500
500
  rubyforge_project: spree_backend
501
- rubygems_version: 2.2.2
501
+ rubygems_version: 2.2.0
502
502
  signing_key:
503
503
  specification_version: 4
504
504
  summary: backend e-commerce functionality for the Spree project.