spree_backend 2.0.13 → 2.1.0
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 +4 -4
- data/app/assets/javascripts/admin/admin.js.erb +27 -23
- data/app/assets/javascripts/admin/checkouts/edit.js +12 -0
- data/app/assets/javascripts/admin/image_settings.js.erb +2 -1
- data/app/assets/javascripts/admin/option_type_autocomplete.js.erb +1 -4
- data/app/assets/javascripts/admin/product_picker.js +1 -2
- data/app/assets/javascripts/admin/progress.coffee +4 -4
- data/app/assets/javascripts/admin/shipments.js.erb +0 -243
- data/app/assets/javascripts/admin/spree_backend.js +3 -1
- data/app/assets/javascripts/admin/stock_transfer.js.coffee +8 -4
- data/app/assets/javascripts/admin/taxonomy.js.coffee +2 -2
- data/app/assets/javascripts/admin/variant_autocomplete.js.erb +243 -0
- data/app/assets/stylesheets/admin/components/_navigation.scss +2 -8
- data/app/assets/stylesheets/admin/hacks/_ie.scss +2 -1
- data/app/assets/stylesheets/admin/hacks/_mozilla.scss +1 -2
- data/app/assets/stylesheets/admin/plugins/_select2.scss +8 -11
- data/app/assets/stylesheets/admin/sections/_tax_zones.scss +15 -0
- data/app/assets/stylesheets/admin/shared/_forms.scss +0 -1
- data/app/assets/stylesheets/admin/shared/_icons.scss +1 -0
- data/app/assets/stylesheets/admin/shared/_layout.scss +0 -1
- data/app/assets/stylesheets/admin/shared/_tables.scss +1 -1
- data/app/assets/stylesheets/admin/spree_admin.scss +1 -0
- data/app/assets/stylesheets/admin/spree_backend.css +1 -0
- data/app/controllers/spree/admin/base_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +10 -6
- data/app/controllers/spree/admin/orders_controller.rb +5 -4
- data/app/controllers/spree/admin/overview_controller.rb +0 -2
- data/app/controllers/spree/admin/payment_methods_controller.rb +7 -3
- data/app/controllers/spree/admin/payments_controller.rb +5 -13
- data/app/controllers/spree/admin/products_controller.rb +8 -0
- data/app/controllers/spree/admin/reports_controller.rb +16 -26
- data/app/controllers/spree/admin/resource_controller.rb +12 -8
- data/app/controllers/spree/admin/stock_items_controller.rb +5 -1
- data/app/controllers/spree/admin/stock_movements_controller.rb +5 -1
- data/app/controllers/spree/admin/stock_transfers_controller.rb +1 -1
- data/app/controllers/spree/admin/taxons_controller.rb +42 -16
- data/app/helpers/spree/admin/base_helper.rb +2 -2
- data/app/helpers/spree/admin/navigation_helper.rb +3 -6
- data/app/helpers/spree/admin/stock_movements_helper.rb +1 -12
- data/app/views/spree/admin/mail_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/orders/_add_product.html.erb +0 -1
- data/app/views/spree/admin/orders/_form.html.erb +1 -5
- data/app/views/spree/admin/orders/_shipment.html.erb +2 -10
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +2 -2
- data/app/views/spree/admin/orders/customer_details/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +4 -10
- data/app/views/spree/admin/payment_methods/_form.html.erb +2 -0
- data/app/views/spree/admin/payments/_form.html.erb +2 -2
- data/app/views/spree/admin/payments/_list.html.erb +2 -2
- data/app/views/spree/admin/payments/show.html.erb +2 -2
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +2 -3
- data/app/views/spree/admin/payments/source_views/_gateway.html.erb +15 -5
- data/app/views/spree/admin/products/_form.html.erb +59 -82
- data/app/views/spree/admin/products/index.html.erb +1 -1
- data/app/views/spree/admin/products/new.html.erb +6 -6
- data/app/views/spree/admin/products/stock.html.erb +4 -12
- data/app/views/spree/admin/promotion_rules/create.js.erb +0 -1
- data/app/views/spree/admin/promotions/_form.html.erb +5 -3
- data/app/views/spree/admin/prototypes/_form.html.erb +2 -2
- data/app/views/spree/admin/prototypes/show.html.erb +1 -1
- data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +2 -2
- data/app/views/spree/admin/shared/_content_header.html.erb +23 -0
- data/app/views/spree/admin/shared/_destroy.js.erb +14 -5
- data/app/views/spree/admin/shared/_header.html.erb +9 -0
- data/app/views/spree/admin/shared/_menu.html.erb +9 -0
- data/app/views/spree/admin/shared/_order_tabs.html.erb +5 -5
- data/app/views/spree/admin/shared/_report_criteria.html.erb +2 -2
- data/app/views/spree/admin/shared/_routes.html.erb +1 -2
- data/app/views/spree/admin/shared/_sidebar.html.erb +10 -0
- data/app/views/spree/admin/shared/_sub_menu.html.erb +9 -0
- data/app/views/spree/admin/shared/_table_filter.html.erb +8 -0
- data/app/views/spree/admin/shared/_translations.html.erb +3 -6
- data/app/views/spree/admin/shipping_methods/_form.html.erb +5 -6
- data/app/views/spree/admin/shipping_methods/index.html.erb +1 -1
- data/app/views/spree/admin/stock_movements/_form.html.erb +4 -5
- data/app/views/spree/admin/stock_movements/index.html.erb +2 -4
- data/app/views/spree/admin/stock_transfers/show.html.erb +1 -1
- data/app/views/spree/admin/taxons/edit.html.erb +1 -1
- data/app/views/spree/admin/variants/_autocomplete.js.erb +51 -6
- data/app/views/spree/layouts/admin.html.erb +11 -81
- data/config/routes.rb +2 -4
- data/lib/spree/backend/engine.rb +0 -1
- data/vendor/assets/javascripts/css_browser_selector_dev.js +114 -141
- metadata +42 -31
- data/app/assets/javascripts/admin/line_items.js.coffee +0 -61
- data/app/assets/javascripts/admin/payments/edit.js.coffee +0 -148
- data/app/assets/javascripts/admin/stock_movement.js.coffee +0 -17
- data/app/assets/javascripts/admin/variant_management.js.coffee +0 -10
- data/app/assets/javascripts/spree/backend/select_payments.js.coffee +0 -7
- data/app/controllers/spree/admin/variants_including_master_controller.rb +0 -15
- data/app/views/spree/admin/orders/_line_items.html.erb +0 -46
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +0 -41
- data/app/views/spree/admin/variants/update.js.erb +0 -1
- data/vendor/assets/stylesheets/AdminLTE.css +0 -3535
|
@@ -1,48 +1,40 @@
|
|
|
1
1
|
<div data-hook="admin_product_form_fields">
|
|
2
|
+
|
|
3
|
+
<div class="left eight columns alpha" data-hook="admin_product_form_left">
|
|
4
|
+
<%= f.field_container :name do %>
|
|
5
|
+
<%= f.label :name, raw(Spree.t(:name) + content_tag(:span, ' *', :class => 'required')) %>
|
|
6
|
+
<%= f.text_field :name, :class => 'fullwidth title' %>
|
|
7
|
+
<%= f.error_message_on :name %>
|
|
8
|
+
<% end %>
|
|
2
9
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<%= f.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<%= f.error_message_on :name %>
|
|
9
|
-
<% end %>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<div data-hook="admin_product_form_permalink">
|
|
13
|
-
<%= f.field_container :permalink do %>
|
|
14
|
-
<%= f.label :permalink, raw(Spree.t(:permalink) + content_tag(:span, ' *', :class => "required")) %>
|
|
15
|
-
<%= f.text_field :permalink, :class => 'fullwidth title' %>
|
|
16
|
-
<%= f.error_message_on :permalink %>
|
|
17
|
-
<% end %>
|
|
18
|
-
</div>
|
|
10
|
+
<%= f.field_container :permalink do %>
|
|
11
|
+
<%= f.label :permalink, raw(Spree.t(:permalink) + content_tag(:span, ' *', :class => "required")) %>
|
|
12
|
+
<%= f.text_field :permalink, :class => 'fullwidth title' %>
|
|
13
|
+
<%= f.error_message_on :permalink %>
|
|
14
|
+
<% end %>
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
<%= f.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<% end %>
|
|
26
|
-
</div>
|
|
16
|
+
<%= f.field_container :description do %>
|
|
17
|
+
<%= f.label :description, Spree.t(:description) %>
|
|
18
|
+
<%= f.text_area :description, {:rows => "#{unless @product.has_variants? then '20' else '13' end}", :class => 'fullwidth'} %>
|
|
19
|
+
<%= f.error_message_on :description %>
|
|
20
|
+
<% end %>
|
|
27
21
|
</div>
|
|
28
22
|
|
|
29
23
|
<div class="right four columns omega" data-hook="admin_product_form_right">
|
|
30
|
-
<div data-hook="admin_product_form_price">
|
|
31
24
|
<%= f.field_container :price do %>
|
|
32
25
|
<%= f.label :price, raw(Spree.t(:master_price) + content_tag(:span, ' *', :class => "required")) %>
|
|
33
26
|
<%= f.text_field :price, :value => number_to_currency(@product.price, :unit => '') %>
|
|
34
27
|
<%= f.error_message_on :price %>
|
|
35
28
|
<% end %>
|
|
36
|
-
</div>
|
|
37
29
|
|
|
38
|
-
<div
|
|
30
|
+
<div class="alpha two columns">
|
|
39
31
|
<%= f.field_container :cost_price do %>
|
|
40
32
|
<%= f.label :cost_price, Spree.t(:cost_price) %>
|
|
41
33
|
<%= f.text_field :cost_price, :value => number_to_currency(@product.cost_price, :unit => '') %>
|
|
42
34
|
<%= f.error_message_on :cost_price %>
|
|
43
35
|
<% end %>
|
|
44
36
|
</div>
|
|
45
|
-
<div
|
|
37
|
+
<div class="omega two columns">
|
|
46
38
|
<%= f.field_container :cost_currency do %>
|
|
47
39
|
<%= f.label :cost_currency, Spree.t(:cost_currency) %>
|
|
48
40
|
<%= f.text_field :cost_currency %>
|
|
@@ -52,89 +44,74 @@
|
|
|
52
44
|
|
|
53
45
|
<div class="clear"></div>
|
|
54
46
|
|
|
55
|
-
|
|
56
|
-
<%= f.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<% end %>
|
|
61
|
-
</div>
|
|
47
|
+
<%= f.field_container :available_on do %>
|
|
48
|
+
<%= f.label :available_on, Spree.t(:available_on) %>
|
|
49
|
+
<%= f.error_message_on :available_on %>
|
|
50
|
+
<%= f.text_field :available_on, :value => datepicker_field_value(@product.available_on), :class => 'datepicker' %>
|
|
51
|
+
<% end %>
|
|
62
52
|
|
|
63
53
|
<% unless @product.has_variants? %>
|
|
64
|
-
|
|
65
|
-
<%= f.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<% end %>
|
|
69
|
-
</div>
|
|
54
|
+
<%= f.field_container :sku do %>
|
|
55
|
+
<%= f.label :sku, Spree.t(:sku) %>
|
|
56
|
+
<%= f.text_field :sku, :size => 16 %>
|
|
57
|
+
<% end %>
|
|
70
58
|
|
|
71
59
|
<ul id="shipping_specs">
|
|
72
|
-
<li id="shipping_specs_weight_field"
|
|
60
|
+
<li id="shipping_specs_weight_field" class="field alpha two columns">
|
|
73
61
|
<%= f.label :weight, Spree.t(:weight) %>
|
|
74
62
|
<%= f.text_field :weight, :size => 4 %>
|
|
75
63
|
</li>
|
|
76
|
-
<li id="shipping_specs_height_field"
|
|
64
|
+
<li id="shipping_specs_height_field" class="field omega two columns">
|
|
77
65
|
<%= f.label :height, Spree.t(:height) %>
|
|
78
66
|
<%= f.text_field :height, :size => 4 %>
|
|
79
67
|
</li>
|
|
80
|
-
<li id="shipping_specs_width_field"
|
|
68
|
+
<li id="shipping_specs_width_field" class="field alpha two columns">
|
|
81
69
|
<%= f.label :width, Spree.t(:width) %>
|
|
82
70
|
<%= f.text_field :width, :size => 4 %>
|
|
83
71
|
</li>
|
|
84
|
-
<li id="shipping_specs_depth_field"
|
|
72
|
+
<li id="shipping_specs_depth_field" class="field omega two columns">
|
|
85
73
|
<%= f.label :depth, Spree.t(:depth) %>
|
|
86
74
|
<%= f.text_field :depth, :size => 4 %>
|
|
87
75
|
</li>
|
|
88
76
|
</ul>
|
|
89
77
|
<% end %>
|
|
90
78
|
|
|
91
|
-
|
|
92
|
-
<%= f.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<% end %>
|
|
97
|
-
</div>
|
|
79
|
+
<%= f.field_container :shipping_categories do %>
|
|
80
|
+
<%= f.label :shipping_category_id, Spree.t(:shipping_categories) %>
|
|
81
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2' }) %>
|
|
82
|
+
<%= f.error_message_on :shipping_category %>
|
|
83
|
+
<% end %>
|
|
98
84
|
|
|
99
|
-
|
|
100
|
-
<%= f.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<% end %>
|
|
105
|
-
</div>
|
|
85
|
+
<%= f.field_container :tax_category do %>
|
|
86
|
+
<%= f.label :tax_category_id, Spree.t(:tax_category) %>
|
|
87
|
+
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2' }) %>
|
|
88
|
+
<%= f.error_message_on :tax_category %>
|
|
89
|
+
<% end %>
|
|
106
90
|
</div>
|
|
107
91
|
|
|
108
92
|
<div class="twelve columns alpha omega">
|
|
109
|
-
|
|
110
|
-
<%= f.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<% end %>
|
|
114
|
-
</div>
|
|
93
|
+
<%= f.field_container :taxons do %>
|
|
94
|
+
<%= f.label :taxon_ids, Spree.t(:taxons) %><br />
|
|
95
|
+
<%= f.hidden_field :taxon_ids, :value => @product.taxon_ids.join(',') %>
|
|
96
|
+
<% end %>
|
|
115
97
|
|
|
116
|
-
|
|
117
|
-
<%= f.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<% end %>
|
|
121
|
-
</div>
|
|
98
|
+
<%= f.field_container :option_types do %>
|
|
99
|
+
<%= f.label :option_type_ids, Spree.t(:option_types) %>
|
|
100
|
+
<%= f.hidden_field :option_type_ids, :value => @product.option_type_ids.join(',') %>
|
|
101
|
+
<% end %>
|
|
122
102
|
</div>
|
|
123
103
|
|
|
104
|
+
<!-- <h2><%= Spree.t(:metadata) %></h2> -->
|
|
124
105
|
<div data-hook="admin_product_form_meta" class="alpha omega twelve columns">
|
|
125
|
-
|
|
126
|
-
<%= f.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<% end %>
|
|
130
|
-
</div>
|
|
106
|
+
<%= f.field_container :meta_keywords do %>
|
|
107
|
+
<%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
|
|
108
|
+
<%= f.text_field :meta_keywords, :class => 'fullwidth' %>
|
|
109
|
+
<% end %>
|
|
131
110
|
|
|
132
|
-
|
|
133
|
-
<%= f.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<% end %>
|
|
137
|
-
</div>
|
|
111
|
+
<%= f.field_container :meta_description do %>
|
|
112
|
+
<%= f.label :meta_description, Spree.t(:meta_description) %>
|
|
113
|
+
<%= f.text_field :meta_description, :class => 'fullwidth' %>
|
|
114
|
+
<% end %>
|
|
138
115
|
</div>
|
|
139
116
|
|
|
140
117
|
<div class="clear"></div>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
</thead>
|
|
77
77
|
<tbody>
|
|
78
78
|
<% @collection.each do |product| %>
|
|
79
|
-
<tr
|
|
79
|
+
<tr <%== "style='color: red;'" if product.deleted? %> id="<%= spree_dom_id product %>" data-hook="admin_products_index_rows" class="<%= cycle('odd', 'even') %>">
|
|
80
80
|
<td class="align-center"><%= product.sku rescue '' %></td>
|
|
81
81
|
<td class="align-center"><%= mini_image(product) %></td>
|
|
82
82
|
<td><%= link_to product.try(:name), edit_admin_product_path(product) %></td>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<div data-hook="new_product_attrs" class="row">
|
|
17
17
|
<% unless @product.has_variants? %>
|
|
18
|
-
<div
|
|
18
|
+
<div class="alpha four columns">
|
|
19
19
|
<%= f.field_container :sku do %>
|
|
20
20
|
<%= f.label :sku, Spree.t(:sku) %><br />
|
|
21
21
|
<%= f.text_field :sku, :size => 16, :class => 'fullwidth' %>
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
</div>
|
|
25
25
|
<% end %>
|
|
26
26
|
|
|
27
|
-
<div
|
|
27
|
+
<div class="four columns">
|
|
28
28
|
<%= f.field_container :prototype do %>
|
|
29
29
|
<%= f.label :prototype_id, Spree.t(:prototype) %><br />
|
|
30
30
|
<%= f.collection_select :prototype_id, Spree::Prototype.all, :id, :name, {:include_blank => true}, {:class => 'select2 fullwidth'} %>
|
|
31
31
|
<% end %>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
|
-
<div
|
|
34
|
+
<div class="four columns">
|
|
35
35
|
<%= f.field_container :price do %>
|
|
36
36
|
<%= f.label :price, Spree.t(:master_price) %> <span class="required">*</span><br />
|
|
37
|
-
<%= f.text_field :price, :
|
|
37
|
+
<%= f.text_field :price, :class => 'fullwidth' %>
|
|
38
38
|
<%= f.error_message_on :price %>
|
|
39
39
|
<% end %>
|
|
40
40
|
</div>
|
|
41
41
|
|
|
42
|
-
<div
|
|
42
|
+
<div class="omega four columns">
|
|
43
43
|
<%= f.field_container :available_on do %>
|
|
44
44
|
<%= f.label :available_on, Spree.t(:available_on) %>
|
|
45
45
|
<%= f.error_message_on :available_on %>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
<div class='row'>
|
|
53
|
-
<div
|
|
53
|
+
<div class="alpha four columns">
|
|
54
54
|
<%= f.field_container :shipping_category do %>
|
|
55
55
|
<%= f.label :shipping_category_id, Spree.t(:shipping_categories) %><span class="required">*</span><br />
|
|
56
56
|
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2 fullwidth' }) %>
|
|
@@ -33,15 +33,6 @@
|
|
|
33
33
|
<% if variant.images.present? %>
|
|
34
34
|
<%= image_tag variant.images.first.attachment.url(:mini) %>
|
|
35
35
|
<% end %>
|
|
36
|
-
<br/>
|
|
37
|
-
<%= form_tag admin_product_variants_including_master_path(@product, variant, format: :js), method: :put, class: 'toggle_variant_track_inventory' do %>
|
|
38
|
-
<%= check_box_tag 'track_inventory', 1, variant.track_inventory?,
|
|
39
|
-
class: 'track_inventory_checkbox' %>
|
|
40
|
-
<%= Spree.t(:track_inventory) %>
|
|
41
|
-
<%= hidden_field_tag 'variant[track_inventory]', variant.track_inventory?,
|
|
42
|
-
class: 'variant_track_inventory',
|
|
43
|
-
id: "variant_track_inventory_#{variant.id}" %>
|
|
44
|
-
<% end %>
|
|
45
36
|
</td>
|
|
46
37
|
<td colspan="4" class="stock_location_info">
|
|
47
38
|
<table>
|
|
@@ -66,16 +57,17 @@
|
|
|
66
57
|
<td class="align-center"><%= item.count_on_hand %></td>
|
|
67
58
|
<td class="align-center">
|
|
68
59
|
<%= form_tag admin_stock_item_path(item), method: :put, class: 'toggle_stock_item_backorderable' do %>
|
|
69
|
-
<%= check_box_tag 'stock_item[backorderable]',
|
|
60
|
+
<%= check_box_tag 'stock_item[backorderable]', true,
|
|
61
|
+
item.backorderable?,
|
|
70
62
|
class: 'stock_item_backorderable',
|
|
71
63
|
id: "stock_item_backorderable_#{item.stock_location.id}" %>
|
|
72
64
|
<% end %>
|
|
73
65
|
</td>
|
|
74
66
|
<td class="actions">
|
|
75
67
|
<%= link_to(icon('delete'), [:admin, item],
|
|
76
|
-
method: :delete, remote: true,
|
|
68
|
+
method: :delete, remote: true,
|
|
77
69
|
class: 'icon_link with-tip icon-trash no-text',
|
|
78
|
-
title: Spree.t(:remove), data: { action: :remove }) %>
|
|
70
|
+
title: Spree.t(:remove), data: { action: :remove, confirm: Spree.t(:are_you_sure) }) %>
|
|
79
71
|
</td>
|
|
80
72
|
</tr>
|
|
81
73
|
<% end %>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<%= f.field_container :description do %>
|
|
33
33
|
<%= f.label :description %><br />
|
|
34
34
|
<%= f.text_area :description, :rows => 7, :class => 'fullwidth' %>
|
|
35
|
-
<% end %>
|
|
35
|
+
<% end %>
|
|
36
36
|
</div>
|
|
37
37
|
</div>
|
|
38
38
|
|
|
@@ -40,9 +40,11 @@
|
|
|
40
40
|
<%= f.field_container :usage_limit do %>
|
|
41
41
|
<%= f.label :usage_limit %><br />
|
|
42
42
|
<%= f.number_field :usage_limit, :min => 0, :class => 'fullwidth' %><br>
|
|
43
|
-
|
|
43
|
+
<span class="info">
|
|
44
|
+
<%= Spree.t(:current_promotion_usage, :count => @promotion.credits_count) %>
|
|
45
|
+
</span>
|
|
44
46
|
<% end %>
|
|
45
|
-
|
|
47
|
+
|
|
46
48
|
<div id="starts_at_field" class="field">
|
|
47
49
|
<%= f.label :starts_at %>
|
|
48
50
|
<%= f.text_field :starts_at, :value => datepicker_field_value(@promotion.starts_at), :class => 'datepicker datepicker-from fullwidth' %>
|
|
@@ -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| [
|
|
14
|
+
<%= f.select :property_ids, Spree::Property.all.map { |p| [p.presentation, 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| [
|
|
22
|
+
<%= f.select :option_type_ids, Spree::OptionType.all.map { |ot| [ot.presentation, ot.id] }, {}, { :multiple => true, :class => "select2 fullwidth" } %>
|
|
23
23
|
<% end %>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<% end %>
|
|
13
13
|
|
|
14
14
|
<% content_for :table_filter do %>
|
|
15
|
-
<%= render :partial => 'spree/admin/shared/
|
|
15
|
+
<%= render :partial => 'spree/admin/shared/report_criteria', :locals => {} %>
|
|
16
16
|
<% end %>
|
|
17
17
|
|
|
18
18
|
<table class="admin-report" data-hook="sales_total">
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</tr>
|
|
10
10
|
</thead>
|
|
11
11
|
<tbody>
|
|
12
|
-
<% @return_authorization.order.shipments.shipped.collect{|s| s.inventory_units.
|
|
12
|
+
<% @return_authorization.order.shipments.shipped.collect{|s| s.inventory_units.to_a}.flatten.group_by(&:variant).each do | variant, units| %>
|
|
13
13
|
<tr id="<%= dom_id(variant) %>" data-hook="rma_row" class="<%= cycle('odd', 'even')%>">
|
|
14
14
|
<td>
|
|
15
15
|
<div class="variant-name"><%= variant.name %></div>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
|
|
51
51
|
<%= f.field_container :stock_location do %>
|
|
52
52
|
<%= f.label :stock_location, Spree.t(:stock_location) %>
|
|
53
|
-
<%= f.select :stock_location_id, Spree::StockLocation.active.
|
|
53
|
+
<%= f.select :stock_location_id, Spree::StockLocation.active.to_a.collect{|l|[l.name, l.id]}, {:style => 'height:100px;', :class => 'fullwidth'} %>
|
|
54
54
|
<%= f.error_message_on :reason %>
|
|
55
55
|
<% end %>
|
|
56
56
|
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<% if content_for?(:page_title) || content_for?(:page_actions) %>
|
|
2
|
+
<div id="content-header" data-hook>
|
|
3
|
+
<div class="container">
|
|
4
|
+
<div class="sixteen columns">
|
|
5
|
+
<div class="block-table">
|
|
6
|
+
<% if content_for?(:page_title) %>
|
|
7
|
+
<div class="table-cell">
|
|
8
|
+
<h1 class="page-title <%= yield :page_title_classes %>"><%= yield :page_title %></h1>
|
|
9
|
+
</div>
|
|
10
|
+
<% end %>
|
|
11
|
+
|
|
12
|
+
<% if content_for?(:page_actions) %>
|
|
13
|
+
<div class="page-actions table-cell toolbar" data-hook="toolbar">
|
|
14
|
+
<ul class="inline-menu">
|
|
15
|
+
<%= yield :page_actions %>
|
|
16
|
+
</ul>
|
|
17
|
+
</div>
|
|
18
|
+
<% end %>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<% end %>
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
notice_div = $('.flash.notice');
|
|
2
|
+
<% notice = flash.discard(:notice)
|
|
3
|
+
if notice %>
|
|
4
|
+
if (notice_div.length > 0) {
|
|
5
|
+
notice_div.html("<%= notice %>");
|
|
6
|
+
notice_div.show();
|
|
7
|
+
} else {
|
|
8
|
+
if ($("#content .toolbar").length > 0) {
|
|
9
|
+
$("#content .toolbar").before('<div class="flash notice"><%= notice %></div>');
|
|
10
|
+
} else {
|
|
11
|
+
$("#content h1").before('<div class="flash notice"><%= notice %></div>');
|
|
12
|
+
}
|
|
13
|
+
} <%
|
|
14
|
+
end %>
|
|
6
15
|
|
|
7
16
|
<%= render :partial => '/spree/admin/shared/update_order_state' if @order %>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<header id="header" data-hook>
|
|
2
|
+
<div class="container">
|
|
3
|
+
<figure data-hook="logo-wrapper" class="columns five">
|
|
4
|
+
<%= link_to image_tag(Spree::Config[:admin_interface_logo], :id => 'logo'), spree.admin_path %>
|
|
5
|
+
</figure>
|
|
6
|
+
|
|
7
|
+
<nav data-hook="admin_login_navigation_bar" class="columns eleven"></nav>
|
|
8
|
+
</div>
|
|
9
|
+
</header>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<% content_for :page_title do %>
|
|
2
|
-
<%=
|
|
2
|
+
<%= Spree.t(:order) %> #<%= @order.number %>
|
|
3
3
|
<% end %>
|
|
4
4
|
|
|
5
5
|
<% content_for :sidebar_title do %>
|
|
@@ -47,22 +47,22 @@
|
|
|
47
47
|
<%= link_to_with_icon 'icon-edit', Spree.t(:order_details), edit_admin_order_url(@order) %>
|
|
48
48
|
</li>
|
|
49
49
|
<% end %>
|
|
50
|
-
<% if can?
|
|
50
|
+
<% if can? :update, @order && checkout_steps.include?("address") %>
|
|
51
51
|
<li<%== ' class="active"' if current == 'Customer Details' %>>
|
|
52
52
|
<%= link_to_with_icon 'icon-user', Spree.t(:customer_details), admin_order_customer_url(@order) %>
|
|
53
53
|
</li>
|
|
54
54
|
<% end %>
|
|
55
|
-
<% if can? :index,
|
|
55
|
+
<% if can? :index, @order.adjustments %>
|
|
56
56
|
<li<%== ' class="active"' if current == 'Adjustments' %>>
|
|
57
57
|
<%= link_to_with_icon 'icon-cogs', Spree.t(:adjustments), admin_order_adjustments_url(@order) %>
|
|
58
58
|
</li>
|
|
59
59
|
<% end %>
|
|
60
|
-
<% if can?
|
|
60
|
+
<% if can? :index, @order.payments && @payment_required %>
|
|
61
61
|
<li<%== ' class="active"' if current == 'Payments' %>>
|
|
62
62
|
<%= link_to_with_icon 'icon-credit-card', Spree.t(:payments), admin_order_payments_url(@order) %>
|
|
63
63
|
</li>
|
|
64
64
|
<% end %>
|
|
65
|
-
<% if can? :index,
|
|
65
|
+
<% if can? :index, @order.return_authorizations %>
|
|
66
66
|
<% if @order.completed? %>
|
|
67
67
|
<li<%== ' class="active"' if current == 'Return Authorizations' %>>
|
|
68
68
|
<%= link_to_with_icon 'icon-share-alt', Spree.t(:return_authorizations), admin_order_return_authorizations_url(@order) %>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<%= search_form_for @search, :url => spree.sales_total_admin_reports_path do |s| %>
|
|
2
2
|
<div class="date-range-filter field align-center">
|
|
3
3
|
<%= label_tag nil, Spree.t(:start), :class => 'inline' %>
|
|
4
|
-
<%= s.text_field :created_at_gt, :class => 'datepicker datepicker-from'
|
|
4
|
+
<%= s.text_field :created_at_gt, :class => 'datepicker datepicker-from' %>
|
|
5
5
|
|
|
6
6
|
<span class="range-divider">
|
|
7
7
|
<i class="icon-arrow-right"></i>
|
|
8
8
|
</span>
|
|
9
9
|
|
|
10
|
-
<%= s.text_field :created_at_lt, :class => 'datepicker datepicker-to'
|
|
10
|
+
<%= s.text_field :created_at_lt, :class => 'datepicker datepicker-to' %>
|
|
11
11
|
<%= label_tag nil, Spree.t(:end), :class => 'inline' %>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -9,6 +9,5 @@
|
|
|
9
9
|
Spree.routes.checkouts_api = "<%= spree.api_checkouts_url(:format => 'json') %>";
|
|
10
10
|
Spree.routes.stock_locations_api = "<%= spree.api_stock_locations_url(:format => 'json') %>";
|
|
11
11
|
Spree.routes.variants_api = "<%= spree.api_variants_url(:format => 'json') %>";
|
|
12
|
-
|
|
13
|
-
Spree.routes.stock_items_api = "<%= spree.api_stock_location_stock_items_url(:format => 'json') if params[:stock_location_id] %>";
|
|
12
|
+
|
|
14
13
|
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<% if content_for?(:sidebar) %>
|
|
2
|
+
<aside id="sidebar" data-hook class="four columns">
|
|
3
|
+
|
|
4
|
+
<% if content_for?(:sidebar_title) %>
|
|
5
|
+
<h5 class="sidebar-title"><span><%= yield :sidebar_title %></span></h5>
|
|
6
|
+
<% end %>
|
|
7
|
+
|
|
8
|
+
<%= yield :sidebar %>
|
|
9
|
+
</aside>
|
|
10
|
+
<% end %>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<% if content_for?(:table_filter) %>
|
|
2
|
+
<div id="table-filter" data-hook class="<%= if content_for?(:sidebar) then 'twelve' else 'sixteen' end %> columns">
|
|
3
|
+
<fieldset>
|
|
4
|
+
<legend align="center"><%= yield :table_filter_title %></legend>
|
|
5
|
+
<%= yield :table_filter %>
|
|
6
|
+
</fieldset>
|
|
7
|
+
</div>
|
|
8
|
+
<% end %>
|
|
@@ -10,10 +10,8 @@
|
|
|
10
10
|
:choose_a_customer => Spree.t(:choose_a_customer),
|
|
11
11
|
:confirm_delete => Spree.t(:confirm_delete),
|
|
12
12
|
:cut => Spree.t(:cut),
|
|
13
|
-
:destroy => Spree.t(:destroy
|
|
14
|
-
:edit => Spree.t(:edit
|
|
15
|
-
:save => Spree.t(:save, :scope => :actions),
|
|
16
|
-
:cancel => Spree.t(:cancel, :scope => :actions),
|
|
13
|
+
:destroy => Spree.t(:destroy),
|
|
14
|
+
:edit => Spree.t(:edit),
|
|
17
15
|
:first_day => Spree.t(:first_day,
|
|
18
16
|
:scope => 'date_picker',
|
|
19
17
|
:default => 0).to_i,
|
|
@@ -33,8 +31,7 @@
|
|
|
33
31
|
:type_to_search => Spree.t(:type_to_search),
|
|
34
32
|
:taxon_placeholder => Spree.t(:taxon_placeholder),
|
|
35
33
|
:variant_placeholder => Spree.t(:variant_placeholder),
|
|
36
|
-
:value => Spree.t(:value)
|
|
37
|
-
:currency_separator => I18n.t('number.currency.format.separator'),
|
|
34
|
+
:value => Spree.t(:value)
|
|
38
35
|
}.to_json
|
|
39
36
|
%>
|
|
40
37
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div data-hook="admin_shipping_method_form_fields" class="alpha twelve columns">
|
|
2
|
-
<div
|
|
2
|
+
<div 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
|
|
10
|
+
<div 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
|
|
19
|
+
<div 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
|
|
28
|
+
<div 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,10 +54,9 @@
|
|
|
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 %>
|
|
58
57
|
<% Spree::Zone.all.each do |zone| %>
|
|
59
58
|
<%= label_tag do %>
|
|
60
|
-
<%= check_box_tag('shipping_method[zones][]', zone.id,
|
|
59
|
+
<%= check_box_tag('shipping_method[zones][]', zone.id, @shipping_method.zones.include?(zone)) %>
|
|
61
60
|
<%= zone.name %>
|
|
62
61
|
<% end %>
|
|
63
62
|
<br>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</tr>
|
|
30
30
|
</thead>
|
|
31
31
|
<tbody>
|
|
32
|
-
<% @shipping_methods.
|
|
32
|
+
<% @shipping_methods.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>
|