spree_backend 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/fonts/FontAwesome.otf +0 -0
- data/app/assets/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/fonts/fontawesome-webfont.svg +399 -0
- data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/images/credit_cards/credit_card.gif +0 -0
- data/app/assets/javascripts/admin/admin.js.erb +6 -5
- data/app/assets/javascripts/admin/option_type_autocomplete.js.erb +1 -2
- data/app/assets/javascripts/admin/shipments.js.erb +3 -3
- data/app/assets/javascripts/admin/spree_backend.js +2 -2
- data/app/assets/javascripts/admin/stock_transfer.js.coffee +3 -3
- data/app/assets/javascripts/admin/variant_autocomplete.js.erb +9 -9
- data/app/assets/javascripts/admin/zone.js.coffee +8 -4
- data/app/assets/stylesheets/admin/components/_date-picker.scss +1 -1
- data/app/assets/stylesheets/admin/components/_navigation.scss +12 -8
- data/app/assets/stylesheets/admin/components/_sidebar.scss +2 -0
- data/app/assets/stylesheets/admin/globals/_variables.scss +53 -47
- data/app/assets/stylesheets/admin/globals/_variables_override.scss +2 -2
- data/app/assets/stylesheets/admin/plugins/_font-awesome.scss +1475 -0
- data/app/assets/stylesheets/admin/plugins/_jstree.scss +0 -1
- data/app/assets/stylesheets/admin/plugins/_select2.scss +40 -31
- data/app/assets/stylesheets/admin/shared/_forms.scss +7 -2
- data/app/assets/stylesheets/admin/shared/_icons.scss +7 -6
- data/app/assets/stylesheets/admin/shared/_layout.scss +2 -3
- data/app/assets/stylesheets/admin/shared/_tables.scss +7 -0
- data/app/assets/stylesheets/admin/spree_backend.css +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +3 -0
- data/app/controllers/spree/admin/orders_controller.rb +8 -0
- data/app/controllers/spree/admin/payments_controller.rb +2 -1
- data/app/controllers/spree/admin/products_controller.rb +9 -3
- data/app/controllers/spree/admin/stock_items_controller.rb +29 -6
- data/app/controllers/spree/admin/stock_locations_controller.rb +12 -0
- data/app/controllers/spree/admin/stock_movements_controller.rb +4 -31
- data/app/controllers/spree/admin/stock_transfers_controller.rb +1 -1
- data/app/controllers/spree/admin/tax_categories_controller.rb +1 -1
- data/app/controllers/spree/admin/variants_controller.rb +1 -2
- data/app/helpers/spree/admin/orders_helper.rb +4 -0
- data/app/views/spree/admin/mail_methods/_form.html.erb +3 -7
- data/app/views/spree/admin/orders/_shipment.html.erb +96 -126
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +33 -0
- data/app/views/spree/admin/orders/edit.html.erb +10 -4
- data/app/views/spree/admin/orders/index.html.erb +1 -1
- data/app/views/spree/admin/payments/_form.html.erb +3 -1
- data/app/views/spree/admin/product_properties/index.html.erb +1 -1
- data/app/views/spree/admin/products/_add_stock_form.html.erb +31 -2
- data/app/views/spree/admin/products/_form.html.erb +2 -2
- data/app/views/spree/admin/products/edit.html.erb +5 -3
- data/app/views/spree/admin/products/index.html.erb +4 -4
- data/app/views/spree/admin/products/new.html.erb +10 -0
- data/app/views/spree/admin/products/stock.html.erb +17 -17
- data/app/views/spree/admin/promotions/_promotion_action.html.erb +2 -1
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -0
- data/app/views/spree/admin/prototypes/index.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_tabs.html.erb +10 -9
- data/app/views/spree/admin/shared/_routes.html.erb +4 -0
- data/app/views/spree/admin/shared/_tabs.html.erb +1 -1
- data/app/views/spree/admin/shared/_translations.html.erb +27 -25
- data/app/views/spree/admin/shipping_methods/_form.html.erb +9 -4
- data/app/views/spree/admin/states/index.html.erb +1 -1
- data/app/views/spree/admin/stock_items/destroy.js.erb +1 -0
- data/app/views/spree/admin/stock_locations/_form.html.erb +8 -0
- data/app/views/spree/admin/stock_locations/index.html.erb +35 -31
- data/app/views/spree/admin/stock_locations/new.html.erb +2 -2
- data/app/views/spree/admin/stock_movements/index.html.erb +3 -6
- data/app/views/spree/admin/stock_transfers/index.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/new.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/show.html.erb +1 -2
- data/app/views/spree/admin/taxonomies/edit.erb +1 -1
- data/app/views/spree/admin/variants/_autocomplete.js.erb +1 -1
- data/app/views/spree/admin/zones/_member_type.html.erb +3 -3
- data/app/views/spree/layouts/admin.html.erb +9 -15
- data/config/routes.rb +2 -2
- data/lib/spree/backend.rb +1 -0
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +2 -2
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/style.css +2 -2
- data/vendor/assets/stylesheets/jquery-ui.datepicker.css.erb +5 -5
- metadata +35 -21
- data/app/assets/images/admin/bg/spree_50.png +0 -0
- data/app/assets/stylesheets/admin/plugins/font-awesome.scss +0 -303
- data/app/views/spree/admin/shared/_stock_movement_form.html.erb +0 -30
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.svg +0 -255
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/stylesheets/font-awesome-ie7.css +0 -645
- data/vendor/assets/stylesheets/font-awesome.css.erb +0 -303
@@ -2,7 +2,7 @@ module Spree
|
|
2
2
|
module Admin
|
3
3
|
class TaxCategoriesController < ResourceController
|
4
4
|
def destroy
|
5
|
-
if @object.
|
5
|
+
if @object.destroy
|
6
6
|
flash[:success] = flash_message_for(@object, :successfully_removed)
|
7
7
|
respond_with(@object) do |format|
|
8
8
|
format.html { redirect_to collection_url }
|
@@ -8,8 +8,7 @@ module Spree
|
|
8
8
|
# instead of actually deleting the product.
|
9
9
|
def destroy
|
10
10
|
@variant = Variant.find(params[:id])
|
11
|
-
@variant.
|
12
|
-
if @variant.save
|
11
|
+
if @variant.destroy
|
13
12
|
flash[:success] = Spree.t('notice_messages.variant_deleted')
|
14
13
|
else
|
15
14
|
flash[:success] = Spree.t('notice_messages.variant_not_deleted')
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div data-hook="admin_mail_method_form_fields">
|
2
2
|
<div class="row">
|
3
|
-
|
3
|
+
|
4
4
|
<div class="alpha six columns" data-hook="general">
|
5
5
|
<fieldset class="no-border-bottom">
|
6
6
|
<legend align="center"><%= Spree.t(:general) %></legend>
|
@@ -56,15 +56,11 @@
|
|
56
56
|
</div>
|
57
57
|
<div class="field">
|
58
58
|
<%= label_tag :secure_connection_type, Spree.t(:secure_connection_type) %><br />
|
59
|
-
<%= select_tag(:secure_connection_type,
|
60
|
-
options_from_collection_for_select(Spree::Core::MailSettings::SECURE_CONNECTION_TYPES, :to_s, :to_s, Spree::Config[:secure_connection_type]),
|
61
|
-
:class => 'select2 fullwidth') %>
|
59
|
+
<%= select_tag(:secure_connection_type, options_from_collection_for_select(Spree::Core::MailSettings::SECURE_CONNECTION_TYPES.map{|w| Spree.t(w.downcase.to_sym, :default => w)}, :to_s, :to_s, Spree::Config[:secure_connection_type]), :class => 'select2 fullwidth') %>
|
62
60
|
</div>
|
63
61
|
<div class="field">
|
64
62
|
<%= label_tag :mail_auth_type, Spree.t(:smtp_authentication_type) %><br />
|
65
|
-
<%= select_tag(:mail_auth_type,
|
66
|
-
options_from_collection_for_select(Spree::Core::MailSettings::MAIL_AUTH, :to_s, :to_s, Spree::Config[:mail_auth_type]),
|
67
|
-
:class => 'select2 fullwidth') %>
|
63
|
+
<%= select_tag(:mail_auth_type, options_from_collection_for_select(Spree::Core::MailSettings::MAIL_AUTH.map{|w| Spree.t(w.downcase.to_sym, :default => w)}, :to_s, :to_s, Spree::Config[:mail_auth_type]), :class => 'select2 fullwidth') %>
|
68
64
|
</div>
|
69
65
|
<div class="field">
|
70
66
|
<%= label_tag :smtp_username, Spree.t(:smtp_username) %><br />
|
@@ -1,150 +1,120 @@
|
|
1
|
-
<%=
|
2
|
-
|
3
|
-
<
|
4
|
-
<
|
5
|
-
|
6
|
-
<span class="shipment-state"><%= shipment.state %></span>
|
7
|
-
<%= Spree.t(:package_from) %>
|
8
|
-
<strong class="stock-location-name" data-hook="stock-location-name">'<%= shipment.stock_location.name %>'</strong>
|
9
|
-
<% if shipment.ready? and can? :update, shipment %>
|
1
|
+
<div id="<%= "shipment_#{shipment.id}" %>">
|
2
|
+
<%= render :partial => "spree/admin/variants/split", :formats => :js %>
|
3
|
+
<fieldset class="no-border-bottom">
|
4
|
+
<legend align="center" class="stock-location" data-hook="stock-location">
|
5
|
+
<span class="shipment-number"><%= shipment.number %></span>
|
10
6
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
<span class="shipment-state"><%= Spree.t("shipment_states.#{shipment.state}") %></span>
|
8
|
+
<%= Spree.t(:package_from) %>
|
9
|
+
<strong class="stock-location-name" data-hook="stock-location-name">'<%= shipment.stock_location.name %>'</strong>
|
10
|
+
<% if shipment.ready? and can? :update, shipment %>
|
11
|
+
-
|
12
|
+
<%= link_to 'ship', '#', :class => 'ship button icon-arrow-right', :data => {'shipment-number' => shipment.number} %>
|
13
|
+
<% end %>
|
14
|
+
</legend>
|
15
|
+
</fieldset>
|
15
16
|
|
16
|
-
<table class="stock-contents index" data-hook="stock-contents">
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
<table class="stock-contents index" data-hook="stock-contents">
|
18
|
+
<colgroup>
|
19
|
+
<col style="width: 10%;" />
|
20
|
+
<col style="width: 30%;" />
|
21
|
+
<col style="width: 15%;" />
|
22
|
+
<col style="width: 15%;" />
|
23
|
+
<col style="width: 15%;" />
|
24
|
+
<col style="width: 15%;" />
|
25
|
+
</colgroup>
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
<thead>
|
28
|
+
<th colspan="2"><%= Spree.t(:item_description) %></th>
|
29
|
+
<th><%= Spree.t(:price) %></th>
|
30
|
+
<th><%= Spree.t(:quantity) %></th>
|
31
|
+
<th><%= Spree.t(:total) %></th>
|
32
|
+
<th class="orders-actions actions" data-hook="admin_order_form_line_items_header_actions"></th>
|
33
|
+
</thead>
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
<% line_item = order.find_line_item_by_variant(item.variant) %>
|
35
|
+
<tbody data-shipment-number="<%= shipment.number %>" data-order-number="<%= order.number %>">
|
36
|
+
<%= render 'spree/admin/orders/shipment_manifest', order: order, shipment: shipment %>
|
37
37
|
|
38
|
-
|
39
|
-
<
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
38
|
+
<% unless shipment.shipped? %>
|
39
|
+
<tr class="edit-method hidden total">
|
40
|
+
<td colspan="5">
|
41
|
+
<div class="field alpha five columns">
|
42
|
+
<%= label_tag 'selected_shipping_rate_id', Spree.t(:shipping_method) %>
|
43
|
+
<%= select_tag :selected_shipping_rate_id,
|
44
|
+
options_for_select(shipment.shipping_rates.backend.map {|sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id),
|
45
|
+
{:class => 'select2 fullwidth', :data => {'shipment-number' => shipment.number } } %>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<% if shipment.adjustment && shipment.adjustment.closed? %>
|
49
|
+
<div class="field omega four columns">
|
50
|
+
<label><%= Spree.t(:associated_adjustment_closed) %></label>
|
51
|
+
<ul>
|
52
|
+
<li><%= radio_button_tag :open_adjustment, 'yes', false, :data => {'shipment-number' => shipment.number } %> Yes</li>
|
53
|
+
<li><%= radio_button_tag :open_adjustment, 'no', true, :data => {'shipment-number' => shipment.number } %> No</li>
|
54
|
+
</ul>
|
55
|
+
</div>
|
47
56
|
<% end %>
|
48
|
-
</td>
|
49
|
-
<% unless shipment.shipped? %>
|
50
|
-
<td class="item-qty-edit hidden">
|
51
|
-
<%= number_field_tag :quantity, item.quantity, :min => 0, :class => "line_item_quantity", :size => 5 %>
|
52
57
|
</td>
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
<td class="actions">
|
59
|
+
<% if can? :update, shipment %>
|
60
|
+
<%= link_to '', '#', :class => 'save-method icon_link icon-ok no-text with-tip',
|
61
|
+
:data => {'shipment-number' => shipment.number, :action => 'save'}, title: Spree.t('actions.save') %>
|
62
|
+
<%= link_to '', '#', :class => 'cancel-method icon_link icon-cancel no-text with-tip',
|
63
|
+
:data => {:action => 'cancel'}, :title => Spree.t('actions.cancel') %>
|
64
|
+
<% end %>
|
65
|
+
</td>
|
66
|
+
</tr>
|
67
|
+
<% end %>
|
68
|
+
|
69
|
+
<tr class="show-method total">
|
70
|
+
<td colspan="4">
|
71
|
+
<% if shipment.adjustment.present? %>
|
72
|
+
<strong><%= shipment.adjustment.label %>: <%= shipment.shipping_method.name %></strong>
|
73
|
+
<% else %>
|
74
|
+
<%= Spree.t(:cannot_set_shipping_method_without_address) %>
|
75
|
+
<% end %>
|
76
|
+
</td>
|
77
|
+
<td class="total" align="center">
|
78
|
+
<% if shipment.adjustment.present? %>
|
79
|
+
<span><%= shipment.adjustment.display_amount %></span>
|
80
|
+
<% end %>
|
81
|
+
</td>
|
82
|
+
<% if shipment.adjustment.present? && !shipment.shipped? %>
|
83
|
+
<td class="actions">
|
84
|
+
<% if can? :update, shipment %>
|
85
|
+
<%= link_to '', '#', :class => 'edit-method icon_link icon-edit no-text with-tip', :data => {:action => 'edit'}, :title => Spree.t('edit') %>
|
63
86
|
<% end %>
|
64
87
|
</td>
|
65
88
|
<% end %>
|
66
89
|
</tr>
|
67
|
-
<% end %>
|
68
90
|
|
69
|
-
|
70
|
-
<tr class="edit-method hidden total">
|
91
|
+
<tr class="edit-tracking hidden total">
|
71
92
|
<td colspan="5">
|
72
|
-
<
|
73
|
-
|
74
|
-
<%= select_tag :selected_shipping_rate_id,
|
75
|
-
options_for_select(shipment.shipping_rates.backend.map {|sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id),
|
76
|
-
{:class => 'select2 fullwidth', :data => {'shipment-number' => shipment.number } } %>
|
77
|
-
</div>
|
78
|
-
|
79
|
-
<% if shipment.adjustment && shipment.adjustment.closed? %>
|
80
|
-
<div class="field omega four columns">
|
81
|
-
<label><%= Spree.t(:associated_adjustment_closed) %></label>
|
82
|
-
<ul>
|
83
|
-
<li><%= radio_button_tag :open_adjustment, 'yes', false, :data => {'shipment-number' => shipment.number } %> Yes</li>
|
84
|
-
<li><%= radio_button_tag :open_adjustment, 'no', true, :data => {'shipment-number' => shipment.number } %> No</li>
|
85
|
-
</ul>
|
86
|
-
</div>
|
87
|
-
<% end %>
|
93
|
+
<label><%= Spree.t(:tracking_number) %>:</label>
|
94
|
+
<%= text_field_tag :tracking, shipment.tracking %>
|
88
95
|
</td>
|
89
96
|
<td class="actions">
|
90
97
|
<% if can? :update, shipment %>
|
91
|
-
<%= link_to '', '#', :class => 'save-
|
92
|
-
|
93
|
-
<%= link_to '', '#', :class => 'cancel-method icon_link icon-cancel no-text with-tip',
|
94
|
-
:data => {:action => 'cancel'}, :title => Spree.t('actions.cancel') %>
|
98
|
+
<%= link_to '', '#', :class => 'save-tracking icon_link icon-ok no-text with-tip', :data => {'shipment-number' => shipment.number, :action => 'save'}, :title => Spree.t('actions.save') %>
|
99
|
+
<%= link_to '', '#', :class => 'cancel-tracking icon_link icon-cancel no-text with-tip', :data => {:action => 'cancel'}, :title => Spree.t('actions.cancel') %>
|
95
100
|
<% end %>
|
96
101
|
</td>
|
97
102
|
</tr>
|
98
|
-
<% end %>
|
99
103
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
<td class="total" align="center">
|
109
|
-
<% if shipment.adjustment.present? %>
|
110
|
-
<span><%= shipment.adjustment.display_amount %></span>
|
111
|
-
<% end %>
|
112
|
-
</td>
|
113
|
-
<% if shipment.adjustment.present? && !shipment.shipped? %>
|
104
|
+
<tr class="show-tracking total">
|
105
|
+
<td colspan="5">
|
106
|
+
<% if shipment.tracking.present? %>
|
107
|
+
<strong><%= Spree.t(:tracking) %>:</strong> <%= shipment.tracking %>
|
108
|
+
<% else %>
|
109
|
+
<%= Spree.t(:no_tracking_present) %>
|
110
|
+
<% end %>
|
111
|
+
</td>
|
114
112
|
<td class="actions">
|
115
113
|
<% if can? :update, shipment %>
|
116
|
-
<%= link_to '', '#', :class => 'edit-
|
114
|
+
<%= link_to '', '#', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => {:action => 'edit'}, :title => Spree.t('edit') %>
|
117
115
|
<% end %>
|
118
116
|
</td>
|
119
|
-
|
120
|
-
</
|
121
|
-
|
122
|
-
|
123
|
-
<td colspan="5">
|
124
|
-
<label><%= Spree.t(:tracking_number) %>:</label>
|
125
|
-
<%= text_field_tag :tracking, shipment.tracking %>
|
126
|
-
</td>
|
127
|
-
<td class="actions">
|
128
|
-
<% if can? :update, shipment %>
|
129
|
-
<%= link_to '', '#', :class => 'save-tracking icon_link icon-ok no-text with-tip', :data => {'shipment-number' => shipment.number, :action => 'save'}, :title => Spree.t('actions.save') %>
|
130
|
-
<%= link_to '', '#', :class => 'cancel-tracking icon_link icon-cancel no-text with-tip', :data => {:action => 'cancel'}, :title => Spree.t('actions.cancel') %>
|
131
|
-
<% end %>
|
132
|
-
</td>
|
133
|
-
</tr>
|
134
|
-
|
135
|
-
<tr class="show-tracking total">
|
136
|
-
<td colspan="5">
|
137
|
-
<% if shipment.tracking.present? %>
|
138
|
-
<strong><%= Spree.t(:tracking) %>:</strong> <%= shipment.tracking %>
|
139
|
-
<% else %>
|
140
|
-
<%= Spree.t(:no_tracking_present) %>
|
141
|
-
<% end %>
|
142
|
-
</td>
|
143
|
-
<td class="actions">
|
144
|
-
<% if can? :update, shipment %>
|
145
|
-
<%= link_to '', '#', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => {:action => 'edit'}, :title => Spree.t('edit') %>
|
146
|
-
<% end %>
|
147
|
-
</td>
|
148
|
-
</tr>
|
149
|
-
</tbody>
|
150
|
-
</table>
|
117
|
+
</tr>
|
118
|
+
</tbody>
|
119
|
+
</table>
|
120
|
+
</div>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<% shipment.manifest.each do |item| %>
|
2
|
+
<% line_item = order.find_line_item_by_variant(item.variant) %>
|
3
|
+
|
4
|
+
<tr class="stock-item" data-item-quantity="<%= item.quantity %>">
|
5
|
+
<td class="item-image"><%= mini_image(item.variant) %></td>
|
6
|
+
<td class="item-name">
|
7
|
+
<%= item.variant.product.name %><br><%= "(" + variant_options(item.variant) + ")" unless item.variant.option_values.empty? %>
|
8
|
+
</td>
|
9
|
+
<td class="item-price align-center"><%= line_item.single_money.to_html %></td>
|
10
|
+
<td class="item-qty-show align-center">
|
11
|
+
<% item.states.each do |state,count| %>
|
12
|
+
<%= count %> x <%= state.humanize.downcase %>
|
13
|
+
<% end %>
|
14
|
+
</td>
|
15
|
+
<% unless shipment.shipped? %>
|
16
|
+
<td class="item-qty-edit hidden">
|
17
|
+
<%= number_field_tag :quantity, item.quantity, :min => 0, :class => "line_item_quantity", :size => 5 %>
|
18
|
+
</td>
|
19
|
+
<% end %>
|
20
|
+
<td class="item-total align-center"><%= line_item_shipment_price(line_item, item.quantity) %></td>
|
21
|
+
<% unless shipment.shipped? %>
|
22
|
+
<td class="cart-item-delete actions" data-hook="cart_item_delete">
|
23
|
+
<% if can? :update, item %>
|
24
|
+
<%= link_to '', '#', :class => 'save-item icon_link icon-ok no-text with-tip', :data => {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, :action => 'save'}, :title => Spree.t('actions.save'), :style => 'display: none' %>
|
25
|
+
<%= link_to '', '#', :class => 'cancel-item icon_link icon-cancel no-text with-tip', :data => {:action => 'cancel'}, :title => Spree.t('actions.cancel'), :style => 'display: none' %>
|
26
|
+
<%= link_to '', '#', :class => 'edit-item icon_link icon-edit no-text with-tip', :data => {:action => 'edit'}, :title => Spree.t('edit') %>
|
27
|
+
<%= link_to '', '#', :class => 'split-item icon_link icon-resize-horizontal no-text with-tip', :data => {:action => 'split', 'variant-id' => item.variant.id}, :title => Spree.t('split') %>
|
28
|
+
<%= link_to '', '#', :class => 'delete-item icon-trash no-text with-tip', :data => {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, :action => 'remove', :confirm => Spree.t(:are_you_sure)}, :title => Spree.t('delete') %>
|
29
|
+
<% end %>
|
30
|
+
</td>
|
31
|
+
<% end %>
|
32
|
+
</tr>
|
33
|
+
<% end %>
|
@@ -1,8 +1,14 @@
|
|
1
1
|
<%= csrf_meta_tags %>
|
2
2
|
<% content_for :page_actions do %>
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
<% if can?(:fire, @order) %>
|
4
|
+
<li><%= event_links %></li>
|
5
|
+
<% end %>
|
6
|
+
<% if can?(:resend, @order) %>
|
7
|
+
<li><%= button_link_to Spree.t(:resend), resend_admin_order_url(@order), :method => :post, :icon => 'icon-email' %></li>
|
8
|
+
<% end %>
|
9
|
+
<% if can?(:admin, Spree::Order) %>
|
10
|
+
<li><%= button_link_to Spree.t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left' %></li>
|
11
|
+
<% end %>
|
6
12
|
<% end %>
|
7
13
|
|
8
14
|
<%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Order Details' } %>
|
@@ -11,7 +17,7 @@
|
|
11
17
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @order } %>
|
12
18
|
</div>
|
13
19
|
|
14
|
-
<%= render :partial => 'add_product' %>
|
20
|
+
<%= render :partial => 'add_product' if can?(:update, @order) %>
|
15
21
|
|
16
22
|
<% if @order.line_items.empty? %>
|
17
23
|
<div class="no-objects-found">
|
@@ -20,7 +20,9 @@
|
|
20
20
|
</ul>
|
21
21
|
<div class="payment-method-settings">
|
22
22
|
<% @payment_methods.each do |method| %>
|
23
|
-
|
23
|
+
<% if method.source_required? %>
|
24
|
+
<%= render :partial => "spree/admin/payments/source_forms/#{method.method_type}", :locals => { :payment_method => method } %>
|
25
|
+
<% end %>
|
24
26
|
<% end %>
|
25
27
|
</div>
|
26
28
|
</div>
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<div class="add_product_properties" data-hook="add_product_properties"></div>
|
23
23
|
|
24
24
|
<div id="prototypes" data-hook></div>
|
25
|
-
<%= image_tag 'spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %>
|
25
|
+
<%= image_tag 'select2-spinner.gif', :plugin => 'spree', :style => 'display:none;', :id => 'busy_indicator' %>
|
26
26
|
|
27
27
|
<table class="index sortable" data-hook data-sortable-link="<%= update_positions_admin_product_product_properties_url %>">
|
28
28
|
<thead>
|
@@ -1,6 +1,35 @@
|
|
1
|
-
<%= form_for [:admin, Spree::StockMovement.new] do |f| %>
|
1
|
+
<%= form_for [:admin, Spree::StockMovement.new], url: admin_stock_items_path do |f| %>
|
2
2
|
<fieldset>
|
3
3
|
<legend align="center"><%= Spree.t(:add_stock_management) %></legend>
|
4
|
-
|
4
|
+
|
5
|
+
<div data-hook="admin_stock_movements_form_fields" class="row">
|
6
|
+
<div class="alpha two columns">
|
7
|
+
<%= f.field_container :quantity do %>
|
8
|
+
<%= f.label :quantity, Spree.t(:quantity) %>
|
9
|
+
<%= f.number_field :quantity, class: 'fullwidth', value: 1 %>
|
10
|
+
<% end %>
|
11
|
+
</div>
|
12
|
+
<div class="five columns">
|
13
|
+
<%= f.field_container :stock_location do %>
|
14
|
+
<%= label_tag :stock_location_id, Spree.t(:stock_location) %>
|
15
|
+
<%= select_tag 'stock_location_id', options_from_collection_for_select(@stock_locations, :id, :name),
|
16
|
+
class: 'select2 fullwidth' %>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<div class="five columns omega">
|
21
|
+
<%= f.field_container :variant_id do %>
|
22
|
+
<%= label_tag 'variant_id', Spree.t(:variant) %>
|
23
|
+
<%= select_tag 'variant_id', options_from_collection_for_select(@variants, :id, :sku),
|
24
|
+
class: 'select2 fullwidth' %>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
30
|
+
<%= button Spree.t(:add_stock), 'icon-plus' %>
|
31
|
+
<span class="or"><%= Spree.t(:or) %></span>
|
32
|
+
<%= link_to_with_icon 'icon-remove', Spree.t('actions.cancel'), collection_url, :class => 'button' %>
|
33
|
+
</div>
|
5
34
|
</fieldset>
|
6
35
|
<% end %>
|
@@ -78,13 +78,13 @@
|
|
78
78
|
|
79
79
|
<%= f.field_container :shipping_categories do %>
|
80
80
|
<%= f.label :shipping_category_id, Spree.t(:shipping_categories) %>
|
81
|
-
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => '
|
81
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2' }) %>
|
82
82
|
<%= f.error_message_on :shipping_category %>
|
83
83
|
<% end %>
|
84
84
|
|
85
85
|
<%= f.field_container :tax_category do %>
|
86
86
|
<%= f.label :tax_category_id, Spree.t(:tax_category) %>
|
87
|
-
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => '
|
87
|
+
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2' }) %>
|
88
88
|
<%= f.error_message_on :tax_category %>
|
89
89
|
<% end %>
|
90
90
|
</div>
|