cambium 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +339 -15
  4. data/{lib/generators/cambium/templates/app/assets/javascripts/admin/admin.js.coffee → app/assets/javascripts/cambium/admin/application.js.coffee} +4 -10
  5. data/app/assets/javascripts/cambium/admin/routers/router.js.coffee +25 -0
  6. data/app/assets/javascripts/cambium/admin/users.js +2 -0
  7. data/app/assets/javascripts/cambium/admin/views/dropdown_menu.js.coffee +24 -0
  8. data/app/assets/javascripts/cambium/admin/views/pickadate.js.coffee +15 -0
  9. data/app/assets/stylesheets/cambium/admin/application.scss +27 -0
  10. data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_colors.scss +7 -7
  11. data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones.scss +18 -18
  12. data/app/assets/stylesheets/cambium/admin/partials/_globals.scss +21 -0
  13. data/app/assets/stylesheets/cambium/admin/partials/activity.scss +52 -0
  14. data/app/assets/stylesheets/cambium/admin/partials/components.scss +64 -0
  15. data/app/assets/stylesheets/cambium/admin/partials/dashboard.scss +48 -0
  16. data/app/assets/stylesheets/cambium/admin/partials/forms.scss +107 -0
  17. data/app/assets/stylesheets/cambium/admin/partials/header.scss +113 -0
  18. data/app/assets/stylesheets/cambium/admin/partials/page_title.scss +42 -0
  19. data/app/assets/stylesheets/cambium/admin/partials/sidebar.scss +41 -0
  20. data/app/assets/stylesheets/cambium/admin/partials/tables.scss +80 -0
  21. data/app/assets/stylesheets/cambium/admin/partials/typography.scss +5 -0
  22. data/app/assets/stylesheets/cambium/admin/partials/wireframe.scss +52 -0
  23. data/app/assets/stylesheets/cambium/admin/users.css +4 -0
  24. data/app/controllers/cambium/admin/dashboard_controller.rb +12 -0
  25. data/app/controllers/cambium/admin/search_controller.rb +9 -0
  26. data/app/controllers/cambium/admin/users_controller.rb +30 -0
  27. data/app/controllers/cambium/admin_controller.rb +90 -0
  28. data/app/helpers/cambium/cambium_helper.rb +205 -0
  29. data/app/presenters/cambium/admin_presenter.rb +127 -0
  30. data/app/views/cambium/admin/_activity.html.erb +6 -0
  31. data/app/views/cambium/admin/_header.html.erb +41 -0
  32. data/app/views/cambium/admin/_sidebar.html.erb +19 -0
  33. data/app/views/cambium/admin/_status.html.erb +5 -0
  34. data/app/views/cambium/admin/dashboard/show.html.erb +5 -0
  35. data/app/views/cambium/admin/edit.html.erb +7 -0
  36. data/app/views/cambium/admin/index.html.erb +7 -0
  37. data/app/views/cambium/admin/new.html.erb +7 -0
  38. data/app/views/cambium/admin/paper_trail/versions/_version.html.erb +20 -0
  39. data/app/views/cambium/admin/search/index.html.erb +38 -0
  40. data/app/views/layouts/admin.html.erb +25 -0
  41. data/bin/rails +12 -0
  42. data/cambium.gemspec +19 -15
  43. data/config/routes.rb +10 -0
  44. data/lib/cambium/configuration.rb +28 -0
  45. data/lib/cambium/engine.rb +2 -1
  46. data/lib/cambium/version.rb +1 -1
  47. data/lib/cambium.rb +12 -1
  48. data/lib/generators/cambium/admin_generator.rb +104 -0
  49. data/lib/generators/cambium/app_generator.rb +205 -0
  50. data/lib/generators/cambium/controller_generator.rb +81 -0
  51. data/lib/generators/cambium/gemfile_generator.rb +36 -0
  52. data/lib/generators/cambium/install_generator.rb +19 -0
  53. data/lib/generators/cambium/user_generator.rb +40 -0
  54. data/lib/generators/{cambium/helpers → helpers}/generators_helper.rb +32 -24
  55. data/lib/generators/templates/Gemfile.erb +79 -0
  56. data/lib/generators/{cambium/templates/app/assets/javascripts/backbone/app.js.coffee → templates/app/assets/javascripts/application.js.coffee} +9 -1
  57. data/lib/generators/templates/app/assets/javascripts/views/default_helpers.js.coffee +16 -0
  58. data/lib/generators/templates/app/assets/stylesheets/admin/admin.scss +3 -0
  59. data/lib/generators/templates/app/controllers/admin/controller.rb.erb +2 -0
  60. data/lib/generators/{cambium/templates → templates}/app/controllers/application_controller.rb +1 -5
  61. data/lib/generators/{cambium/templates → templates}/app/models/user.rb +4 -4
  62. data/lib/generators/templates/app/views/application/_status.html.erb +3 -0
  63. data/lib/generators/{cambium/templates → templates}/app/views/layouts/application.html.erb +1 -1
  64. data/lib/generators/templates/config/admin/controller.yml.erb +24 -0
  65. data/lib/generators/templates/config/admin/sidebar.yml +9 -0
  66. data/lib/generators/templates/config/admin/users.yml +31 -0
  67. data/lib/generators/{cambium/templates → templates}/config/application.rb +6 -4
  68. data/lib/generators/templates/config/initializers/_hash.rb +23 -0
  69. data/lib/generators/templates/config/initializers/_settings.rb +18 -0
  70. data/lib/generators/templates/config/initializers/assets.rb +1 -0
  71. data/lib/generators/templates/config/initializers/cambium.rb +16 -0
  72. data/lib/generators/templates/config/private.yml +16 -0
  73. data/lib/generators/templates/config/routes.rb +54 -0
  74. data/lib/generators/templates/config/settings.yml +16 -0
  75. data/lib/generators/{cambium/templates → templates}/gitignore +1 -1
  76. data/lib/help/cambium_prereqs.txt +13 -0
  77. data/lib/help/pg_search_post_install.txt +13 -0
  78. data/lib/{generators/cambium/templates/lib/tasks → tasks}/db.rake +2 -2
  79. data/lib/{generators/cambium/templates/lib/tasks → tasks}/rename.rake +1 -1
  80. data/test/controllers/cambium/admin/dashboard_controller_test.rb +9 -0
  81. data/test/controllers/cambium/admin/users_controller_test.rb +9 -0
  82. data/test/controllers/cambium/admin_controller_test.rb +9 -0
  83. metadata +192 -152
  84. data/bin/cambium +0 -16
  85. data/lib/generators/cambium/helpers/dependencies_helper.rb +0 -58
  86. data/lib/generators/cambium/install/admin_generator.rb +0 -110
  87. data/lib/generators/cambium/install/app_generator.rb +0 -162
  88. data/lib/generators/cambium/install/config_generator.rb +0 -182
  89. data/lib/generators/cambium/install/utilities_generator.rb +0 -57
  90. data/lib/generators/cambium/model/image_generator.rb +0 -67
  91. data/lib/generators/cambium/model/page_generator.rb +0 -131
  92. data/lib/generators/cambium/model/post_generator.rb +0 -71
  93. data/lib/generators/cambium/model/tag_generator.rb +0 -40
  94. data/lib/generators/cambium/model/user_generator.rb +0 -78
  95. data/lib/generators/cambium/templates/Gemfile +0 -43
  96. data/lib/generators/cambium/templates/Gemfile.erb +0 -40
  97. data/lib/generators/cambium/templates/_partials/pages/admin_icon.rb +0 -6
  98. data/lib/generators/cambium/templates/app/assets/javascripts/.DS_Store +0 -0
  99. data/lib/generators/cambium/templates/app/assets/javascripts/admin/collections/.gitkeep +0 -0
  100. data/lib/generators/cambium/templates/app/assets/javascripts/admin/models/.gitkeep +0 -0
  101. data/lib/generators/cambium/templates/app/assets/javascripts/admin/models/image.js.coffee +0 -14
  102. data/lib/generators/cambium/templates/app/assets/javascripts/admin/models/tag.js.coffee +0 -14
  103. data/lib/generators/cambium/templates/app/assets/javascripts/admin/parser_rules/custom.js +0 -552
  104. data/lib/generators/cambium/templates/app/assets/javascripts/admin/routers/router.js.coffee +0 -37
  105. data/lib/generators/cambium/templates/app/assets/javascripts/admin/tag.jst.ejs +0 -7
  106. data/lib/generators/cambium/templates/app/assets/javascripts/admin/templates/image.jst.ejs +0 -3
  107. data/lib/generators/cambium/templates/app/assets/javascripts/admin/templates/paginator_controls.jst.ejs +0 -8
  108. data/lib/generators/cambium/templates/app/assets/javascripts/admin/templates/paginator_nav.jst.ejs +0 -11
  109. data/lib/generators/cambium/templates/app/assets/javascripts/admin/templates/post_tag.jst.ejs +0 -1
  110. data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/accordion.js.coffee +0 -33
  111. data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/counter.js.coffee +0 -25
  112. data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/dropdown_toggle.js.coffee +0 -16
  113. data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/image_upload.js.coffee +0 -28
  114. data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/init_counter.js.coffee +0 -13
  115. data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/paginator.js.coffee +0 -86
  116. data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/publishable.js.coffee +0 -12
  117. data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/tags.js.coffee +0 -158
  118. data/lib/generators/cambium/templates/app/assets/javascripts/admin/views/wysiwyg.js.coffee +0 -87
  119. data/lib/generators/cambium/templates/app/assets/javascripts/admin/wysihtml5.js +0 -9521
  120. data/lib/generators/cambium/templates/app/assets/javascripts/application.js +0 -10
  121. data/lib/generators/cambium/templates/app/assets/javascripts/backbone/templates/.keep +0 -0
  122. data/lib/generators/cambium/templates/app/assets/stylesheets/admin/admin.scss +0 -14
  123. data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_content.scss +0 -88
  124. data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_form.scss +0 -470
  125. data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_globals.scss +0 -39
  126. data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_header.scss +0 -121
  127. data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_nav.scss +0 -45
  128. data/lib/generators/cambium/templates/app/assets/stylesheets/admin/partials/_wireframe.scss +0 -24
  129. data/lib/generators/cambium/templates/app/assets/stylesheets/admin/wysihtml5.css +0 -7
  130. data/lib/generators/cambium/templates/app/controllers/admin/images_controller.rb +0 -45
  131. data/lib/generators/cambium/templates/app/controllers/admin/pages_controller.rb +0 -42
  132. data/lib/generators/cambium/templates/app/controllers/admin/posts_controller.rb +0 -39
  133. data/lib/generators/cambium/templates/app/controllers/admin/taggings_controller.rb +0 -69
  134. data/lib/generators/cambium/templates/app/controllers/admin/tags_controller.rb +0 -11
  135. data/lib/generators/cambium/templates/app/controllers/admin/users_controller.rb +0 -13
  136. data/lib/generators/cambium/templates/app/controllers/admin_controller.rb +0 -97
  137. data/lib/generators/cambium/templates/app/controllers/images_controller.rb +0 -45
  138. data/lib/generators/cambium/templates/app/controllers/pages_controller.rb +0 -12
  139. data/lib/generators/cambium/templates/app/controllers/posts_controller.rb +0 -11
  140. data/lib/generators/cambium/templates/app/helpers/admin/pages_controller.rb +0 -47
  141. data/lib/generators/cambium/templates/app/helpers/admin_helper.rb +0 -121
  142. data/lib/generators/cambium/templates/app/models/concerns/name.rb +0 -7
  143. data/lib/generators/cambium/templates/app/models/concerns/title.rb +0 -7
  144. data/lib/generators/cambium/templates/app/models/image.rb +0 -43
  145. data/lib/generators/cambium/templates/app/models/page.rb +0 -81
  146. data/lib/generators/cambium/templates/app/models/post.rb +0 -45
  147. data/lib/generators/cambium/templates/app/models/tag.rb +0 -33
  148. data/lib/generators/cambium/templates/app/models/tagging.rb +0 -20
  149. data/lib/generators/cambium/templates/app/uploaders/image_uploader.rb +0 -91
  150. data/lib/generators/cambium/templates/app/views/admin/_buttons.html.erb +0 -5
  151. data/lib/generators/cambium/templates/app/views/admin/_form.html.erb +0 -11
  152. data/lib/generators/cambium/templates/app/views/admin/_title.html.erb +0 -1
  153. data/lib/generators/cambium/templates/app/views/admin/edit.html.erb +0 -2
  154. data/lib/generators/cambium/templates/app/views/admin/images/_image.html.erb +0 -1
  155. data/lib/generators/cambium/templates/app/views/admin/images/create.js.erb +0 -7
  156. data/lib/generators/cambium/templates/app/views/admin/images/index.json.jbuilder +0 -4
  157. data/lib/generators/cambium/templates/app/views/admin/index.html.erb +0 -50
  158. data/lib/generators/cambium/templates/app/views/admin/new.html.erb +0 -2
  159. data/lib/generators/cambium/templates/app/views/admin/pages/_form.html.erb +0 -26
  160. data/lib/generators/cambium/templates/app/views/admin/posts/_form.html.erb +0 -40
  161. data/lib/generators/cambium/templates/app/views/admin/shared/_footer.html.erb +0 -2
  162. data/lib/generators/cambium/templates/app/views/admin/shared/_header.html.erb +0 -2
  163. data/lib/generators/cambium/templates/app/views/admin/shared/_insert_image.html.erb +0 -12
  164. data/lib/generators/cambium/templates/app/views/admin/shared/_nav.html.erb +0 -12
  165. data/lib/generators/cambium/templates/app/views/admin/shared/_status.html.erb +0 -3
  166. data/lib/generators/cambium/templates/app/views/admin/shared/forms/_editor.html.erb +0 -54
  167. data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_column_left.html.erb +0 -9
  168. data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_column_right.html.erb +0 -9
  169. data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_page.html.erb +0 -22
  170. data/lib/generators/cambium/templates/app/views/admin/shared/forms/_form_section.html.erb +0 -8
  171. data/lib/generators/cambium/templates/app/views/admin/shared/forms/_publishable.html.erb +0 -33
  172. data/lib/generators/cambium/templates/app/views/admin/users/_form.html.erb +0 -11
  173. data/lib/generators/cambium/templates/app/views/application/_status.html.erb +0 -3
  174. data/lib/generators/cambium/templates/app/views/layouts/.DS_Store +0 -0
  175. data/lib/generators/cambium/templates/app/views/layouts/admin.html.erb +0 -44
  176. data/lib/generators/cambium/templates/app/views/page_templates/default.html.erb +0 -2
  177. data/lib/generators/cambium/templates/app/views/posts/_post.html.erb +0 -4
  178. data/lib/generators/cambium/templates/app/views/posts/index.html.erb +0 -1
  179. data/lib/generators/cambium/templates/app/views/posts/show.html.erb +0 -10
  180. data/lib/generators/cambium/templates/config/app_routes.rb +0 -77
  181. data/lib/generators/cambium/templates/config/database.mysql2.yml.erb +0 -15
  182. data/lib/generators/cambium/templates/config/database.pg.yml.erb +0 -14
  183. data/lib/generators/cambium/templates/config/database.sqlite3.yml.erb +0 -18
  184. data/lib/generators/cambium/templates/config/initializers/_settings.rb +0 -11
  185. data/lib/generators/cambium/templates/config/initializers/assets.rb +0 -1
  186. data/lib/generators/cambium/templates/config/routes.rb.erb +0 -42
  187. data/lib/generators/cambium/templates/config/settings.yml +0 -15
  188. data/lib/generators/cambium/templates/config/settings_private.sample.yml +0 -15
  189. data/lib/generators/cambium/templates/config/settings_private.yml +0 -13
  190. data/lib/generators/cambium/templates/db/migrate/create_pages.rb.erb +0 -24
  191. data/lib/generators/cambium/templates/db/migrate/create_posts.rb +0 -19
  192. data/lib/generators/cambium/templates/lib/.DS_Store +0 -0
  193. data/lib/help/cambium +0 -7
  194. /data/{lib/generators/cambium/templates/app/assets/javascripts/backbone/collections → app/assets/javascripts/cambium/admin/templates}/.keep +0 -0
  195. /data/{lib/generators/cambium/templates/app/assets/javascripts/backbone → app/assets/javascripts/cambium/admin}/views/default_helpers.js.coffee +0 -0
  196. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/__default.scss +0 -0
  197. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_buttons.scss +0 -0
  198. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_components.scss +0 -0
  199. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_forms.scss +0 -0
  200. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_helpers.scss +0 -0
  201. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_images.scss +0 -0
  202. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_nav.scss +0 -0
  203. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_tables.scss +0 -0
  204. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_typography.scss +0 -0
  205. /data/{lib/generators/cambium/templates/app/assets/stylesheets → app/assets/stylesheets/cambium}/admin/bones/bones-config/_wireframe.scss +0 -0
  206. /data/{lib/generators/cambium/templates/app → app}/models/concerns/idx.rb +0 -0
  207. /data/{lib/generators/cambium/templates/app → app}/models/concerns/image_cropper.rb +0 -0
  208. /data/{lib/generators/cambium/templates/app → app}/models/concerns/publishable.rb +0 -0
  209. /data/{lib/generators/cambium/templates/app → app}/models/concerns/slug.rb +0 -0
  210. /data/{lib/generators/cambium/templates/app → app}/models/concerns/tags.rb +0 -0
  211. /data/lib/generators/{cambium/helpers → helpers}/_autoloader.rb +0 -0
  212. /data/lib/generators/{cambium/templates/app/assets/javascripts/backbone → templates/app/assets/javascripts}/routers/router.js.coffee +0 -0
  213. /data/lib/generators/{cambium/templates/app/assets/javascripts/backbone/models → templates/app/assets/javascripts/templates}/.keep +0 -0
  214. /data/lib/generators/{cambium/templates → templates}/app/assets/stylesheets/application.scss +0 -0
  215. /data/lib/generators/{cambium/templates → templates}/app/views/home/index.html.erb +0 -0
  216. /data/lib/generators/{cambium/templates → templates}/db/seeds.rb +0 -0
  217. /data/{lib/generators/cambium/templates/vendor → vendor}/assets/javascripts/modernizr.js +0 -0
  218. /data/{lib/generators/cambium/templates/vendor → vendor}/assets/stylesheets/normalize.scss +0 -0
@@ -1,54 +0,0 @@
1
- <div id="wysihtml5-toolbar-<%= idx %>" class="wysihtml5-toolbar">
2
- <div class="group">
3
- <%= wysihtml5_link 'formatBlock', 'P', { :cmd => 'p' } %>
4
- <%= wysihtml5_link 'formatBlock', 'H1', { :cmd => 'h1' } %>
5
- <%= wysihtml5_link 'formatBlock', 'H2', { :cmd => 'h2' } %>
6
- <%= wysihtml5_link 'formatBlock', 'H3', { :cmd => 'h3' } %>
7
- <%= wysihtml5_link 'formatBlock', 'H4', { :cmd => 'h4' } %>
8
- <%#= wysihtml5_link 'formatBlock', 'H5', 'h5' %>
9
- <%#= wysihtml5_link 'formatBlock', 'H6', 'h6' %>
10
- </div>
11
-
12
- <div class="group">
13
- <%= wysihtml5_icon 'bold' %>
14
- <%= wysihtml5_icon 'italic' %>
15
- <%= wysihtml5_icon 'underline' %>
16
- </div>
17
-
18
- <div class="group">
19
- <%= wysihtml5_icon 'justifyLeft', 'paragraph-left' %>
20
- <%= wysihtml5_icon 'justifyCenter', 'paragraph-center' %>
21
- <%= wysihtml5_icon 'justifyRight', 'paragraph-right' %>
22
- </div>
23
-
24
- <div class="group">
25
- <%= wysihtml5_icon 'insertUnorderedList', 'list2' %>
26
- <%= wysihtml5_icon 'insertOrderedList', 'numbered-list' %>
27
- </div>
28
-
29
- <div class="group">
30
- <%= wysihtml5_icon 'createLink', 'link' %>
31
- <%= wysihtml5_icon 'insertImage', 'image', { :id => 'wysihtml5-insert-image' } %>
32
-
33
- <div class="dialog" data-wysihtml5-dialog="createLink" style="display: none;">
34
- <input type="text" data-wysihtml5-dialog-field="href" value="http://" class="text">
35
- <a class="margin-right-medium" data-wysihtml5-dialog-action="save">Insert</a>
36
- <a data-wysihtml5-dialog-action="cancel">Cancel</a>
37
- </div>
38
- <div class="dialog" data-wysihtml5-dialog="insertImage" style="display: none; margin-left: 36px;">
39
- <input type="text" data-wysihtml5-dialog-field="src" value="http://" class="insert-image">
40
- <a class="insert-image" class="margin-right-medium" data-wysihtml5-dialog-action="save">Insert</a>
41
- <a class="browse-images">Browse Images</a>
42
- <a data-wysihtml5-dialog-action="cancel">Cancel</a>
43
- </div>
44
- </div>
45
-
46
- <div class="group right">
47
- <a data-wysihtml5-action="change_view">HTML</a>
48
- </div>
49
-
50
- </div>
51
-
52
- <%= f.input field, :as => :text, :label => false, :input_html => {
53
- :id => "wysihtml5-textarea-#{idx}", :class => 'wysihtml5-textarea' },
54
- :wrapper_html => { :class => "wysihtml5" } %>
@@ -1,9 +0,0 @@
1
- <div class="row">
2
- <div class="accordion column-6">
3
- <header>
4
- <h2><%= title %></h2>
5
- </header>
6
- <div class="fields">
7
- <%= content %>
8
- </div>
9
- </div>
@@ -1,9 +0,0 @@
1
- <div class="accordion column-6">
2
- <header>
3
- <h2><%= title %></h2>
4
- </header>
5
- <div class="fields">
6
- <%= content %>
7
- </div>
8
- </div>
9
- </div>
@@ -1,22 +0,0 @@
1
- <div id="form">
2
-
3
- <header class="intro">
4
- <div class="breadcrumbs">
5
- <% index_label ||= classname.downcase %>
6
- <%= link_to index_label, index %>
7
- <span>/</span>
8
- <%= link_to title.downcase, "#", :class => "disabled title" %>
9
- </div>
10
- <h1 class="title"><%= title %></h1>
11
- </header>
12
-
13
- <section class="form-container">
14
- <%= render :partial => 'admin/shared/status' %>
15
- <% if action_name == 'edit' || action_name == 'edit' %>
16
- <%= render :partial => 'edit_form' %>
17
- <% else %>
18
- <%= render :partial => 'form' %>
19
- <% end %>
20
- </section>
21
-
22
- </div>
@@ -1,8 +0,0 @@
1
- <div class="accordion <%= open ? nil : 'closed' %>">
2
- <header>
3
- <h2><%= title %></h2>
4
- </header>
5
- <div class="fields">
6
- <%= content %>
7
- </div>
8
- </div>
@@ -1,33 +0,0 @@
1
- <% if @item.new_record? or !@item.published? %>
2
- <p class="item-status">
3
- <span class="status">Status:</span>
4
- <span class="draft">
5
- <i class="icon-cancel-circle2"></i>&nbsp;DRAFT
6
- </span>
7
- </p>
8
- <hr>
9
- <% else %>
10
- <p class="item-status">
11
- <span class="status">Status:</span>
12
- <span class="published">
13
- <i class="icon-checkmark-circle2"></i>&nbsp;PUBLISHED
14
- </span>
15
- </p>
16
- <hr>
17
- <% end %>
18
-
19
- <label>Publish</label>
20
- <%= f.input :active_date, :as => :string, :label => false, :input_html => {
21
- :placeholder => 'Date', :class => 'active-date date-js',
22
- :value => @item.formatted_active_date } %>
23
- <%= f.input :active_time, :as => :string, :label => false, :input_html => {
24
- :placeholder => 'Time', :class => 'active-time time-js',
25
- :value => @item.formatted_active_time } %>
26
-
27
- <label>Unpublish</label>
28
- <%= f.input :inactive_date, :as => :string, :label => false, :input_html => {
29
- :placeholder => 'Date', :class => 'inactive-date date-js',
30
- :value => @item.formatted_inactive_date } %>
31
- <%= f.input :inactive_time, :as => :string, :label => false, :input_html => {
32
- :placeholder => 'Time', :class => 'inactive-time time-js',
33
- :value => @item.formatted_inactive_time } %>
@@ -1,11 +0,0 @@
1
- <%= simple_form_for @item, :url => @url do |f| %>
2
-
3
- <%= form_section 'overview' do %>
4
- <%= f.input :email %>
5
- <%= f.input :password %>
6
- <%= f.input :password_confirmation %>
7
- <% end %>
8
-
9
- <%= f.button :submit %>
10
-
11
- <% end %>
@@ -1,3 +0,0 @@
1
- <% flash.each do |level,message| %>
2
- <p class="<%= level %>"><%= message %></p>
3
- <% end %>
@@ -1,44 +0,0 @@
1
- <!DOCTYPE html>
2
- <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
3
- <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
4
- <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
5
- <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
6
- <head>
7
- <meta charset="utf-8">
8
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9
- <meta name="description" content="">
10
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0">
11
- <meta name="apple-mobile-web-app-capable" content="yes">
12
- <meta name="format-detection" content="telephone=no">
13
-
14
- <title><%= @site_title %></title>
15
-
16
- <%%= stylesheet_link_tag "admin/admin", :media => "all" %>
17
- <%%= javascript_include_tag "modernizr" %>
18
-
19
- <script type="text/javascript">
20
- var WYSIWYG_BASE_STYLES = "<%%= stylesheet_path('wysiwyg') %>";
21
- var WYSIWYG_CUSTOM_STYLES = "<%%= stylesheet_path('admin/wysihtml5') %>";
22
- </script>
23
-
24
- <%%= csrf_meta_tags %>
25
- </head>
26
- <body>
27
-
28
- <div id="admin" class="row">
29
-
30
- <aside class="nav">
31
- <%%= render partial: "admin/shared/nav" %>
32
- </aside>
33
-
34
- <section class="container">
35
- <div class="content">
36
- <%%= yield %>
37
- </div>
38
- </section>
39
-
40
- </div>
41
-
42
- <%%= javascript_include_tag "admin/admin" %>
43
- </body>
44
- </html>
@@ -1,2 +0,0 @@
1
- <h1><%= @page.title %></h1>
2
- <%= @page.body.html_safe %>
@@ -1,4 +0,0 @@
1
- <article class="post-item" id="post-item-<%= post.id %>">
2
- <%= image_tag(post.main_image.thumb.url) if post.main_image.present? %>
3
- <p><%= post.summary_text %></p>
4
- </article>
@@ -1 +0,0 @@
1
- <%= render @posts %>
@@ -1,10 +0,0 @@
1
- <section class="post-detail" id="post-detail=<%= @post.id %>">
2
- <header>
3
- <%= image_tag(@post.main_image.to_crop.url) if @post.main_image.to_s %>
4
- </header>
5
- <article>
6
- <h1><%= @post.title %></h1>
7
- <%= content_tag :h2, "by #{@post.author_name}" if @post.author_name %>
8
- <%= @post.body.html_safe %>
9
- </article>
10
- </section>
@@ -1,77 +0,0 @@
1
-
2
-
3
- ######################################################################
4
- # BEGIN Cambium
5
- ######################################################################
6
- #
7
- # The following are Cambium's default routes. Feel free to customize (or
8
- # delete) these to fit your needs.
9
- #
10
- ######################################################################
11
- # WARNING: MAKE SURE YOU REMOVE ANY DUPLICATES AND REARRANGE TO AVOID
12
- # CONFLICTS WITH YOUR EXISTING ROUTES.
13
- ######################################################################
14
- #
15
- # ------------------------------------------ Devise
16
- #
17
- # Only use this section if you've installed Cambium's user authentication
18
- # system (which uses Devise).
19
- #
20
- # The following line is necessary to add Devise's routes. The :skip argument
21
- # is ommitting registration routes, since we don't use the registration module
22
- # by default. And we only skip sessions because we rewrite those routes below
23
- # so they are a little cleaner.
24
- #
25
- # devise_for :users, :skip => [:sessions, :registrations]
26
- # devise_scope :user do
27
- # get '/login' => 'devise/sessions#new', :as => :new_user_session
28
- # post '/login' => 'devise/sessions#create', :as => :user_session
29
- # get '/logout' => 'devise/sessions#destroy', :as => :destroy_user_session
30
- # end
31
- #
32
- # ------------------------------------------ Admin
33
- #
34
- # Only use this section if you plan to implement Cambium's admin module. Do
35
- # note, if you accidentally delete it before you run the admin generator, they
36
- # will be regenerated.
37
- #
38
- # This routes to our admin dashboard, which we don't use by default. It really
39
- # just redirects to the controller of your choosing.
40
- #
41
- # get '/admin' => 'admin#dashboard', :as => :admin_dashboard
42
- #
43
- # All additional admin routes should be nested under the :admin namespace.
44
- # Here we show an example that includes the users routes.
45
- #
46
- # namespace :admin do
47
- # resources :users, :except => [:show]
48
- # end
49
- #
50
- # ------------------------------------------ JSON
51
- #
52
- # If you plan to use any public json routes, it's good to nest them in their
53
- # own scope. We use a scope instead of a namespace because a controller action
54
- # can have routes to it in different formats, so namespacing is unecessary.
55
- #
56
- # scope 'json' do
57
- # 'users' => 'users#index'
58
- # end
59
- #
60
- # ------------------------------------------ Public
61
- #
62
- # After we define all namespaced routes, we can move on to those routes that
63
- # are not namespaced.
64
- #
65
- # resources :users
66
- #
67
- # ------------------------------------------ Home Page
68
- #
69
- # We end the routes file with the root route, which defines our application's
70
- # home page. This is essential and should only be defined once -- after all
71
- # other routes.
72
- #
73
- # root :to => 'home#index'
74
- #
75
- ######################################################################
76
- # END Cambium
77
- ######################################################################
@@ -1,15 +0,0 @@
1
- default: &default
2
- adapter: mysql2
3
- encoding: utf8
4
- pool: 5
5
- <%= "username: #{@config[:db][:user]}" if @config[:db][:user].present? %>
6
- <%= "password: #{@config[:db][:password]}" if @config[:db][:password].present? %>
7
- socket: /tmp/mysql.sock
8
-
9
- development:
10
- <<: *default
11
- database: <%= @config[:db][:name] %>_development
12
-
13
- test:
14
- <<: *default
15
- database: <%= @config[:db][:name] %>_test
@@ -1,14 +0,0 @@
1
- default: &default
2
- adapter: postgresql
3
- encoding: unicode
4
- pool: 5
5
- <%= "user: #{@config[:db][:user]}" if @config[:db][:user].present? %>
6
- <%= "password: #{@config[:db][:password]}" if @config[:db][:password].present? %>
7
-
8
- development:
9
- <<: *default
10
- database: <%= @config[:db][:name] %>_development
11
-
12
- test:
13
- <<: *default
14
- database: <%= @config[:db][:name] %>_test
@@ -1,18 +0,0 @@
1
- default: &default
2
- adapter: sqlite3
3
- pool: 5
4
- timeout: 5000
5
- <%= "user: #{@config[:db][:user]}" if @config[:db][:user].present? %>
6
- <%= "password: #{@config[:db][:password]}" if @config[:db][:password].present? %>
7
-
8
- development:
9
- <<: *default
10
- database: db/development.sqlite3
11
-
12
- test:
13
- <<: *default
14
- database: db/test.sqlite3
15
-
16
- production:
17
- <<: *default
18
- database: db/production.sqlite3
@@ -1,11 +0,0 @@
1
- # Loads config/settings.yml into SETTINGS[]
2
- config_file = File.join(Rails.root,'config','settings.yml')
3
- if File.exists?(config_file)
4
- SETTINGS = YAML.load_file(config_file)[Rails.env]
5
- end
6
-
7
- # Loads config/settings_private.yml (sensitive settings) into PRIVATE[]
8
- private_file = File.join(Rails.root,'config','settings_private.yml')
9
- if File.exists?(private_file)
10
- PRIVATE = YAML.load_file(private_file)[Rails.env]
11
- end
@@ -1 +0,0 @@
1
- Rails.application.config.assets.precompile += %w( admin/admin.css admin/admin.js wysiwyg.css admin/wysihtml5.css modernizr.js )
@@ -1,42 +0,0 @@
1
- <%= Rails.application.class.parent_name %>::Application.routes.draw do
2
-
3
- <% if defined?(User) == 'constant' && User.class == Class %> # ------------------------------------------ Devise
4
-
5
- devise_for :users, skip: [:sessions, :registrations]
6
- devise_scope :user do
7
- get '/login' => 'devise/sessions#new', :as => :new_user_session
8
- post '/login' => 'devise/sessions#create', :as => :user_session
9
- get '/logout' => 'devise/sessions#destroy', :as => :destroy_user_session
10
- end<% end %>
11
-
12
- # ------------------------------------------ Admin
13
-
14
- get '/admin' => 'admin#dashboard', :as => :admin_dashboard
15
- namespace :admin do
16
- resources :users, :except => [:show]
17
- <% if defined?(Page) == 'constant' && Page.class == Class %>
18
- resources :pages, :except => [:show]
19
- <% end %>
20
- <% if defined?(Post) == 'constant' && Post.class == Class %>
21
- resources :posts, :except => [:show]
22
- <% end %>
23
- scope 'json' do
24
- resources :images, only: [:index, :create, :destroy]
25
- end
26
- end
27
-
28
- # ------------------------------------------ Public
29
-
30
- # resources :posts
31
-
32
- # ------------------------------------------ JSON
33
-
34
- # scope 'json' do
35
- # 'posts' => 'posts#index'
36
- # end
37
-
38
- # ------------------------------------------ Root
39
-
40
- root :to => 'home#index'
41
-
42
- end
@@ -1,15 +0,0 @@
1
- #
2
- # This file is for storing NON-SENSITIVE settings.
3
- #
4
- # Values here are loaded into the SETTINGS constant. For example, below you can
5
- # access "Hello" through SETTINGS['say']['hello']
6
- #
7
- development: &default
8
- say:
9
- hello: "Hello"
10
-
11
- test:
12
- <<: *default
13
-
14
- production:
15
- <<: *default
@@ -1,15 +0,0 @@
1
- # Copy this file to config/settings_private.yml then input all your settings
2
- # here. This file is tracked by Git and is used as a starting point for
3
- # sensitive data.
4
- #
5
- # Values here are loaded into the PRIVATE constant. For example, below you can
6
- # access "ABC123" through PRIVATE['my_special_key']
7
- #
8
- development: &default
9
- my_special_key: "ABC123"
10
-
11
- test:
12
- <<: *default
13
-
14
- production:
15
- <<: *default
@@ -1,13 +0,0 @@
1
- # This file is for storing SENSITIVE settings. This file is not tracked.
2
- #
3
- # Values here are loaded into the PRIVATE constant. For example, below you can
4
- # access "ABC123" through PRIVATE['my_special_key']
5
- #
6
- development: &default
7
- my_special_key: "ABC123"
8
-
9
- test:
10
- <<: *default
11
-
12
- production:
13
- <<: *default
@@ -1,24 +0,0 @@
1
- class CreatePages < ActiveRecord::Migration
2
-
3
- def up
4
- create_table :pages do |t|
5
- t.string :title
6
- t.text :body
7
- t.text :description
8
- t.string :template
9
- t.string :slug
10
- t.string :ancestry
11
- t.integer :position
12
- t.boolean :in_nav
13
- t.datetime :active_at, default: nil
14
- t.datetime :inactive_at, default: nil
15
- t.json :template_data
16
- t.timestamps
17
- end
18
- end
19
-
20
- def down
21
- drop_table :pages
22
- end
23
-
24
- end
@@ -1,19 +0,0 @@
1
- class CreatePosts < ActiveRecord::Migration
2
- def up
3
- create_table "posts", force: true do |t|
4
- t.string "title"
5
- t.text "body"
6
- t.string "slug"
7
- t.datetime "active_at"
8
- t.datetime "inactive_at"
9
- t.datetime "created_at"
10
- t.datetime "updated_at"
11
- t.string "main_image"
12
- t.integer "user_id"
13
- t.boolean "is_featured", default: false
14
- end
15
- end
16
- def down
17
- remove_table :posts
18
- end
19
- end
data/lib/help/cambium DELETED
@@ -1,7 +0,0 @@
1
-
2
- Usage:
3
- bundle exec cambium [ACTION]
4
-
5
- [ACTION] Options:
6
-
7
- [setup] Run setup commands