caboose-cms 0.4.3 → 0.4.4

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.
Files changed (45) hide show
  1. checksums.yaml +8 -8
  2. data/app/assets/fonts/avenir-medium.eot +0 -0
  3. data/app/assets/fonts/avenir-medium.ttf +0 -0
  4. data/app/assets/images/caboose/caboose_logo.png +0 -0
  5. data/app/assets/images/caboose/login_image.png +0 -0
  6. data/app/assets/images/caboose/modal_overlay.png +0 -0
  7. data/app/assets/images/caboose/password_image.png +0 -0
  8. data/app/assets/stylesheets/caboose/admin.css +13 -0
  9. data/app/assets/stylesheets/caboose/caboose.css +1 -1
  10. data/app/assets/stylesheets/caboose/fonts.css +11 -0
  11. data/app/assets/stylesheets/caboose/fonts/avenir-medium.eot +0 -0
  12. data/app/assets/stylesheets/caboose/fonts/avenir-medium.ttf +0 -0
  13. data/app/assets/stylesheets/caboose/login.css +94 -6
  14. data/app/assets/stylesheets/caboose/modal.css +18 -4
  15. data/app/controllers/caboose/block_type_categories_controller.rb +12 -0
  16. data/app/controllers/caboose/block_types_controller.rb +1 -0
  17. data/app/controllers/caboose/pages_controller.rb +5 -2
  18. data/app/models/caboose/block.rb +18 -51
  19. data/app/models/caboose/block_type.rb +3 -1
  20. data/app/models/caboose/block_type_category.rb +41 -0
  21. data/app/models/caboose/schema.rb +46 -11
  22. data/app/views/caboose/block_types/admin_edit.html.erb +4 -3
  23. data/app/views/caboose/blocks/{_layout_default.html.erb → _layout_basic.html.erb} +5 -7
  24. data/app/views/caboose/blocks/_layout_basic_content.html.erb +8 -0
  25. data/app/views/caboose/blocks/_layout_basic_footer.html.erb +3 -0
  26. data/app/views/caboose/blocks/_layout_basic_header.html.erb +3 -0
  27. data/app/views/caboose/blocks/_layout_left_sidebar.html.erb +34 -0
  28. data/app/views/caboose/blocks/_layout_left_sidebar_content.html.erb +8 -0
  29. data/app/views/caboose/blocks/_layout_left_sidebar_footer.html.erb +3 -0
  30. data/app/views/caboose/blocks/_layout_left_sidebar_header.html.erb +3 -0
  31. data/app/views/caboose/blocks/_layout_left_sidebar_sidebar.html.erb +3 -0
  32. data/app/views/caboose/blocks/_layout_right_sidebar.html.erb +34 -0
  33. data/app/views/caboose/blocks/_layout_right_sidebar_content.html.erb +8 -0
  34. data/app/views/caboose/blocks/_layout_right_sidebar_footer.html.erb +3 -0
  35. data/app/views/caboose/blocks/_layout_right_sidebar_header.html.erb +3 -0
  36. data/app/views/caboose/blocks/_layout_right_sidebar_sidebar.html.erb +3 -0
  37. data/app/views/caboose/login/index.html.erb +5 -1
  38. data/app/views/caboose/pages/admin_new.html.erb +18 -12
  39. data/app/views/layouts/caboose/application.html.erb +2 -1
  40. data/config/routes.rb +2 -0
  41. data/lib/caboose/version.rb +1 -1
  42. metadata +25 -5
  43. data/app/views/caboose/blocks/_layout_default_content.html.erb +0 -16
  44. data/app/views/caboose/blocks/_layout_default_footer.html.erb +0 -20
  45. data/app/views/caboose/blocks/_layout_default_header.html.erb +0 -32
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTc1NzBhYTU1YjlmNzA1YzExZWUwNzkzZThjNDQxNGQ5ODhjN2VjOA==
4
+ ODUzNTBkMWYxM2RiNTYzOTZjNGQ1Y2IwNDk2YjYwNTNhMDIzNzFiOQ==
5
5
  data.tar.gz: !binary |-
6
- YWZlMGQ1ZmZjZWE4OTdhMWQxNzEzMDJhNjI3MDZlY2ZhMzY0ZjQzNg==
6
+ NDFkOGNiOTIzOGRjMmQ1NGNlMWMxNTYxZTk3Yzg0MjAwZGYwMjMzMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OTJlNjk2ZTZjOWJjZmEwZTQ4ZGM2NjUwYzhjNDExYmM0ZmM0ZGIzOTEwZjc2
10
- ODIxMjY1OTMyZTcyYTM3NzgxNzAxMzQ3MDAwYWQ4NzVhMjg3MTc2ZmVhYjNl
11
- MDVjZmZlNGM3MjIxYjlkNzQzMGRhZDZmZGYyN2EzYTY3OWUzZmQ=
9
+ NTYwMGMyZjI4N2YzNGI3MTNmYWM1M2Y1MjQ3NWRjOGQ5ZTZmNjVkNDFkN2Rm
10
+ YTYxOTYyNDA2MjZmODI0MjJlZDY3ZjgzZGQ4MTdkYjUyNTQ2OTM2ODQ0Mjdi
11
+ NWYxNmY5NTY0N2QxNTI3MTIyOGFlN2YyY2QyZTg0M2UwNzgzMDI=
12
12
  data.tar.gz: !binary |-
13
- NmYzZDk0YWEzNTJiMzMzNmExNTI4MDQ0MWYzNDA1NWU2MjdlZDgwNDJhNzhh
14
- ZmJmNDcxYzc0MDhkZmJhODM2ZjYxMDQ2ZDk3YzkwNzY4MDU3YTcyNTU2MWMy
15
- MzllZmU2NmE4NjQ1YzUzMDA5ZjhjZGY5Yzc1YjFhY2E3Njk5NDE=
13
+ MTk3ZjU1MDM5NDQ1ZjE4ZGRhZGZjODczMzc4MWE3MGJiMGM1M2NkYTY0ZTAy
14
+ Y2YyMTYxNWE5N2MwYWIzY2JkNDdmMzEyY2YxMWQzZDMyNGFjNjY1YWQ4OWQ1
15
+ YWFjNDZkZTdkNTlhNjM4N2VjZjQyZTNmYjY4MmI1ZTVjZmI0NDc=
Binary file
Binary file
@@ -16,10 +16,23 @@
16
16
  */
17
17
 
18
18
  #cboxLoadedContent { margin-bottom: 0; }
19
+
19
20
 
20
21
  body {
21
22
  margin: 0;
22
23
  padding: 0;
24
+ font-family: "Avenir", serif;
25
+ }
26
+
27
+ #cboxOverlay {
28
+ opacity: 0.85 !important;
29
+ background: url('/assets/caboose/modal_overlay.png') !important;
30
+ }
31
+
32
+ #cboxWrapper {
33
+ -webkit-border-radius: 7px !important;
34
+ -moz-border-radius: 7px !important;
35
+ border-radius: 7px !important;
23
36
  }
24
37
 
25
38
  #top_nav {
@@ -4,5 +4,5 @@ body {
4
4
  }
5
5
 
6
6
  .placeholder_js {
7
- color: #aaa;
7
+ color: #fff;
8
8
  }
@@ -3,3 +3,14 @@
3
3
  font-family: 'BigNoodleTitling';
4
4
  src: local('Big Noodle Titling'), url('/assets/caboose/fonts/big_noodle_titling.ttf') format('truetype');
5
5
  }
6
+
7
+ @font-face {
8
+ font-family: 'Avenir';
9
+ src: url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.eot');
10
+ src: url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.eot') format('embedded-opentype'),
11
+ url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.woff') format('woff'),
12
+ url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.ttf') format('truetype'),
13
+ url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.svg') format('svg');
14
+ font-weight: normal;
15
+ font-style: normal;
16
+ }
@@ -11,6 +11,26 @@
11
11
  padding: 12px 0;
12
12
  position: relative;
13
13
  width: 100%;
14
+ padding-bottom: 0;
15
+ }
16
+
17
+ #login-form .header {
18
+ width: 100%;
19
+ text-align: center;
20
+ }
21
+
22
+ #login-form .header h1 {
23
+ position: relative;
24
+ bottom: 7px;
25
+ margin-bottom: 0;
26
+ }
27
+ #login-form .header p {
28
+ margin: 0;
29
+ position: relative;
30
+ bottom: 8px;
31
+ font-style: italic;
32
+ font-size: 14px;
33
+ margin-bottom: 10px;
14
34
  }
15
35
 
16
36
  @media all and (max-width: 400px) {
@@ -23,24 +43,92 @@
23
43
  #login-form #login-options {
24
44
  margin: 0;
25
45
  padding: 0;
26
- position: absolute;
27
- top: 12px;
28
- right: 0;
46
+ float: right;
47
+ list-style-type: none;
48
+ position: relative;
49
+ right: 13px;
50
+ }
51
+ #login-options li {
52
+ text-align: right;
29
53
  }
30
54
 
55
+ #login-options li a {
56
+ color: #387a8f;
57
+ font-size: 0.9em;
58
+ border-bottom: 0;
59
+ }
60
+
61
+ #login-form input#username {
62
+ background-image: url('/assets/caboose/login_image.png');
63
+ background-position: 8px center;
64
+ }
65
+ #login-form input#password {
66
+ background-image: url('/assets/caboose/password_image.png');
67
+ background-position: 12px center;
68
+ }
69
+
70
+
31
71
  #login-form input#username,
32
72
  #login-form input#password {
33
73
  font-size: 18px;
34
- margin: 0 0 8px 0;
74
+ margin: 0 auto;
35
75
  max-width: 100%;
76
+ display: block;
77
+ margin-bottom: 12px;
36
78
  padding: 7px;
37
- width: 386px; /* 400 - 14:padding */
79
+ width: 315px;
80
+ background-repeat: no-repeat;
81
+ padding-left: 42px;
38
82
  }
39
83
 
40
84
  #login-form label {
41
85
  cursor: pointer;
42
86
  display: block;
87
+ float: left;
88
+ position: relative;
89
+ left: 13px;
90
+ font-size: 0.9em;
91
+ color: #a58a32;
92
+ bottom: 18px;
93
+ }
94
+
95
+ p.buttons {
96
+ clear: both;
97
+ margin-top: 80px;
98
+ overflow: auto;
99
+ padding: 0 16px;
100
+ margin-bottom: 0;
43
101
  }
44
102
 
45
103
  #login-form input[type=checkbox] { top: 8px; }
46
- #login-form .btn { font-size: 18px; }
104
+
105
+ #login-form .btn {
106
+ font-size: 18px;
107
+ display: block;
108
+ width: 48%;
109
+ padding: 13px 1%;
110
+ height: auto;
111
+ border: 0;
112
+ border-radius: 4px;
113
+ cursor: pointer;
114
+ }
115
+
116
+ #login-form input.btn[type=button] {
117
+ background: #d34f46;
118
+ float: left;
119
+ }
120
+
121
+ #login-form input.btn[type=button]:hover {
122
+ background: #b53c34;
123
+ }
124
+
125
+ #login-form input[type=submit] {
126
+ background: #1c9a7f;
127
+ float: right;
128
+ }
129
+
130
+ #login-form input[type=submit]:hover {
131
+ background: #096652;
132
+ }
133
+
134
+
@@ -16,13 +16,24 @@
16
16
 
17
17
  html { width: 100%; }
18
18
 
19
+ @font-face {
20
+ font-family: 'Avenir';
21
+ src: url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.eot');
22
+ src: url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.eot') format('embedded-opentype'),
23
+ url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.woff') format('woff'),
24
+ url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.ttf') format('truetype'),
25
+ url('//d1ygukj37mahb2.cloudfront.net/assets/avenir-medium.svg') format('svg');
26
+ font-weight: normal;
27
+ font-style: normal;
28
+ }
29
+
19
30
  body {
20
31
  background: #111111;
21
32
  margin: 0;
22
33
  padding: 0;
23
34
  color: #fff;
24
35
  width: 100%;
25
- font-family: Helvetica, Arial;
36
+ font-family: "Avenir", Arial;
26
37
  }
27
38
 
28
39
  #modal_wrapper {
@@ -94,11 +105,14 @@ div.model_attribute_text {
94
105
  }
95
106
 
96
107
  input, select, textarea {
97
- font-family: Helvetica, arial;
98
- border: 1px solid #ccc;
108
+ font-family: "Avenir", Arial;
109
+ border: 2px solid #ccc;
110
+ background: none;
111
+ color: #fff;
112
+ /*
99
113
  -moz-border-radius: 2px;
100
114
  -webkit-border-radius: 2px;
101
- border-radius: 2px;
115
+ border-radius: 2px; */
102
116
  padding: 4px 8px;
103
117
  height: 34px;
104
118
  font-size: 20px;
@@ -0,0 +1,12 @@
1
+
2
+ module Caboose
3
+ class BlockTypeCategoriesController < ApplicationController
4
+
5
+ # GET /admin/block-type-categories/tree-options
6
+ def admin_tree_options
7
+ return unless user_is_allowed('pages', 'edit')
8
+ render :json => BlockTypeCategory.tree
9
+ end
10
+
11
+ end
12
+ end
@@ -72,6 +72,7 @@ module Caboose
72
72
  when 'parent_id' then bt.parent_id = v
73
73
  when 'name' then bt.name = v
74
74
  when 'description' then bt.description = v
75
+ when 'block_type_category_id' then bt.block_type_category_id = v
75
76
  when 'render_function' then bt.render_function = v
76
77
  when 'use_render_function' then bt.use_render_function = v
77
78
  when 'use_render_function_for_layout' then bt.use_render_function_for_layout = v
@@ -217,7 +217,7 @@ module Caboose
217
217
  })
218
218
 
219
219
  parent_id = params[:parent_id]
220
- title = params[:title]
220
+ title = params[:title]
221
221
 
222
222
  if (title.strip.length == 0)
223
223
  resp.error = "A page title is required."
@@ -235,7 +235,7 @@ module Caboose
235
235
 
236
236
  page = Caboose::Page.new
237
237
  page.title = title
238
- page.parent_id = parent_id
238
+ page.parent_id = parent_id
239
239
  page.hide = true
240
240
  page.content_format = Caboose::Page::CONTENT_FORMAT_HTML
241
241
 
@@ -248,6 +248,9 @@ module Caboose
248
248
 
249
249
  page.save
250
250
 
251
+ # Create the top level block for the page
252
+ Block.create(:page_id => page.id, :block_type_id => params[:block_type_id])
253
+
251
254
  # Set the new page's permissions
252
255
  viewers = Caboose::PagePermission.where({ :page_id => parent.id, :action => 'view' }).pluck(:role_id)
253
256
  editors = Caboose::PagePermission.where({ :page_id => parent.id, :action => 'edit' }).pluck(:role_id)
@@ -51,6 +51,11 @@ class Caboose::Block < ActiveRecord::Base
51
51
  end
52
52
  end
53
53
 
54
+ def full_name
55
+ return name if parent_id.nil?
56
+ return "#{parent.full_name}_#{name}"
57
+ end
58
+
54
59
  def child_value(name)
55
60
  b = child(name)
56
61
  return nil if b.nil?
@@ -84,7 +89,7 @@ class Caboose::Block < ActiveRecord::Base
84
89
  end
85
90
 
86
91
  def render(block, options)
87
- Caboose.log("block.render\nself.id = #{self.id}\nblock = #{block}\noptions.class = #{options.class}\noptions = #{options}")
92
+ #Caboose.log("block.render\nself.id = #{self.id}\nblock = #{block}\noptions.class = #{options.class}\noptions = #{options}")
88
93
 
89
94
  if block && block.is_a?(String)
90
95
  Caboose.log("Block #{block} is a string, finding block object... self.id = #{self.id}")
@@ -101,68 +106,30 @@ class Caboose::Block < ActiveRecord::Base
101
106
  end
102
107
  str = ""
103
108
 
104
- defaults = {
105
- :modal => false,
106
- :empty_text => "",
107
- :editing => false,
108
- :css => nil,
109
- :js => nil,
110
- :block => block
111
- }
109
+ defaults = { :modal => false, :empty_text => '', :editing => false, :css => nil, :js => nil, :block => block }
112
110
  options2 = nil
113
- #Caboose.log(options.class)
114
111
  if options.is_a?(Hash)
115
- options2 = defaults.merge(options)
116
- #elsif options.is_a?(ActionView::Base)
117
- # options2 = {
118
- # :modal => options.modal,
119
- # :empty_text => options.empty_text,
120
- # :editing => options.editing,
121
- # :css => options.css,
122
- # :js => options.js
123
- # }
112
+ options2 = defaults.merge(options)
124
113
  else
125
- options2 = {
126
- :modal => options.modal,
127
- :empty_text => options.empty_text,
128
- :editing => options.editing,
129
- :css => options.css,
130
- :js => options.js
131
- }
114
+ options2 = { :modal => options.modal, :empty_text => options.empty_text, :editing => options.editing, :css => options.css, :js => options.js }
132
115
  end
133
116
  options2[:block] = block
134
-
135
- #options2.modal = false if options2.modal.nil?
136
- #options2.empty_text = "" if options2.empty_text.nil?
137
- #options2.editing = false if options2.editing.nil?
138
- #options[:css => nil,
139
- #options[:js => nil
140
- #}.merge(options)
141
- #options2.block = block
142
-
143
- if block.block_type.use_render_function && block.block_type.render_function
144
- #Caboose.log("Rendering from function")
117
+
118
+ if block.block_type.use_render_function && block.block_type.render_function
145
119
  str = block.render_from_function(options2)
146
120
  else
147
121
  view = ActionView::Base.new(ActionController::Base.view_paths)
148
122
  begin
149
- #Caboose.log("Rendering caboose/blocks/#{block.name}")
150
- str = view.render(:partial => "caboose/blocks/#{block.name}", :locals => options2)
123
+ #str = view.render(:partial => "caboose/blocks/#{block.name}", :locals => options2)
124
+ str = view.render(:partial => "caboose/blocks/#{block.full_name}", :locals => options2)
151
125
  rescue
152
- #Caboose.log("Error rendering caboose/blocks/#{block.name}")
153
- begin
154
- #Caboose.log("Rendering caboose/blocks/#{block.block_type.name}")
155
- str = view.render(:partial => "caboose/blocks/#{block.block_type.name}", :locals => options2)
156
- rescue
157
- #Caboose.log("Error rendering caboose/blocks/#{block.block_type.name}")
158
- #Caboose.log("Rendering caboose/blocks/#{block.block_type.field_type}")
126
+ #begin
127
+ # str = view.render(:partial => "caboose/blocks/#{block.block_type.name}", :locals => options2)
128
+ #rescue
159
129
  str = view.render(:partial => "caboose/blocks/#{block.block_type.field_type}", :locals => options2)
160
- end
130
+ #end
161
131
  end
162
- end
163
- #return str if block.parent_id.nil?
164
- #return str if options[:editing].nil? || options[:editing] == false
165
- #return "<div id='block_#{block.id}' class='block'>#{str}</div>"
132
+ end
166
133
  return str
167
134
  end
168
135
 
@@ -2,12 +2,14 @@
2
2
  class Caboose::BlockType < ActiveRecord::Base
3
3
  self.table_name = "block_types"
4
4
 
5
+ belongs_to :block_type_category
5
6
  belongs_to :parent, :foreign_key => 'parent_id', :class_name => 'Caboose::BlockType'
6
7
  has_many :children, :foreign_key => 'parent_id', :class_name => 'Caboose::BlockType', :dependent => :destroy
7
8
  attr_accessible :id,
8
9
  :parent_id,
9
10
  :name,
10
- :description,
11
+ :description,
12
+ :block_type_category_id,
11
13
  :use_render_function,
12
14
  :use_render_function_for_layout,
13
15
  :allow_child_blocks,
@@ -0,0 +1,41 @@
1
+
2
+ class Caboose::BlockTypeCategory < ActiveRecord::Base
3
+ self.table_name = "block_type_categories"
4
+
5
+ belongs_to :parent, :foreign_key => 'parent_id', :class_name => 'Caboose::BlockTypeCategory'
6
+ has_many :children, :foreign_key => 'parent_id', :class_name => 'Caboose::BlockTypeCategory', :dependent => :destroy, :order => :name
7
+ has_many :block_types
8
+ attr_accessible :id,
9
+ :parent_id,
10
+ :name
11
+
12
+ def self.layouts
13
+ self.where("name = ? and parent_id is null", 'Layouts').reorder(:name).all
14
+ end
15
+
16
+ def self.content
17
+ self.where("name = ? and parent_id is null", 'Content').reorder(:name).all
18
+ end
19
+
20
+ def self.rows
21
+ cat = self.content
22
+ return false if cat.nil?
23
+ self.where("name = ? and parent_id = ?", 'Rows', cat.id).reorder(:name).all
24
+ end
25
+
26
+ def self.tree
27
+ arr = []
28
+ self.where("parent_id is null").reorder(:name).all.each do |cat|
29
+ self.tree_helper(arr, cat, '')
30
+ end
31
+ return arr
32
+ end
33
+
34
+ def self.tree_helper(arr, cat, prefix)
35
+ arr << { 'value' => cat.id, 'text' => "#{prefix}#{cat.name}" }
36
+ cat.children.each do |kid|
37
+ self.tree_helper(arr, kid, "#{prefix} - ")
38
+ end
39
+ end
40
+
41
+ end
@@ -134,6 +134,7 @@ class Caboose::Schema < Caboose::Utilities::Schema
134
134
  [ :parent_id , :integer ],
135
135
  [ :name , :string ],
136
136
  [ :description , :string ],
137
+ [ :block_type_category_id , :integer , { :default => 2 }],
137
138
  [ :render_function , :text ],
138
139
  [ :use_render_function , :boolean , { :default => false }],
139
140
  [ :use_render_function_for_layout , :boolean , { :default => false }],
@@ -148,6 +149,10 @@ class Caboose::Schema < Caboose::Utilities::Schema
148
149
  [ :options , :text ],
149
150
  [ :options_function , :text ],
150
151
  [ :options_url , :string ]
152
+ ],
153
+ Caboose::BlockTypeCategory => [
154
+ [ :parent_id , :integer ],
155
+ [ :name , :string ]
151
156
  ],
152
157
  #Caboose::Field => [
153
158
  # [ :block_id , :integer ],
@@ -243,17 +248,6 @@ class Caboose::Schema < Caboose::Utilities::Schema
243
248
  # end
244
249
  # c.remove_column(:pages, :content)
245
250
  #end
246
-
247
- if !Caboose::BlockType.where(:name => 'heading').exists?
248
- bt = Caboose::BlockType.create(:name => 'heading', :description => 'Heading')
249
- Caboose::BlockType.create(:parent_id => bt.id, :name => 'text', :field_type => 'text', :description => 'Text', :default => '', :width => 800, :fixed_placeholder => false)
250
- Caboose::BlockType.create(:parent_id => bt.id, :name => 'size', :field_type => 'text', :description => 'Size', :default => 1, :width => 800, :fixed_placeholder => false, :options => "1|2|3|4|5|6")
251
- end
252
-
253
- if !Caboose::BlockType.where(:name => 'richtext').exists?
254
- bt = Caboose::BlockType.create(:name => 'richtext', :description => 'Rich Text')
255
- Caboose::BlockType.create(:parent_id => bt.id, :name => 'text', :field_type => 'richtext', :description => 'Text', :default => '', :width => 800, :height => 400, :fixed_placeholder => false)
256
- end
257
251
 
258
252
  admin_user = nil
259
253
  if !Caboose::User.exists?(:username => 'admin')
@@ -321,5 +315,46 @@ class Caboose::Schema < Caboose::Utilities::Schema
321
315
  Caboose::Setting.create(:name => 'site_url' , :value => 'www.mycaboosesite.com' ) if !Caboose::Setting.exists?(:name => 'site_url' , :value => 'www.mycaboosesite.com' )
322
316
  Caboose::Setting.create(:name => 'admin_email' , :value => 'william@nine.is' ) if !Caboose::Setting.exists?(:name => 'admin_email' , :value => 'william@nine.is' )
323
317
 
318
+ # Create default block type categories
319
+ btc = Caboose::BlockTypeCategory
320
+ layouts = btc.exists?(:name => 'Layouts') ? btc.where(:name => 'Layouts').first : btc.create(:name => 'Layouts')
321
+ content = btc.exists?(:name => 'Content') ? btc.where(:name => 'Content').first : btc.create(:name => 'Content')
322
+ btc.create(:name => 'Rows', :parent_id => content.id) if !btc.where(:name => 'Rows', :parent_id => content.id).exists?
323
+
324
+ # Create default block types
325
+ if !Caboose::BlockType.where(:name => 'layout_basic').exists?
326
+ bt = Caboose::BlockType.create(:name => 'layout_basic', :description => 'Basic', :block_type_category_id => layouts.id, :use_render_function_for_layout => true, :allow_child_blocks => false, :field_type => 'block')
327
+ Caboose::BlockType.create(:name => 'header' , :description => 'Header' , :parent_id => bt.id, :field_type => 'block')
328
+ Caboose::BlockType.create(:name => 'content' , :description => 'Content' , :parent_id => bt.id, :field_type => 'block', :allow_child_blocks => true)
329
+ Caboose::BlockType.create(:name => 'footer' , :description => 'Footer' , :parent_id => bt.id, :field_type => 'block')
330
+ end
331
+
332
+ if !Caboose::BlockType.where(:name => 'layout_left_sidebar').exists?
333
+ bt = Caboose::BlockType.create(:name => 'layout_left_sidebar', :description => 'Left Sidebar', :block_type_category_id => layouts.id, :use_render_function_for_layout => true, :allow_child_blocks => false, :field_type => 'block')
334
+ Caboose::BlockType.create(:name => 'header' , :description => 'Header' , :parent_id => bt.id, :field_type => 'block')
335
+ Caboose::BlockType.create(:name => 'sidebar' , :description => 'Sidebar' , :parent_id => bt.id, :field_type => 'block', :allow_child_blocks => true)
336
+ Caboose::BlockType.create(:name => 'content' , :description => 'Content' , :parent_id => bt.id, :field_type => 'block', :allow_child_blocks => true)
337
+ Caboose::BlockType.create(:name => 'footer' , :description => 'Footer' , :parent_id => bt.id, :field_type => 'block')
338
+ end
339
+
340
+ if !Caboose::BlockType.where(:name => 'layout_right_sidebar').exists?
341
+ bt = Caboose::BlockType.create(:name => 'layout_right_sidebar', :description => 'Right Sidebar', :block_type_category_id => layouts.id, :use_render_function_for_layout => true, :allow_child_blocks => false, :field_type => 'block')
342
+ Caboose::BlockType.create(:name => 'header' , :description => 'Header' , :parent_id => bt.id, :field_type => 'block')
343
+ Caboose::BlockType.create(:name => 'sidebar' , :description => 'Sidebar' , :parent_id => bt.id, :field_type => 'block', :allow_child_blocks => true)
344
+ Caboose::BlockType.create(:name => 'content' , :description => 'Content' , :parent_id => bt.id, :field_type => 'block', :allow_child_blocks => true)
345
+ Caboose::BlockType.create(:name => 'footer' , :description => 'Footer' , :parent_id => bt.id, :field_type => 'block')
346
+ end
347
+
348
+ if !Caboose::BlockType.where(:name => 'heading').exists?
349
+ bt = Caboose::BlockType.create(:name => 'heading', :description => 'Heading')
350
+ Caboose::BlockType.create(:parent_id => bt.id, :name => 'text', :description => 'Text', :field_type => 'text', :default => '', :width => 800, :fixed_placeholder => false)
351
+ Caboose::BlockType.create(:parent_id => bt.id, :name => 'size', :description => 'Size', :field_type => 'text', :default => 1, :width => 800, :fixed_placeholder => false, :options => "1|2|3|4|5|6")
352
+ end
353
+
354
+ if !Caboose::BlockType.where(:name => 'richtext').exists?
355
+ bt = Caboose::BlockType.create(:name => 'richtext', :description => 'Rich Text')
356
+ Caboose::BlockType.create(:parent_id => bt.id, :name => 'text', :field_type => 'richtext', :description => 'Text', :default => '', :width => 800, :height => 400, :fixed_placeholder => false)
357
+ end
358
+
324
359
  end
325
360
  end
@@ -3,12 +3,12 @@ bt = @block_type
3
3
  %>
4
4
 
5
5
  <h1>Edit Block Type</h1>
6
- <p><div id='blocktype_<%= bt.id %>_parent_id'></div></p>
7
- <p><div id='blocktype_<%= bt.id %>_name'></div></p>
8
6
  <p><div id='blocktype_<%= bt.id %>_description'></div></p>
7
+ <p><div id='blocktype_<%= bt.id %>_name'></div></p>
8
+ <p><div id='blocktype_<%= bt.id %>_parent_id'></div></p>
9
+ <p><div id='blocktype_<%= bt.id %>_block_type_category_id'></div></p>
9
10
  <p><div id='blocktype_<%= bt.id %>_field_type'></div></p>
10
11
 
11
-
12
12
  <p><div id='blocktype_<%= bt.id %>_default'></div></p>
13
13
  <p><div id='blocktype_<%= bt.id %>_width'></div></p>
14
14
  <p><div id='blocktype_<%= bt.id %>_height'></div></p>
@@ -91,6 +91,7 @@ $(document).ready(function() {
91
91
  { name: 'parent_id' , nice_name: 'Parent' , type: 'select' , value: <%= raw Caboose.json(bt.parent_id) %>, width: 400, options_url: '/admin/block-types/tree-options' },
92
92
  { name: 'name' , nice_name: 'Name' , type: 'text' , value: <%= raw Caboose.json(bt.name) %>, width: 400 },
93
93
  { name: 'description' , nice_name: 'Description' , type: 'text' , value: <%= raw Caboose.json(bt.description) %>, width: 400 },
94
+ { name: 'block_type_category_id' , nice_name: 'Category' , type: 'select' , value: <%= raw Caboose.json(bt.block_type_category_id) %>, width: 400, options_url: '/admin/block-type-categories/tree-options' },
94
95
  { name: 'use_render_function' , nice_name: 'Use Render Function' , type: 'checkbox' , value: <%= bt.use_render_function ? 'true' : 'false' %>, width: 400 },
95
96
  { name: 'use_render_function_for_layout' , nice_name: 'Use Render Function for Layout' , type: 'checkbox' , value: <%= bt.use_render_function_for_layout ? 'true' : 'false' %>, width: 400 },
96
97
  { name: 'allow_child_blocks' , nice_name: 'Allow Child Blocks' , type: 'checkbox' , value: <%= bt.allow_child_blocks ? 'true' : 'false' %>, width: 400 },
@@ -9,24 +9,22 @@ page = block.page
9
9
  <head>
10
10
  <meta charset="utf-8" />
11
11
  <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
12
- <title><%= !page.title.nil? && page.title.strip.length > 0 ? "#{page.title} | " : "" %>Truesouth</title>
12
+ <title><%= !page.title.nil? && page.title.strip.length > 0 ? "#{page.title} | " : "" %><%= Caboose::website_name %></title>
13
13
  <meta name="description" content="" />
14
14
  <meta name="viewport" content="width=device-width" />
15
15
  <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAzhmPHU-MEhWXbpvAdZRjd0-ZmVy-KYA8&sensor=false"></script>
16
16
  <%= raw css %>
17
17
  <%= stylesheet_link_tag 'print', :media => 'print' %>
18
- <%
19
- #= csrf_meta_tags
20
- %>
18
+ <%= raw csrf_meta_tags %>
21
19
  </head>
22
20
  <body>
23
21
  <div class="container" id='block_<%= block.id %>'>
24
22
  <!--[if lt IE 7]>
25
23
  <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
26
24
  <![endif]-->
27
- <%= raw block.render('layout_default_header' , local_assigns) %>
28
- <%= raw block.render('layout_default_content', local_assigns) %>
29
- <%= raw block.render('layout_default_footer' , local_assigns) %>
25
+ <%= raw block.render('layout_basic_header' , local_assigns) %>
26
+ <%= raw block.render('layout_basic_content', local_assigns) %>
27
+ <%= raw block.render('layout_basic_footer' , local_assigns) %>
30
28
  </div>
31
29
  <%= raw js %>
32
30
  </body>
@@ -0,0 +1,8 @@
1
+ <div class="content_wrapper" id='block_<%= block.id %>'>
2
+ <div class="content_body">
3
+ <% if block.children.count > 0 %>
4
+ <% block.children.each do |b| %><%= raw block.render(b, local_assigns) %><% end %>
5
+ <% end %>
6
+ <% if editing %><%= raw block.child_block_link %><% end %>
7
+ </div>
8
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="footer" id='block_<%= block.id %>'>
2
+ <p>Please edit /app/views/caboose/blocks/_layout_basic_footer.html.erb</p>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="header" id='block_<%= block.id %>'>
2
+ <p>Please edit /app/views/caboose/blocks/_layout_basic_header.html.erb</p>
3
+ </div>
@@ -0,0 +1,34 @@
1
+ <%
2
+ page = block.page
3
+ %><!DOCTYPE html>
4
+ <!--[if lt IE 7]><html class="no-js ie lt-ie9 lt-ie8 lt-ie7" lang="en"><![endif]-->
5
+ <!--[if IE 7]><html class="no-js ie ie7 lt-ie9 lt-ie8" lang="en"><![endif]-->
6
+ <!--[if IE 8]><html class="no-js ie ie8 lt-ie9" lang="en"><![endif]-->
7
+ <!--[if IE 9]><html class="no-js ie ie9" lang="en"><![endif]-->
8
+ <!--[if !IE]><!--> <html class="no-js" lang="en"><!--<![endif]-->
9
+ <head>
10
+ <meta charset="utf-8" />
11
+ <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
12
+ <title><%= !page.title.nil? && page.title.strip.length > 0 ? "#{page.title} | " : "" %><%= Caboose::website_name %></title>
13
+ <meta name="description" content="" />
14
+ <meta name="viewport" content="width=device-width" />
15
+ <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAzhmPHU-MEhWXbpvAdZRjd0-ZmVy-KYA8&sensor=false"></script>
16
+ <%= raw css %>
17
+ <%= stylesheet_link_tag 'print', :media => 'print' %>
18
+ <%= raw csrf_meta_tags %>
19
+ </head>
20
+ <body>
21
+ <div class="container" id='block_<%= block.id %>'>
22
+ <!--[if lt IE 7]>
23
+ <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
24
+ <![endif]-->
25
+ <%= raw block.render('layout_left_sidebar_header' , local_assigns) %>
26
+ <div class='sidebar_content_wrapper'>
27
+ <%= raw block.render('layout_left_sidebar_sidebar' , local_assigns) %>
28
+ <%= raw block.render('layout_left_sidebar_content' , local_assigns) %>
29
+ </div>
30
+ <%= raw block.render('layout_left_sidebar_footer' , local_assigns) %>
31
+ </div>
32
+ <%= raw js %>
33
+ </body>
34
+ </html>
@@ -0,0 +1,8 @@
1
+ <div class="content_wrapper" id='block_<%= block.id %>'>
2
+ <div class="content_body">
3
+ <% if block.children.count > 0 %>
4
+ <% block.children.each do |b| %><%= raw block.render(b, local_assigns) %><% end %>
5
+ <% end %>
6
+ <% if editing %><%= raw block.child_block_link %><% end %>
7
+ </div>
8
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="footer" id='block_<%= block.id %>'>
2
+ <p>Please edit /app/views/caboose/blocks/_layout_left_sidebar_footer.html.erb</p>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="header" id='block_<%= block.id %>'>
2
+ <p>Please edit /app/views/caboose/blocks/_layout_left_sidebar_header.html.erb</p>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="sidebar" id='block_<%= block.id %>'>
2
+ <p>Please edit /app/views/caboose/_layout_left_sidebar_sidebar.html.erb</p>
3
+ </div>
@@ -0,0 +1,34 @@
1
+ <%
2
+ page = block.page
3
+ %><!DOCTYPE html>
4
+ <!--[if lt IE 7]><html class="no-js ie lt-ie9 lt-ie8 lt-ie7" lang="en"><![endif]-->
5
+ <!--[if IE 7]><html class="no-js ie ie7 lt-ie9 lt-ie8" lang="en"><![endif]-->
6
+ <!--[if IE 8]><html class="no-js ie ie8 lt-ie9" lang="en"><![endif]-->
7
+ <!--[if IE 9]><html class="no-js ie ie9" lang="en"><![endif]-->
8
+ <!--[if !IE]><!--> <html class="no-js" lang="en"><!--<![endif]-->
9
+ <head>
10
+ <meta charset="utf-8" />
11
+ <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
12
+ <title><%= !page.title.nil? && page.title.strip.length > 0 ? "#{page.title} | " : "" %><%= Caboose::website_name %></title>
13
+ <meta name="description" content="" />
14
+ <meta name="viewport" content="width=device-width" />
15
+ <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAzhmPHU-MEhWXbpvAdZRjd0-ZmVy-KYA8&sensor=false"></script>
16
+ <%= raw css %>
17
+ <%= stylesheet_link_tag 'print', :media => 'print' %>
18
+ <%= raw csrf_meta_tags %>
19
+ </head>
20
+ <body>
21
+ <div class="container" id='block_<%= block.id %>'>
22
+ <!--[if lt IE 7]>
23
+ <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
24
+ <![endif]-->
25
+ <%= raw block.render('layout_right_sidebar_header' , local_assigns) %>
26
+ <div class='sidebar_content_wrapper'>
27
+ <%= raw block.render('layout_right_sidebar_sidebar' , local_assigns) %>
28
+ <%= raw block.render('layout_right_sidebar_content' , local_assigns) %>
29
+ </div>
30
+ <%= raw block.render('layout_right_sidebar_footer' , local_assigns) %>
31
+ </div>
32
+ <%= raw js %>
33
+ </body>
34
+ </html>
@@ -0,0 +1,8 @@
1
+ <div class="content_wrapper" id='block_<%= block.id %>'>
2
+ <div class="content_body">
3
+ <% if block.children.count > 0 %>
4
+ <% block.children.each do |b| %><%= raw block.render(b, local_assigns) %><% end %>
5
+ <% end %>
6
+ <% if editing %><%= raw block.child_block_link %><% end %>
7
+ </div>
8
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="footer" id='block_<%= block.id %>'>
2
+ <p>Please edit /app/views/caboose/blocks/_layout_right_sidebar_footer.html.erb</p>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="header" id='block_<%= block.id %>'>
2
+ <p>Please edit /app/views/caboose/blocks/_layout_right_sidebar_header.html.erb</p>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="sidebar" id='block_<%= block.id %>'>
2
+ <p>Please edit /app/views/caboose/_layout_right_sidebar_sidebar.html.erb</p>
3
+ </div>
@@ -1,5 +1,9 @@
1
1
  <form action="/login" method="post" id="login-form">
2
- <h1>Login</h1>
2
+ <div class="header">
3
+ <img src="/assets/caboose/caboose_logo.png" alt="Caboose">
4
+ <h1>caboose</h1>
5
+ <p>Coo Coo Ca Choo</p>
6
+ </div>
3
7
 
4
8
  <input type="hidden" name="return_url" value="<%= @return_url %>" />
5
9
  <input type="text" name="username" id="username" placeholder="Login or email" />
@@ -1,12 +1,23 @@
1
-
2
1
  <h1>New Page</h1>
3
2
  <p>Parent: <%= @parent ? @parent.title : "Home" %></p>
4
- <input type='hidden' id='parent_id' name='parent_id' value='<%= @parent_id %>' />
5
- <p><input type='text' id='title' name='title' placeholder='Title' style="width: 400px;" /></p>
3
+
4
+ <form action='/admin/pages' method='post' id='new_page_form' onsubmit="add_page(); return false;">
5
+ <input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' />
6
+ <input type='hidden' name='parent_id' value='<%= @parent_id %>' />
7
+ <p><input type='text' name='title' placeholder='Title' style="width: 400px;" /></p>
8
+ <p><select name='block_type_id'>
9
+ <option value=''>-- Select a layout --</option>
10
+ <% cat_ids = Caboose::BlockTypeCategory.layouts.collect{ |cat| cat.id } %>
11
+ <% Caboose::BlockType.where("block_type_category_id in (?)", cat_ids).reorder(:description).all.each do |bt| %>
12
+ <option value="<%= bt.id %>"><%= bt.description %></option>
13
+ <% end %>
14
+ </select></p>
15
+ <div id='message'></div>
6
16
  <p>
7
17
  <input type='button' value='< Back' onclick="window.location='/admin/pages';" />
8
- <input type='submit' value='Add Page' onclick='add_page();' />
18
+ <input type='submit' value='Add Page' />
9
19
  </p>
20
+ </form>
10
21
 
11
22
  <% content_for :caboose_js do %>
12
23
  <%= javascript_include_tag "caboose/model/all" %>
@@ -23,15 +34,10 @@ function add_page()
23
34
  $.ajax({
24
35
  url: '/admin/pages',
25
36
  type: 'post',
26
- data: {
27
- parent_id: $('#parent_id').val(),
28
- title: $('#title').val()
29
- },
37
+ data: $('#new_page_form').serialize(),
30
38
  success: function(resp) {
31
- if (resp.error)
32
- modal.autosize("<p class='note error'>" + resp.error + "</p>");
33
- if (resp.redirect)
34
- parent.window.location = resp.redirect
39
+ if (resp.error) modal.autosize("<p class='note error'>" + resp.error + "</p>");
40
+ if (resp.redirect) parent.window.location = resp.redirect
35
41
  }
36
42
  });
37
43
  }
@@ -25,7 +25,8 @@ elsif !@page.nil? && @page.title != 'Access Denied'
25
25
  :empty_text => '',
26
26
  :editing => defined?(@editing) ? @editing : false,
27
27
  :css => yield(:css),
28
- :js => yield(:js)
28
+ :js => yield(:js),
29
+ :csrf_meta_tags => csrf_meta_tags
29
30
  }) %><%
30
31
  end
31
32
  end
data/config/routes.rb CHANGED
@@ -134,6 +134,8 @@ Caboose::Engine.routes.draw do
134
134
  put "admin/block-types/:id" => "block_types#admin_update"
135
135
  delete "admin/block-types/:id" => "block_types#admin_delete"
136
136
 
137
+ get "admin/block-type-categories/tree-options" => "block_type_categories#admin_tree_options"
138
+
137
139
  get "posts" => "posts#index"
138
140
  get "posts/:id" => "posts#detail"
139
141
  get "admin/posts/category-options" => "posts#admin_category_options"
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.4.3'
2
+ VERSION = '0.4.4'
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.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
@@ -172,6 +172,9 @@ executables:
172
172
  extensions: []
173
173
  extra_rdoc_files: []
174
174
  files:
175
+ - app/assets/fonts/avenir-medium.eot
176
+ - app/assets/fonts/avenir-medium.ttf
177
+ - app/assets/images/caboose/caboose_logo.png
175
178
  - app/assets/images/caboose/caboose_logo_small.png
176
179
  - app/assets/images/caboose/caboose_nav.png
177
180
  - app/assets/images/caboose/caboose_nav_black.png
@@ -181,6 +184,9 @@ files:
181
184
  - app/assets/images/caboose/loading_small_black_on_white.gif
182
185
  - app/assets/images/caboose/loading_small_white_on_black.gif
183
186
  - app/assets/images/caboose/loading_white_on_black.gif
187
+ - app/assets/images/caboose/login_image.png
188
+ - app/assets/images/caboose/modal_overlay.png
189
+ - app/assets/images/caboose/password_image.png
184
190
  - app/assets/images/caboose/search.png
185
191
  - app/assets/javascripts/caboose/admin.js
186
192
  - app/assets/javascripts/caboose/admin_block_edit.js
@@ -221,6 +227,8 @@ files:
221
227
  - app/assets/stylesheets/caboose/application.css
222
228
  - app/assets/stylesheets/caboose/bound_input.css
223
229
  - app/assets/stylesheets/caboose/caboose.css
230
+ - app/assets/stylesheets/caboose/fonts/avenir-medium.eot
231
+ - app/assets/stylesheets/caboose/fonts/avenir-medium.ttf
224
232
  - app/assets/stylesheets/caboose/fonts/big_noodle_titling.ttf
225
233
  - app/assets/stylesheets/caboose/fonts/big_noodle_titling_oblique.ttf
226
234
  - app/assets/stylesheets/caboose/fonts.css
@@ -237,6 +245,7 @@ files:
237
245
  - app/controllers/caboose/ab_variants_controller.rb
238
246
  - app/controllers/caboose/admin_controller.rb
239
247
  - app/controllers/caboose/application_controller.rb
248
+ - app/controllers/caboose/block_type_categories_controller.rb
240
249
  - app/controllers/caboose/block_types_controller.rb
241
250
  - app/controllers/caboose/blocks_controller.rb
242
251
  - app/controllers/caboose/login_controller.rb
@@ -265,6 +274,7 @@ files:
265
274
  - app/models/caboose/authenticator.rb
266
275
  - app/models/caboose/block.rb
267
276
  - app/models/caboose/block_type.rb
277
+ - app/models/caboose/block_type_category.rb
268
278
  - app/models/caboose/caboose_plugin.rb
269
279
  - app/models/caboose/core_plugin.rb
270
280
  - app/models/caboose/database_session.rb
@@ -301,10 +311,20 @@ files:
301
311
  - app/views/caboose/blocks/_heading.html.erb
302
312
  - app/views/caboose/blocks/_html.html.erb
303
313
  - app/views/caboose/blocks/_image.html.erb
304
- - app/views/caboose/blocks/_layout_default.html.erb
305
- - app/views/caboose/blocks/_layout_default_content.html.erb
306
- - app/views/caboose/blocks/_layout_default_footer.html.erb
307
- - app/views/caboose/blocks/_layout_default_header.html.erb
314
+ - app/views/caboose/blocks/_layout_basic.html.erb
315
+ - app/views/caboose/blocks/_layout_basic_content.html.erb
316
+ - app/views/caboose/blocks/_layout_basic_footer.html.erb
317
+ - app/views/caboose/blocks/_layout_basic_header.html.erb
318
+ - app/views/caboose/blocks/_layout_left_sidebar.html.erb
319
+ - app/views/caboose/blocks/_layout_left_sidebar_content.html.erb
320
+ - app/views/caboose/blocks/_layout_left_sidebar_footer.html.erb
321
+ - app/views/caboose/blocks/_layout_left_sidebar_header.html.erb
322
+ - app/views/caboose/blocks/_layout_left_sidebar_sidebar.html.erb
323
+ - app/views/caboose/blocks/_layout_right_sidebar.html.erb
324
+ - app/views/caboose/blocks/_layout_right_sidebar_content.html.erb
325
+ - app/views/caboose/blocks/_layout_right_sidebar_footer.html.erb
326
+ - app/views/caboose/blocks/_layout_right_sidebar_header.html.erb
327
+ - app/views/caboose/blocks/_layout_right_sidebar_sidebar.html.erb
308
328
  - app/views/caboose/blocks/_richtext.html.erb
309
329
  - app/views/caboose/blocks/_text.html.erb
310
330
  - app/views/caboose/blocks/admin_edit.html.erb
@@ -1,16 +0,0 @@
1
- <div class="page_wrap" id='block_<%= block.id %>'>
2
- <div class="page_body">
3
- <div class="page_content">
4
- <div class="icons-social">
5
- <ul>
6
- <li><a class="icon-twitter" href="https://twitter.com/truesouthprop"></a></li>
7
- <li><a class="icon-facebook" href="https://www.facebook.com/pages/TrueSouth-Properties/144790345550944"></a></li>
8
- </ul>
9
- </div>
10
- <% if block.children.count > 0 %>
11
- <% block.children.each do |b| %><%= raw block.render(b, local_assigns) %><% end %>
12
- <% end %>
13
- <% if editing %><%= raw block.child_block_link %><% end %>
14
- </div>
15
- </div>
16
- </div>
@@ -1,20 +0,0 @@
1
- <div class="footer" id='block_<%= block.id %>'>
2
- <div class="constrain">
3
- <div class="nav">
4
- <ul>
5
- <li><a href="/">Home</a></li>
6
- <li><a href="/about">About</a></li>
7
- <li><a href="/services">Services</a></li>
8
- <li><a href="/properties/category/land">Land</a></li>
9
- <li><a href="/properties/category/commercial">Commercial</a></li>
10
- <li><a href="/properties/category/residential">Residential</a></li>
11
- <li><a href="/properties/category/rural">Rural</a></li>
12
- <li><a href="/contact/montgomery">Contact</a></li>
13
- </ul>
14
- </div>
15
- <div class="nine">
16
- <span>site designed, built and loved by:</span>
17
- <a href="http://www.nine.is" target="_blank"><div class="logo"></div></a>
18
- </div>
19
- </div>
20
- </div>
@@ -1,32 +0,0 @@
1
- <div class="header" id="block_<%= block.id %>">
2
- <div class="constrain">
3
- <a href="/"><div class="logo" style="width: <%= block.child('logo_size').value %>;"></div></a>
4
- <a href="/"><div class="mobile_logo"></div></a>
5
- <div class='register'><a href='/newsletter'>Sign up for our newsletter</a></div>
6
- <div class="nav">
7
- <ul>
8
- <li><a href="/">Home</a></li>
9
- <li><a href="/about">About</a></li>
10
- <li><a href="/properties/category/land">Land</a></li>
11
- <li><a href="/properties/category/commercial">Commercial</a></li>
12
- <li><a href="/properties/category/rural">Rural</a></li>
13
- <li><a href="/properties/category/residential">Residential</a></li>
14
- <li><a href="/services">Services</a></li>
15
- <li><a href="/contact/montgomery">Contact Us</a></li>
16
- </ul>
17
- </div>
18
- <a id="show_menu" href="#sidr"><img src="//d323vxen8l6os.cloudfront.net/assets/icons/sidr.png"></a>
19
- <div id="sidr" style="display:none;">
20
- <ul>
21
- <li><a href="/">Home</a></li>
22
- <li><a href="/about">About</a></li>
23
- <li><a href="/services">Services</a></li>
24
- <li><a href="/properties/category/land">Land</a></li>
25
- <li><a href="/properties/category/commercial">Commercial</a></li>
26
- <li><a href="/properties/category/residential">Residential</a></li>
27
- <li><a href="/properties/category/rural">Rural</a></li>
28
- <li><a href="/contact/montgomery">Contact</a></li>
29
- </ul>
30
- </div>
31
- </div>
32
- </div>