caboose-cms 0.6.16 → 0.6.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,10 +20,8 @@
20
20
  <ul id="login-options">
21
21
  <li><a href="/register?return_url=<%= @return_url %>" class='register'>Need to register?</a></li>
22
22
  <li><a href="/login/forgot-password?return_url=<%= @return_url %>" class='forgot'>Forgot your password?</a></li>
23
- </ul>
24
-
25
- <div id="message"></div>
26
-
23
+ </ul>
24
+ <div style='clear: both;' id="message"></div>
27
25
  <p class="buttons">
28
26
  <input type="button" class="btn" value="Cancel" onclick="parent.$.fn.colorbox.close();" />
29
27
  <input type="submit" class="btn" value="Login" onclick='login(); return false;' />
@@ -0,0 +1,41 @@
1
+ <h1>Login Logs</h1>
2
+
3
+ <form action='/admin/users' method='get' class='search_form'>
4
+ <input type='text' name='first_name_like' value="<%= @gen.params['first_name_like'] %>" placeholder='First name' />
5
+ <input type='text' name='last_name_like' value="<%= @gen.params['last_name_like'] %>" placeholder='Last name' />
6
+ <input type='text' name='email_like' value="<%= @gen.params['email_like'] %>" placeholder='Email' />
7
+ <input type='submit' value='Search' />
8
+ </form>
9
+
10
+ <p>
11
+ <a href='/admin/users/new'>New User</a> |
12
+ <a href='/admin/users/import'>Import CSV</a>
13
+ </p>
14
+
15
+ <table class='data' id='users_table'>
16
+ <tr>
17
+ <%= raw @gen.sortable_table_headings({
18
+ 'first_name' => 'First Name',
19
+ 'last_name, first_name' => 'Last Name',
20
+ 'username' => 'Username',
21
+ 'email' => 'Email'
22
+ })
23
+ %>
24
+ </tr>
25
+ <% @users.each do |user| %>
26
+ <tr onclick="window.location='/admin/users/<%= user.id %>';">
27
+ <td><%= user.first_name %></td>
28
+ <td><%= user.last_name %></td>
29
+ <td><%= user.username %></td>
30
+ <td><%= user.email %></td>
31
+ </tr>
32
+ <% end %>
33
+ </table>
34
+
35
+ <p><%= raw @gen.generate %></p>
36
+
37
+ <% content_for :caboose_js do %>
38
+ <script type='text/javascript'>
39
+
40
+ </script>
41
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <%
2
+ d = @user.site.primary_domain
3
+ d = @user.site.domains.first if d.nil?
4
+ %>
5
+
6
+ <h1>Account Locked</h1>
7
+ <p>The account for <%= @user.email %> on the site "<%= @user.site.description %>" has been locked due to too many failed login attempts.</p>
8
+ <p><a href='http://<%= d.domain %>/admin/users/<%= @user.id %>'>Manage this user</a></p>
@@ -11,11 +11,17 @@
11
11
 
12
12
  <% content_for :caboose_css do %>
13
13
  <%= stylesheet_link_tag 'caboose/admin_media_index' %>
14
+ <%
15
+ #=stylesheet_link_tag 'caboose/nestable.css'
16
+ %>
14
17
  <%= stylesheet_link_tag 'plupload/jquery.ui.plupload/css/jquery.ui.plupload.css' %>
15
18
  <% end %>
16
19
 
17
20
  <% content_for :caboose_js do %>
18
21
  <%= javascript_include_tag 'caboose/model/all' %>
22
+ <%
23
+ #= javascript_include_tag 'caboose/jquery.nestable.js'
24
+ %>
19
25
  <%= javascript_include_tag 'caboose/admin_media_index.js' %>
20
26
  <%= javascript_include_tag 'caboose/jquery-ui.drag-multiple.min.js' %>
21
27
 
@@ -56,7 +56,7 @@ $(document).ready(function() {
56
56
  { show: false, name: 'category_id' , nice_name: 'Categories' , sort: 'categories.name' , type: 'checkbox-multiple' , value: function(p) { return p.categories ? p.categories.map(function(c) { return c.id }) : []; }, text: function(p) { return p.categories ? p.categories.map(function(c) { return c.name }).join(', ') : ''; }, width: 200, height: 200, options_url: '/admin/categories/options' },
57
57
  { show: true , name: 'stackable_group_id' , nice_name: 'Stackable Group' , sort: 'stackable_group_id' , type: 'select' , value: function(p) { return p.stackable_group_id }, width: 200, options_url: '/admin/stackable-groups/options' },
58
58
  { show: false, name: 'allow_gift_wrap' , nice_name: 'Allow Gift Wrap' , sort: 'allow_gift_wrap' , type: 'checkbox' , value: function(p) { return p.allow_gift_wrap ? 'Yes' : 'No' }, width: 500 },
59
- { show: false, name: 'gift_wrap_price' , nice_name: 'Gift Wrap Price' , sort: 'gift_wrap_price' , type: 'text' , value: function(p) { return p.gift_wrap_price.length > 0 ? '$' + parseFloat(p.gift_wrap_price).toFixed(2) : '' }, width: 500 }
59
+ { show: false, name: 'gift_wrap_price' , nice_name: 'Gift Wrap Price' , sort: 'gift_wrap_price' , type: 'text' , value: function(p) { return p.gift_wrap_price != null && p.gift_wrap_price.length > 0 ? '$' + parseFloat(p.gift_wrap_price).toFixed(2) : '' }, width: 500 }
60
60
  ],
61
61
  new_model_text: 'New Product',
62
62
  new_model_fields: [
@@ -14,6 +14,7 @@ sc = @social_config
14
14
  <p><div id="socialconfig_<%= sc.id %>_google_plus_url" ></div></p>
15
15
  <p><div id="socialconfig_<%= sc.id %>_linkedin_url" ></div></p>
16
16
  <p><div id="socialconfig_<%= sc.id %>_google_analytics_id" ></div></p>
17
+ <p><div id="socialconfig_<%= sc.id %>_google_analytics_id2" ></div></p>
17
18
  <p><div id="socialconfig_<%= sc.id %>_auto_ga_js" ></div></p>
18
19
 
19
20
  <div id='message'></div>
@@ -30,17 +31,18 @@ $(document).ready(function() {
30
31
  update_url: '/admin/social',
31
32
  authenticity_token: '<%= form_authenticity_token %>',
32
33
  attributes: [
33
- { name: 'facebook_page_id' , nice_name: 'Facebook Page ID' , type: 'text' , value: <%= raw Caboose.json(sc.facebook_page_id) %>, width: 500 },
34
- { name: 'twitter_username' , nice_name: 'Twitter Username' , type: 'text' , value: <%= raw Caboose.json(sc.twitter_username) %>, width: 500 },
35
- { name: 'instagram_username' , nice_name: 'Instagram Username' , type: 'text' , value: <%= raw Caboose.json(sc.instagram_username) %>, width: 500 },
36
- { name: 'youtube_url' , nice_name: 'YouTube Channel ID' , type: 'text' , value: <%= raw Caboose.json(sc.youtube_url) %>, width: 500 },
37
- { name: 'pinterest_url' , nice_name: 'Pinterest URL' , type: 'text' , value: <%= raw Caboose.json(sc.pinterest_url) %>, width: 500 },
38
- { name: 'vimeo_url' , nice_name: 'Vimeo URL' , type: 'text' , value: <%= raw Caboose.json(sc.vimeo_url) %>, width: 500 },
39
- { name: 'rss_url' , nice_name: 'RSS Feed URL' , type: 'text' , value: <%= raw Caboose.json(sc.rss_url) %>, width: 500 },
40
- { name: 'google_plus_url' , nice_name: 'Google Plus URL' , type: 'text' , value: <%= raw Caboose.json(sc.google_plus_url) %>, width: 500 },
41
- { name: 'linkedin_url' , nice_name: 'LinkedIn URL' , type: 'text' , value: <%= raw Caboose.json(sc.linkedin_url) %>, width: 500 },
42
- { name: 'google_analytics_id' , nice_name: 'Google Analytics Tracking ID' , type: 'text' , value: <%= raw Caboose.json(sc.google_analytics_id) %>, width: 500 },
43
- { name: 'auto_ga_js' , nice_name: 'Auto Embed Google Analytics JS' , type: 'checkbox' , value: <%= sc.auto_ga_js ? 1 : 0 %>, width: 500 }
34
+ { name: 'facebook_page_id' , nice_name: 'Facebook Page ID' , type: 'text' , value: <%= raw Caboose.json(sc.facebook_page_id) %>, width: 500 },
35
+ { name: 'twitter_username' , nice_name: 'Twitter Username' , type: 'text' , value: <%= raw Caboose.json(sc.twitter_username) %>, width: 500 },
36
+ { name: 'instagram_username' , nice_name: 'Instagram Username' , type: 'text' , value: <%= raw Caboose.json(sc.instagram_username) %>, width: 500 },
37
+ { name: 'youtube_url' , nice_name: 'YouTube Channel ID' , type: 'text' , value: <%= raw Caboose.json(sc.youtube_url) %>, width: 500 },
38
+ { name: 'pinterest_url' , nice_name: 'Pinterest URL' , type: 'text' , value: <%= raw Caboose.json(sc.pinterest_url) %>, width: 500 },
39
+ { name: 'vimeo_url' , nice_name: 'Vimeo URL' , type: 'text' , value: <%= raw Caboose.json(sc.vimeo_url) %>, width: 500 },
40
+ { name: 'rss_url' , nice_name: 'RSS Feed URL' , type: 'text' , value: <%= raw Caboose.json(sc.rss_url) %>, width: 500 },
41
+ { name: 'google_plus_url' , nice_name: 'Google Plus URL' , type: 'text' , value: <%= raw Caboose.json(sc.google_plus_url) %>, width: 500 },
42
+ { name: 'linkedin_url' , nice_name: 'LinkedIn URL' , type: 'text' , value: <%= raw Caboose.json(sc.linkedin_url) %>, width: 500 },
43
+ { name: 'google_analytics_id' , nice_name: 'Primary Google Analytics Tracking ID' , type: 'text' , value: <%= raw Caboose.json(sc.google_analytics_id) %>, width: 500 },
44
+ { name: 'google_analytics_id2' , nice_name: 'Secondary Google Analytics Tracking ID' , type: 'text' , value: <%= raw Caboose.json(sc.google_analytics_id2) %>, width: 500 },
45
+ { name: 'auto_ga_js' , nice_name: 'Auto Embed Google Analytics JS' , type: 'checkbox' , value: <%= sc.auto_ga_js ? 1 : 0 %>, width: 500 }
44
46
  ]
45
47
  });
46
48
 
@@ -8,6 +8,7 @@ pic = "http://gravatar.com/avatar/#{gravatar_id}.png?s=150" #&d=/assets/caboose/
8
8
  <p><div id='user_<%= @edituser.id %>_last_name' ></div></p>
9
9
  <p><div id='user_<%= @edituser.id %>_username' ></div></p>
10
10
  <p><div id='user_<%= @edituser.id %>_email' ></div></p>
11
+ <p><div id='user_<%= @edituser.id %>_locked' ></div></p>
11
12
  <div id='roles'>
12
13
  <table class='data'>
13
14
  <% Caboose::Role.flat_tree(@site.id).each do |r| %>
@@ -40,10 +41,11 @@ $(document).ready(function() {
40
41
  update_url: '/admin/users/<%= @edituser.id %>',
41
42
  authenticity_token: '<%= form_authenticity_token %>',
42
43
  attributes: [
43
- { name: 'first_name' , nice_name: 'First name', type: 'text', value: <%= raw Caboose.json(@edituser.first_name) %>, width: 280 },
44
- { name: 'last_name' , nice_name: 'Last name' , type: 'text', value: <%= raw Caboose.json(@edituser.last_name) %>, width: 280 },
45
- { name: 'username' , nice_name: 'Username' , type: 'text', value: <%= raw Caboose.json(@edituser.username) %>, width: 280 },
46
- { name: 'email' , nice_name: 'Email' , type: 'text', value: <%= raw Caboose.json(@edituser.email) %>, width: 280 }
44
+ { name: 'first_name' , nice_name: 'First name', type: 'text' , value: <%= raw Caboose.json(@edituser.first_name) %>, width: 280 },
45
+ { name: 'last_name' , nice_name: 'Last name' , type: 'text' , value: <%= raw Caboose.json(@edituser.last_name) %>, width: 280 },
46
+ { name: 'username' , nice_name: 'Username' , type: 'text' , value: <%= raw Caboose.json(@edituser.username) %>, width: 280 },
47
+ { name: 'email' , nice_name: 'Email' , type: 'text' , value: <%= raw Caboose.json(@edituser.email) %>, width: 280 },
48
+ { name: 'locked' , nice_name: 'Locked' , type: 'checkbox' , value: <%= @edituser.locked ? 1 : 0 %>, width: 280 }
47
49
  ]
48
50
  });
49
51
  });
@@ -228,6 +228,7 @@ Caboose::Engine.routes.draw do
228
228
  get "/admin/media-categories/json" => "media_categories#admin_json"
229
229
  get "/admin/media-categories/options" => "media_categories#admin_options"
230
230
  get "/admin/media-categories/flat-tree" => "media_categories#admin_flat_tree"
231
+ get "/admin/media-categories/tree" => "media_categories#admin_tree"
231
232
  post "/admin/media-categories" => "media_categories#admin_add"
232
233
  post "/admin/media-categories/:id/attach" => "media_categories#admin_attach"
233
234
  put "/admin/media-categories/:id" => "media_categories#admin_update"
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.6.16'
2
+ VERSION = '0.6.17'
3
3
  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.6.16
4
+ version: 0.6.17
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-07-24 00:00:00.000000000 Z
11
+ date: 2015-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -262,20 +262,6 @@ dependencies:
262
262
  - - ! '>='
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
- - !ruby/object:Gem::Dependency
266
- name: tax_cloud
267
- requirement: !ruby/object:Gem::Requirement
268
- requirements:
269
- - - ! '>='
270
- - !ruby/object:Gem::Version
271
- version: '0'
272
- type: :runtime
273
- prerelease: false
274
- version_requirements: !ruby/object:Gem::Requirement
275
- requirements:
276
- - - ! '>='
277
- - !ruby/object:Gem::Version
278
- version: '0'
279
265
  - !ruby/object:Gem::Dependency
280
266
  name: rspec-rails
281
267
  requirement: !ruby/object:Gem::Requirement
@@ -400,6 +386,7 @@ files:
400
386
  - app/assets/javascripts/caboose/admin_edit_order.js
401
387
  - app/assets/javascripts/caboose/admin_main.js
402
388
  - app/assets/javascripts/caboose/admin_media_index.js
389
+ - app/assets/javascripts/caboose/admin_media_index_new.js
403
390
  - app/assets/javascripts/caboose/admin_page_edit_content.js
404
391
  - app/assets/javascripts/caboose/admin_page_new_blocks.js
405
392
  - app/assets/javascripts/caboose/admin_post_edit_content.js
@@ -425,6 +412,7 @@ files:
425
412
  - app/assets/javascripts/caboose/jquery.detect.js
426
413
  - app/assets/javascripts/caboose/jquery.fileupload.js
427
414
  - app/assets/javascripts/caboose/jquery.iframe-transport.js
415
+ - app/assets/javascripts/caboose/jquery.nestable.js
428
416
  - app/assets/javascripts/caboose/jquery.placeholder.js
429
417
  - app/assets/javascripts/caboose/jquery.timepicker.js
430
418
  - app/assets/javascripts/caboose/lodash.min.js
@@ -568,6 +556,7 @@ files:
568
556
  - app/assets/stylesheets/caboose/model_binder.css
569
557
  - app/assets/stylesheets/caboose/my_account.css
570
558
  - app/assets/stylesheets/caboose/my_account_edit_order.css.scss
559
+ - app/assets/stylesheets/caboose/nestable.css
571
560
  - app/assets/stylesheets/caboose/page_bar_generator.css
572
561
  - app/assets/stylesheets/caboose/print.css
573
562
  - app/assets/stylesheets/caboose/product_images.css.scss
@@ -592,7 +581,6 @@ files:
592
581
  - app/assets/templates/caboose/product/images.jst.ejs
593
582
  - app/assets/templates/caboose/product/images_old.jst.ejs
594
583
  - app/assets/templates/caboose/product/options.jst.ejs
595
- - app/controllers/caboose/#Untitled-1#
596
584
  - app/controllers/caboose/ab_options_controller.rb
597
585
  - app/controllers/caboose/ab_variants_controller.rb
598
586
  - app/controllers/caboose/admin_controller.rb
@@ -615,6 +603,7 @@ files:
615
603
  - app/controllers/caboose/google_spreadsheets_controller.rb
616
604
  - app/controllers/caboose/line_items_controller.rb
617
605
  - app/controllers/caboose/login_controller.rb
606
+ - app/controllers/caboose/login_logs_controller.rb
618
607
  - app/controllers/caboose/logout_controller.rb
619
608
  - app/controllers/caboose/media_categories_controller.rb
620
609
  - app/controllers/caboose/media_controller.rb
@@ -697,6 +686,7 @@ files:
697
686
  - app/models/caboose/gift_card.rb
698
687
  - app/models/caboose/line_item.rb
699
688
  - app/models/caboose/line_item_modification.rb
689
+ - app/models/caboose/login_log.rb
700
690
  - app/models/caboose/media.rb
701
691
  - app/models/caboose/media_category.rb
702
692
  - app/models/caboose/menu_block.rb
@@ -881,7 +871,9 @@ files:
881
871
  - app/views/caboose/login/forgot_password_form.html.erb
882
872
  - app/views/caboose/login/index.html.erb
883
873
  - app/views/caboose/login/reset_password_form.html.erb
874
+ - app/views/caboose/login_logs/admin_index.html.erb
884
875
  - app/views/caboose/login_mailer/forgot_password_email.html.erb
876
+ - app/views/caboose/login_mailer/locked_account.html.erb
885
877
  - app/views/caboose/media/admin_edit.html.erb
886
878
  - app/views/caboose/media/admin_edit_description.html.erb
887
879
  - app/views/caboose/media/admin_index.html.erb
@@ -1,3 +0,0 @@
1
-
2
-
3
- if arr['dog'] && arr['dog']['name'] && arr['dog']['name']['first_name']