spree_backend 2.1.6 → 2.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d66b5d26cfa4ae38fe8681bea1a28383fc734681
4
- data.tar.gz: 08484ecf9094fd841dfb2ab5f3d831f473c533bd
3
+ metadata.gz: cd53e6c39454defcfdc16122be6d38b21cd60ca8
4
+ data.tar.gz: 6a3e9ebb4b838cc72862b336cbc6bf5b43d467eb
5
5
  SHA512:
6
- metadata.gz: 7018f4e61a2db7c7b3d5283526610ef38ebc7803f5fd5e94b515311a713bea750510e49d238910c4efab63d99f2694b85f11624d6e03204bc03be636afe3f8a2
7
- data.tar.gz: 222bd1b2aaf5844266ae88910c24d24b6939e945a445a004c518e9660b05e45e9c43d59addf5124c1d7232a82be5e7008bb6afdb0994c30690c4e4ccb053002f
6
+ metadata.gz: 13ccc8fddb1910cdf4568841793c96d0f9fa5d2ac28e2a3b35711369cbb40c9aed0b0ae492013817f8a002909b59ec725649b164e377be0383269f56db1842fe
7
+ data.tar.gz: f913deeb7fc1c5680719a3683dbdc46db3773d32a1dfda08167baa5b8b9d1a985ede084b43fb9a3189719aed4de9bf172be6553baa17f3ab4996947cd2526e8d
@@ -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)
@@ -9,7 +9,7 @@
9
9
  <strong class="stock-location-name" data-hook="stock-location-name">'<%= shipment.stock_location.name %>'</strong>
10
10
  <% if shipment.ready? and can? :update, shipment %>
11
11
  -
12
- <%= link_to 'ship', '#', :class => 'ship button icon-arrow-right', :data => {'shipment-number' => shipment.number} %>
12
+ <%= link_to Spree.t(:ship), '#', :class => 'ship button icon-arrow-right', :data => {'shipment-number' => shipment.number} %>
13
13
  <% end %>
14
14
  </legend>
15
15
  </fieldset>
@@ -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
@@ -125,7 +125,7 @@ Spree::Core::Engine.add_routes do
125
125
  end
126
126
  end
127
127
 
128
- resources :reports, :only => [:index, :show] do
128
+ resources :reports, :only => [:index] do
129
129
  collection do
130
130
  get :sales_total
131
131
  post :sales_total
@@ -142,7 +142,6 @@ Spree::Core::Engine.add_routes do
142
142
  end
143
143
  end
144
144
 
145
- resources :stock_movements
146
145
  resources :stock_items, :only => [:create, :update, :destroy]
147
146
  resources :tax_rates
148
147
  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.1.6
4
+ version: 2.1.7
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_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.1.6
19
+ version: 2.1.7
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.1.6
26
+ version: 2.1.7
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: 2.1.6
33
+ version: 2.1.7
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.1.6
40
+ version: 2.1.7
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jquery-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -510,7 +510,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
510
510
  requirements:
511
511
  - none
512
512
  rubyforge_project: spree_backend
513
- rubygems_version: 2.2.2
513
+ rubygems_version: 2.2.0
514
514
  signing_key:
515
515
  specification_version: 4
516
516
  summary: backend e-commerce functionality for the Spree project.