caboose-cms 0.5.206 → 0.5.207
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/assets/stylesheets/caboose/modal_main.css +372 -0
- data/app/controllers/caboose/fonts_controller.rb +48 -0
- data/app/controllers/caboose/modification_value_input_fields_controller.rb +108 -0
- data/app/controllers/caboose/sites_controller.rb +1 -0
- data/app/models/caboose/core_plugin.rb +1 -0
- data/app/models/caboose/font.rb +7 -0
- data/app/models/caboose/modification_value_input_field.rb +21 -0
- data/app/models/caboose/schema.rb +8 -0
- data/app/models/caboose/site.rb +1 -0
- data/app/views/caboose/checkout/thanks.html.erb +1 -1
- data/app/views/caboose/fonts/admin_index.html.erb +438 -0
- data/app/views/caboose/modification_value_input_fields/admin_edit.html.erb +78 -0
- data/app/views/caboose/orders_mailer/fulfillment_new_order.html.erb +114 -0
- data/app/views/caboose/sites/admin_edit.html.erb +2 -0
- data/config/routes.rb +9 -1
- data/lib/caboose/version.rb +1 -1
- metadata +9 -2
@@ -0,0 +1,78 @@
|
|
1
|
+
<%
|
2
|
+
mvif = @modification_value_input_field
|
3
|
+
%>
|
4
|
+
<h1>Edit Input Field</h1>
|
5
|
+
|
6
|
+
<p><div id='inputfield_<%= mvif.id %>_name' ></div></p>
|
7
|
+
<p><div id='inputfield_<%= mvif.id %>_description' ></div></p>
|
8
|
+
<p><div id='inputfield_<%= mvif.id %>_field_type' ></div></p>
|
9
|
+
<p><div id='inputfield_<%= mvif.id %>_default_value' ></div></p>
|
10
|
+
<p><div id='inputfield_<%= mvif.id %>_width' ></div></p>
|
11
|
+
<p><div id='inputfield_<%= mvif.id %>_height' ></div></p>
|
12
|
+
<p><div id='inputfield_<%= mvif.id %>_options' ></div></p>
|
13
|
+
<p><div id='inputfield_<%= mvif.id %>_options_url' ></div></p>
|
14
|
+
|
15
|
+
<div id='message'></div>
|
16
|
+
<p>
|
17
|
+
<input type='button' value='Close' onclick="modal.close();" />
|
18
|
+
<input type='button' value='Delete Field' onclick="delete_field();" />
|
19
|
+
</p>
|
20
|
+
<% content_for :caboose_js do %>
|
21
|
+
<%= javascript_include_tag "caboose/model/all" %>
|
22
|
+
<script type='text/javascript'>
|
23
|
+
|
24
|
+
$(document).ready(function() {
|
25
|
+
new ModelBinder({
|
26
|
+
name: 'InputField',
|
27
|
+
id: <%= mvif.id %>,
|
28
|
+
update_url: '/admin/products/<%= @product.id %>/modifications/<%= @modification.id %>/values/<%= mvif.modification_value_id %>/input-fields/<%= mvif.id %>',
|
29
|
+
authenticity_token: <%= raw Caboose.json(form_authenticity_token) %>,
|
30
|
+
attributes: [
|
31
|
+
{ name: 'name' , nice_name: 'Name' , type: 'text' , value: <%= raw Caboose.json(mvif.name ) %>, width: 400 },
|
32
|
+
{ name: 'description' , nice_name: 'Description' , type: 'text' , value: <%= raw Caboose.json(mvif.description ) %>, width: 400 },
|
33
|
+
{ name: 'field_type' , nice_name: 'Field Type' , type: 'select' , value: <%= raw Caboose.json(mvif.field_type ) %>, width: 400 },
|
34
|
+
{ name: 'default_value' , nice_name: 'Default Value' , type: 'text' , value: <%= raw Caboose.json(mvif.default_value ) %>, width: 400 },
|
35
|
+
{ name: 'width' , nice_name: 'Width' , type: 'text' , value: <%= raw Caboose.json(mvif.width ) %>, width: 400 },
|
36
|
+
{ name: 'height' , nice_name: 'Height' , type: 'text' , value: <%= raw Caboose.json(mvif.height ) %>, width: 400 },
|
37
|
+
{ name: 'options' , nice_name: 'Options' , type: 'text' , value: <%= raw Caboose.json(mvif.options ) %>, width: 400 },
|
38
|
+
{ name: 'options_url' , nice_name: 'Options URL' , type: 'text' , value: <%= raw Caboose.json(mvif.options_url ) %>, width: 400 }
|
39
|
+
]
|
40
|
+
});
|
41
|
+
});
|
42
|
+
|
43
|
+
var modal = false;
|
44
|
+
$(window).load(function() {
|
45
|
+
modal = new CabooseModal(440);
|
46
|
+
});
|
47
|
+
|
48
|
+
function delete_field(confirm)
|
49
|
+
{
|
50
|
+
if (!confirm)
|
51
|
+
{
|
52
|
+
var p = $('<p/>')
|
53
|
+
.addClass('note error')
|
54
|
+
.append("Are you sure you want to delete the field?<br /><br />")
|
55
|
+
.append($("<input/>").attr('type', 'button').val('Confirm').click(function() { delete_field(true); }))
|
56
|
+
.append(' ')
|
57
|
+
.append($("<input/>").attr('type', 'button').val('Cancel').click(function() { $('#message').empty(); modal.autosize(); }));
|
58
|
+
modal.autosize(p);
|
59
|
+
return;
|
60
|
+
}
|
61
|
+
modal.autosize("<p class='loading'>Deleting field...</p>");
|
62
|
+
$.ajax({
|
63
|
+
url: '/admin/products/<%= @product.id %>/modifications/<%= @modification.id %>/values/<%= mvif.modification_value_id %>/input-fields/<%= mvif.id %>',
|
64
|
+
type: 'delete',
|
65
|
+
success: function(resp) {
|
66
|
+
if (resp.error)
|
67
|
+
modal.autosize("<p class='note error'>" + resp.error + "</p>");
|
68
|
+
if (resp.success)
|
69
|
+
{
|
70
|
+
parent.controller.refresh();
|
71
|
+
modal.close();
|
72
|
+
}
|
73
|
+
}
|
74
|
+
});
|
75
|
+
}
|
76
|
+
|
77
|
+
</script>
|
78
|
+
<% end %>
|
@@ -1 +1,115 @@
|
|
1
|
+
<p><img src='<%= @order.site.logo.url(:thumb) %>' /></p>
|
2
|
+
|
3
|
+
<!-- <h1>Thank you for your order!</h1> -->
|
1
4
|
<h1>New Order Received</h1>
|
5
|
+
|
6
|
+
<h4><a href="<%= @order.site.store_config.pp_relay_domain %>/admin/orders/<%= @order.id %>" target="_blank" title="View Order">View Order</a></h4>
|
7
|
+
|
8
|
+
<h2>Order Details</h2>
|
9
|
+
|
10
|
+
<p>Order #<%= @order.order_number %></p>
|
11
|
+
|
12
|
+
<table border='1' style='border-collapse: collapse;'>
|
13
|
+
<tr>
|
14
|
+
<th>Package</th>
|
15
|
+
<th>Line Item</th>
|
16
|
+
<th>Unit Price</th>
|
17
|
+
<th>Quantity</th>
|
18
|
+
<th>Subtotal</th>
|
19
|
+
</tr>
|
20
|
+
<% @order.order_packages.each do |op| %>
|
21
|
+
<% op.line_items.each_with_index do |li, i| %>
|
22
|
+
<% v = li.variant %>
|
23
|
+
<% p = v.product %>
|
24
|
+
<tr>
|
25
|
+
<% if i == 0 %>
|
26
|
+
<td rowspan="<%= op.line_items.count %>">
|
27
|
+
<div><%= op.shipping_method.service_name %></div>
|
28
|
+
<div><%= op.status %></div>
|
29
|
+
<% if op.tracking_number %><div><%= op.tracking_number %></div><% end %>
|
30
|
+
</td>
|
31
|
+
<% end %>
|
32
|
+
<td>
|
33
|
+
<p><%= p.title %></p>
|
34
|
+
<% if li.is_gift %>
|
35
|
+
<p>This item is a gift.</p>
|
36
|
+
<ul>
|
37
|
+
<li><% if li.gift_wrap %>Gift wrap (<%= number_to_currency(p.gift_wrap_price) %>)<% else %>Do not gift wrap<% end %></li>
|
38
|
+
<li><% if li.include_gift_message %>Gift message: <%= li.gift_message %><% else %>No gift message<% end %></li>
|
39
|
+
<li><% if li.hide_prices %>Hide all prices<% else %>Show all prices<% end %></li>
|
40
|
+
</ul>
|
41
|
+
<% end %>
|
42
|
+
</td>
|
43
|
+
<td align='right'><%= number_to_currency(li.unit_price) %></td>
|
44
|
+
<td align='right'><%= li.quantity %></td>
|
45
|
+
<td align='right'><%= number_to_currency(li.subtotal) %></td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
<% end %>
|
49
|
+
<% @order.line_items.each do |li| %>
|
50
|
+
<% next if li.order_package_id %>
|
51
|
+
<% v = li.variant %>
|
52
|
+
<% p = v.product %>
|
53
|
+
<tr>
|
54
|
+
<td>
|
55
|
+
<% if v.downloadable %>
|
56
|
+
<p>This item is downloadable.</p>
|
57
|
+
<p><a href='<%= @order.site.store_config.pp_relay_domain %>/my-account/orders/<%= @order.id %>/line-items/<%= li.id %>/download' target="_blank">Download</a></li>
|
58
|
+
<% else %>
|
59
|
+
Not assigned to a package
|
60
|
+
<% end %>
|
61
|
+
</td>
|
62
|
+
<td>
|
63
|
+
<p><%= p.title %></td></p>
|
64
|
+
<% if li.is_gift %>
|
65
|
+
<p>This item is a gift.</p>
|
66
|
+
<ul>
|
67
|
+
<li><% if li.gift_wrap %>Gift wrap (<%= number_to_currency(p.gift_wrap_price) %>)<% else %>Do not gift wrap<% end %></li>
|
68
|
+
<li><% if li.include_gift_message %>Gift message: <%= li.gift_message %><% else %>No gift message<% end %></li>
|
69
|
+
<li><% if li.hide_prices %>Hide all prices<% else %>Show all prices<% end %></li>
|
70
|
+
</ul>
|
71
|
+
<% end %>
|
72
|
+
</td>
|
73
|
+
<td align='right'><%= number_to_currency(li.unit_price) %></td>
|
74
|
+
<td align='right'><%= li.quantity %></td>
|
75
|
+
<td align='right'><%= number_to_currency(li.subtotal) %></td>
|
76
|
+
</tr>
|
77
|
+
<% end %>
|
78
|
+
<tr><td colspan="4" align='right'>Subtotal: </td><td align='right'><%= number_to_currency(@order.subtotal) %></td></tr>
|
79
|
+
<tr><td colspan="4" align='right'>Tax: </td><td align='right'><%= number_to_currency(@order.tax) %></td></tr>
|
80
|
+
<tr><td colspan="4" align='right'>Shipping and Handling: </td><td align='right'><%= number_to_currency(@order.shipping + @order.handling) %></td></tr>
|
81
|
+
<% if @order.gift_wrap && @order.gift_wrap > 0 %>
|
82
|
+
<tr><td colspan="4" align='right'>Gift wrap: </td><td align='right'><%= number_to_currency(@order.gift_wrap) %></td></tr>
|
83
|
+
<% end %>
|
84
|
+
<% if @order.discounts %>
|
85
|
+
<% @order.discounts.each do |d| %>
|
86
|
+
<tr><td colspan="4" align='right'>"<%= d.gift_card.code %>" gift card: </td><td align='right'><%= number_to_currency(d.amount) %></td></tr>
|
87
|
+
<% end %>
|
88
|
+
<% end %>
|
89
|
+
<% if @order.custom_discount %>
|
90
|
+
<tr><td colspan="4" align='right'>Discount: </td><td align='right'><%= number_to_currency(@order.custom_discount) %></td></tr>
|
91
|
+
<% end %>
|
92
|
+
<tr><td colspan="4" align='right'>Total: </td><td align='right'><%= number_to_currency(@order.total) %></td></tr>
|
93
|
+
</table>
|
94
|
+
|
95
|
+
<% if @order.shipping_address %>
|
96
|
+
<% sa = @order.shipping_address %>
|
97
|
+
<h2>Shipping Address</h2>
|
98
|
+
<p>
|
99
|
+
<%= sa.first_name %> <%= sa.last_name %><br />
|
100
|
+
<%= sa.address1 %><br />
|
101
|
+
<% if sa.address2 && sa.address2.strip.length > 0 %><%= sa.address2 %><br /><% end %>
|
102
|
+
<%= sa.city %>, <%= sa.state %> <%= sa.zip %>
|
103
|
+
</p>
|
104
|
+
<% end %>
|
105
|
+
|
106
|
+
<% if @order.billing_address %>
|
107
|
+
<% ba = @order.billing_address %>
|
108
|
+
<h2>Billing Address</h2>
|
109
|
+
<p>
|
110
|
+
<%= ba.first_name %> <%= ba.last_name %><br />
|
111
|
+
<%= ba.address1 %><br />
|
112
|
+
<% if ba.address2 && ba.address2.strip.length > 0 %><%= ba.address2 %><br /><% end %>
|
113
|
+
<%= ba.city %>, <%= ba.state %> <%= ba.zip %>
|
114
|
+
</p>
|
115
|
+
<% end %>
|
@@ -12,6 +12,7 @@ user_ids = [] if user_ids.nil?
|
|
12
12
|
<p><div id='site_<%= @site.id %>_description' ></div></p>
|
13
13
|
<p><div id='site_<%= @site.id %>_under_construction_html' ></div></p>
|
14
14
|
<p><div id='site_<%= @site.id %>_use_store' ></div></p>
|
15
|
+
<p><div id='site_<%= @site.id %>_use_fonts' ></div></p>
|
15
16
|
<p><div id='site_<%= @site.id %>_default_layout_id' ></div></p>
|
16
17
|
|
17
18
|
<h2>Domains</h2>
|
@@ -73,6 +74,7 @@ $(document).ready(function() {
|
|
73
74
|
{ name: 'description' , nice_name: 'Description' , type: 'textarea' , value: <%= raw Caboose.json(@site.description) %>, width: 600, height: 75 },
|
74
75
|
{ name: 'under_construction_html' , nice_name: 'Under Construction HTML' , type: 'textarea' , value: <%= raw Caboose.json(@site.under_construction_html) %>, width: 600, height: 75 },
|
75
76
|
{ name: 'use_store' , nice_name: 'Enable Store' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_store ? true : false) %>, width: 400 },
|
77
|
+
{ name: 'use_fonts' , nice_name: 'Enable Fonts' , type: 'checkbox' , value: <%= raw Caboose.json(@site.use_fonts ? true : false) %>, width: 400 },
|
76
78
|
{ name: 'default_layout_id' , nice_name: 'Default Layout' , type: 'select' , value: <%= raw Caboose.json(@site.default_layout_id) %>, width: 600, options_url: "/admin/sites/<%= @site.id %>/default-layout-options" }
|
77
79
|
]
|
78
80
|
});
|
data/config/routes.rb
CHANGED
@@ -73,7 +73,7 @@ Caboose::Engine.routes.draw do
|
|
73
73
|
delete "/admin/sites/:id" => "sites#admin_delete"
|
74
74
|
post "/admin/sites/:id/members" => "sites#admin_add_member"
|
75
75
|
delete "/admin/sites/:id/members/:user_id" => "sites#admin_remove_member"
|
76
|
-
|
76
|
+
|
77
77
|
post "/admin/sites/:site_id/domains" => "domains#admin_add"
|
78
78
|
put "/admin/sites/:site_id/domains/:id" => "domains#admin_update"
|
79
79
|
delete "/admin/sites/:site_id/domains/:id" => "domains#admin_delete"
|
@@ -112,6 +112,14 @@ Caboose::Engine.routes.draw do
|
|
112
112
|
get "/admin/analytics" => "social#analytics"
|
113
113
|
|
114
114
|
|
115
|
+
#=============================================================================
|
116
|
+
# Fonts
|
117
|
+
#=============================================================================
|
118
|
+
|
119
|
+
get "/admin/fonts" => "fonts#admin_index"
|
120
|
+
put "/admin/fonts" => "fonts#admin_update"
|
121
|
+
|
122
|
+
|
115
123
|
#=============================================================================
|
116
124
|
# Shipping Packages
|
117
125
|
#=============================================================================
|
data/lib/caboose/version.rb
CHANGED
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.207
|
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-05-
|
11
|
+
date: 2015-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -489,6 +489,7 @@ files:
|
|
489
489
|
- app/assets/stylesheets/caboose/login.css
|
490
490
|
- app/assets/stylesheets/caboose/message_boxes.css.scss
|
491
491
|
- app/assets/stylesheets/caboose/modal.css
|
492
|
+
- app/assets/stylesheets/caboose/modal_main.css
|
492
493
|
- app/assets/stylesheets/caboose/model_binder.css
|
493
494
|
- app/assets/stylesheets/caboose/my_account.css
|
494
495
|
- app/assets/stylesheets/caboose/my_account_edit_order.css.scss
|
@@ -533,6 +534,7 @@ files:
|
|
533
534
|
- app/controllers/caboose/domains_controller.rb
|
534
535
|
- app/controllers/caboose/event_groups_controller.rb
|
535
536
|
- app/controllers/caboose/events_controller.rb
|
537
|
+
- app/controllers/caboose/fonts_controller.rb
|
536
538
|
- app/controllers/caboose/gift_cards_controller.rb
|
537
539
|
- app/controllers/caboose/google_spreadsheets_controller.rb
|
538
540
|
- app/controllers/caboose/images_controller.rb
|
@@ -541,6 +543,7 @@ files:
|
|
541
543
|
- app/controllers/caboose/logout_controller.rb
|
542
544
|
- app/controllers/caboose/media_categories_controller.rb
|
543
545
|
- app/controllers/caboose/modal_controller.rb
|
546
|
+
- app/controllers/caboose/modification_value_input_fields_controller.rb
|
544
547
|
- app/controllers/caboose/modification_values_controller.rb
|
545
548
|
- app/controllers/caboose/modifications_controller.rb
|
546
549
|
- app/controllers/caboose/my_account_controller.rb
|
@@ -610,6 +613,7 @@ files:
|
|
610
613
|
- app/models/caboose/database_session.rb
|
611
614
|
- app/models/caboose/discount.rb
|
612
615
|
- app/models/caboose/domain.rb
|
616
|
+
- app/models/caboose/font.rb
|
613
617
|
- app/models/caboose/gift_card.rb
|
614
618
|
- app/models/caboose/line_item.rb
|
615
619
|
- app/models/caboose/line_item_modification.rb
|
@@ -621,6 +625,7 @@ files:
|
|
621
625
|
- app/models/caboose/model_binder.rb
|
622
626
|
- app/models/caboose/modification.rb
|
623
627
|
- app/models/caboose/modification_value.rb
|
628
|
+
- app/models/caboose/modification_value_input_field.rb
|
624
629
|
- app/models/caboose/order.rb
|
625
630
|
- app/models/caboose/order_discount.rb
|
626
631
|
- app/models/caboose/order_package.rb
|
@@ -785,6 +790,7 @@ files:
|
|
785
790
|
- app/views/caboose/extras/error.html.erb
|
786
791
|
- app/views/caboose/extras/error404.html.erb
|
787
792
|
- app/views/caboose/extras/error_invalid_site.html.erb
|
793
|
+
- app/views/caboose/fonts/admin_index.html.erb
|
788
794
|
- app/views/caboose/gift_cards/admin_edit.html.erb
|
789
795
|
- app/views/caboose/gift_cards/admin_index.html.erb
|
790
796
|
- app/views/caboose/images/admin_edit.html.erb
|
@@ -797,6 +803,7 @@ files:
|
|
797
803
|
- app/views/caboose/login/reset_password_form.html.erb
|
798
804
|
- app/views/caboose/login_mailer/forgot_password_email.html.erb
|
799
805
|
- app/views/caboose/modal/index.html.erb
|
806
|
+
- app/views/caboose/modification_value_input_fields/admin_edit.html.erb
|
800
807
|
- app/views/caboose/my_account/index.html.erb
|
801
808
|
- app/views/caboose/my_account_orders/authnet_relay.html.erb
|
802
809
|
- app/views/caboose/my_account_orders/authnet_response.html.erb
|