caboose-cms 0.5.122 → 0.5.123
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/assets/javascripts/caboose/admin.js +1 -0
- data/app/assets/javascripts/caboose/admin_edit_order.js +6 -8
- data/app/assets/javascripts/caboose/cart.js +2 -2
- data/app/assets/javascripts/caboose/jquery.datetimepicker.js +1925 -0
- data/app/assets/javascripts/caboose/model/all.js +1 -0
- data/app/assets/javascripts/caboose/model/bound_date.js +10 -3
- data/app/assets/javascripts/caboose/model/bound_date_time.js +121 -0
- data/app/assets/javascripts/caboose/model/model_binder.js +3 -0
- data/app/assets/stylesheets/caboose/admin.css +1 -0
- data/app/assets/stylesheets/caboose/jquery.datetimepicker.css +523 -0
- data/app/assets/templates/caboose/cart/line_items.jst.ejs +1 -1
- data/app/assets/templates/caboose/checkout/line_items.jst.ejs +2 -2
- data/app/controllers/caboose/checkout_controller.rb +3 -2
- data/app/controllers/caboose/line_items_controller.rb +4 -2
- data/app/controllers/caboose/my_account_controller.rb +43 -0
- data/app/controllers/caboose/my_account_orders_controller.rb +40 -6
- data/app/controllers/caboose/orders_controller.rb +26 -20
- data/app/controllers/caboose/products_controller.rb +1 -0
- data/app/controllers/caboose/sites_controller.rb +15 -1
- data/app/controllers/caboose/users_controller.rb +0 -35
- data/app/controllers/caboose/variants_controller.rb +51 -2
- data/app/controllers/caboose/vendors_controller.rb +3 -2
- data/app/models/caboose/address.rb +9 -1
- data/app/models/caboose/line_item.rb +17 -9
- data/app/models/caboose/model_binder.rb +63 -0
- data/app/models/caboose/order.rb +21 -14
- data/app/models/caboose/order_pdf.rb +3 -3
- data/app/models/caboose/pending_orders_pdf.rb +1 -1
- data/app/models/caboose/product.rb +15 -16
- data/app/models/caboose/schema.rb +20 -13
- data/app/models/caboose/site.rb +9 -0
- data/app/models/caboose/store_config.rb +6 -0
- data/app/models/caboose/variant.rb +15 -1
- data/app/views/caboose/checkout/_cart.html.erb +3 -3
- data/app/views/caboose/checkout/_confirm.html.erb +3 -3
- data/app/views/caboose/login/index.html.erb +7 -3
- data/app/views/caboose/{users/my_account.html.erb → my_account/index.html.erb} +7 -6
- data/app/views/caboose/my_account_orders/edit.html.erb +104 -0
- data/app/views/caboose/my_account_orders/index.html.erb +36 -0
- data/app/views/caboose/sites/admin_edit.html.erb +2 -0
- data/app/views/caboose/variants/admin_edit.html.erb +11 -1
- data/app/views/caboose/variants/admin_index.html.erb +5 -2
- data/config/routes.rb +7 -2
- data/lib/caboose/#Untitled-1# +264 -0
- data/lib/caboose/engine.rb +23 -140
- data/lib/caboose/version.rb +1 -1
- data/lib/tasks/caboose.rake +15 -1
- metadata +11 -4
- data/app/views/caboose/orders/admin_edit_old.html.erb +0 -155
data/lib/caboose/engine.rb
CHANGED
@@ -74,161 +74,44 @@ module Caboose
|
|
74
74
|
app.config.assets.precompile += [
|
75
75
|
|
76
76
|
# Images
|
77
|
-
'caboose
|
78
|
-
'caboose
|
79
|
-
'caboose/caboose_nav.png',
|
80
|
-
'caboose/default_user_pic.png',
|
81
|
-
'caboose/loading_black_on_white.gif',
|
82
|
-
'caboose/loading_green.gif',
|
83
|
-
'caboose/loading_small_black_on_white.gif',
|
84
|
-
'caboose/loading_small_white_on_black.gif',
|
85
|
-
'caboose/loading_white_on_black.gif',
|
86
|
-
'caboose/search.png',
|
77
|
+
'caboose/*.png',
|
78
|
+
'caboose/*.gif',
|
87
79
|
|
88
80
|
# Javascript
|
89
|
-
'caboose
|
90
|
-
'caboose/
|
91
|
-
'
|
92
|
-
'caboose/admin_main.js',
|
93
|
-
'caboose/admin_page_edit_content.js',
|
94
|
-
'caboose/admin_page_new_blocks.js',
|
95
|
-
'caboose/admin_products.js',
|
96
|
-
'caboose/admin.js',
|
97
|
-
'caboose/application.js',
|
98
|
-
'caboose/authorize.net.js',
|
99
|
-
'caboose/cart.js',
|
100
|
-
'caboose/cart_old.js',
|
101
|
-
'caboose/checkout_addresses.js',
|
102
|
-
'caboose/checkout_gift_cards.js',
|
103
|
-
'caboose/checkout_login_register.js',
|
104
|
-
'caboose/checkout_module.js',
|
105
|
-
'caboose/checkout_payment.js',
|
106
|
-
'caboose/checkout_shipping.js',
|
107
|
-
'caboose/checkout.js',
|
108
|
-
'caboose/date_format.js',
|
109
|
-
'caboose/imageZoom.js',
|
110
|
-
'caboose/jquery.detect.js',
|
111
|
-
'caboose/jquery.fileupload.js',
|
112
|
-
'caboose/jquery.iframe-transport.js',
|
113
|
-
'caboose/jquery.placeholder.js',
|
114
|
-
'caboose/jquery.timepicker.js',
|
115
|
-
'caboose/lodash.min.js',
|
116
|
-
'caboose/main.js',
|
117
|
-
'caboose/modal_integration.js',
|
118
|
-
'caboose/modal.js',
|
119
|
-
'caboose/model/all.js',
|
120
|
-
'caboose/model/attribute.js',
|
121
|
-
'caboose/model/bound_checkbox_multiple.js',
|
122
|
-
'caboose/model/bound_checkbox.js',
|
123
|
-
'caboose/model/bound_code.js',
|
124
|
-
'caboose/model/bound_color.js',
|
125
|
-
'caboose/model/bound_control.js',
|
126
|
-
'caboose/model/bound_date.js',
|
127
|
-
'caboose/model/bound_file.js',
|
128
|
-
'caboose/model/bound_image.js',
|
129
|
-
'caboose/model/bound_richtext.js',
|
130
|
-
'caboose/model/bound_s3_image.js',
|
131
|
-
'caboose/model/bound_select.js',
|
132
|
-
'caboose/model/bound_text.js',
|
133
|
-
'caboose/model/bound_textarea.js',
|
134
|
-
'caboose/model/bound_time.js',
|
135
|
-
'caboose/model/class.js',
|
136
|
-
'caboose/model/index_table_bak.js',
|
137
|
-
'caboose/model/index_table.js',
|
138
|
-
'caboose/model/model_binder.js',
|
139
|
-
'caboose/model/model.js',
|
140
|
-
'caboose/model/pager.js',
|
141
|
-
'caboose/model/s3.js',
|
142
|
-
'caboose/model.form.page.js',
|
143
|
-
'caboose/model.form.user.js',
|
144
|
-
'caboose/product.js',
|
145
|
-
'caboose/s3upload.js',
|
146
|
-
'caboose/shortcut.js',
|
147
|
-
'caboose/spectrum.js',
|
148
|
-
'caboose/station.js',
|
149
|
-
'caboose/testing.js',
|
150
|
-
'jquery.js',
|
81
|
+
'caboose/*.js',
|
82
|
+
'caboose/model/*.js',
|
83
|
+
'jquery.js',
|
151
84
|
'jquery_ujs.js',
|
152
85
|
'jquery-ui.js',
|
153
|
-
'colorbox-rails/jquery.colorbox-min.js',
|
154
86
|
'colorbox-rails.js',
|
155
|
-
'colorbox-rails/colorbox-
|
156
|
-
'
|
157
|
-
'tinymce/preinit.js',
|
158
|
-
'tinymce/plugins/caboose/plugin.js',
|
159
|
-
'tinymce/themes/modern/theme.js',
|
160
|
-
'tinymce/plugins/advlist/plugin.js',
|
161
|
-
'tinymce/plugins/lists/plugin.js',
|
162
|
-
'tinymce/plugins/autolink/plugin.js',
|
163
|
-
'tinymce/plugins/link/plugin.js',
|
164
|
-
'tinymce/plugins/image/plugin.js',
|
165
|
-
'tinymce/plugins/charmap/plugin.js',
|
166
|
-
'tinymce/plugins/print/plugin.js',
|
167
|
-
'tinymce/plugins/preview/plugin.js',
|
168
|
-
'tinymce/plugins/hr/plugin.js',
|
169
|
-
'tinymce/plugins/anchor/plugin.js',
|
170
|
-
'tinymce/plugins/searchreplace/plugin.js',
|
171
|
-
'tinymce/plugins/pagebreak/plugin.js',
|
172
|
-
'tinymce/plugins/wordcount/plugin.js',
|
173
|
-
'tinymce/plugins/visualblocks/plugin.js',
|
174
|
-
'tinymce/plugins/visualchars/plugin.js',
|
175
|
-
'tinymce/plugins/code/plugin.js',
|
176
|
-
'tinymce/plugins/fullscreen/plugin.js',
|
177
|
-
'tinymce/plugins/insertdatetime/plugin.js',
|
178
|
-
'tinymce/plugins/media/plugin.js',
|
179
|
-
'tinymce/plugins/nonbreaking/plugin.js',
|
180
|
-
'tinymce/plugins/table/plugin.js',
|
181
|
-
'tinymce/plugins/contextmenu/plugin.js',
|
182
|
-
'tinymce/plugins/directionality/plugin.js',
|
183
|
-
'tinymce/plugins/emoticons/plugin.js',
|
184
|
-
'tinymce/plugins/paste/plugin.js',
|
185
|
-
'tinymce/plugins/template/plugin.js',
|
186
|
-
'tinymce/plugins/textcolor/plugin.js',
|
87
|
+
'colorbox-rails/jquery.colorbox-min.js',
|
88
|
+
'colorbox-rails/colorbox-links.js',
|
89
|
+
'tinymce/preinit.js',
|
187
90
|
'tinymce/plugins/caboose/plugin.js',
|
188
|
-
|
189
|
-
|
190
|
-
'*/js/application.js',
|
91
|
+
'tinymce/themes/modern/theme.js',
|
92
|
+
'tinymce/plugins/*/plugin.js',
|
93
|
+
'*/js/application.js', # Site JS
|
191
94
|
|
192
95
|
# CSS
|
96
|
+
'caboose/*.css',
|
193
97
|
'caboose/admin_crumbtrail.css',
|
194
|
-
'caboose/admin_images_index.css',
|
195
|
-
'caboose/admin_main.css',
|
196
|
-
'caboose/admin_page_edit_content.css',
|
197
|
-
'caboose/admin_products.css',
|
198
|
-
'caboose/admin.css',
|
199
|
-
'caboose/application.css',
|
200
|
-
'caboose/bound_input.css',
|
201
|
-
'caboose/caboose.css',
|
98
|
+
'caboose/admin_images_index.css',
|
202
99
|
'caboose/cart.css',
|
203
100
|
'caboose/checkout.css',
|
204
|
-
'caboose/fonts/avenir-medium.eot',
|
205
|
-
'caboose/fonts/avenir-medium.ttf',
|
206
|
-
'caboose/fonts/big_noodle_titling_oblique.ttf',
|
207
|
-
'caboose/fonts/big_noodle_titling.ttf',
|
208
|
-
'caboose/fonts.css',
|
209
|
-
'caboose/icomoon_fonts.css',
|
210
|
-
'caboose/icons.txt',
|
211
|
-
'caboose/jquery.timepicker.css',
|
212
|
-
'caboose/login.css',
|
213
101
|
'caboose/message_boxes.css',
|
214
|
-
'caboose/modal.css',
|
215
|
-
'caboose/model_binder.css',
|
216
|
-
'caboose/page_bar_generator.css',
|
217
|
-
'caboose/print.css',
|
218
102
|
'caboose/product_images.css',
|
219
|
-
'caboose/product_options.css',
|
220
|
-
'caboose/register.css',
|
221
|
-
'caboose/responsive.css',
|
222
|
-
'caboose/spectrum.css',
|
223
|
-
'caboose/station_modal.css',
|
224
|
-
'caboose/station_sidebar.css',
|
225
|
-
'caboose/tinymce.css',
|
103
|
+
'caboose/product_options.css',
|
226
104
|
'colorbox-rails.css',
|
227
105
|
'colorbox-rails/colorbox-rails.css',
|
228
|
-
'jquery-ui.css',
|
229
|
-
|
230
|
-
|
231
|
-
|
106
|
+
'jquery-ui.css',
|
107
|
+
'*/css/application.css' # Site CSS
|
108
|
+
|
109
|
+
# Fonts
|
110
|
+
'caboose/fonts/avenir-medium.eot',
|
111
|
+
'caboose/fonts/avenir-medium.ttf',
|
112
|
+
'caboose/fonts/big_noodle_titling_oblique.ttf',
|
113
|
+
'caboose/fonts/big_noodle_titling.ttf',
|
114
|
+
'caboose/icons.txt',
|
232
115
|
|
233
116
|
]
|
234
117
|
end
|
data/lib/caboose/version.rb
CHANGED
data/lib/tasks/caboose.rake
CHANGED
@@ -66,6 +66,20 @@ namespace :caboose do
|
|
66
66
|
ActiveRecord::Base.connection.execute(ActiveRecord::Base.send(:sanitize_sql_array, query))
|
67
67
|
end
|
68
68
|
end
|
69
|
+
|
70
|
+
desc "Set order numbers"
|
71
|
+
task :set_order_numbers => :environment do
|
72
|
+
|
73
|
+
Caboose::Site.all.each do |site|
|
74
|
+
next if !site.use_store
|
75
|
+
i = site.store_config.starting_order_number
|
76
|
+
Caboose::Order.where("order_number is null and status <> 'cart'").reorder(:id).all.each do |o|
|
77
|
+
o.order_number = i
|
78
|
+
o.save
|
79
|
+
i = i + 1
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
69
83
|
|
70
84
|
#=============================================================================
|
71
85
|
|
@@ -173,5 +187,5 @@ namespace :assets do
|
|
173
187
|
end
|
174
188
|
end
|
175
189
|
end
|
176
|
-
|
190
|
+
|
177
191
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.123
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -401,6 +401,7 @@ files:
|
|
401
401
|
- app/assets/javascripts/caboose/checkout_shipping.js
|
402
402
|
- app/assets/javascripts/caboose/date_format.js
|
403
403
|
- app/assets/javascripts/caboose/imageZoom.js
|
404
|
+
- app/assets/javascripts/caboose/jquery.datetimepicker.js
|
404
405
|
- app/assets/javascripts/caboose/jquery.detect.js
|
405
406
|
- app/assets/javascripts/caboose/jquery.fileupload.js
|
406
407
|
- app/assets/javascripts/caboose/jquery.iframe-transport.js
|
@@ -420,6 +421,7 @@ files:
|
|
420
421
|
- app/assets/javascripts/caboose/model/bound_color.js
|
421
422
|
- app/assets/javascripts/caboose/model/bound_control.js
|
422
423
|
- app/assets/javascripts/caboose/model/bound_date.js
|
424
|
+
- app/assets/javascripts/caboose/model/bound_date_time.js
|
423
425
|
- app/assets/javascripts/caboose/model/bound_file.js
|
424
426
|
- app/assets/javascripts/caboose/model/bound_image.js
|
425
427
|
- app/assets/javascripts/caboose/model/bound_richtext.js
|
@@ -460,6 +462,7 @@ files:
|
|
460
462
|
- app/assets/stylesheets/caboose/fonts/big_noodle_titling_oblique.ttf
|
461
463
|
- app/assets/stylesheets/caboose/icomoon_fonts.css
|
462
464
|
- app/assets/stylesheets/caboose/icons.txt
|
465
|
+
- app/assets/stylesheets/caboose/jquery.datetimepicker.css
|
463
466
|
- app/assets/stylesheets/caboose/jquery.timepicker.css
|
464
467
|
- app/assets/stylesheets/caboose/login.css
|
465
468
|
- app/assets/stylesheets/caboose/message_boxes.css.scss
|
@@ -512,6 +515,7 @@ files:
|
|
512
515
|
- app/controllers/caboose/logout_controller.rb
|
513
516
|
- app/controllers/caboose/media_categories_controller.rb
|
514
517
|
- app/controllers/caboose/modal_controller.rb
|
518
|
+
- app/controllers/caboose/my_account_controller.rb
|
515
519
|
- app/controllers/caboose/my_account_line_items_controller.rb
|
516
520
|
- app/controllers/caboose/my_account_orders_controller.rb
|
517
521
|
- app/controllers/caboose/order_packages_controller.rb
|
@@ -584,6 +588,7 @@ files:
|
|
584
588
|
- app/models/caboose/media_image.rb
|
585
589
|
- app/models/caboose/menu_block.rb
|
586
590
|
- app/models/caboose/message.rb
|
591
|
+
- app/models/caboose/model_binder.rb
|
587
592
|
- app/models/caboose/order.rb
|
588
593
|
- app/models/caboose/order_discount.rb
|
589
594
|
- app/models/caboose/order_package.rb
|
@@ -748,12 +753,14 @@ files:
|
|
748
753
|
- app/views/caboose/login/reset_password_form.html.erb
|
749
754
|
- app/views/caboose/login_mailer/forgot_password_email.html.erb
|
750
755
|
- app/views/caboose/modal/index.html.erb
|
756
|
+
- app/views/caboose/my_account/index.html.erb
|
757
|
+
- app/views/caboose/my_account_orders/edit.html.erb
|
758
|
+
- app/views/caboose/my_account_orders/index.html.erb
|
751
759
|
- app/views/caboose/orders/_admin_footer.html.erb
|
752
760
|
- app/views/caboose/orders/_admin_header.html.erb
|
753
761
|
- app/views/caboose/orders/_quickbooks_order.html.erb
|
754
762
|
- app/views/caboose/orders/admin_delete_form.html.erb
|
755
763
|
- app/views/caboose/orders/admin_edit.html.erb
|
756
|
-
- app/views/caboose/orders/admin_edit_old.html.erb
|
757
764
|
- app/views/caboose/orders/admin_index.html.erb
|
758
765
|
- app/views/caboose/orders/admin_new.html.erb
|
759
766
|
- app/views/caboose/orders/admin_print.html.erb
|
@@ -843,7 +850,6 @@ files:
|
|
843
850
|
- app/views/caboose/users/edit_password.html.erb
|
844
851
|
- app/views/caboose/users/import_form.html.erb
|
845
852
|
- app/views/caboose/users/index.html.erb
|
846
|
-
- app/views/caboose/users/my_account.html.erb
|
847
853
|
- app/views/caboose/users/new.html.erb
|
848
854
|
- app/views/caboose/users/update_pic.html.erb
|
849
855
|
- app/views/caboose/variants/admin_edit.html.erb
|
@@ -888,6 +894,7 @@ files:
|
|
888
894
|
- config/tinymce.yml
|
889
895
|
- db/migrate/000_add_linked_resources_to_page.rb
|
890
896
|
- lib/caboose.rb
|
897
|
+
- lib/caboose/#Untitled-1#
|
891
898
|
- lib/caboose/caboose_helper.rb
|
892
899
|
- lib/caboose/engine.rb
|
893
900
|
- lib/caboose/version.rb
|
@@ -1,155 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
sa = @order.shipping_address
|
3
|
-
shipping_address = sa.address1
|
4
|
-
shipping_address << "<br />#{sa.address2}" if sa.address2 && sa.address2.length > 0
|
5
|
-
shipping_address << "<br />#{sa.city}, #{sa.state} #{sa.zip}"
|
6
|
-
captured = @order.financial_status == 'captured'
|
7
|
-
%>
|
8
|
-
<input type='hidden' name='order_id' id='order_id' value='<%= @order.id %>' />
|
9
|
-
|
10
|
-
<h1>Edit Order #<%= @order.id %></h1>
|
11
|
-
|
12
|
-
<table class='data'>
|
13
|
-
<tr>
|
14
|
-
<th><%= if @order.customer.nil? then 'Guest' else 'Customer' end %></th>
|
15
|
-
<th>Shipping Address</th>
|
16
|
-
<th>Shipping Method</th>
|
17
|
-
<th>Order Status</th>
|
18
|
-
<th>Payment Status</th>
|
19
|
-
<th>Transaction ID</th>
|
20
|
-
</tr>
|
21
|
-
<tr>
|
22
|
-
<td valign='top'>
|
23
|
-
<%= "#{@order.shipping_address.first_name} #{@order.shipping_address.last_name}" %><br />
|
24
|
-
<% if @order.customer %>
|
25
|
-
<a href="mailto:<%= "#{@order.customer.email}" %>"><%= "#{@order.customer.email}" %></a><br />
|
26
|
-
<% elsif @order.email %>
|
27
|
-
<a href="mailto:<%= @order.email %>"><%= @order.email %></a>
|
28
|
-
<% end %>
|
29
|
-
<%= @order.customer ? @order.customer.phone : @order.shipping_address.phone %>
|
30
|
-
</td>
|
31
|
-
<td valign='top'>
|
32
|
-
<%= "#{@order.shipping_address.first_name} #{@order.shipping_address.last_name}" %><br />
|
33
|
-
<%= raw shipping_address %>
|
34
|
-
</td>
|
35
|
-
<td valign='top' align='center'>
|
36
|
-
<% if @order.shipping_service_code %>
|
37
|
-
<%= @order.shipping_carrier %> <%= @order.shipping_service_name %>
|
38
|
-
<% else %>
|
39
|
-
Multiple packages
|
40
|
-
<% end %>
|
41
|
-
</td>
|
42
|
-
<td valign='top'>
|
43
|
-
<div id='order_<%= @order.id %>_status'></div>
|
44
|
-
</td>
|
45
|
-
<td valign='top' align='center'>
|
46
|
-
<%= @order.financial_status %>
|
47
|
-
<% if @order.financial_status == 'authorized' %>
|
48
|
-
for<br /><%= number_to_currency(@order.auth_amount) %>
|
49
|
-
<% end %>
|
50
|
-
</td>
|
51
|
-
<td valign="top" align='center'><%= @order.transaction_id %></td>
|
52
|
-
</tr>
|
53
|
-
</table><br />
|
54
|
-
|
55
|
-
<table class='data' width='100%'>
|
56
|
-
<tr>
|
57
|
-
<th>Package</th>
|
58
|
-
<th>Item</th>
|
59
|
-
<th>Status</th>
|
60
|
-
<th>Unit Price</th>
|
61
|
-
<th>Quantity</th>
|
62
|
-
<th>Subtotal</th>
|
63
|
-
</tr>
|
64
|
-
<% @order.packages.each do |op| %>
|
65
|
-
<% op.line_items.each_with_index do |li, i| %>
|
66
|
-
<tr>
|
67
|
-
<% if i == 0 %>
|
68
|
-
<td rowspan="<%= op.line_items.count %>">
|
69
|
-
<div id='orderpackage_<%= op.id %>_shipping_method_id'></div>
|
70
|
-
<div id='orderpackage_<%= op.id %>_status'></div>
|
71
|
-
</td>
|
72
|
-
<% end %>
|
73
|
-
<td>
|
74
|
-
<% if li.variant.nil? || li.variant.product.nil? %>
|
75
|
-
<% if li.variant.nil? %>
|
76
|
-
Unknown variant
|
77
|
-
<% else %>
|
78
|
-
<%= li.variant.sku %>
|
79
|
-
<% end %>
|
80
|
-
<% else %>
|
81
|
-
<a href='/admin/products/<%= li.variant.product.id %>/variants?highlight=<%= li.variant.id %>'><%= li.variant.product.title %></a><br />
|
82
|
-
<%= li.variant.sku %><br />
|
83
|
-
<%= li.variant.title %>
|
84
|
-
<% end %>
|
85
|
-
</td>
|
86
|
-
<td ><div id='lineitem_<%= li.id %>_status' ></div></td>
|
87
|
-
<td align='right'><%= number_to_currency(li.variant.price) %></td>
|
88
|
-
<td align='right'><% if captured %><%= li.quantity %><% else %><div id='lineitem_<%= li.id %>_quantity'></div><% end %></td>
|
89
|
-
<td align='right' id='li_<%= li.id %>_subtotal'><%= number_to_currency(li.price) %></td>
|
90
|
-
</tr>
|
91
|
-
<% end %>
|
92
|
-
<% end %>
|
93
|
-
<% @order.line_items.each do |li| %>
|
94
|
-
<% next if li.order_package_id %>
|
95
|
-
<tr>
|
96
|
-
<td><div id='assign_to_package'>Unpackaged! <a href='#' onclick="assign_to_package_form(<%= li.id %>);">Assign to package</a></div></td>
|
97
|
-
<td>
|
98
|
-
<% if li.variant.nil? || li.variant.product.nil? %>
|
99
|
-
<% if li.variant.nil? %>Unknown variant<% else %><%= li.variant.sku %><% end %>
|
100
|
-
<% else %>
|
101
|
-
<a href='/admin/products/<%= li.variant.product.id %>/variants?highlight=<%= li.variant.id %>'><%= li.variant.product.title %></a><br />
|
102
|
-
<%= li.variant.sku %><br />
|
103
|
-
<%= li.variant.title %>
|
104
|
-
<% end %>
|
105
|
-
</td>
|
106
|
-
<td ><div id='lineitem_<%= li.id %>_status' ></div></td>
|
107
|
-
<td align='right'><%= number_to_currency(li.variant.price) %></td>
|
108
|
-
<td align='right'><% if captured %><%= li.quantity %><% else %><div id='lineitem_<%= li.id %>_quantity'></div><% end %></td>
|
109
|
-
<td align='right' id='li_<%= li.id %>_subtotal'><%= number_to_currency(li.price) %></td>
|
110
|
-
</tr>
|
111
|
-
<% end %>
|
112
|
-
<tr><td colspan='5' align='right'>Subtotal </td><td align='right' id='subtotal' ><%= number_to_currency(@order.subtotal ) %></td></tr>
|
113
|
-
<tr><td colspan='5' align='right'>Tax </td><td align='right' id='tax' ><%= number_to_currency(@order.tax ) %></td></tr>
|
114
|
-
<tr><td colspan='5' align='right'><%= @order.shipping_service_code ? @order.shipping_service_code : '' %> Shipping & Handling </td><td align='right' id='shipping'><%= number_to_currency(@order.shipping + @order.handling) %></td></tr>
|
115
|
-
<tr>
|
116
|
-
<td colspan='5' align='right'>Discount</td>
|
117
|
-
<td align='right'>
|
118
|
-
<% if captured && @order.discounts.any? %>
|
119
|
-
<%= number_to_currency(@order.amount_discounted || 0) %>
|
120
|
-
<% elsif @order.discounts.any? %>
|
121
|
-
<%= number_to_currency(@order.discounts.first.amount_current) %>
|
122
|
-
<% else %>
|
123
|
-
$0.00
|
124
|
-
<% end %>
|
125
|
-
</td>
|
126
|
-
</tr>
|
127
|
-
<tr><td colspan='5' align='right'>Total </td><td align='right' id='total' ><%= number_to_currency(@order.total ) %></td></tr>
|
128
|
-
</table>
|
129
|
-
<div id='message'></div>
|
130
|
-
|
131
|
-
<p>
|
132
|
-
<input type='button' value='< Back' onclick="window.location='/admin/orders';" />
|
133
|
-
<% if @order.financial_status == 'authorized' %>
|
134
|
-
<input type='button' value='Capture Funds' onclick="capture_funds(<%= @order.id %>);" />
|
135
|
-
<input type='button' value='Void' onclick="void_order(<%= @order.id %>);" />
|
136
|
-
<% end %>
|
137
|
-
<% if @order.financial_status == 'captured' %>
|
138
|
-
<input type='button' value='Refund' onclick="refund_order(<%= @order.id %>);" />
|
139
|
-
<% end %>
|
140
|
-
<input type='button' value='Resend Confirmation' onclick="resend_confirmation(<%= @order.id %>)" />
|
141
|
-
<input type='button' value='Print Order' onclick="print_order(<%= @order.id %>);" />
|
142
|
-
|
143
|
-
<% str = Caboose.plugin_hook('admin_edit_order_buttons', "", @order) %>
|
144
|
-
<% if str %><%= raw str %><% end %>
|
145
|
-
</p>
|
146
|
-
|
147
|
-
<% content_for :caboose_js do %>
|
148
|
-
<%= javascript_include_tag 'caboose/model/all' %>
|
149
|
-
<%= javascript_include_tag 'caboose/admin_edit_order' %>
|
150
|
-
<script type='text/javascript'>
|
151
|
-
|
152
|
-
var controller = new OrderController({ order_id: <%= raw Caboose.json(@order.id) %> });
|
153
|
-
|
154
|
-
</script>
|
155
|
-
<% end %>
|