camaleon_cms 0.2.1 → 1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of camaleon_cms might be problematic. Click here for more details.

Files changed (266) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +266 -0
  3. data/app/apps/plugins/attack/config/config.json +1 -1
  4. data/app/apps/plugins/contact_form/config/config.json +1 -1
  5. data/app/apps/plugins/contact_form/contact_form_html_helper.rb +15 -10
  6. data/app/apps/plugins/contact_form/front_controller.rb +1 -0
  7. data/app/apps/plugins/contact_form/views/admin_forms/edit.html.erb +1 -2
  8. data/app/apps/plugins/contact_form/views/admin_forms/index.html.erb +1 -1
  9. data/app/apps/plugins/contact_form/views/admin_forms/responses.html.erb +1 -1
  10. data/app/apps/plugins/contact_form/views/forms_shorcode.html.erb +6 -6
  11. data/app/apps/plugins/front_cache/config/config.json +1 -1
  12. data/app/apps/plugins/front_cache/views/admin/settings.html.erb +1 -1
  13. data/app/apps/plugins/visibility_post/config/config.json +1 -1
  14. data/app/apps/themes/camaleon_first/assets/css/style-ver.css.scss +59 -32
  15. data/app/apps/themes/camaleon_first/views/layouts/index.html.erb +2 -2
  16. data/app/apps/themes/default/assets/css/style.css.scss +3 -0
  17. data/app/apps/themes/default/views/category.html.erb +1 -1
  18. data/app/apps/themes/default/views/post_tag.html.erb +1 -1
  19. data/app/apps/themes/default/views/post_type.html.erb +1 -1
  20. data/app/apps/themes/default/views/search.html.erb +1 -1
  21. data/app/apps/themes/new/views/category.html.erb +1 -1
  22. data/app/apps/themes/new/views/layouts/index.html.erb +2 -2
  23. data/app/apps/themes/new/views/post_tag.html.erb +1 -1
  24. data/app/apps/themes/new/views/post_type.html.erb +1 -1
  25. data/app/apps/themes/new/views/search.html.erb +1 -1
  26. data/app/assets/{stylesheets/admin/bootstrap/images → images/admin}/glyphicons-halflings.png +0 -0
  27. data/app/assets/javascripts/admin/actions.js +12 -205
  28. data/app/assets/javascripts/admin/admin-basic-manifest.js +3 -0
  29. data/app/assets/javascripts/admin/admin-manifest.js +14 -4
  30. data/app/assets/javascripts/admin/custom_fields.js +4 -2
  31. data/app/assets/javascripts/admin/data.js +49 -20
  32. data/app/assets/javascripts/admin/elfinder/upload_elfinder.js +4 -4
  33. data/app/assets/javascripts/admin/grid-editor.js +390 -113
  34. data/app/assets/javascripts/admin/i18n.js +22 -0
  35. data/app/assets/javascripts/admin/jquery.validate.js +2 -54
  36. data/app/assets/javascripts/admin/{core.js → libraries.js} +92 -76
  37. data/app/assets/javascripts/admin/login_manifest.js +0 -3
  38. data/app/assets/javascripts/admin/lte/app.js +758 -0
  39. data/app/assets/javascripts/admin/modal.js +76 -22
  40. data/app/assets/javascripts/admin/nav-menu.js +98 -39
  41. data/app/assets/javascripts/admin/post.js +28 -29
  42. data/app/assets/javascripts/admin/tinymce/skins/lightgray/content.min.css.scss +1 -1
  43. data/app/assets/javascripts/admin/tinymce/tinymce.min.js +11 -11
  44. data/app/assets/javascripts/admin/translator.js +9 -7
  45. data/app/assets/javascripts/admin/widgets.js +1 -0
  46. data/app/assets/stylesheets/admin/admin-basic-manifest.css +15 -0
  47. data/app/assets/stylesheets/admin/admin-manifest.css +7 -11
  48. data/app/assets/stylesheets/admin/bootstrap-datepicker.css.scss +472 -0
  49. data/app/assets/stylesheets/admin/bootstrap-datetimepicker.css.scss +339 -0
  50. data/app/assets/stylesheets/admin/colorpicker.css.scss +95 -0
  51. data/app/assets/stylesheets/admin/custom_admin.css.scss +160 -0
  52. data/app/assets/stylesheets/admin/elfinder-manifest.css +1 -1
  53. data/app/assets/stylesheets/admin/grid-editor.css.scss +14 -299
  54. data/app/assets/stylesheets/admin/lte/admin.css.scss +4747 -0
  55. data/app/assets/stylesheets/admin/lte/skins/skin-black-light.css +176 -0
  56. data/app/assets/stylesheets/admin/lte/skins/skin-black.css +154 -0
  57. data/app/assets/stylesheets/admin/lte/skins/skin-blue-light.css +167 -0
  58. data/app/assets/stylesheets/admin/lte/skins/skin-blue.css +142 -0
  59. data/app/assets/stylesheets/admin/lte/skins/skin-green-light.css +156 -0
  60. data/app/assets/stylesheets/admin/lte/skins/skin-green.css +134 -0
  61. data/app/assets/stylesheets/admin/lte/skins/skin-purple-light.css +156 -0
  62. data/app/assets/stylesheets/admin/lte/skins/skin-purple.css +134 -0
  63. data/app/assets/stylesheets/admin/lte/skins/skin-red-light.css +156 -0
  64. data/app/assets/stylesheets/admin/lte/skins/skin-red.css +134 -0
  65. data/app/assets/stylesheets/admin/lte/skins/skin-yellow-light.css +156 -0
  66. data/app/assets/stylesheets/admin/lte/skins/skin-yellow.css +134 -0
  67. data/app/assets/stylesheets/admin/nav-menu.css.scss +33 -0
  68. data/app/controllers/admin/appearances/nav_menus_controller.rb +13 -10
  69. data/app/controllers/admin/appearances/themes_controller.rb +1 -2
  70. data/app/controllers/admin/appearances_controller.rb +0 -4
  71. data/app/controllers/admin/categories_controller.rb +9 -15
  72. data/app/controllers/admin/comments_controller.rb +8 -14
  73. data/app/controllers/admin/grid_editor_controller.rb +55 -0
  74. data/app/controllers/admin/installers_controller.rb +1 -1
  75. data/app/controllers/admin/media_controller.rb +1 -3
  76. data/app/controllers/admin/plugins_controller.rb +2 -2
  77. data/app/controllers/admin/post_tags_controller.rb +9 -18
  78. data/app/controllers/admin/posts/drafts_controller.rb +1 -9
  79. data/app/controllers/admin/posts_controller.rb +12 -15
  80. data/app/controllers/admin/sessions_controller.rb +6 -7
  81. data/app/controllers/admin/settings/custom_fields_controller.rb +4 -9
  82. data/app/controllers/admin/settings/post_types_controller.rb +6 -16
  83. data/app/controllers/admin/settings/sites_controller.rb +5 -7
  84. data/app/controllers/admin/settings_controller.rb +0 -4
  85. data/app/controllers/admin/user_roles_controller.rb +8 -8
  86. data/app/controllers/admin/users_controller.rb +8 -9
  87. data/app/controllers/admin_controller.rb +4 -5
  88. data/app/controllers/apps/plugins_admin_controller.rb +3 -3
  89. data/app/controllers/apps/plugins_front_controller.rb +2 -2
  90. data/app/controllers/apps/themes_admin_controller.rb +2 -2
  91. data/app/controllers/apps/themes_front_controller.rb +2 -2
  92. data/app/controllers/camaleon_controller.rb +0 -1
  93. data/app/controllers/concerns/frontend_concern.rb +1 -2
  94. data/app/controllers/frontend_controller.rb +25 -9
  95. data/app/decorators/category_decorator.rb +0 -1
  96. data/app/decorators/custom_field_decorator.rb +0 -1
  97. data/app/decorators/custom_fields_concern.rb +9 -3
  98. data/app/decorators/post_comment_decorator.rb +0 -1
  99. data/app/decorators/post_decorator.rb +10 -4
  100. data/app/decorators/post_tag_decorator.rb +0 -1
  101. data/app/decorators/post_type_decorator.rb +0 -1
  102. data/app/decorators/site_decorator.rb +35 -11
  103. data/app/decorators/term_taxonomy_decorator.rb +1 -3
  104. data/app/decorators/theme_decorator.rb +0 -1
  105. data/app/decorators/user_decorator.rb +7 -5
  106. data/app/decorators/widget_decorator.rb +0 -1
  107. data/app/helpers/admin/application_helper.rb +14 -0
  108. data/app/helpers/admin/menus_helper.rb +8 -8
  109. data/app/helpers/camaleon_helper.rb +10 -3
  110. data/app/helpers/captcha_helper.rb +2 -2
  111. data/app/helpers/frontend/application_helper.rb +0 -1
  112. data/app/helpers/frontend/nav_menu_helper.rb +2 -1
  113. data/app/helpers/frontend/seo_helper.rb +1 -2
  114. data/app/helpers/frontend/site_helper.rb +4 -4
  115. data/app/helpers/hooks_helper.rb +2 -5
  116. data/app/helpers/html_helper.rb +9 -7
  117. data/app/helpers/plugins_helper.rb +34 -8
  118. data/app/helpers/session_helper.rb +1 -2
  119. data/app/helpers/short_code_helper.rb +91 -10
  120. data/app/helpers/site_helper.rb +17 -8
  121. data/app/helpers/theme_helper.rb +34 -7
  122. data/app/helpers/uploader_helper.rb +6 -2
  123. data/app/mailers/html_mailer.rb +15 -6
  124. data/app/models/category.rb +2 -1
  125. data/app/models/concerns/custom_fields_read.rb +14 -3
  126. data/app/models/concerns/metas.rb +7 -4
  127. data/app/models/custom_field_group.rb +3 -0
  128. data/app/models/{concerns/metas_saved.rb → grid_template.rb} +7 -2
  129. data/app/models/meta.rb +0 -1
  130. data/app/models/nav_menu.rb +15 -1
  131. data/app/models/nav_menu_item.rb +10 -0
  132. data/app/models/post.rb +100 -6
  133. data/app/models/post_comment.rb +6 -0
  134. data/app/models/post_default.rb +9 -8
  135. data/app/models/post_relationship.rb +2 -0
  136. data/app/models/post_type.rb +36 -24
  137. data/app/models/site.rb +7 -16
  138. data/app/models/term_taxonomy.rb +3 -2
  139. data/app/models/theme.rb +5 -0
  140. data/app/models/widget/assigned.rb +3 -2
  141. data/app/views/admin/appearances/nav_menus/_custom_fields.html.erb +6 -0
  142. data/app/views/admin/appearances/{_external_menu.html.erb → nav_menus/_external_menu.html.erb} +8 -10
  143. data/app/views/admin/appearances/nav_menus/_menu_form.html.erb +35 -0
  144. data/app/views/admin/appearances/nav_menus/_menu_list.html.erb +22 -0
  145. data/app/views/admin/appearances/nav_menus/index.html.erb +110 -0
  146. data/app/views/admin/appearances/themes/index.html.erb +4 -3
  147. data/app/views/admin/appearances/widgets/main/_sidebar.html.erb +29 -0
  148. data/app/views/admin/appearances/widgets/main/form.html.erb +1 -1
  149. data/app/views/admin/appearances/widgets/main/index.html.erb +19 -41
  150. data/app/views/admin/categories/edit.html.erb +2 -6
  151. data/app/views/admin/categories/index.html.erb +7 -11
  152. data/app/views/admin/comments/form.html.erb +4 -7
  153. data/app/views/admin/comments/index.html.erb +24 -41
  154. data/app/views/admin/comments/reply.html.erb +9 -10
  155. data/app/views/admin/grid_editor/form.html.erb +31 -0
  156. data/app/views/admin/grid_editor/index.html.erb +29 -0
  157. data/app/views/admin/media/index.html.erb +3 -15
  158. data/app/views/admin/plugins/_plugins_list.html.erb +1 -2
  159. data/app/views/admin/post_tags/edit.html.erb +2 -6
  160. data/app/views/admin/post_tags/index.html.erb +3 -8
  161. data/app/views/admin/posts/_sidebar.html.erb +136 -0
  162. data/app/views/admin/posts/form.html.erb +87 -281
  163. data/app/views/admin/posts/index.html.erb +89 -104
  164. data/app/views/admin/sessions/forgot.html.erb +7 -13
  165. data/app/views/admin/sessions/login.html.erb +21 -11
  166. data/app/views/admin/sessions/register.html.erb +3 -6
  167. data/app/views/admin/settings/custom_fields/_meta_data.html.erb +1 -1
  168. data/app/views/admin/settings/custom_fields/_render.html.erb +6 -14
  169. data/app/views/admin/settings/custom_fields/fields/audio.html.erb +1 -1
  170. data/app/views/admin/settings/custom_fields/fields/field_attrs.html.erb +3 -5
  171. data/app/views/admin/settings/custom_fields/fields/file.html.erb +1 -1
  172. data/app/views/admin/settings/custom_fields/fields/image.html.erb +1 -1
  173. data/app/views/admin/settings/custom_fields/fields/posts.html.erb +1 -1
  174. data/app/views/admin/settings/custom_fields/fields/select.html.erb +1 -1
  175. data/app/views/admin/settings/custom_fields/fields/users.html.erb +1 -1
  176. data/app/views/admin/settings/custom_fields/fields/video.html.erb +1 -1
  177. data/app/views/admin/settings/custom_fields/form.html.erb +11 -9
  178. data/app/views/admin/settings/custom_fields/get_items.html.erb +3 -6
  179. data/app/views/admin/settings/custom_fields/index.html.erb +3 -10
  180. data/app/views/admin/settings/languages.html.erb +2 -10
  181. data/app/views/admin/settings/post_types/_form.html.erb +1 -1
  182. data/app/views/admin/settings/post_types/edit.html.erb +2 -6
  183. data/app/views/admin/settings/post_types/index.html.erb +4 -12
  184. data/app/views/admin/settings/site.html.erb +143 -149
  185. data/app/views/admin/settings/sites/form.html.erb +4 -19
  186. data/app/views/admin/settings/sites/index.html.erb +8 -9
  187. data/app/views/admin/taxonomy/index.html.erb +1 -1
  188. data/app/views/admin/user_roles/form.html.erb +2 -3
  189. data/app/views/admin/user_roles/index.html.erb +2 -8
  190. data/app/views/admin/users/form.html.erb +14 -9
  191. data/app/views/admin/users/index.html.erb +3 -8
  192. data/app/views/admin/users/profile_edit.html.erb +21 -14
  193. data/app/views/default_theme/custom_fields/audio.html.erb +3 -0
  194. data/app/views/default_theme/custom_fields/checkbox.html.erb +3 -0
  195. data/app/views/default_theme/custom_fields/checkboxes.html.erb +3 -0
  196. data/app/views/default_theme/custom_fields/colorpicker.html.erb +3 -0
  197. data/app/views/default_theme/custom_fields/date.html.erb +3 -0
  198. data/app/views/default_theme/custom_fields/editor.html.erb +3 -0
  199. data/app/views/default_theme/custom_fields/email.html.erb +3 -0
  200. data/app/views/default_theme/custom_fields/field_attrs.html.erb +3 -0
  201. data/app/views/default_theme/custom_fields/file.html.erb +3 -0
  202. data/app/views/default_theme/custom_fields/image.html.erb +3 -0
  203. data/app/views/default_theme/custom_fields/numeric.html.erb +3 -0
  204. data/app/views/default_theme/custom_fields/phone.html.erb +3 -0
  205. data/app/views/default_theme/custom_fields/posts.html.erb +3 -0
  206. data/app/views/default_theme/custom_fields/radio.html.erb +3 -0
  207. data/app/views/default_theme/custom_fields/select.html.erb +3 -0
  208. data/app/views/default_theme/custom_fields/select_eval.html.erb +3 -0
  209. data/app/views/default_theme/custom_fields/text_area.html.erb +3 -0
  210. data/app/views/default_theme/custom_fields/text_box.html.erb +3 -0
  211. data/app/views/default_theme/custom_fields/url.html.erb +3 -0
  212. data/app/views/default_theme/custom_fields/users.html.erb +3 -0
  213. data/app/views/default_theme/custom_fields/video.html.erb +3 -0
  214. data/app/views/default_theme/layouts/index.html.erb +2 -2
  215. data/app/views/default_theme/{post.html.erb → single.html.erb} +1 -1
  216. data/app/views/default_theme/{post.rss.builder → single.rss.builder} +0 -0
  217. data/app/views/layouts/admin.html.erb +35 -133
  218. data/app/views/layouts/admin/_flash_messages.html.erb +1 -15
  219. data/app/views/layouts/admin/_footer.html.erb +6 -0
  220. data/app/views/layouts/admin/_header.html.erb +51 -0
  221. data/app/views/layouts/admin/_sidebar.html.erb +21 -30
  222. data/app/views/layouts/admin/installer.html.erb +2 -2
  223. data/app/views/layouts/login.html.erb +15 -33
  224. data/config/initializers/active_record_extension.rb +14 -2
  225. data/config/initializers/assets.rb +21 -7
  226. data/config/initializers/page_caching.rb +1 -2
  227. data/config/locales/admin/en.yml +17 -9
  228. data/config/locales/admin/es.yml +8 -3
  229. data/config/locales/admin/it.yml +4 -2
  230. data/config/locales/admin/js.yml +147 -0
  231. data/config/routes/admin.rb +4 -4
  232. data/config/routes/frontend.rb +2 -2
  233. data/config/system.json +1 -0
  234. data/db/migrate/20150926095310_rename_column_posts.rb +18 -0
  235. data/lib/camaleon_cms.rb +1 -1
  236. data/lib/camaleon_cms/engine.rb +17 -2
  237. data/lib/camaleon_cms/version.rb +1 -1
  238. data/lib/generators/camaleon_cms/gem_plugin_generator.rb +122 -0
  239. data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb +8 -0
  240. data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/front_controller.rb +8 -0
  241. data/lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb +22 -0
  242. data/lib/generators/camaleon_cms/gem_plugin_template/app/models/plugins/my_plugin/my_plugin.rb +12 -0
  243. data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/admin/index.html.erb +2 -0
  244. data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/front/index.html.erb +2 -0
  245. data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/layouts/readme.txt +2 -0
  246. data/lib/generators/camaleon_cms/gem_plugin_template/config/camaleon_plugin.json +21 -0
  247. data/lib/generators/camaleon_cms/install_generator.rb +1 -2
  248. data/lib/generators/camaleon_cms/install_template/plugin_routes.rb +1 -10
  249. data/lib/generators/ctheme_template/app/apps/themes/my_theme/config/config.json +5 -5
  250. data/lib/generators/ctheme_template/app/apps/themes/my_theme/main_helper.rb +6 -5
  251. data/lib/generators/ctheme_template/app/apps/themes/my_theme/views/layouts/index.html.erb +2 -2
  252. data/lib/plugin_routes.rb +40 -2
  253. metadata +257 -22
  254. data/app/assets/stylesheets/admin/animate/animate.min.css +0 -6
  255. data/app/assets/stylesheets/admin/bootstrap/bootstrap-datetimepicker.css.scss +0 -339
  256. data/app/assets/stylesheets/admin/bootstrap/bootstrap.min.css +0 -5
  257. data/app/assets/stylesheets/admin/core.scss +0 -349
  258. data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.eot +0 -0
  259. data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.svg +0 -1831
  260. data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.ttf +0 -0
  261. data/app/assets/stylesheets/admin/fonts/OpenSans-Regular-webfont.woff +0 -0
  262. data/app/assets/stylesheets/admin/nav-menu.css +0 -54
  263. data/app/assets/stylesheets/admin/theme-default.scss +0 -8462
  264. data/app/models/concerns/site_public.rb +0 -23
  265. data/app/views/admin/appearances/menu.html.erb +0 -199
  266. data/lib/Gemfile +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b50e18ba1373540299a6e15770552a38ee6c46e
4
- data.tar.gz: 62c7b76bd64ee158012caa5ce7a5a27a09bf5746
3
+ metadata.gz: 2e69367fceac8dd2ca7e29de702eb29905911505
4
+ data.tar.gz: cbc634628dbce5af53bcc9aebdb10c464dfd811b
5
5
  SHA512:
6
- metadata.gz: 13016956ede770e599d3f96b841d5d2656d8e8822ecd63df8dee9a8a3eb2367957013ec87d0580be1a1dd148a364177ccabfee19668be496dc41cd915506af50
7
- data.tar.gz: 2b1b18d5866277735b92a1efdec56a6709e2e96ffcffa22cb4f5be2c76b54c4974e5f07ddfeb13b0957de6ed70fa4356fa9768c75cad1454556ef2b7403ec013
6
+ metadata.gz: 19395c1a52bd313b6e4741a4a7ca6450f2da54fbb486be7b44c26a7153310daf72a386394c0a0348e0b1d2542a891226941c17e29a9bad8fc04d782dd4527b7b
7
+ data.tar.gz: f9589b0bf5a8e05f870eac03813db2c8c6cb208db52c0d4780c59b56c5f8f8524ed011f00d8fac62946dfd0fe626d0e3de14dc218551a0502dd406c43ac9ee0f
@@ -0,0 +1,266 @@
1
+ ![](https://img.shields.io/badge/Rails-4%2B-green.svg)
2
+ ![](https://img.shields.io/badge/Ruby-1.9.3%2B-green.svg)
3
+ ![](https://img.shields.io/badge/Mysql-100%-green.svg)
4
+ ![](https://img.shields.io/badge/Sqlite-100%-green.svg)
5
+ ![](https://img.shields.io/badge/Postgres-100%-green.svg)
6
+ ![](https://img.shields.io/badge/Tests-In_Progress-red.svg)
7
+ ![](https://img.shields.io/badge/Docs-90%-orange.svg)
8
+ ![](https://img.shields.io/badge/Support-Inmediate-green.svg)
9
+
10
+ [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/owen2345/Camaleon-CMS-Sample)
11
+ # CAMALEON CMS
12
+ ![](http://camaleon.tuzitio.com/media/132/logo2.png)
13
+
14
+ # Requirements
15
+ * Rails 4.1+
16
+ * MySQL 5+ or SQlite or PostgreSQL
17
+ * Ruby 1.9.3+
18
+ * Imagemagick
19
+
20
+ # Installation
21
+ * Install Ruby on Rails 4.1+
22
+ [Visit here.](http://railsapps.github.io/installing-rails.html)
23
+ * Create your rails project
24
+
25
+ ```
26
+ rails new my_project
27
+ ```
28
+ * Add the gem in your Gemfile
29
+
30
+ ```
31
+ gem 'camaleon_cms', '0.2.1' # if you want the previous stable version
32
+ gem 'camaleon_cms' # if you want the latest version (1.0)
33
+ ```
34
+ * Install the gem
35
+
36
+ ```
37
+ bundle install # bundle update if you have previous version installed
38
+ ```
39
+ * Install the CMS (This will copy some basic templates and plugins in your project)
40
+
41
+ ```
42
+ rails generate camaleon_cms:install
43
+ ```
44
+ * Install required Gems for CMS and basic plugins
45
+
46
+ ```
47
+ bundle install
48
+ ```
49
+ * Create database structure
50
+
51
+ ```
52
+ rake db:migrate
53
+ ```
54
+ * Start your server
55
+
56
+ ```
57
+ rails server # and then go to your browser http://localhost:3000/
58
+ ```
59
+
60
+ # Migrating from 0.2.x or earlier?
61
+
62
+ 1. Install camaleon as a gem as stated above or run `bundle update 'camaleon_cms'`
63
+ 1. Remove `lib/Gemfile_camaleon`
64
+
65
+ ```bash
66
+ rm lib/Gemfile_camaleon
67
+ ```
68
+ 1. Install gems
69
+
70
+ ```bash
71
+ bundle install
72
+ ```
73
+ 1. Update `lib/plugin_routes.rb`
74
+
75
+ ```bash
76
+ rails generate camaleon_cms:install
77
+ ```
78
+ 1. Start/restart Rails
79
+
80
+ ```bash
81
+ rails server
82
+ ```
83
+
84
+ # Camaleon CMS (It adapts to your needs)
85
+
86
+ Camaleon CMS is a dynamic and advanced content management system based on Ruby on Rails 4 and Ruby 1.9.3+. This CMS is an alternative to wordpress for Ruby on Rails developers to manage advanced contents easily.
87
+ Camaleon CMS is a flexible manager where you can build your custom content structure without coding anything by custom fields and custom contents type.
88
+
89
+ To download or publish themes go to themes store:
90
+ http://camaleon.tuzitio.com/store/themes
91
+
92
+ To download or publish plugins go to plugins store:
93
+ http://camaleon.tuzitio.com/store/plugins
94
+
95
+ ## Camaleon CMS is FREE and Open source
96
+ It was released on July, 2015 and tested previously with more than 20 projects by 6 months and on august 22, 2015 was published as a gem.
97
+
98
+ ![](http://camaleon.tuzitio.com/media/132/multi-language.png)
99
+
100
+ ## With Camaleon you can do:
101
+ * Multiples sites in the same installation
102
+ * Multilanguage sites
103
+ * Extend or customize the functionalities by plugins
104
+ * Manage your content visualization by themes
105
+ * Advanced User roles
106
+ * Other features:
107
+ - Shortcodes
108
+ - Widgets
109
+ - Drag and Drop / Sortable / Multi level menus
110
+ - Templates for pages
111
+ - Easy migration from wordpress
112
+
113
+ ## Some features are:
114
+ * Easy administration
115
+ Camaleon CMS permit you to adapt the CMS to all your needs and not you adapt to the CMS.
116
+ * Security
117
+ - Remote code execution
118
+ - SQL injections
119
+ - Advanced sessions security
120
+ - Cross Site Scripting
121
+ - Control of abusive requests
122
+ - Cross-Site Request Forgery
123
+ * Site Speed
124
+ Camaleon CMS include a lot of cache strategies to optimize the site access velocity:
125
+ - Cache contents
126
+ - Cache queries
127
+ - Manifests (compress and join asset files)
128
+ Customize your content for Desktop, Mobile and Tablet
129
+ * SEO & HTML5
130
+ - Automatic Sitemap generations
131
+ - Seo Configuration
132
+ - Seo for social media
133
+ - Customize your content for Desktop, Mobile and Tablet
134
+ - All generated content is compatible with HTML5
135
+
136
+ ## Camaleon CMS come with basic and important plugins like:
137
+ * Ecommerce
138
+ * Visibility content
139
+ * Web attack control
140
+ * Contact forms
141
+ * Cache content
142
+ * Content reorder
143
+ * many others [here.](https://github.com/owen2345/Camaleon-CMS-Sample)
144
+
145
+ ## Demonstration
146
+ * [Camaleon Server (current version)](http://camaleon.tuzitio.com/plugins/demo_manage/)
147
+ * [Deploy in Heroku](https://heroku.com/deploy?template=https://github.com/owen2345/Camaleon-CMS-Sample)
148
+
149
+ ## Support
150
+ If you have problems, please enter an issue [here.](https://github.com/owen2345/camaleon-cms/issues)
151
+ If you need support, need some extra functionality or need plugins, please contact us on:
152
+ * Site: http://camaleon.tuzitio.com/
153
+ * Email: owenperedo@gmail.com
154
+ * Skype: owen-2345
155
+
156
+ ## Author
157
+ Owen Peredo Diaz
158
+
159
+ ## License
160
+ http://camaleon.tuzitio.com/license.html/
161
+
162
+ ## Coming soon
163
+ * Documentation and Videos
164
+ * Create more basic plugins
165
+
166
+ ## Contributing
167
+ * Fork it.
168
+ * Create a branch (git checkout -b my_feature_branch)
169
+ * Commit your changes (git commit -am "Added a sweet feature")
170
+ * Push to the branch (git push origin my_feature_branch)
171
+ * Create a pull request from your branch into master (Please be sure to provide enough detail for us to cipher what this change is doing)
172
+
173
+ Visit the web site for more information: http://camaleon.tuzitio.com/
174
+
175
+ ## Version History
176
+ ### 1.0
177
+ * new template for admin panel
178
+ * gem plugin generator
179
+ console:
180
+ rails g camaleon_cms:gem_plugin post_reorder
181
+ bundle install
182
+ visit frontend: http://localhost:3000/plugins/post_reorder/index
183
+ visit backend: http://localhost:3000/admin/plugins/post_reorder/index
184
+ Check here to publish your gem http://guides.rubygems.org/publishing/
185
+ * gem plugin support added
186
+ * changed post structure to improve sql query
187
+ * added custom field orderer
188
+ sort_by_field(...)
189
+ sample: Site.first.posts.sort_by_field("untitled-field-attributes", "desc")
190
+ * Added layouts selector like template selector
191
+ * Added support custom fields for menu items
192
+ Add any custom fields into menus and it will appear for each menu item (ideal to add icons or custom text for each menu)
193
+ * I18n(..) for javascript
194
+ You don't need to print your translations in html, put your translations in:
195
+ Sample:
196
+ ``en:
197
+ admin:
198
+ js:
199
+ button
200
+ my_text: "asasa"
201
+
202
+ I18n("button.my_text")``
203
+ * hooks for email
204
+ * shortcodes support for content editor
205
+ * hook "user_update_more_actions" to add more action in user profile
206
+ * added slug render support for categories, post_types, post_tags. Check doc.
207
+ * fixed the default view "post.html.erb" into "single.html.erb". Check doc.
208
+ * added the_field!(..) and get_field!(..) method in custom fields to manage empty values. Check doc.
209
+ * added a control for logged users the_edit_link
210
+ * added the_author method for posts
211
+ * added the_categories method for sites
212
+ * added cama_edit_link(...) to create common edit links anywhere, this verify if current visitor was logged in
213
+ * added default shortcodes: load_libreries (load custom libraries), asset (render an url or image tag with the url), post_url (render an url for a post by id or slug)
214
+ * fixed shortcode to support shortcodes with almost the same name. sample: [asset] [asset_path]
215
+ * added method cama_strip_shortcodes(..) to strip all shortcodes
216
+ * added get_fields(..) to get multiple values of a custom field
217
+ * added filters for categories (.no_empty, .empty)
218
+ * Added method for post: set_summary(..)
219
+ * Added method for post: set_thumb(..)
220
+ * Added method for post: increment_visits!
221
+ * Added method for post: total_visits
222
+ * Added method for post: total_comments
223
+ * Added extra support values for method add_post(..) in post_type object
224
+ * Added shortcode "post_url"
225
+ Permit to generate the url of a post (add path='' to generate the path and not the full url,
226
+ add id='123' to use the POST ID,
227
+ add key='my_slug' to use the POST SLUG,
228
+ add link='true' to generate the full link,
229
+ add title='my title' text of the link (default post title),
230
+ add target='_blank' to open the link in a new window this is valid only if link is present),
231
+ sample: [post_url id='122' link=true target='_blank']
232
+ * Added shortcode "asset"
233
+ Permit to generate an asset url (
234
+ add file='' asset file path,
235
+ add as_path='true' to generate only the path and not the full url,
236
+ add class='my_class' to setup image class,
237
+ add style='height: 100px; width: 200px;...' to setup image style,
238
+ add image='true' to generate the image tag with this url),
239
+ sample: <img src=\"[asset as_path='true' file='themes/my_theme/assets/img/signature.png']\" /> or [asset image='true' file='themes/my_theme/assets/img/signature.png' style='height: 50px;']
240
+ * Added shortcode "custom_field"
241
+ Permit you to include your custom fields in anywhere.
242
+ key: slug or key of the custom_field
243
+ attrs: custom html attributes
244
+ render: (true) enable to render the custom field as html. (Sample text_field: <span>my_field_value</span>)
245
+ post_slug: (Optional, default current post) slug or key of a Post.
246
+ Sample1: [custom_field key='subtitle']
247
+ Sample2: [custom_field key='subtitle' post_slug='contact' render=true attrs='style=\"width: 50px;\"'] // return the custom field of page with slug = contact
248
+
249
+ ### 0.2.1
250
+ * fixed sprockets problem: https://github.com/owen2345/camaleon-cms/issues/53
251
+
252
+ ### 0.2.0
253
+ * datetimepicker
254
+ * Plugin files separated in two files, please update with: rails g camaleon_cms:install //and replace plugin_routes.rb
255
+ * Added the edit url for post/posttypes/categories
256
+ * Added plugin upgrade support
257
+ * Added confirm for disable/enable a plugin
258
+
259
+ ### 0.1.10
260
+ * Fix rufus initializer
261
+ * Changed plugins documentation link
262
+ * Fixed current locale for editors
263
+ * Rails 4.1 support added
264
+
265
+ ### 0.1.6
266
+ * Added Italian language support
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "title": "Attack",
3
- "descr": "",
3
+ "descr": "Please check documentation <a href='http://camaleon.tuzitio.com/store/plugins/2'>here.</a>",
4
4
  "version": "0.1",
5
5
  "key": "attack",
6
6
  "position": 1,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "title": "Contact Form",
3
- "descr": "",
3
+ "descr": "Please check documentation <a href='http://camaleon.tuzitio.com/store/plugins/4'>here.</a>",
4
4
  "version": "0.1",
5
5
  "key": "contact_form",
6
6
  "helpers": [
@@ -28,7 +28,7 @@ module Plugins::ContactForm::ContactFormHtmlHelper
28
28
  end
29
29
 
30
30
  # form contact with css bootstrap
31
- def form_element_bootstrap_object(form, object)
31
+ def form_element_bootstrap_object(form, object, values)
32
32
  html = ""
33
33
 
34
34
  object.each do |ob|
@@ -46,29 +46,31 @@ module Plugins::ContactForm::ContactFormHtmlHelper
46
46
  field_options = ob[:field_options]
47
47
  for_name = ob[:label].to_s
48
48
  f_name = "fields[#{ob[:cid]}]"
49
+ cid = ob[:cid].to_sym
50
+
49
51
  temp2 = ""
50
52
 
51
53
  case ob[:field_type].to_s
52
54
  when 'paragraph','textarea'
53
- temp2 = "<textarea #{ob[:custom_attrs].to_attr_format} name=\"#{f_name}\" maxlength=\"#{field_options[:maxlength]}\" class=\"#{ob[:custom_class]} \"></textarea>"
55
+ temp2 = "<textarea #{ob[:custom_attrs].to_attr_format} name=\"#{f_name}\" maxlength=\"#{field_options[:maxlength]}\" class=\"#{ob[:custom_class]} \">#{values[cid]}</textarea>"
54
56
  when 'radio'
55
- temp2= form_select_multiple_bootstrap(ob, ob[:label], ob[:field_type])
57
+ temp2= form_select_multiple_bootstrap(ob, ob[:label], ob[:field_type],values)
56
58
  when 'checkboxes'
57
- temp2= form_select_multiple_bootstrap(ob, ob[:label], "checkbox")
59
+ temp2= form_select_multiple_bootstrap(ob, ob[:label], "checkbox",values)
58
60
  when 'text', 'website', 'email'
59
61
  class_type = ""
60
62
 
61
63
  class_type = "railscf-field-#{ob[:field_type]}" if ob[:field_type]=="website"
62
64
  class_type = "railscf-field-#{ob[:field_type]}" if ob[:field_type]=="email"
63
65
 
64
- temp2= "<input #{ob[:custom_attrs].to_attr_format} type=\"#{ob[:field_type]}\" value=\"#{}\" name=\"#{f_name}\" class=\"#{ob[:custom_class]} #{class_type}\">"
66
+ temp2= "<input #{ob[:custom_attrs].to_attr_format} type=\"#{ob[:field_type]}\" value=\"#{values[cid]}\" name=\"#{f_name}\" class=\"#{ob[:custom_class]} #{class_type}\">"
65
67
  when 'captcha'
66
68
  temp2= captcha_tag(5, {}, {class: "#{ob[:custom_class]} field-captcha required"}.merge(ob[:custom_attrs]))
67
69
  when 'file'
68
70
  class_type = "railscf-field-#{ob[:field_type]}" if ob[:field_type]=="website"
69
- temp2= "<input multiple=\"multiple\" type=\"file\" value=\"#{}\" name=\"#{f_name}\" #{ob[:custom_attrs].to_attr_format} class=\"#{class_type} #{ob[:custom_class]}\">"
71
+ temp2= "<input multiple=\"multiple\" type=\"file\" value=\"\" name=\"#{f_name}\" #{ob[:custom_attrs].to_attr_format} class=\"#{class_type} #{ob[:custom_class]}\">"
70
72
  when 'dropdown'
71
- temp2= form_select_multiple_bootstrap(ob, ob[:label], "select")
73
+ temp2= form_select_multiple_bootstrap(ob, ob[:label], "select",values)
72
74
  else
73
75
  end
74
76
  r[:template] = r[:template].sub('[label ci]', for_name).sub('[ci]', temp2)
@@ -78,7 +80,7 @@ module Plugins::ContactForm::ContactFormHtmlHelper
78
80
  html
79
81
  end
80
82
 
81
- def form_select_multiple_bootstrap(ob, title, type)
83
+ def form_select_multiple_bootstrap(ob, title, type, values)
82
84
 
83
85
  options = ob[:field_options][:options]
84
86
  include_other_option = ob[:field_options][:include_other_option]
@@ -86,8 +88,11 @@ module Plugins::ContactForm::ContactFormHtmlHelper
86
88
 
87
89
  f_name = "fields[#{ob[:cid]}]"
88
90
  f_label = ""
91
+ cid = ob[:cid].to_sym
89
92
  html = ""
93
+
90
94
  if type=="radio" || type=="checkbox"
95
+
91
96
  other_input = (include_other_option)? "<div class=\"#{type} #{ob[:custom_class]}\"> <label for=\"#{ob[:cid]}\"><input id=\"#{ob[:cid]}-other\" type=\"#{type}\" name=\"#{title.downcase}[]\" class=\"\">Other <input type=\"text\" /></label></div>" : " "
92
97
 
93
98
  else
@@ -103,7 +108,7 @@ module Plugins::ContactForm::ContactFormHtmlHelper
103
108
  </label>
104
109
  </div>"
105
110
  else
106
- html += "<option value=\"#{op[:label].downcase.gsub(" ", "_")}\">#{op[:label]}</option>"
111
+ html += "<option value=\"#{op[:label].downcase.gsub(" ", "_")}\" #{"selected" if "#{op[:label].downcase.gsub(" ", "_")}" == values[cid]} >#{op[:label]}</option>"
107
112
  end
108
113
  end
109
114
 
@@ -154,4 +159,4 @@ module Plugins::ContactForm::ContactFormHtmlHelper
154
159
  html += "</td></tr></tbody></table>"
155
160
  end
156
161
 
157
- end
162
+ end
@@ -88,6 +88,7 @@ class Plugins::ContactForm::FrontController < Apps::PluginsFrontController
88
88
  flash[:notice] = succes.join("<br>")
89
89
  else
90
90
  flash[:error] = errors.join("<br>")
91
+ flash[:values] = fields
91
92
  end
92
93
 
93
94
  redirect_to :back
@@ -269,7 +269,7 @@
269
269
  </div>
270
270
 
271
271
  <script>
272
- run.push(function(){
272
+ jQuery(function($){
273
273
  var options = <%= raw (@form.value ).to_sym %>;
274
274
  var settings = <%= raw (@form.settings ).to_sym %>;
275
275
 
@@ -371,5 +371,4 @@
371
371
  });
372
372
 
373
373
  });
374
-
375
374
  </script>
@@ -54,7 +54,7 @@
54
54
  </tbody>
55
55
  </table>
56
56
  <%= content_tag("div", raw(t('plugin.contact_form.msg_data_found_list')), class: "alert alert-warning") if @forms.empty? %>
57
- <%= will_paginate @forms, renderer: BootstrapPagination::Rails %>
57
+ <%= raw do_pagination(@forms) %>
58
58
  </div>
59
59
  </div>
60
60
  <!-- END BASIC TABLE SAMPLE -->
@@ -50,7 +50,7 @@
50
50
  </tbody>
51
51
  </table>
52
52
  <%= content_tag("div", raw("#{t('admin.message.data_found_list')}"), class: "alert alert-warning") if @forms.empty? %>
53
- <%= will_paginate @forms, renderer: BootstrapPagination::Rails %>
53
+ <%= raw do_pagination(@forms) %>
54
54
  </div>
55
55
  </div>
56
56
 
@@ -2,11 +2,12 @@
2
2
  @form = current_site.contact_forms.where({slug: attributes['slug']}).first
3
3
  if @form.present?
4
4
 
5
- values = JSON.parse(@form.value).to_sym
6
- settings = JSON.parse(@form.settings).to_sym
7
- r = {form: @form, form_class: "railscf-form railscf-form-group", before_form: "", after_form: "", submit: "<div class='form-group'>
5
+ values_fields = (flash[:values].present?)? flash[:values].to_sym : {}
6
+ values = JSON.parse(@form.value).to_sym
7
+ settings = JSON.parse(@form.settings).to_sym
8
+ r = {form: @form, form_class: "railscf-form railscf-form-group", before_form: "", after_form: "", submit: "<div class='form-group'>
8
9
  <button class='submit_btn btn btn-default pull-right' type='submit'>[submit_label]</button>
9
- </div>"}
10
+ </div>"}
10
11
  hooks_run("contact_form_render", r)
11
12
  %>
12
13
  <section>
@@ -14,9 +15,8 @@
14
15
  <%= form_for @form, url: plugins_contact_form_save_form_path, html: {method: "post", class: r[:form_class], multipart: true} do |f| %>
15
16
 
16
17
  <%= hidden_field_tag "id", @form.id %>
17
-
18
18
  <%= render :partial => "flash_messages" %>
19
- <%= raw form_element_bootstrap_object(r[:form], values[:fields]) %>
19
+ <%= raw form_element_bootstrap_object(r[:form], values[:fields], values_fields) %>
20
20
  <% if values[:fields].present? %>
21
21
  <%= raw r[:submit].sub('[submit_label]', settings[:railscf_form_button][:name_button])%>
22
22
  <% end %>