caboose-cms 0.5.16 → 0.5.17

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDU5MWI2YTUyYzc5NTg3NDYwOTEzYjJlMTYzMDc2ZGIwOTlkMDA2YQ==
4
+ ZDg5OWEzYmQ5M2NkNTRiMjhlMjc5ODBmNDE3OGViYjBiYjk4NTc3NA==
5
5
  data.tar.gz: !binary |-
6
- YWJkNTI4N2Y3YWZjYTYzYzM1NzgxNTYyYTEwZGI5NDU4ODFlNDU5YQ==
6
+ MDdiNDRjZTUyZWNkMmU4MzU4MGNhMzVlNTdmMjM0YWI0ZjA2ZWE3Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGE2YTExNTVkNjI5YTA3N2RmM2NhYTkxNWU0NjVmZWM3MTYzN2Y3ZDE2MDIy
10
- OGRlYTg1ZjU4OGI2OGY0N2RjMjQyZTk5YzgzNjBkMTUwMTdjOTBhMGZiNTdm
11
- YTIwODI5NWU5NDhlZjA2OWRhNjllMmE2ODViYTcwYmY2YjRlYjE=
9
+ ZDhiNGNlY2M3YjdhOTU3NTlhMzUwZTZlMmQ1Mzg2Y2VjZTliZDdmZDUzZTFi
10
+ ZGUyYTllZjRjMDgzMzRlOTUyYTQyMjMzZmM1YWUzMzViMTJjNjE4ODcxZmNh
11
+ ZjNlNzgwN2ZiYjY3OTYxYTAyMWI0OTQ2NTYyNDZjM2RmZTY1YmY=
12
12
  data.tar.gz: !binary |-
13
- NWQ2MzJiNjljYzBiYTQzZDc0YjIwYTgzMDcxMzEzMjNhMjY3ODZhNjIwNDU5
14
- NzIwMTVmYTdhMDVlN2NlYWIyODRmMTIwMDA2NjI1MjI1NzdjZjRhZmQwODRj
15
- NTU4MjBiYmJjMDg0NWU0MzY0ZDMwOThhMTliZjE5NWZlY2FhNmQ=
13
+ N2UyYTAwOTFjZDYyMjA0NmY1NzMwYTY5ZTBjYTNjODIyMDFhOGE3MGU1YmY5
14
+ OWI5NDI0Njk0ZTg3ZjI5MDEyOTQ3OGJkNjk4MDkwZjg5OWQ3ZTU4YzIxYTgw
15
+ YzQxNTQ5Y2Q4MWZiZGI1OGUwNjYwNzY0NGU3ZWJiNWJjZDQ0ZjY=
@@ -32,8 +32,34 @@ module Caboose
32
32
 
33
33
  # GET /admin/sites/1/edit
34
34
  def admin_edit
35
+ return if !user_is_allowed('sites', 'edit')
36
+ @site = Site.find(params[:id])
37
+ end
38
+
39
+ # GET /admin/sites/1/edit/store
40
+ def admin_edit_store_config
35
41
  return if !user_is_allowed('sites', 'edit')
36
42
  @site = Site.find(params[:id])
43
+ StoreConfig.create(:site_id => @site.id) if @site.store_config.nil?
44
+ end
45
+
46
+ # GET /admin/sites/1/edit/smtp
47
+ def admin_edit_smtp_config
48
+ return if !user_is_allowed('sites', 'edit')
49
+ @site = Site.find(params[:id])
50
+ SmtpConfig.create(:site_id => @site.id) if @site.smtp_config.nil?
51
+ end
52
+
53
+ # GET /admin/sites/1/edit/block-types
54
+ def admin_edit_block_types
55
+ return if !user_is_allowed('sites', 'edit')
56
+ @site = Site.find(params[:id])
57
+ end
58
+
59
+ # GET /admin/sites/1/edit/delete
60
+ def admin_delete_form
61
+ return if !user_is_allowed('sites', 'edit')
62
+ @site = Site.find(params[:id])
37
63
  end
38
64
 
39
65
  # POST /admin/sites
@@ -46,8 +72,10 @@ module Caboose
46
72
 
47
73
  if site.name.length == 0
48
74
  resp.error = "Please enter a valid domain."
49
- else
75
+ else
50
76
  site.save
77
+ StoreConfig.create(:site_id => site.id)
78
+ SmtpConfig.create( :site_id => site.id)
51
79
  resp.redirect = "/admin/sites/#{site.id}"
52
80
  end
53
81
 
@@ -153,5 +181,25 @@ module Caboose
153
181
  render :json => options
154
182
  end
155
183
 
184
+ # GET /admin/sites/payment-processor-options
185
+ def payment_processor_options
186
+ return if !user_is_allowed('sites', 'view')
187
+ options = [
188
+ { 'value' => 'stripe', 'text' => 'Stripe' }
189
+ ]
190
+ render :json => options
191
+ end
192
+
193
+ # GET /admin/sites/smtp-auth-options
194
+ def smtp_auth_options
195
+ return if !user_is_allowed('sites', 'view')
196
+ options = [
197
+ { 'value' => SmtpConfig::AUTH_PLAIN , 'text' => SmtpConfig::AUTH_PLAIN },
198
+ { 'value' => SmtpConfig::AUTH_LOGIN , 'text' => SmtpConfig::AUTH_LOGIN },
199
+ { 'value' => SmtpConfig::AUTH_MD5 , 'text' => SmtpConfig::AUTH_MD5 }
200
+ ]
201
+ render :json => options
202
+ end
203
+
156
204
  end
157
205
  end
@@ -495,6 +495,24 @@ class Caboose::Schema < Caboose::Utilities::Schema
495
495
  [ :max_width , :decimal ],
496
496
  [ :max_height , :decimal ]
497
497
  ],
498
+ Caboose::StoreConfig => [
499
+ [ :site_id , :integer ],
500
+ [ :pp_name , :string ],
501
+ [ :pp_username , :string ],
502
+ [ :pp_password , :string ],
503
+ [ :use_usps , :boolean , { :default => false } ],
504
+ [ :usps_secret_key , :string ],
505
+ [ :usps_publishable_key , :string ],
506
+ [ :allowed_shipping_codes , :string ],
507
+ [ :default_shipping_code , :string ],
508
+ [ :origin_country , :string ],
509
+ [ :origin_state , :string ],
510
+ [ :origin_city , :string ],
511
+ [ :origin_zip , :string ],
512
+ [ :fulfillment_email , :string ],
513
+ [ :shipping_email , :string ],
514
+ [ :handling_percentage , :string ]
515
+ ],
498
516
  Caboose::User => [
499
517
  [ :first_name , :string ],
500
518
  [ :last_name , :string ],
@@ -7,6 +7,7 @@ class Caboose::Site < ActiveRecord::Base
7
7
  has_many :site_memberships, :class_name => 'Caboose::SiteMembership', :dependent => :delete_all
8
8
  has_many :domains, :class_name => 'Caboose::Domain', :dependent => :delete_all
9
9
  has_many :post_categories, :class_name => 'Caboose::PostCategory'
10
+ has_one :store_config
10
11
  attr_accessible :id, :name, :description, :under_construction_html
11
12
 
12
13
  def smtp_config
@@ -13,7 +13,6 @@ class Caboose::SmtpConfig < ActiveRecord::Base
13
13
  :authentication ,
14
14
  :enable_starttls_auto
15
15
 
16
-
17
16
  AUTH_PLAIN = 'plain'
18
17
  AUTH_LOGIN = 'login'
19
18
  AUTH_MD5 = 'cram_md5'
@@ -0,0 +1,22 @@
1
+ module Caboose
2
+ class StoreConfig < ActiveRecord::Base
3
+ belongs_to :site
4
+ attr_accessible :id,
5
+ :site_id,
6
+ :pp_name,
7
+ :pp_username,
8
+ :pp_password,
9
+ :use_usps,
10
+ :usps_secret_key,
11
+ :usps_publishable_key,
12
+ :allowed_shipping_codes, # ['0','7','6','1','2','3'],
13
+ :default_shipping_code,
14
+ :origin_country,
15
+ :origin_state,
16
+ :origin_city,
17
+ :origin_zip,
18
+ :fulfillment_email,
19
+ :shipping_email,
20
+ :handling_percentage
21
+ end
22
+ end
@@ -0,0 +1,2 @@
1
+ <br style='clear: left; line-height: 0;' />
2
+ </div><!-- modal_content2 -->
@@ -0,0 +1,40 @@
1
+
2
+ <% content_for :caboose_css do %>
3
+ <style type='text/css'>
4
+ #gravatar {
5
+ float: right;
6
+ width: 150px;
7
+ text-align: right;
8
+ margin: 0 4px 0 0;
9
+ padding: 0;
10
+ }
11
+ #gravatar img {
12
+ border: #fff 2px solid;
13
+ }
14
+ #content input[type=checkbox] { position: relative; }
15
+ #members { height: 200px; overflow-y: scroll; margin-bottom: 20px; }
16
+ </style>
17
+ <% end %>
18
+
19
+ <% content_for :caboose_js do %>
20
+ <%= javascript_include_tag "caboose/model/all" %>
21
+ <% end %>
22
+
23
+ <h1 id='page_title'>Edit Site</h1>
24
+ <ul id='tabs'>
25
+ <%
26
+ tabs = {
27
+ 'General' => "/admin/sites/#{@site.id}",
28
+ 'Block Types' => "/admin/sites/#{@site.id}/block-types",
29
+ 'Store Config' => "/admin/sites/#{@site.id}/store",
30
+ 'SMTP Config' => "/admin/sites/#{@site.id}/smtp",
31
+ 'Delete Site' => "/admin/sites/#{@site.id}/delete"
32
+ }
33
+
34
+ %>
35
+ <% tabs.each do |text, href| %>
36
+ <li<%= raw request.fullpath == href ? " class='selected'" : '' %>><a href='<%= href %>'><%= raw text %></a></li>
37
+ <% end %>
38
+ <li class='back'><input type='button' value='< Back' onclick="window.location='/admin/sites';" /></li>
39
+ </ul>
40
+ <div id='content2'>
@@ -0,0 +1,39 @@
1
+ <%
2
+ s = @site
3
+ %>
4
+ <%= render :partial => 'caboose/sites/admin_header' %>
5
+
6
+ <div id='message'></div>
7
+ <div id='controls'>
8
+ <input type='button' value='Delete Site' onclick="delete_site(<%= @site.id %>);" />
9
+ </div>
10
+
11
+ <%= render :partial => 'caboose/sites/admin_footer' %>
12
+
13
+ <% content_for :caboose_js do %>
14
+ <script type="text/javascript">
15
+
16
+ function delete_site(site_id, confirm)
17
+ {
18
+ if (!confirm)
19
+ {
20
+ var p = $('<p/>').addClass('note confirm')
21
+ .append('Are you sure you want to delete the site? ')
22
+ .append($('<input/>').attr('type','button').val('Yes').click(function() { delete_site(site_id, true); })).append(' ')
23
+ .append($('<input/>').attr('type','button').val('No').click(function() { $('#message').empty(); }));
24
+ $('#message').empty().append(p);
25
+ return;
26
+ }
27
+ $('#message').html("<p class='loading'>Deleting site...</p>");
28
+ $.ajax({
29
+ url: '/admin/sites/' + site_id,
30
+ type: 'delete',
31
+ success: function(resp) {
32
+ if (resp.error) $('#message').html("<p class='note error'>" + resp.error + "</p>");
33
+ if (resp.redirect) window.location = resp.redirect;
34
+ }
35
+ });
36
+ }
37
+
38
+ </script>
39
+ <% end %>
@@ -5,7 +5,7 @@ user_ids = Caboose::SiteMembership.where(:site_id => s.id, :role => Caboose::Si
5
5
  admin_ids = [] if admin_ids.nil?
6
6
  user_ids = [] if user_ids.nil?
7
7
  %>
8
- <h1>Edit Site</h1>
8
+ <%= render :partial => 'caboose/sites/admin_header' %>
9
9
 
10
10
  <p><div id='site_<%= @site.id %>_name' ></div></p>
11
11
  <p><div id='site_<%= @site.id %>_description' ></div></p>
@@ -51,35 +51,9 @@ user_ids = [] if user_ids.nil?
51
51
  </table>
52
52
  </div>
53
53
 
54
- <h2>Block Types</h2>
55
- <div id='block_types'>
56
- <table class='data'>
57
- <tr><th>&nbsp;</th><th>Name</th><th>Description</th></tr>
58
- <% bt_ids = @site.block_type_site_memberships.collect{ |bt| bt.block_type_id } %>
59
- <% Caboose::BlockType.where("parent_id is null").reorder('name').all.each do |bt| %>
60
- <tr>
61
- <td align='center'><input type='checkbox' name='block_type_id_<%= bt.id %>' <%= bt_ids.include?(bt.id) ? "checked='true'" : '' %> onclick="toggle_block_type_site_membership(<%= @site.id %>, <%= bt.id %>, $(this).prop('checked'));" /></td>
62
- <td><%= bt.name %></td>
63
- <td><%= bt.description %></td>
64
- </tr>
65
- <% end %>
66
- </table><br/>
67
- </div>
54
+ <%= render :partial => 'caboose/sites/admin_footer' %>
68
55
 
69
- <div id='message'></div>
70
- <div id='controls'>
71
- <input type='button' value='Back' onclick="window.location='/admin/sites';" />
72
- <input type='button' value='Delete Site' onclick="delete_site(<%= @site.id %>);" />
73
- </div>
74
-
75
- <% content_for :caboose_css do %>
76
- <style type='text/css'>
77
- #content input[type=checkbox] { position: relative; }
78
- #members { height: 200px; overflow-y: scroll; margin-bottom: 20px; }
79
- </style>
80
- <% end %>
81
56
  <% content_for :caboose_js do %>
82
- <%= javascript_include_tag "caboose/model/all" %>
83
57
  <script type="text/javascript">
84
58
 
85
59
  $(document).ready(function() {
@@ -93,31 +67,9 @@ $(document).ready(function() {
93
67
  { name: 'description' , nice_name: 'Description' , type: 'textarea' , value: <%= raw Caboose.json(@site.description) %>, width: 600, height: 75 },
94
68
  { name: 'under_construction_html' , nice_name: 'Under Construction HTML' , type: 'textarea' , value: <%= raw Caboose.json(@site.under_construction_html) %>, width: 600, height: 75 }
95
69
  ]
96
- });
70
+ });
97
71
  });
98
72
 
99
- function delete_site(site_id, confirm)
100
- {
101
- if (!confirm)
102
- {
103
- var p = $('<p/>').addClass('note confirm')
104
- .append('Are you sure you want to delete the site? ')
105
- .append($('<input/>').attr('type','button').val('Yes').click(function() { delete_site(site_id, true); })).append(' ')
106
- .append($('<input/>').attr('type','button').val('No').click(function() { $('#message').empty(); }));
107
- $('#message').empty().append(p);
108
- return;
109
- }
110
- $('#message').html("<p class='loading'>Deleting site...</p>");
111
- $.ajax({
112
- url: '/admin/sites/' + site_id,
113
- type: 'delete',
114
- success: function(resp) {
115
- if (resp.error) $('#message').html("<p class='note error'>" + resp.error + "</p>");
116
- if (resp.redirect) window.location = resp.redirect;
117
- }
118
- });
119
- }
120
-
121
73
  function set_under_construction(site_id, domain_id, checked)
122
74
  {
123
75
  $.ajax({
@@ -149,18 +101,6 @@ function remove_site_membership(site_id, user_id)
149
101
  });
150
102
  }
151
103
 
152
- function toggle_block_type_site_membership(site_id, block_type_id, checked)
153
- {
154
- $.ajax({
155
- url: '/admin/block-types/' + block_type_id,
156
- type: 'put',
157
- data: {
158
- site_id: [site_id, checked ? 1 : 0]
159
- },
160
- succes: function(resp) {}
161
- });
162
- }
163
-
164
104
  function add_domain(site_id, domain)
165
105
  {
166
106
  if (!domain)
@@ -222,18 +162,3 @@ function set_primary_domain(site_id, domain_id)
222
162
 
223
163
  </script>
224
164
  <% end %>
225
-
226
- <% content_for :caboose_css do %>
227
- <style type='text/css'>
228
- #gravatar {
229
- float: right;
230
- width: 150px;
231
- text-align: right;
232
- margin: 0 4px 0 0;
233
- padding: 0;
234
- }
235
- #gravatar img {
236
- border: #fff 2px solid;
237
- }
238
- </style>
239
- <% end %>
@@ -0,0 +1,45 @@
1
+ <%
2
+ s = @site
3
+ %>
4
+ <%= render :partial => 'caboose/sites/admin_header' %>
5
+
6
+ <h2>Block Types</h2>
7
+ <div id='block_types'>
8
+ <table class='data'>
9
+ <tr><th>&nbsp;</th><th>Name</th><th>Description</th></tr>
10
+ <% bt_ids = @site.block_type_site_memberships.collect{ |bt| bt.block_type_id } %>
11
+ <% Caboose::BlockType.where("parent_id is null").reorder('name').all.each do |bt| %>
12
+ <tr>
13
+ <td align='center'><input type='checkbox' name='block_type_id_<%= bt.id %>' <%= bt_ids.include?(bt.id) ? "checked='true'" : '' %> onclick="toggle_block_type_site_membership(<%= @site.id %>, <%= bt.id %>, $(this).prop('checked'));" /></td>
14
+ <td><%= bt.name %></td>
15
+ <td><%= bt.description %></td>
16
+ </tr>
17
+ <% end %>
18
+ </table><br/>
19
+ </div>
20
+
21
+ <div id='message'></div>
22
+
23
+ <%= render :partial => 'caboose/sites/admin_footer' %>
24
+
25
+ <% content_for :caboose_js do %>
26
+ <script type="text/javascript">
27
+
28
+ $(document).ready(function() {
29
+
30
+ });
31
+
32
+ function toggle_block_type_site_membership(site_id, block_type_id, checked)
33
+ {
34
+ $.ajax({
35
+ url: '/admin/block-types/' + block_type_id,
36
+ type: 'put',
37
+ data: {
38
+ site_id: [site_id, checked ? 1 : 0]
39
+ },
40
+ succes: function(resp) {}
41
+ });
42
+ }
43
+
44
+ </script>
45
+ <% end %>
@@ -0,0 +1,51 @@
1
+ <%
2
+ s = @site
3
+ smtp_config = s.smtp_config
4
+ %>
5
+ <%= render :partial => 'caboose/sites/admin_header' %>
6
+
7
+ <h2>SMTP Config</h2>
8
+ <p><div id='smtpconfig_<%= smtp_config.id %>_address' ></div></p>
9
+ <p><div id='smtpconfig_<%= smtp_config.id %>_port' ></div></p>
10
+ <p><div id='smtpconfig_<%= smtp_config.id %>_domain' ></div></p>
11
+ <p><div id='smtpconfig_<%= smtp_config.id %>_user_name' ></div></p>
12
+ <p><div id='smtpconfig_<%= smtp_config.id %>_password' ></div></p>
13
+ <p><div id='smtpconfig_<%= smtp_config.id %>_authentication' ></div></p>
14
+ <p><div id='smtpconfig_<%= smtp_config.id %>_enable_starttls_auto' ></div></p>
15
+
16
+ <div id='message'></div>
17
+
18
+ <%= render :partial => 'caboose/sites/admin_footer' %>
19
+
20
+ <% content_for :caboose_css do %>
21
+ <style type='text/css'>
22
+ #content input[type=checkbox] { position: relative; }
23
+ #members { height: 200px; overflow-y: scroll; margin-bottom: 20px; }
24
+ </style>
25
+ <% end %>
26
+ <% content_for :caboose_js do %>
27
+ <%= javascript_include_tag "caboose/model/all" %>
28
+ <script type="text/javascript">
29
+
30
+ $(document).ready(function() {
31
+
32
+ new ModelBinder({
33
+ name: 'SmtpConfig',
34
+ id: <%= smtp_config.id %>,
35
+ update_url: '/admin/sites/<%= @site.id %>/smtp',
36
+ authenticity_token: '<%= form_authenticity_token %>',
37
+ attributes: [
38
+ { name: 'address' , nice_name: 'Address' , type: 'text' , value: <%= raw Caboose.json(smtp_config.address ) %>, width: 400 },
39
+ { name: 'port' , nice_name: 'Port' , type: 'text' , value: <%= raw Caboose.json(smtp_config.port ) %>, width: 400 },
40
+ { name: 'domain' , nice_name: 'Domain' , type: 'text' , value: <%= raw Caboose.json(smtp_config.domain ) %>, width: 400 },
41
+ { name: 'user_name' , nice_name: 'Username' , type: 'text' , value: <%= raw Caboose.json(smtp_config.user_name ) %>, width: 400 },
42
+ { name: 'password' , nice_name: 'Password' , type: 'text' , value: <%= raw Caboose.json(smtp_config.password ) %>, width: 400 },
43
+ { name: 'authentication' , nice_name: 'Authentication' , type: 'select' , value: <%= raw Caboose.json(smtp_config.authentication ) %>, width: 400 , options_url: '/admin/sites/smtp-auth-options' },
44
+ { name: 'enable_starttls_auto' , nice_name: 'Enable Start TLS Auto' , type: 'checkbox' , value: <%= raw smtp_config.enable_starttls_auto ? 1 : 0 %>, width: 400 }
45
+ ]
46
+ });
47
+
48
+ });
49
+
50
+ </script>
51
+ <% end %>
@@ -0,0 +1,66 @@
1
+ <%
2
+ s = @site
3
+ store_config = s.store_config
4
+ %>
5
+ <%= render :partial => 'caboose/sites/admin_header' %>
6
+
7
+ <p><div id='storeconfig_<%= store_config.id %>_pp_name' ></div></p>
8
+ <p><div id='storeconfig_<%= store_config.id %>_pp_username' ></div></p>
9
+ <p><div id='storeconfig_<%= store_config.id %>_pp_password' ></div></p>
10
+ <p><div id='storeconfig_<%= store_config.id %>_use_usps' ></div></p>
11
+ <p><div id='storeconfig_<%= store_config.id %>_usps_secret_key' ></div></p>
12
+ <p><div id='storeconfig_<%= store_config.id %>_usps_publishable_key' ></div></p>
13
+ <p><div id='storeconfig_<%= store_config.id %>_allowed_shipping_codes' ></div></p>
14
+ <p><div id='storeconfig_<%= store_config.id %>_default_shipping_code' ></div></p>
15
+ <p><div id='storeconfig_<%= store_config.id %>_origin_country' ></div></p>
16
+ <p><div id='storeconfig_<%= store_config.id %>_origin_state' ></div></p>
17
+ <p><div id='storeconfig_<%= store_config.id %>_origin_city' ></div></p>
18
+ <p><div id='storeconfig_<%= store_config.id %>_origin_zip' ></div></p>
19
+ <p><div id='storeconfig_<%= store_config.id %>_fulfillment_email' ></div></p>
20
+ <p><div id='storeconfig_<%= store_config.id %>_shipping_email' ></div></p>
21
+ <p><div id='storeconfig_<%= store_config.id %>_handling_percentage' ></div></p>
22
+
23
+ <div id='message'></div>
24
+
25
+ <%= render :partial => 'caboose/sites/admin_footer' %>
26
+
27
+ <% content_for :caboose_css do %>
28
+ <style type='text/css'>
29
+ #content input[type=checkbox] { position: relative; }
30
+ #members { height: 200px; overflow-y: scroll; margin-bottom: 20px; }
31
+ </style>
32
+ <% end %>
33
+ <% content_for :caboose_js do %>
34
+ <%= javascript_include_tag "caboose/model/all" %>
35
+ <script type="text/javascript">
36
+
37
+ $(document).ready(function() {
38
+
39
+ new ModelBinder({
40
+ name: 'StoreConfig',
41
+ id: <%= store_config.id %>,
42
+ update_url: '/admin/sites/<%= @site.id %>/store',
43
+ authenticity_token: '<%= form_authenticity_token %>',
44
+ attributes: [
45
+ { name: 'pp_name' , nice_name: 'Payment Processor Type' , type: 'select' , value: <%= raw Caboose.json(store_config.pp_name ) %>, width: 400 , options_url: '/admin/sites/payment-processor-options' },
46
+ { name: 'pp_username' , nice_name: 'Payment Processor Username' , type: 'text' , value: <%= raw Caboose.json(store_config.pp_username ) %>, width: 400 },
47
+ { name: 'pp_password' , nice_name: 'Payment Processor Password' , type: 'text' , value: <%= raw Caboose.json(store_config.pp_password ) %>, width: 400 },
48
+ { name: 'use_usps' , nice_name: 'Use USPS' , type: 'checkbox' , value: <%= raw Caboose.json(store_config.use_usps ? 1 : 0 ) %>, width: 400 },
49
+ { name: 'usps_secret_key' , nice_name: 'USPS Secret Key' , type: 'text' , value: <%= raw Caboose.json(store_config.usps_secret_key ) %>, width: 400 },
50
+ { name: 'usps_publishable_key' , nice_name: 'USPS Publishable Key' , type: 'text' , value: <%= raw Caboose.json(store_config.usps_publishable_key ) %>, width: 400 },
51
+ { name: 'allowed_shipping_codes' , nice_name: 'Allowed Shipping Codes' , type: 'text' , value: <%= raw Caboose.json(store_config.allowed_shipping_codes ) %>, width: 400 },
52
+ { name: 'default_shipping_code' , nice_name: 'Default Shipping Code' , type: 'text' , value: <%= raw Caboose.json(store_config.default_shipping_code ) %>, width: 400 },
53
+ { name: 'origin_country' , nice_name: 'Origin Country' , type: 'text' , value: <%= raw Caboose.json(store_config.origin_country ) %>, width: 400 },
54
+ { name: 'origin_state' , nice_name: 'Origin State' , type: 'text' , value: <%= raw Caboose.json(store_config.origin_state ) %>, width: 400 },
55
+ { name: 'origin_city' , nice_name: 'Origin City' , type: 'text' , value: <%= raw Caboose.json(store_config.origin_city ) %>, width: 400 },
56
+ { name: 'origin_zip' , nice_name: 'Origin Zip' , type: 'text' , value: <%= raw Caboose.json(store_config.origin_zip ) %>, width: 400 },
57
+ { name: 'fulfillment_email' , nice_name: 'Fulfillment Email' , type: 'text' , value: <%= raw Caboose.json(store_config.fulfillment_email ) %>, width: 400 },
58
+ { name: 'shipping_email' , nice_name: 'Shipping Email' , type: 'text' , value: <%= raw Caboose.json(store_config.shipping_email ) %>, width: 400 },
59
+ { name: 'handling_percentage' , nice_name: 'Handling Percentage' , type: 'text' , value: <%= raw Caboose.json(store_config.handling_percentage ) %>, width: 400 }
60
+ ]
61
+ });
62
+
63
+ });
64
+
65
+ </script>
66
+ <% end %>
@@ -28,13 +28,19 @@ Caboose::Engine.routes.draw do
28
28
  put "admin/sites/:site_id/domains/:id" => "domains#admin_update"
29
29
  delete "admin/sites/:site_id/domains/:id" => "domains#admin_delete"
30
30
 
31
- get "admin/sites/options" => "sites#options"
32
- get "admin/sites" => "sites#admin_index"
33
- get "admin/sites/new" => "sites#admin_new"
34
- get "admin/sites/:id" => "sites#admin_edit"
35
- put "admin/sites/:id" => "sites#admin_update"
36
- post "admin/sites" => "sites#admin_add"
37
- delete "admin/sites/:id" => "sites#admin_delete"
31
+ get "admin/sites/options" => "sites#options"
32
+ get "admin/sites/payment-processor-options" => "sites#payment_processor_options"
33
+ get "admin/sites/smtp-auth-options" => "sites#smtp_auth_options"
34
+ get "admin/sites" => "sites#admin_index"
35
+ get "admin/sites/new" => "sites#admin_new"
36
+ get "admin/sites/:id/store" => "sites#admin_edit_store_config"
37
+ get "admin/sites/:id/smtp" => "sites#admin_edit_smtp_config"
38
+ get "admin/sites/:id/block-types" => "sites#admin_edit_block_types"
39
+ get "admin/sites/:id/delete" => "sites#admin_delete_form"
40
+ get "admin/sites/:id" => "sites#admin_edit"
41
+ put "admin/sites/:id" => "sites#admin_update"
42
+ post "admin/sites" => "sites#admin_add"
43
+ delete "admin/sites/:id" => "sites#admin_delete"
38
44
 
39
45
  get "admin/redirects" => "redirects#admin_index"
40
46
  get "admin/redirects/new" => "redirects#admin_new"
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.16'
2
+ VERSION = '0.5.17'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.16
4
+ version: 0.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
@@ -476,6 +476,7 @@ files:
476
476
  - app/models/caboose/stackable_group.rb
477
477
  - app/models/caboose/states.rb
478
478
  - app/models/caboose/std_class.rb
479
+ - app/models/caboose/store_config.rb
479
480
  - app/models/caboose/tax_calculator.rb
480
481
  - app/models/caboose/tax_line.rb
481
482
  - app/models/caboose/user.rb
@@ -662,7 +663,13 @@ files:
662
663
  - app/views/caboose/settings/edit.html.erb
663
664
  - app/views/caboose/settings/index.html.erb
664
665
  - app/views/caboose/settings/new.html.erb
666
+ - app/views/caboose/sites/_admin_footer.html.erb
667
+ - app/views/caboose/sites/_admin_header.html.erb
668
+ - app/views/caboose/sites/admin_delete_form.html.erb
665
669
  - app/views/caboose/sites/admin_edit.html.erb
670
+ - app/views/caboose/sites/admin_edit_block_types.html.erb
671
+ - app/views/caboose/sites/admin_edit_smtp_config.html.erb
672
+ - app/views/caboose/sites/admin_edit_store_config.html.erb
666
673
  - app/views/caboose/sites/admin_index.html.erb
667
674
  - app/views/caboose/sites/admin_new.html.erb
668
675
  - app/views/caboose/stackable_groups/admin_index.html.erb