spree_backend 2.3.4 → 2.3.5
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/address_states.js +4 -2
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +16 -0
- data/app/assets/javascripts/spree/backend/payments/new.js +3 -3
- data/app/assets/javascripts/spree/backend.js +3 -3
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +5 -0
- data/app/assets/stylesheets/spree/backend/sections/_taxons.scss +7 -1
- data/app/assets/stylesheets/spree/backend.css +2 -2
- data/app/controllers/spree/admin/adjustments_controller.rb +6 -0
- data/app/controllers/spree/admin/orders_controller.rb +6 -6
- data/app/helpers/spree/admin/base_helper.rb +6 -0
- data/app/views/spree/admin/log_entries/index.html.erb +5 -2
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +7 -5
- data/app/views/spree/admin/option_types/edit.html.erb +2 -9
- data/app/views/spree/admin/orders/_form.html.erb +1 -2
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +7 -1
- data/app/views/spree/admin/payment_methods/_form.html.erb +6 -6
- data/app/views/spree/admin/products/_form.html.erb +6 -5
- data/app/views/spree/admin/products/new.html.erb +3 -3
- data/app/views/spree/admin/prototypes/_form.html.erb +2 -2
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +2 -2
- data/app/views/spree/admin/shared/_product_tabs.html.erb +0 -1
- data/app/views/spree/admin/stock_locations/_form.html.erb +59 -73
- data/app/views/spree/admin/trackers/_form.html.erb +3 -3
- data/config/routes.rb +2 -2
- metadata +8 -9
- data/app/views/spree/admin/log_entries/_credit_card.html.erb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfb4a7508972ef8102f95e7633192342d35e8b1f
|
4
|
+
data.tar.gz: 245a1617da026360112445f70c38a82921c8dda8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32e603d0700dddb9fa38a855422c96b1e554ba51be7fe8fd5749a7120f9ce91434472603a62b66ae25dae5b8a047c6fb8cf6aadcba3c3cf809ed2475e9ea43bb
|
7
|
+
data.tar.gz: 7dced87891897a95ca77c7347546e0c7ed4f0af43618907edcc5262e369480372c1bdd0fd0861e8c6f74007cf3d4ebc34f9af8c7c34ee39734c64ed3809a6130
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var update_state = function (region) {
|
1
|
+
var update_state = function (region, done) {
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
var country = $('span#' + region + 'country .select2').select2('val');
|
@@ -27,5 +27,7 @@ var update_state = function (region) {
|
|
27
27
|
state_input.prop('disabled', false).show();
|
28
28
|
state_select.select2('destroy').hide();
|
29
29
|
}
|
30
|
+
|
31
|
+
if(done) done();
|
30
32
|
});
|
31
|
-
};
|
33
|
+
};
|
@@ -34,6 +34,22 @@ $(document).ready(function() {
|
|
34
34
|
$('#guest_checkout_false').prop("checked", true);
|
35
35
|
$('#guest_checkout_false').prop("disabled", false);
|
36
36
|
|
37
|
+
var billAddress = customer.bill_address;
|
38
|
+
if(billAddress) {
|
39
|
+
$('#order_bill_address_attributes_firstname').val(billAddress.firstname);
|
40
|
+
$('#order_bill_address_attributes_lastname').val(billAddress.lastname);
|
41
|
+
$('#order_bill_address_attributes_address1').val(billAddress.address1);
|
42
|
+
$('#order_bill_address_attributes_address2').val(billAddress.address2);
|
43
|
+
$('#order_bill_address_attributes_city').val(billAddress.city);
|
44
|
+
$('#order_bill_address_attributes_zipcode').val(billAddress.zipcode);
|
45
|
+
$('#order_bill_address_attributes_phone').val(billAddress.phone);
|
46
|
+
|
47
|
+
$('#order_bill_address_attributes_country_id').select2("val", billAddress.country_id).promise().done(function () {
|
48
|
+
update_state('b', function () {
|
49
|
+
$('#order_bill_address_attributes_state_id').select2("val", billAddress.state_id);
|
50
|
+
});
|
51
|
+
});
|
52
|
+
}
|
37
53
|
return customer.email;
|
38
54
|
}
|
39
55
|
})
|
@@ -14,7 +14,7 @@ $(document).ready(function() {
|
|
14
14
|
$('.payment-methods').hide();
|
15
15
|
$('.payment-methods input').prop('disabled', true);
|
16
16
|
if (this.checked) {
|
17
|
-
$('#payment_method_' + this.value).prop('disabled', false);
|
17
|
+
$('#payment_method_' + this.value + ' input').prop('disabled', false);
|
18
18
|
$('#payment_method_' + this.value).show();
|
19
19
|
}
|
20
20
|
}
|
@@ -23,11 +23,11 @@ $(document).ready(function() {
|
|
23
23
|
$('.payment_methods_radios').each(
|
24
24
|
function() {
|
25
25
|
if (this.checked) {
|
26
|
-
$('#payment_method_' + this.value).prop('disabled', false);
|
26
|
+
$('#payment_method_' + this.value + ' input').prop('disabled', false);
|
27
27
|
$('#payment_method_' + this.value).show();
|
28
28
|
} else {
|
29
29
|
$('#payment_method_' + this.value).hide();
|
30
|
-
$('#payment_method_' + this.value).prop('disabled', true);
|
30
|
+
$('#payment_method_' + this.value + ' input').prop('disabled', true);
|
31
31
|
}
|
32
32
|
|
33
33
|
if ($("#card_new" + this.value).is("*")) {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
//= require jquery
|
2
2
|
//= require jquery_ujs
|
3
3
|
//= require jquery-migrate-1.0.0
|
4
|
-
//= require jquery
|
5
|
-
//= require jquery
|
6
|
-
//= require jquery
|
4
|
+
//= require jquery-ui/datepicker
|
5
|
+
//= require jquery-ui/sortable
|
6
|
+
//= require jquery-ui/autocomplete
|
7
7
|
//= require modernizr
|
8
8
|
//= require jquery.cookie
|
9
9
|
//= require jquery.delayedobserver
|
@@ -8,8 +8,8 @@
|
|
8
8
|
*= require responsive-tables
|
9
9
|
*= require normalize
|
10
10
|
*= require skeleton
|
11
|
-
*= require jquery
|
12
|
-
*= require jquery
|
11
|
+
*= require jquery-ui/datepicker
|
12
|
+
*= require jquery-ui/autocomplete
|
13
13
|
*= require jquery.powertip
|
14
14
|
*= require select2
|
15
15
|
|
@@ -20,11 +20,11 @@ module Spree
|
|
20
20
|
|
21
21
|
params[:q].delete(:inventory_units_shipment_id_null) if params[:q][:inventory_units_shipment_id_null] == "0"
|
22
22
|
|
23
|
-
if
|
23
|
+
if params[:q][:created_at_gt].present?
|
24
24
|
params[:q][:created_at_gt] = Time.zone.parse(params[:q][:created_at_gt]).beginning_of_day rescue ""
|
25
25
|
end
|
26
26
|
|
27
|
-
if
|
27
|
+
if params[:q][:created_at_lt].present?
|
28
28
|
params[:q][:created_at_lt] = Time.zone.parse(params[:q][:created_at_lt]).end_of_day rescue ""
|
29
29
|
end
|
30
30
|
|
@@ -98,16 +98,16 @@ module Spree
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def open_adjustments
|
101
|
-
adjustments = @order.
|
102
|
-
adjustments.update_all(:
|
101
|
+
adjustments = @order.all_adjustments.where(state: 'closed')
|
102
|
+
adjustments.update_all(state: 'open')
|
103
103
|
flash[:success] = Spree.t(:all_adjustments_opened)
|
104
104
|
|
105
105
|
respond_with(@order) { |format| format.html { redirect_to :back } }
|
106
106
|
end
|
107
107
|
|
108
108
|
def close_adjustments
|
109
|
-
adjustments = @order.
|
110
|
-
adjustments.update_all(:
|
109
|
+
adjustments = @order.all_adjustments.where(state: 'open')
|
110
|
+
adjustments.update_all(state: 'closed')
|
111
111
|
flash[:success] = Spree.t(:all_adjustments_closed)
|
112
112
|
|
113
113
|
respond_with(@order) { |format| format.html { redirect_to :back } }
|
@@ -159,6 +159,12 @@ module Spree
|
|
159
159
|
dom_id(record, 'spree')
|
160
160
|
end
|
161
161
|
|
162
|
+
def rails_environments
|
163
|
+
@@rails_environments ||= Dir.glob("#{Rails.root}/config/environments/*.rb")
|
164
|
+
.map { |f| File.basename(f, ".rb") }
|
165
|
+
.sort
|
166
|
+
end
|
167
|
+
|
162
168
|
private
|
163
169
|
def attribute_name_for(field_name)
|
164
170
|
field_name.gsub(' ', '_').downcase
|
@@ -22,7 +22,10 @@
|
|
22
22
|
</tr>
|
23
23
|
</thead>
|
24
24
|
<tbody>
|
25
|
-
|
25
|
+
<tr>
|
26
|
+
<td>Message</td>
|
27
|
+
<td><%= entry.parsed_details.message %></td>
|
28
|
+
</tr>
|
26
29
|
</tbody>
|
27
30
|
<% end %>
|
28
|
-
</table>
|
31
|
+
</table>
|
@@ -1,9 +1,11 @@
|
|
1
1
|
<tr class="option_value fields" id="spree_<%= dom_id(f.object) %>" data-hook="option_value" class="<%= cycle('odd', 'even')%>">
|
2
|
-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
<% if f.object.persisted? %>
|
3
|
+
<td class="no-border">
|
4
|
+
<span class="handle"></span>
|
5
|
+
<%= f.hidden_field :id %>
|
6
|
+
</td>
|
7
|
+
<% end %>
|
8
|
+
<td colspan="<%= f.object.persisted? ? '' : '2' %>" class="name"><%= f.text_field :name %></td>
|
7
9
|
<td class="presentation"><%= f.text_field :presentation %></td>
|
8
10
|
<td class="actions"><%= link_to_remove_fields Spree.t(:remove), f, :no_text => true %></td>
|
9
11
|
</tr>
|
@@ -32,15 +32,8 @@
|
|
32
32
|
</tr>
|
33
33
|
</thead>
|
34
34
|
<tbody id="option_values">
|
35
|
-
|
36
|
-
|
37
|
-
<td colspan="2"><%= Spree.t(:none) %></td>
|
38
|
-
<td class="actions"></td>
|
39
|
-
</tr>
|
40
|
-
<% else %>
|
41
|
-
<%= f.fields_for :option_values do |option_value_form| %>
|
42
|
-
<%= render :partial => 'option_value_fields', :locals => { :f => option_value_form } %>
|
43
|
-
<% end %>
|
35
|
+
<%= f.fields_for :option_values, @option_values do |option_value_form| %>
|
36
|
+
<%= render :partial => 'option_value_fields', :locals => { :f => option_value_form } %>
|
44
37
|
<% end %>
|
45
38
|
</tbody>
|
46
39
|
</table>
|
@@ -37,9 +37,8 @@
|
|
37
37
|
var shipments = [];
|
38
38
|
|
39
39
|
<% @order.shipments.each do |shipment| %>
|
40
|
-
|
40
|
+
shipments.push(<%== shipment.as_json(:root => false, :only => [:id, :tracking, :number, :state, :stock_location_id], :include => [:inventory_units, :stock_location]).to_json %>);
|
41
41
|
<% end %>
|
42
|
-
|
43
42
|
<%= render :partial => 'spree/admin/shared/update_order_state', :handlers => [:js] %>
|
44
43
|
<% end -%>
|
45
44
|
</div>
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<%= f.fields_for :ship_address do |sa_form| %>
|
52
52
|
<div class="field" style="position: absolute;margin-top: -15px;right: 0;">
|
53
53
|
<span data-hook="use_billing">
|
54
|
-
<%= check_box_tag 'order[use_billing]', '1', (
|
54
|
+
<%= check_box_tag 'order[use_billing]', '1', ((@order.bill_address.empty? && @order.ship_address.empty?) && @order.bill_address.same_as?(@order.ship_address)) %>
|
55
55
|
<%= label_tag 'order[use_billing]', Spree.t(:use_billing_address) %>
|
56
56
|
</span>
|
57
57
|
</div>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</div>
|
18
18
|
|
19
19
|
<% if @order.payments.exists? && @order.considered_risky? %>
|
20
|
-
<%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.
|
20
|
+
<%= render 'spree/admin/orders/risk_analysis', latest_payment: @order.payments.last %>
|
21
21
|
<% end %>
|
22
22
|
|
23
23
|
<%= render partial: 'add_product' if @order.shipment_state != 'shipped' && can?(:update, @order) %>
|
@@ -132,7 +132,13 @@
|
|
132
132
|
<% if Spree::Order.checkout_step_names.include?(:delivery) %>
|
133
133
|
<td class="align-center"><span class="state <%= order.shipment_state %>"><%= Spree.t("shipment_states.#{order.shipment_state}") if order.shipment_state %></span></td>
|
134
134
|
<% end %>
|
135
|
-
<td
|
135
|
+
<td>
|
136
|
+
<% if order.user %>
|
137
|
+
<%= link_to order.email, edit_admin_user_path(order.user) %>
|
138
|
+
<% else %>
|
139
|
+
<%= mail_to order.email %>
|
140
|
+
<% end %>
|
141
|
+
</td>
|
136
142
|
<td class="align-center"><%= order.display_total.to_html %></td>
|
137
143
|
<td class='actions align-center' data-hook="admin_orders_index_row_actions">
|
138
144
|
<%= link_to_edit_url edit_admin_order_path(order), :title => "admin_edit_#{dom_id(order)}", :no_text => true %>
|
@@ -14,10 +14,10 @@
|
|
14
14
|
<div id="gateway-settings-warning" class="info warning"><%= Spree.t(:provider_settings_warning) %></div>
|
15
15
|
<% end %>
|
16
16
|
<% end %>
|
17
|
-
</div>
|
17
|
+
</div>
|
18
18
|
<div data-hook="environment" class="field">
|
19
19
|
<%= label_tag nil, Spree.t(:environment) %>
|
20
|
-
<%= collection_select(:payment_method, :environment,
|
20
|
+
<%= collection_select(:payment_method, :environment, rails_environments, :to_s, :titleize, {}, {:id => 'gtwy-env', :class => 'select2 fullwidth'}) %>
|
21
21
|
</div>
|
22
22
|
<div data-hook="display" class="field">
|
23
23
|
<%= label_tag nil, Spree.t(:display) %>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<li>
|
34
34
|
<%= radio_button :payment_method, :active, true %>
|
35
35
|
<%= label_tag nil, Spree.t(:say_yes) %>
|
36
|
-
</li>
|
36
|
+
</li>
|
37
37
|
<li>
|
38
38
|
<%= radio_button :payment_method, :active, false %>
|
39
39
|
<%= label_tag nil, Spree.t(:say_no) %>
|
@@ -41,7 +41,7 @@
|
|
41
41
|
</ul>
|
42
42
|
</div>
|
43
43
|
</div>
|
44
|
-
|
44
|
+
|
45
45
|
<div class="omega eight columns">
|
46
46
|
<div data-hook="name" class="field">
|
47
47
|
<%= label_tag nil, Spree.t(:name) %>
|
@@ -50,9 +50,9 @@
|
|
50
50
|
<div data-hook="description" class="field">
|
51
51
|
<%= label_tag nil, Spree.t(:description) %>
|
52
52
|
<%= text_area :payment_method, :description, {:cols => 60, :rows => 6, :class => 'fullwidth'} %>
|
53
|
-
</div>
|
53
|
+
</div>
|
54
54
|
</div>
|
55
|
-
|
55
|
+
|
56
56
|
</div>
|
57
57
|
</div>
|
58
58
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div data-hook="admin_product_form_name">
|
5
5
|
<%= f.field_container :name do %>
|
6
6
|
<%= f.label :name, raw(Spree.t(:name) + content_tag(:span, ' *', :class => 'required')) %>
|
7
|
-
<%= f.text_field :name, :class => 'fullwidth title' %>
|
7
|
+
<%= f.text_field :name, :class => 'fullwidth title', :required => true %>
|
8
8
|
<%= f.error_message_on :name %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<div data-hook="admin_product_form_slug">
|
13
13
|
<%= f.field_container :slug do %>
|
14
14
|
<%= f.label :slug, raw(Spree.t(:slug) + content_tag(:span, ' *', :class => "required")) %>
|
15
|
-
<%= f.text_field :slug, :class => 'fullwidth title' %>
|
15
|
+
<%= f.text_field :slug, :class => 'fullwidth title', :required => true %>
|
16
16
|
<%= f.error_message_on :slug %>
|
17
17
|
<% end %>
|
18
18
|
</div>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
<div data-hook="admin_product_form_price">
|
31
31
|
<%= f.field_container :price do %>
|
32
32
|
<%= f.label :price, raw(Spree.t(:master_price) + content_tag(:span, ' *', :class => "required")) %>
|
33
|
-
<%= f.text_field :price, :value => number_to_currency(@product.price, :unit => '') %>
|
33
|
+
<%= f.text_field :price, :value => number_to_currency(@product.price, :unit => ''), :required => true %>
|
34
34
|
<%= f.error_message_on :price %>
|
35
35
|
<% end %>
|
36
36
|
</div>
|
@@ -42,6 +42,7 @@
|
|
42
42
|
<%= f.error_message_on :cost_price %>
|
43
43
|
<% end %>
|
44
44
|
</div>
|
45
|
+
|
45
46
|
<div data-hook="admin_product_form_cost_currency" class="omega two columns">
|
46
47
|
<%= f.field_container :cost_currency do %>
|
47
48
|
<%= f.label :cost_currency, Spree.t(:cost_currency) %>
|
@@ -62,7 +63,7 @@
|
|
62
63
|
|
63
64
|
<% if @product.has_variants? %>
|
64
65
|
<div data-hook="admin_product_form_multiple_variants">
|
65
|
-
<%= f.label :skus, Spree.t(:
|
66
|
+
<%= f.label :skus, Spree.t(:skus) %>
|
66
67
|
<span class="info">
|
67
68
|
<%= Spree.t(:info_product_has_multiple_skus, count: @product.variants.count) %>
|
68
69
|
<ul class="text_list">
|
@@ -76,7 +77,7 @@
|
|
76
77
|
</span>
|
77
78
|
<div class="info-actions">
|
78
79
|
<% if can?(:admin, Spree::Variant) %>
|
79
|
-
<%= link_to_with_icon 'th-large',
|
80
|
+
<%= link_to_with_icon 'th-large', Spree.t(:manage_variants), admin_product_variants_url(@product) %>
|
80
81
|
<% end %>
|
81
82
|
</div>
|
82
83
|
</div>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<%= f.field_container :name do %>
|
12
12
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span><br />
|
13
|
-
<%= f.text_field :name, :class => 'fullwidth title' %>
|
13
|
+
<%= f.text_field :name, :class => 'fullwidth title', :required => true %>
|
14
14
|
<%= f.error_message_on :name %>
|
15
15
|
<% end %>
|
16
16
|
|
@@ -35,7 +35,7 @@
|
|
35
35
|
<div data-hook="new_product_price" class="four columns">
|
36
36
|
<%= f.field_container :price do %>
|
37
37
|
<%= f.label :price, Spree.t(:master_price) %> <span class="required">*</span><br />
|
38
|
-
<%= f.text_field :price, :value => number_to_currency(@product.price, :unit => ''), :class => 'fullwidth' %>
|
38
|
+
<%= f.text_field :price, :value => number_to_currency(@product.price, :unit => ''), :class => 'fullwidth', :required => true %>
|
39
39
|
<%= f.error_message_on :price %>
|
40
40
|
<% end %>
|
41
41
|
</div>
|
@@ -54,7 +54,7 @@
|
|
54
54
|
<div data-hook="new_product_shipping_category" class="alpha four columns">
|
55
55
|
<%= f.field_container :shipping_category do %>
|
56
56
|
<%= f.label :shipping_category_id, Spree.t(:shipping_categories) %><span class="required">*</span><br />
|
57
|
-
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2 fullwidth' }) %>
|
57
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2 fullwidth', :required => true }) %>
|
58
58
|
<%= f.error_message_on :shipping_category_id %>
|
59
59
|
<% end %>
|
60
60
|
</div>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<div id='properties' data-hook>
|
12
12
|
<%= f.field_container :property_ids do %>
|
13
13
|
<%= f.label :property_ids, Spree.t(:properties) %><br>
|
14
|
-
<%= f.select :property_ids, Spree::Property.all.map { |p| [p.presentation, p.id] }, {}, { :multiple => true, :class => "select2 fullwidth" } %>
|
14
|
+
<%= f.select :property_ids, Spree::Property.all.map { |p| ["#{p.presentation} (#{p.name})", p.id] }, {}, { :multiple => true, :class => "select2 fullwidth" } %>
|
15
15
|
<% end %>
|
16
16
|
</div>
|
17
17
|
</div>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<div class="six columns omega">
|
20
20
|
<%= f.field_container :option_type_ids do %>
|
21
21
|
<%= f.label :option_type_ids, Spree.t(:option_types) %><br>
|
22
|
-
<%= f.select :option_type_ids, Spree::OptionType.all.map { |ot| [ot.presentation, ot.id] }, {}, { :multiple => true, :class => "select2 fullwidth" } %>
|
22
|
+
<%= f.select :option_type_ids, Spree::OptionType.all.map { |ot| ["#{ot.presentation} (#{ot.name})", ot.id] }, {}, { :multiple => true, :class => "select2 fullwidth" } %>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
25
|
</div>
|
@@ -10,8 +10,8 @@
|
|
10
10
|
<%= configurations_sidebar_menu_item Spree.t(:tax_rates), admin_tax_rates_path %>
|
11
11
|
<%= configurations_sidebar_menu_item Spree.t(:zones), admin_zones_path %>
|
12
12
|
<%= configurations_sidebar_menu_item Spree.t(:countries), admin_countries_path %>
|
13
|
-
<% if Spree::Config[:default_country_id] %>
|
14
|
-
<%= configurations_sidebar_menu_item Spree.t(:states), admin_country_states_path(
|
13
|
+
<% if country = Spree::Country.find_by_id(Spree::Config[:default_country_id]) || Spree::Country.first %>
|
14
|
+
<%= configurations_sidebar_menu_item Spree.t(:states), admin_country_states_path(country) %>
|
15
15
|
<% end %>
|
16
16
|
<%= configurations_sidebar_menu_item Spree.t(:payment_methods), admin_payment_methods_path %>
|
17
17
|
<%= configurations_sidebar_menu_item Spree.t(:taxonomies), admin_taxonomies_path %>
|
@@ -1,91 +1,77 @@
|
|
1
1
|
<div data-hook="admin_stock_locations_form_fields" class="row">
|
2
|
-
<div class="
|
3
|
-
<div
|
2
|
+
<div class="alpha nine columns" data-hook="stock_location_names">
|
3
|
+
<div data-hook="stock_location_name">
|
4
4
|
<%= f.field_container :name do %>
|
5
5
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span><br />
|
6
|
-
<%= f.text_field :name, :
|
7
|
-
<% end %><br>
|
8
|
-
<%= f.field_container :admin_name do %>
|
9
|
-
<%= f.label :admin_name, Spree.t(:internal_name) %>
|
10
|
-
<%= f.text_field :admin_name, :class => 'fullwidth', :label => false %>
|
6
|
+
<%= f.text_field :name, class: 'fullwidth', required: true %>
|
11
7
|
<% end %>
|
12
8
|
</div>
|
13
|
-
<div
|
14
|
-
<%= f.field_container :
|
15
|
-
|
16
|
-
|
17
|
-
<li>
|
18
|
-
<%= f.label :active, Spree.t(:active) %>
|
19
|
-
<%= f.check_box :active %>
|
20
|
-
</li>
|
21
|
-
<li>
|
22
|
-
<%= f.label :backorderable_default, Spree.t(:backorderable_default) %>
|
23
|
-
<%= f.check_box :backorderable_default %>
|
24
|
-
</li>
|
25
|
-
<li>
|
26
|
-
<%= f.label :propagate_all_variants, Spree.t(:propagate_all_variants) %>
|
27
|
-
<%= f.check_box :propagate_all_variants %>
|
28
|
-
</li>
|
29
|
-
</ul>
|
9
|
+
<div data-hook="stock_location_admin_name">
|
10
|
+
<%= f.field_container :admin_name do %>
|
11
|
+
<%= f.label :admin_name, Spree.t(:internal_name) %>
|
12
|
+
<%= f.text_field :admin_name, class: 'fullwidth', label: false %>
|
30
13
|
<% end %>
|
31
14
|
</div>
|
32
15
|
</div>
|
33
16
|
|
34
|
-
<div class="
|
35
|
-
|
36
|
-
<
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
17
|
+
<div class="omega three columns" data-hook="stock_location_status">
|
18
|
+
<%= f.field_container :active do %>
|
19
|
+
<label for="active"><%= Spree.t(:status) %></label>
|
20
|
+
<ul>
|
21
|
+
<li class="fullwidth" data-hook="stock_location_active">
|
22
|
+
<%= f.check_box :active %>
|
23
|
+
<%= f.label :active, Spree.t(:active) %>
|
24
|
+
</li>
|
25
|
+
<li class="fullwidth" data-hook="stock_location_backorderable_default">
|
26
|
+
<%= f.check_box :backorderable_default %>
|
27
|
+
<%= f.label :backorderable_default, Spree.t(:backorderable_default) %>
|
28
|
+
</li>
|
29
|
+
<li class="fullwidth" data-hook="stock_location_propagate_all_variants">
|
30
|
+
<%= f.check_box :propagate_all_variants %>
|
31
|
+
<%= f.label :propagate_all_variants, Spree.t(:propagate_all_variants) %>
|
32
|
+
</li>
|
33
|
+
</ul>
|
34
|
+
<% end %>
|
35
|
+
</div>
|
41
36
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
</div>
|
47
|
-
</div>
|
48
|
-
<div class="four columns">
|
49
|
-
<div class="field ">
|
50
|
-
<%= f.label :city, Spree.t(:city) %>
|
51
|
-
<%= f.text_field :city, :class => 'fullwidth' %>
|
52
|
-
</div>
|
53
|
-
</div>
|
37
|
+
<div class="alpha six columns field" data-hook="stock_location_address1">
|
38
|
+
<%= f.label :address1, Spree.t(:street_address) %>
|
39
|
+
<%= f.text_field :address1, class: 'fullwidth' %>
|
40
|
+
</div>
|
54
41
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
<%= f.text_field :zipcode, :class => 'fullwidth' %>
|
59
|
-
</div>
|
60
|
-
</div>
|
42
|
+
<div class="omega six columns field" data-hook="stock_location_city">
|
43
|
+
<%= f.label :city, Spree.t(:city) %>
|
44
|
+
<%= f.text_field :city, class: 'fullwidth' %>
|
61
45
|
</div>
|
62
46
|
|
63
|
-
<div class="
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
<span id="country"><%= f.collection_select :country_id, available_countries, :id, :name, {}, {:class => 'select2 fullwidth'} %></span>
|
68
|
-
</div>
|
69
|
-
</div>
|
47
|
+
<div class="alpha six columns field" data-hook="stock_location_address2">
|
48
|
+
<%= f.label :address2, Spree.t(:street_address_2) %>
|
49
|
+
<%= f.text_field :address2, class: 'fullwidth' %>
|
50
|
+
</div>
|
70
51
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
<span id="state" class="region">
|
76
|
-
<%= f.text_field :state_name, :style => "display: #{f.object.country.states.empty? ? 'block' : 'none' };", :disabled => !f.object.country.states.empty?, :class => 'fullwidth state_name' %>
|
77
|
-
<%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, {:include_blank => true}, {:class => 'select2 fullwidth', :style => "display: #{f.object.country.states.empty? ? 'none' : 'block' };", :disabled => f.object.country.states.empty?} %>
|
78
|
-
</span>
|
79
|
-
<% end %>
|
80
|
-
</div>
|
81
|
-
</div>
|
52
|
+
<div class="three columns field" data-hook="stock_location_zipcode">
|
53
|
+
<%= f.label :zipcode, Spree.t(:zip) %>
|
54
|
+
<%= f.text_field :zipcode, class: 'fullwidth' %>
|
55
|
+
</div>
|
82
56
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
57
|
+
<div class="omega three columns field" data-hook="stock_location_phone">
|
58
|
+
<%= f.label :phone, Spree.t(:phone) %>
|
59
|
+
<%= f.phone_field :phone, class: 'fullwidth' %>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="alpha six columns field" data-hook="stock_location_country">
|
63
|
+
<%= f.label :country_id, Spree.t(:country) %>
|
64
|
+
<span id="country"><%= f.collection_select :country_id, available_countries, :id, :name, {}, { class: 'select2 fullwidth' } %></span>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
<div class="omega six columns field" data-hook="stock_location_state">
|
68
|
+
<% if f.object.country %>
|
69
|
+
<%= f.label :state_id, Spree.t(:state) %>
|
70
|
+
<span id="state" class="region">
|
71
|
+
<%= f.text_field :state_name, style: "display: #{f.object.country.states.empty? ? 'block' : 'none' };", disabled: !f.object.country.states.empty?, class: 'fullwidth state_name' %>
|
72
|
+
<%= f.collection_select :state_id, f.object.country.states.sort, :id, :name, { include_blank: true }, {class: 'select2 fullwidth', style: "display: #{f.object.country.states.empty? ? 'none' : 'block' };", disabled: f.object.country.states.empty?} %>
|
73
|
+
</span>
|
74
|
+
<% end %>
|
89
75
|
</div>
|
90
76
|
</div>
|
91
77
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<div class="four columns">
|
9
9
|
<div data-hook="environment" class="field">
|
10
10
|
<%= label_tag nil, Spree.t(:environment) %>
|
11
|
-
<%= collection_select(:tracker, :environment,
|
11
|
+
<%= collection_select(:tracker, :environment, rails_environments, :to_s, :titleize, {}, {:id => 'tracker-env', :class => 'select2 fullwidth'}) %>
|
12
12
|
</div>
|
13
13
|
</div>
|
14
14
|
<div class="omega four columns">
|
@@ -26,9 +26,9 @@
|
|
26
26
|
</ul>
|
27
27
|
</div>
|
28
28
|
</div>
|
29
|
-
|
29
|
+
|
30
30
|
<div class="clear"></div>
|
31
31
|
|
32
32
|
<div data-hook="additional_tracker_fields"></div>
|
33
|
-
|
33
|
+
|
34
34
|
</div>
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
1
|
Spree::Core::Engine.add_routes do
|
2
|
-
get '/admin', :to => 'admin/orders#index', :as => :admin
|
3
|
-
|
4
2
|
namespace :admin do
|
5
3
|
get '/search/users', :to => "search#users", :as => :search_users
|
6
4
|
|
@@ -151,4 +149,6 @@ Spree::Core::Engine.add_routes do
|
|
151
149
|
end
|
152
150
|
end
|
153
151
|
end
|
152
|
+
|
153
|
+
get '/admin', :to => 'admin/orders#index', :as => :admin
|
154
154
|
end
|
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.3.
|
4
|
+
version: 2.3.5
|
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-
|
11
|
+
date: 2014-11-20 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.3.
|
19
|
+
version: 2.3.5
|
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.3.
|
26
|
+
version: 2.3.5
|
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.3.
|
33
|
+
version: 2.3.5
|
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.3.
|
40
|
+
version: 2.3.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jquery-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 5.0.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 5.0.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: select2-rails
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -257,7 +257,6 @@ files:
|
|
257
257
|
- app/views/spree/admin/inventory_units/adjust.html.erb
|
258
258
|
- app/views/spree/admin/line_items/create.js.erb
|
259
259
|
- app/views/spree/admin/line_items/destroy.js.erb
|
260
|
-
- app/views/spree/admin/log_entries/_credit_card.html.erb
|
261
260
|
- app/views/spree/admin/log_entries/index.html.erb
|
262
261
|
- app/views/spree/admin/option_types/_form.html.erb
|
263
262
|
- app/views/spree/admin/option_types/_option_value_fields.html.erb
|