camaleon_cms 1.1.0 → 2.0.1
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.
- checksums.yaml +4 -4
- data/README.md +27 -60
- data/app/apps/plugins/attack/admin_controller.rb +1 -1
- data/app/apps/plugins/attack/attack_helper.rb +4 -4
- data/app/apps/plugins/attack/config/config.json +1 -1
- data/app/apps/plugins/attack/config/custom_models.rb +1 -1
- data/app/apps/plugins/attack/views/admin/settings.html.erb +2 -2
- data/app/apps/plugins/contact_form/admin_forms_controller.rb +8 -7
- data/app/apps/plugins/contact_form/config/custom_models.rb +1 -1
- data/app/apps/plugins/contact_form/contact_form_helper.rb +4 -5
- data/app/apps/plugins/contact_form/contact_form_html_helper.rb +2 -2
- data/app/apps/plugins/contact_form/front_controller.rb +1 -1
- data/app/apps/plugins/contact_form/views/admin_forms/_form.html.erb +5 -5
- data/app/apps/plugins/contact_form/views/admin_forms/edit.html.erb +19 -35
- data/app/apps/plugins/contact_form/views/admin_forms/index.html.erb +3 -3
- data/app/apps/plugins/contact_form/views/admin_forms/responses.html.erb +6 -13
- data/app/apps/plugins/contact_form/views/forms_shorcode.html.erb +1 -1
- data/app/apps/plugins/contact_form/views/front/index.html.erb +1 -1
- data/app/apps/plugins/front_cache/admin_controller.rb +1 -1
- data/app/apps/plugins/front_cache/config/initializer.rb +1 -1
- data/app/apps/plugins/front_cache/front_cache_helper.rb +37 -42
- data/app/apps/plugins/front_cache/views/admin/settings.html.erb +3 -3
- data/app/apps/plugins/visibility_post/config/config.json +1 -1
- data/app/apps/plugins/visibility_post/visibility_post_helper.rb +21 -23
- data/app/apps/themes/camaleon_first/assets/css/main.css +1 -1
- data/app/apps/themes/camaleon_first/assets/js/main.js +1 -1
- data/app/apps/themes/camaleon_first/views/admin/settings.html.erb +1 -1
- data/app/apps/themes/default/views/admin/settings.html.erb +1 -1
- data/app/apps/themes/default/views/category.html.erb +1 -1
- data/app/apps/themes/default/views/layouts/index.html.erb +7 -7
- data/app/apps/themes/default/views/partials/_comments.html.erb +1 -1
- data/app/apps/themes/default/views/partials/_forms.html.erb +2 -2
- data/app/apps/themes/default/views/partials/_search_form.html.erb +4 -4
- data/app/apps/themes/default/views/post_tag.html.erb +1 -1
- data/app/apps/themes/default/views/post_type.html.erb +1 -1
- data/app/apps/themes/default/views/search.html.erb +1 -1
- data/app/apps/themes/new/assets/js/main.js +0 -1
- data/app/apps/themes/new/views/admin/settings.html.erb +1 -1
- data/app/apps/themes/new/views/category.html.erb +1 -1
- data/app/apps/themes/new/views/layouts/_footer.html.erb +0 -1
- data/app/apps/themes/new/views/layouts/_header.html.erb +7 -7
- data/app/apps/themes/new/views/layouts/index.html.erb +0 -1
- data/app/apps/themes/new/views/partials/_comments.html.erb +1 -1
- data/app/apps/themes/new/views/partials/_forms.html.erb +2 -2
- data/app/apps/themes/new/views/partials/_search_form.html.erb +2 -3
- data/app/apps/themes/new/views/post_tag.html.erb +1 -1
- data/app/apps/themes/new/views/post_type.html.erb +1 -1
- data/app/apps/themes/new/views/search.html.erb +1 -1
- data/app/assets/fonts/{glyphicons-halflings-regular.eot → camaleon_cms/glyphicons-halflings-regular.eot} +0 -0
- data/app/assets/fonts/{glyphicons-halflings-regular.svg → camaleon_cms/glyphicons-halflings-regular.svg} +0 -0
- data/app/assets/fonts/{glyphicons-halflings-regular.ttf → camaleon_cms/glyphicons-halflings-regular.ttf} +0 -0
- data/app/assets/fonts/{glyphicons-halflings-regular.woff → camaleon_cms/glyphicons-halflings-regular.woff} +0 -0
- data/app/assets/images/camaleon_cms/admin/admin_spinner.gif +0 -0
- data/app/assets/images/{admin → camaleon_cms/admin}/glyphicons-halflings.png +0 -0
- data/app/assets/images/{admin → camaleon_cms/admin}/intro/menus.png +0 -0
- data/app/assets/images/{admin → camaleon_cms/admin}/no_image.jpg +0 -0
- data/app/assets/images/{bg-tree.jpeg → camaleon_cms/bg-tree.jpeg} +0 -0
- data/app/assets/images/{camaleon-dark.png → camaleon_cms/camaleon-dark.png} +0 -0
- data/app/assets/images/camaleon_cms/camaleon.png +0 -0
- data/app/assets/images/{category-icon.png → camaleon_cms/category-icon.png} +0 -0
- data/app/assets/images/camaleon_cms/favicon.ico +0 -0
- data/app/assets/images/{image-not-found.png → camaleon_cms/image-not-found.png} +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/de.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/en.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/es.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/fr.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/it.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/pt.png +0 -0
- data/app/assets/images/camaleon_cms/language/pt_br.png +0 -0
- data/app/assets/images/{language → camaleon_cms/language}/zh.png +0 -0
- data/app/assets/images/{loader.gif → camaleon_cms/loader.gif} +0 -0
- data/app/assets/images/{users → camaleon_cms/users}/no-image.jpg +0 -0
- data/app/assets/javascripts/{admin/actions.js → camaleon_cms/admin/_actions.js} +3 -5
- data/app/assets/javascripts/camaleon_cms/admin/_custom_fields.js +178 -0
- data/app/assets/javascripts/{admin/data.js → camaleon_cms/admin/_data.js} +4 -9
- data/app/assets/javascripts/{admin/i18n.js → camaleon_cms/admin/_i18n.js} +10 -4
- data/app/assets/javascripts/{admin/jquery-ui.min.js → camaleon_cms/admin/_jquery-ui.min.js} +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/_jquery.slugify.js +67 -0
- data/app/assets/javascripts/{admin/jquery.tagsinput.min.js → camaleon_cms/admin/_jquery.tagsinput.min.js} +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/_libraries.js +339 -0
- data/app/assets/javascripts/{admin/modal.js → camaleon_cms/admin/_modal.js} +42 -25
- data/app/assets/javascripts/camaleon_cms/admin/_post.js +303 -0
- data/app/assets/javascripts/{admin/translator.js → camaleon_cms/admin/_translator.js} +4 -3
- data/app/assets/javascripts/{admin/underscore.js → camaleon_cms/admin/_underscore.js} +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/admin-basic-manifest.js +3 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/admin-manifest.js +23 -18
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/bootstrap-colorpicker.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/bootstrap-datepicker.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/bootstrap-datetimepicker.min.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/bootstrap-select.js +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/custom_fields_form.js +69 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/form-builder/formbuilder.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/form-builder/vendor.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/form/cropper.min.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/form/jquery.form.js +0 -0
- data/app/assets/javascripts/{admin/introjs/intro.min.js → camaleon_cms/admin/introjs/_intro.min.js} +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/jquery-sieve.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/jquery.nestable.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/jquery.validate.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin/jquery_validate}/es.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin/jquery_validate}/it.js +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/pt_br.js +74 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/login.js.coffee +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/login_manifest.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/lte/app.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/nav-menu.js +5 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/plugins.js +0 -0
- data/app/assets/javascripts/{admin/tageditor/jquery.caret.min.js → camaleon_cms/admin/tageditor/_jquery.caret.min.js} +0 -0
- data/app/assets/javascripts/{admin/tageditor/jquery.tag-editor.js → camaleon_cms/admin/tageditor/_jquery.tag-editor.js} +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/langs/en.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/langs/es.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/langs/it.js +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/tinymce/langs/pt_br.js +219 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/langs/readme.md +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/filemanager/plugin.min.js +3 -4
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/plugins/visualblocks/css/visualblocks.css +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/content.min.css.scss +2 -2
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce-small.svg +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce.svg +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/img/object.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/skins/lightgray/img/trans.gif +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/themes/modern/theme.min.js +0 -0
- data/app/assets/javascripts/{admin → camaleon_cms/admin}/tinymce/tinymce.min.js +0 -0
- data/app/assets/javascripts/camaleon_cms/admin/uploader/_jquery.uploadfile.min.js +8 -0
- data/app/assets/javascripts/camaleon_cms/admin/uploader/_media_manager.js.coffee +161 -0
- data/app/assets/javascripts/camaleon_cms/admin/uploader/uploader_manifest.js +2 -0
- data/app/assets/javascripts/camaleon_cms/admin/user_profile.js +70 -0
- data/app/assets/javascripts/{bootstrap.min.js → camaleon_cms/bootstrap.min.js} +0 -0
- data/app/assets/javascripts/{gibberish-aes.js → camaleon_cms/gibberish-aes.js} +0 -0
- data/app/assets/stylesheets/camaleon_cms/admin/_custom_admin.css.scss +267 -0
- data/app/assets/stylesheets/{admin/jquery.tagsinput.css → camaleon_cms/admin/_jquery.tagsinput.css} +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/admin-basic-manifest.css +3 -3
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/admin-manifest.css +16 -8
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/bootstrap-datepicker.css.scss +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/bootstrap-datetimepicker.css.scss +1 -1
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/colorpicker.css.scss +4 -4
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/cropper/cropper.min.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/form-builder/formbuilder.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/bg.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/colorpicker/alpha.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/colorpicker/hue.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/colorpicker/saturation.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/girls-1.jpg +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/jquery/resize-icon.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/loading.gif +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/logo-small.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/logo.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/no_image.jpg +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/rormeleon-white.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/img/thumb_no_found.jpg +0 -0
- data/app/assets/stylesheets/{admin/introjs/introjs.min.css → camaleon_cms/admin/introjs/_introjs.min.css} +0 -0
- data/app/assets/stylesheets/{admin/jquery/jquery-ui.scss → camaleon_cms/admin/jquery/_jquery-ui.scss} +16 -16
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_454545_256x240.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_888888_256x240.png +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/jquery/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/stylesheets/{admin/lte/admin.css.scss → camaleon_cms/admin/lte/_admin.css.scss} +4 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-black-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-black.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-blue-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-blue.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-green-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-green.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-purple-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-purple.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-red-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-red.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-yellow-light.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/lte/skins/skin-yellow.css +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/nav-menu.css.scss +0 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/nestable/jquery.nestable.css +0 -0
- data/app/assets/stylesheets/{admin/tageditor/jquery.tag-editor.css.scss → camaleon_cms/admin/tageditor/_jquery.tag-editor.css.scss} +0 -0
- data/app/assets/stylesheets/camaleon_cms/admin/uploader/_uploadfile.css.scss +253 -0
- data/app/assets/stylesheets/{admin → camaleon_cms/admin}/widgets.css.scss +0 -0
- data/app/assets/stylesheets/camaleon_cms/bootstrap.min.css.scss +5 -0
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/nav_menus_controller.rb +14 -11
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/themes_controller.rb +4 -2
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/widgets/assign_controller.rb +5 -5
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/widgets/main_controller.rb +8 -6
- data/app/controllers/{admin → camaleon_cms/admin}/appearances/widgets/sidebar_controller.rb +9 -9
- data/app/controllers/{admin → camaleon_cms/admin}/categories_controller.rb +18 -10
- data/app/controllers/camaleon_cms/admin/comments_controller.rb +97 -0
- data/app/controllers/{admin → camaleon_cms/admin}/installers_controller.rb +10 -10
- data/app/controllers/camaleon_cms/admin/media_controller.rb +84 -0
- data/app/controllers/{admin → camaleon_cms/admin}/plugins_controller.rb +7 -6
- data/app/controllers/{admin → camaleon_cms/admin}/post_tags_controller.rb +18 -10
- data/app/controllers/{admin → camaleon_cms/admin}/posts/drafts_controller.rb +5 -5
- data/app/controllers/{admin → camaleon_cms/admin}/posts_controller.rb +40 -23
- data/app/controllers/{admin → camaleon_cms/admin}/sessions_controller.rb +45 -35
- data/app/controllers/{admin → camaleon_cms/admin}/settings/custom_fields_controller.rb +13 -12
- data/app/controllers/{admin → camaleon_cms/admin}/settings/post_types_controller.rb +14 -13
- data/app/controllers/{admin → camaleon_cms/admin}/settings/sites_controller.rb +17 -15
- data/app/controllers/{admin → camaleon_cms/admin}/settings_controller.rb +8 -5
- data/app/controllers/{admin → camaleon_cms/admin}/user_roles_controller.rb +12 -11
- data/app/controllers/{admin → camaleon_cms/admin}/users_controller.rb +42 -48
- data/app/controllers/{admin_controller.rb → camaleon_cms/admin_controller.rb} +28 -9
- data/app/controllers/{apps → camaleon_cms/apps}/plugins_admin_controller.rb +7 -3
- data/app/controllers/camaleon_cms/apps/plugins_front_controller.rb +38 -0
- data/app/controllers/{apps → camaleon_cms/apps}/themes_admin_controller.rb +1 -1
- data/app/controllers/{apps → camaleon_cms/apps}/themes_front_controller.rb +1 -1
- data/app/controllers/camaleon_cms/camaleon_controller.rb +99 -0
- data/app/controllers/{frontend_controller.rb → camaleon_cms/frontend_controller.rb} +56 -45
- data/app/controllers/concerns/{frontend_concern.rb → camaleon_cms/frontend_concern.rb} +8 -8
- data/app/decorators/{application_decorator.rb → camaleon_cms/application_decorator.rb} +5 -17
- data/app/decorators/{category_decorator.rb → camaleon_cms/category_decorator.rb} +8 -3
- data/app/decorators/{custom_field_decorator.rb → camaleon_cms/custom_field_decorator.rb} +1 -1
- data/app/decorators/{custom_fields_concern.rb → camaleon_cms/custom_fields_concern.rb} +4 -3
- data/app/decorators/{metas_decorator_methods.rb → camaleon_cms/metas_decorator_methods.rb} +1 -1
- data/app/decorators/{nav_menu_item_decorator.rb → camaleon_cms/nav_menu_item_decorator.rb} +2 -2
- data/app/decorators/{post_comment_decorator.rb → camaleon_cms/post_comment_decorator.rb} +3 -2
- data/app/decorators/{post_decorator.rb → camaleon_cms/post_decorator.rb} +61 -14
- data/app/decorators/{post_tag_decorator.rb → camaleon_cms/post_tag_decorator.rb} +8 -3
- data/app/decorators/{post_type_decorator.rb → camaleon_cms/post_type_decorator.rb} +29 -6
- data/app/decorators/{site_decorator.rb → camaleon_cms/site_decorator.rb} +24 -22
- data/app/decorators/{term_taxonomy_decorator.rb → camaleon_cms/term_taxonomy_decorator.rb} +15 -15
- data/app/decorators/{theme_decorator.rb → camaleon_cms/theme_decorator.rb} +1 -1
- data/app/decorators/{user_decorator.rb → camaleon_cms/user_decorator.rb} +23 -11
- data/app/decorators/{widget_decorator.rb → camaleon_cms/widget_decorator.rb} +2 -2
- data/app/helpers/{admin → camaleon_cms/admin}/application_helper.rb +17 -9
- data/app/helpers/{admin → camaleon_cms/admin}/breadcrumb_helper.rb +6 -20
- data/app/helpers/{admin → camaleon_cms/admin}/category_helper.rb +6 -3
- data/app/helpers/{admin → camaleon_cms/admin}/custom_fields_helper.rb +21 -20
- data/app/helpers/{admin → camaleon_cms/admin}/menus_helper.rb +26 -36
- data/app/helpers/{admin → camaleon_cms/admin}/post_type_helper.rb +4 -4
- data/app/helpers/{camaleon_helper.rb → camaleon_cms/camaleon_helper.rb} +23 -19
- data/app/helpers/{captcha_helper.rb → camaleon_cms/captcha_helper.rb} +21 -17
- data/app/helpers/camaleon_cms/comment_helper.rb +48 -0
- data/app/helpers/{content_helper.rb → camaleon_cms/content_helper.rb} +12 -10
- data/app/helpers/{frontend → camaleon_cms/frontend}/application_helper.rb +7 -7
- data/app/helpers/{frontend → camaleon_cms/frontend}/nav_menu_helper.rb +21 -34
- data/app/helpers/{frontend → camaleon_cms/frontend}/seo_helper.rb +5 -5
- data/app/helpers/{frontend → camaleon_cms/frontend}/site_helper.rb +17 -10
- data/app/helpers/{hooks_helper.rb → camaleon_cms/hooks_helper.rb} +1 -1
- data/app/helpers/camaleon_cms/html_helper.rb +106 -0
- data/app/helpers/{plugins_helper.rb → camaleon_cms/plugins_helper.rb} +49 -64
- data/app/helpers/{session_helper.rb → camaleon_cms/session_helper.rb} +29 -26
- data/app/helpers/{short_code_helper.rb → camaleon_cms/short_code_helper.rb} +50 -16
- data/app/helpers/{site_helper.rb → camaleon_cms/site_helper.rb} +14 -19
- data/app/helpers/{theme_helper.rb → camaleon_cms/theme_helper.rb} +37 -43
- data/app/helpers/camaleon_cms/uploader_helper.rb +366 -0
- data/app/helpers/{user_roles_helper.rb → camaleon_cms/user_roles_helper.rb} +3 -3
- data/app/mailers/{html_mailer.rb → camaleon_cms/html_mailer.rb} +7 -7
- data/app/models/{ability.rb → camaleon_cms/ability.rb} +3 -3
- data/app/models/{category.rb → camaleon_cms/category.rb} +15 -12
- data/app/models/{custom_field.rb → camaleon_cms/custom_field.rb} +8 -10
- data/app/models/{custom_field_group.rb → camaleon_cms/custom_field_group.rb} +12 -11
- data/app/models/{custom_fields_relationship.rb → camaleon_cms/custom_fields_relationship.rb} +4 -4
- data/app/models/{meta.rb → camaleon_cms/meta.rb} +2 -5
- data/app/models/{nav_menu.rb → camaleon_cms/nav_menu.rb} +14 -13
- data/app/models/{nav_menu_item.rb → camaleon_cms/nav_menu_item.rb} +18 -7
- data/app/models/{plugin.rb → camaleon_cms/plugin.rb} +3 -3
- data/app/models/{post.rb → camaleon_cms/post.rb} +57 -32
- data/app/models/{post_comment.rb → camaleon_cms/post_comment.rb} +10 -9
- data/app/models/{post_default.rb → camaleon_cms/post_default.rb} +24 -19
- data/app/models/{post_relationship.rb → camaleon_cms/post_relationship.rb} +5 -5
- data/app/models/{post_tag.rb → camaleon_cms/post_tag.rb} +4 -4
- data/app/models/{post_type.rb → camaleon_cms/post_type.rb} +49 -17
- data/app/models/{site.rb → camaleon_cms/site.rb} +38 -80
- data/app/models/{term_relationship.rb → camaleon_cms/term_relationship.rb} +6 -4
- data/app/models/camaleon_cms/term_taxonomy.rb +81 -0
- data/app/models/{theme.rb → camaleon_cms/theme.rb} +3 -3
- data/app/models/{user.rb → camaleon_cms/user.rb} +23 -37
- data/app/models/{user_relationship.rb → camaleon_cms/user_relationship.rb} +4 -4
- data/app/models/camaleon_cms/user_role.rb +140 -0
- data/app/models/{widget.rb → camaleon_cms/widget.rb} +1 -1
- data/app/models/{widget → camaleon_cms/widget}/assigned.rb +4 -4
- data/app/models/{widget → camaleon_cms/widget}/main.rb +5 -5
- data/app/models/{widget → camaleon_cms/widget}/sidebar.rb +3 -3
- data/app/models/concerns/{categories_tags_for_posts.rb → camaleon_cms/categories_tags_for_posts.rb} +3 -3
- data/app/models/concerns/{custom_fields_read.rb → camaleon_cms/custom_fields_read.rb} +10 -11
- data/app/models/concerns/camaleon_cms/metas.rb +135 -0
- data/app/views/camaleon_cms/404.html.erb +4 -0
- data/app/views/camaleon_cms/500.html.erb +4 -0
- data/app/views/{_flash_messages.html.erb → camaleon_cms/_flash_messages.html.erb} +0 -0
- data/app/views/camaleon_cms/admin/appearances/nav_menus/_custom_fields.html.erb +6 -0
- data/app/views/{admin → camaleon_cms/admin}/appearances/nav_menus/_custom_menus.html.erb +2 -2
- data/app/views/{admin → camaleon_cms/admin}/appearances/nav_menus/_external_menu.html.erb +3 -3
- data/app/views/camaleon_cms/admin/appearances/nav_menus/_menu_form.html.erb +36 -0
- data/app/views/{admin → camaleon_cms/admin}/appearances/nav_menus/_menu_list.html.erb +5 -5
- data/app/views/{admin → camaleon_cms/admin}/appearances/nav_menus/index.html.erb +8 -8
- data/app/views/{admin → camaleon_cms/admin}/appearances/themes/index.html.erb +7 -6
- data/app/views/{admin → camaleon_cms/admin}/appearances/themes/preview.html.erb +0 -0
- data/app/views/{admin → camaleon_cms/admin}/appearances/themes/theme_load_data.html.erb +1 -1
- data/app/views/{admin → camaleon_cms/admin}/appearances/widgets/assign/_form.html.erb +5 -5
- data/app/views/{admin → camaleon_cms/admin}/appearances/widgets/main/_sidebar.html.erb +4 -4
- data/app/views/camaleon_cms/admin/appearances/widgets/main/form.html.erb +27 -0
- data/app/views/camaleon_cms/admin/appearances/widgets/main/index.html.erb +41 -0
- data/app/views/{admin → camaleon_cms/admin}/appearances/widgets/sidebar/form.html.erb +5 -5
- data/app/views/camaleon_cms/admin/categories/_form.html.erb +42 -0
- data/app/views/{admin/settings/post_types → camaleon_cms/admin/categories}/edit.html.erb +1 -1
- data/app/views/{admin → camaleon_cms/admin}/categories/index.html.erb +16 -26
- data/app/views/camaleon_cms/admin/comments/form.html.erb +12 -0
- data/app/views/camaleon_cms/admin/comments/form_answer.html.erb +12 -0
- data/app/views/camaleon_cms/admin/comments/index.html.erb +21 -0
- data/app/views/camaleon_cms/admin/comments/list.html.erb +36 -0
- data/app/views/{admin/dashboard/index.html.erb → camaleon_cms/admin/dashboard.html.erb} +2 -2
- data/app/views/{admin → camaleon_cms/admin}/installers/form.html.erb +6 -6
- data/app/views/camaleon_cms/admin/installers/welcome.html.erb +8 -0
- data/app/views/camaleon_cms/admin/media/_files_list.html.erb +7 -0
- data/app/views/camaleon_cms/admin/media/_render_file_item.html.erb +27 -0
- data/app/views/camaleon_cms/admin/media/_render_folder_item.html.erb +13 -0
- data/app/views/camaleon_cms/admin/media/index.html.erb +25 -0
- data/app/views/{admin → camaleon_cms/admin}/plugins/_plugins_list.html.erb +10 -10
- data/app/views/{admin → camaleon_cms/admin}/plugins/index.html.erb +10 -6
- data/app/views/{admin → camaleon_cms/admin}/post_tags/_form.html.erb +8 -14
- data/app/views/{admin → camaleon_cms/admin}/post_tags/edit.html.erb +2 -2
- data/app/views/camaleon_cms/admin/post_tags/index.html.erb +58 -0
- data/app/views/camaleon_cms/admin/posts/_filter_posts.html.erb +5 -0
- data/app/views/{admin → camaleon_cms/admin}/posts/_sidebar.html.erb +34 -36
- data/app/views/camaleon_cms/admin/posts/form.html.erb +97 -0
- data/app/views/{admin → camaleon_cms/admin}/posts/index.html.erb +34 -31
- data/app/views/{admin → camaleon_cms/admin}/posts/show.html.erb +1 -1
- data/app/views/camaleon_cms/admin/search.html.erb +68 -0
- data/app/views/camaleon_cms/admin/sessions/forgot.html.erb +44 -0
- data/app/views/camaleon_cms/admin/sessions/login.html.erb +49 -0
- data/app/views/camaleon_cms/admin/sessions/register.html.erb +63 -0
- data/app/views/camaleon_cms/admin/settings/_configuration_settings.html.erb +35 -0
- data/app/views/camaleon_cms/admin/settings/_email_settings.html.erb +33 -0
- data/app/views/camaleon_cms/admin/settings/_file_system_settings.html.erb +23 -0
- data/app/views/camaleon_cms/admin/settings/_seo_settings.html.erb +22 -0
- data/app/views/{admin/settings/custom_fields/get_items.html.erb → camaleon_cms/admin/settings/custom_fields/_get_items.html.erb} +19 -39
- data/app/views/{admin → camaleon_cms/admin}/settings/custom_fields/_meta_data.html.erb +2 -2
- data/app/views/{admin → camaleon_cms/admin}/settings/custom_fields/_render.html.erb +25 -31
- data/app/views/{admin/settings/custom_fields/fields/audio.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_audio.html.erb} +1 -1
- data/app/views/{admin/settings/custom_fields/fields/checkbox.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_checkbox.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/checkboxes.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_checkboxes.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/colorpicker.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_colorpicker.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/date.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_date.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/editor.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_editor.html.erb} +0 -1
- data/app/views/{admin/settings/custom_fields/fields/email.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_email.html.erb} +0 -0
- data/app/views/camaleon_cms/admin/settings/custom_fields/fields/_field_attrs.html.erb +8 -0
- data/app/views/{admin/settings/custom_fields/fields/file.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_file.html.erb} +1 -1
- data/app/views/{admin/settings/custom_fields/fields/image.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_image.html.erb} +1 -1
- data/app/views/{admin/settings/custom_fields/fields/numeric.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_numeric.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/phone.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_phone.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/posts.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/radio.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_radio.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/select.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_select.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/select_eval.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_select_eval.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/text_area.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_text_area.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/text_box.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_text_box.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/url.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_url.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/users.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_users.html.erb} +0 -0
- data/app/views/{admin/settings/custom_fields/fields/video.html.erb → camaleon_cms/admin/settings/custom_fields/fields/_video.html.erb} +1 -1
- data/app/views/camaleon_cms/admin/settings/custom_fields/form.html.erb +137 -0
- data/app/views/{admin → camaleon_cms/admin}/settings/custom_fields/index.html.erb +18 -14
- data/app/views/{admin → camaleon_cms/admin}/settings/languages.html.erb +7 -7
- data/app/views/camaleon_cms/admin/settings/post_types/_form.html.erb +134 -0
- data/app/views/{admin/categories → camaleon_cms/admin/settings/post_types}/edit.html.erb +2 -2
- data/app/views/camaleon_cms/admin/settings/post_types/index.html.erb +54 -0
- data/app/views/camaleon_cms/admin/settings/shortcodes.html.erb +37 -0
- data/app/views/camaleon_cms/admin/settings/site.html.erb +112 -0
- data/app/views/{admin → camaleon_cms/admin}/settings/sites/form.html.erb +9 -9
- data/app/views/camaleon_cms/admin/settings/sites/index.html.erb +58 -0
- data/app/views/camaleon_cms/admin/user_roles/form.html.erb +160 -0
- data/app/views/camaleon_cms/admin/user_roles/index.html.erb +51 -0
- data/app/views/camaleon_cms/admin/users/form.html.erb +233 -0
- data/app/views/camaleon_cms/admin/users/index.html.erb +55 -0
- data/app/views/camaleon_cms/admin/users/profile.html.erb +1 -0
- data/app/views/{admin → camaleon_cms/admin}/users/profile/_activity.html.erb +0 -0
- data/app/views/{admin → camaleon_cms/admin}/users/profile/_settings.html.erb +0 -0
- data/app/views/camaleon_cms/default_theme/admin/settings.html.erb +1 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/category.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/category.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/audio.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/checkbox.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/checkboxes.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/colorpicker.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/date.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/editor.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/email.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/field_attrs.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/file.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/image.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/numeric.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/phone.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/posts.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/radio.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/select.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/select_eval.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/text_area.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/text_box.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/url.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/users.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/custom_fields/video.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/index.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/layouts/_footer.html.erb +0 -1
- data/app/views/{default_theme → camaleon_cms/default_theme}/layouts/_header.html.erb +7 -7
- data/app/views/{default_theme → camaleon_cms/default_theme}/layouts/index.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_breadcrumb.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_categories_list.html.erb +0 -0
- data/app/views/camaleon_cms/default_theme/partials/_comments.html.erb +33 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_comments_list.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_flash_messages.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_forms.html.erb +2 -2
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_post_list_item.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_render_custom_field.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_search_form.html.erb +2 -4
- data/app/views/{default_theme → camaleon_cms/default_theme}/partials/_sidebar.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/post_tag.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/post_tag.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/post_type.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/post_type.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/profile.html.erb +0 -0
- data/app/views/camaleon_cms/default_theme/robots.text.erb +1 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/rss.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/search.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/single.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/single.rss.builder +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/sitemap.html.erb +0 -0
- data/app/views/{default_theme → camaleon_cms/default_theme}/sitemap.xml.builder +0 -0
- data/app/views/{html_mailer → camaleon_cms/html_mailer}/mailer.html.erb +0 -0
- data/app/views/{shortcode_templates → camaleon_cms/shortcode_templates}/widget.html.erb +1 -1
- data/app/views/layouts/camaleon_cms/admin.html.erb +49 -0
- data/app/views/layouts/camaleon_cms/admin/_ajax.html.erb +6 -0
- data/app/views/layouts/{admin → camaleon_cms/admin}/_flash_messages.html.erb +9 -0
- data/app/views/layouts/{admin → camaleon_cms/admin}/_footer.html.erb +0 -0
- data/app/views/layouts/{admin → camaleon_cms/admin}/_form_error.html.erb +1 -1
- data/app/views/layouts/{admin → camaleon_cms/admin}/_header.html.erb +11 -11
- data/app/views/layouts/camaleon_cms/admin/_sidebar.html.erb +19 -0
- data/app/views/layouts/{admin → camaleon_cms/admin}/installer.html.erb +5 -5
- data/app/views/layouts/{application.html.erb → camaleon_cms/application.html.erb} +0 -0
- data/app/views/layouts/{login.html.erb → camaleon_cms/login.html.erb} +5 -4
- data/app/views/layouts/{mailer.html.erb → camaleon_cms/mailer.html.erb} +0 -0
- data/config/initializers/action_view.rb +31 -0
- data/config/initializers/active_record_extension.rb +52 -2
- data/config/initializers/assets.rb +0 -18
- data/config/initializers/custom_initializers.rb +7 -0
- data/config/locales/camaleon_cms/admin/en.yml +648 -0
- data/config/locales/camaleon_cms/admin/es.yml +597 -0
- data/config/locales/camaleon_cms/admin/it.yml +607 -0
- data/config/locales/camaleon_cms/admin/js.yml +127 -0
- data/config/locales/camaleon_cms/admin/pt_br.yml +610 -0
- data/config/locales/camaleon_cms/common.yml +193 -0
- data/config/locales/{languages.yml → camaleon_cms/languages.yml} +0 -0
- data/config/locales/{routes.yml → camaleon_cms/routes.yml} +8 -0
- data/config/locales/{pt.yml → pt-BR.yml} +1 -1
- data/config/routes.rb +8 -24
- data/config/routes/admin.rb +114 -98
- data/config/routes/frontend.rb +39 -27
- data/config/system.json +5 -3
- data/db/migrate/20150611161134_post_table_into_utf8.rb +15 -15
- data/db/migrate/20150926095310_rename_column_posts.rb +4 -4
- data/lib/camaleon_cms/engine.rb +6 -9
- data/lib/camaleon_cms/version.rb +1 -1
- data/lib/ext/string.rb +10 -45
- data/lib/ext/translator.rb +3 -2
- data/lib/generators/camaleon_cms/gem_plugin_generator.rb +90 -83
- data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb +1 -1
- data/lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/front_controller.rb +1 -1
- data/lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/admin/index.html.erb +9 -2
- data/lib/generators/camaleon_cms/gem_theme_generator.rb +97 -0
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/assets/images → camaleon_cms/gem_theme_template/app/assets/images/themes/my_plugin}/image.png +0 -0
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/assets/js → camaleon_cms/gem_theme_template/app/assets/javascripts/themes/my_plugin}/main.js +1 -1
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/assets/css → camaleon_cms/gem_theme_template/app/assets/stylesheets/themes/my_plugin}/main.css +1 -1
- data/lib/generators/camaleon_cms/gem_theme_template/app/helpers/themes/my_plugin/main_helper.rb +26 -0
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/views → camaleon_cms/gem_theme_template/app/views/themes/my_plugin}/admin/settings.html.erb +1 -1
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/views → camaleon_cms/gem_theme_template/app/views/themes/my_plugin}/index.html.erb +0 -0
- data/lib/generators/camaleon_cms/gem_theme_template/app/views/themes/my_plugin/layouts/index.html.erb +71 -0
- data/lib/generators/{ctheme_template/app/apps/themes/my_theme/views → camaleon_cms/gem_theme_template/app/views/themes/my_plugin}/partials/readme.txt +0 -0
- data/lib/generators/camaleon_cms/gem_theme_template/config/camaleon_theme.json +14 -0
- data/lib/generators/camaleon_cms/install_template/system.json +4 -2
- data/lib/generators/camaleon_cms/theme_generator.rb +71 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/assets/css/main.css +12 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/assets/images/image.png +0 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/assets/js/main.js +14 -0
- data/lib/generators/{ctheme_template → camaleon_cms/theme_template}/app/apps/themes/my_theme/config/config.json +0 -0
- data/lib/generators/{ctheme_template → camaleon_cms/theme_template}/app/apps/themes/my_theme/main_helper.rb +0 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/views/admin/settings.html.erb +4 -0
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/views/index.html.erb +25 -0
- data/lib/generators/{ctheme_template → camaleon_cms/theme_template}/app/apps/themes/my_theme/views/layouts/index.html.erb +8 -8
- data/lib/generators/camaleon_cms/theme_template/app/apps/themes/my_theme/views/partials/readme.txt +1 -0
- data/lib/plugin_routes.rb +59 -28
- data/lib/tasks/camaleon_cms/rspec_test.rake +16 -0
- metadata +458 -548
- data/app/apps/plugins/contact_form/views/admin_forms/manual.html.erb +0 -59
- data/app/apps/themes/new/assets/js/plugins/modal_elfinder.js +0 -29
- data/app/assets/javascripts/admin/admin-basic-manifest.js +0 -3
- data/app/assets/javascripts/admin/custom_fields.js +0 -167
- data/app/assets/javascripts/admin/elfinder-manifest.js +0 -7
- data/app/assets/javascripts/admin/elfinder/elfinder.full.js +0 -12646
- data/app/assets/javascripts/admin/elfinder/i18n/elfinder.es.js +0 -294
- data/app/assets/javascripts/admin/elfinder/i18n/elfinder.fr.js +0 -298
- data/app/assets/javascripts/admin/elfinder/i18n/elfinder.it.js +0 -366
- data/app/assets/javascripts/admin/elfinder/proxy/elFinderSupportVer1.js +0 -338
- data/app/assets/javascripts/admin/elfinder/upload_elfinder.js +0 -237
- data/app/assets/javascripts/admin/jquery.slugify.js +0 -65
- data/app/assets/javascripts/admin/libraries.js +0 -266
- data/app/assets/javascripts/admin/post.js +0 -273
- data/app/assets/javascripts/admin/widgets.js +0 -54
- data/app/assets/javascripts/elfinder_front.js +0 -85
- data/app/assets/stylesheets/admin/custom_admin.css.scss +0 -193
- data/app/assets/stylesheets/admin/elfinder-manifest.css +0 -6
- data/app/assets/stylesheets/admin/elfinder/elfinder-theme.scss +0 -191
- data/app/assets/stylesheets/admin/elfinder/elfinder.css +0 -1922
- data/app/assets/stylesheets/admin/elfinder/images/arrows-active.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/arrows-normal.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/crop.gif +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/dialogs.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/icons-big.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/icons-small.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/logo.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/progress.gif +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/quicklook-bg.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/quicklook-icons.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/resize.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/spinner-mini.gif +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/toolbar.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/stylesheets/admin/elfinder/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/stylesheets/bootstrap.min.css.scss +0 -5
- data/app/controllers/admin/appearances_controller.rb +0 -13
- data/app/controllers/admin/comments_controller.rb +0 -113
- data/app/controllers/admin/media_controller.rb +0 -53
- data/app/controllers/api/api_controller.rb +0 -31
- data/app/controllers/api/v1/category_controller.rb +0 -15
- data/app/controllers/api/v1/contact_form_controller.rb +0 -55
- data/app/controllers/api/v1/page_controller.rb +0 -8
- data/app/controllers/api/v1/post_controller.rb +0 -8
- data/app/controllers/apps/plugins_front_controller.rb +0 -20
- data/app/controllers/camaleon_controller.rb +0 -116
- data/app/helpers/html_helper.rb +0 -118
- data/app/helpers/uploader_helper.rb +0 -214
- data/app/models/concerns/metas.rb +0 -136
- data/app/models/grid_template.rb +0 -15
- data/app/models/term_taxonomy.rb +0 -157
- data/app/models/user_role.rb +0 -139
- data/app/serializers/api/base_serializer.rb +0 -9
- data/app/serializers/api/v1/category_serializer.rb +0 -8
- data/app/views/admin/appearances/nav_menus/_custom_fields.html.erb +0 -6
- data/app/views/admin/appearances/nav_menus/_menu_form.html.erb +0 -32
- data/app/views/admin/appearances/widgets/main/form.html.erb +0 -27
- data/app/views/admin/appearances/widgets/main/index.html.erb +0 -69
- data/app/views/admin/categories/_form.html.erb +0 -42
- data/app/views/admin/comments/form.html.erb +0 -52
- data/app/views/admin/comments/index.html.erb +0 -41
- data/app/views/admin/comments/reply.html.erb +0 -196
- data/app/views/admin/installers/welcome.html.erb +0 -8
- data/app/views/admin/media/iframe.html.erb +0 -33
- data/app/views/admin/media/index.html.erb +0 -19
- data/app/views/admin/post_tags/index.html.erb +0 -74
- data/app/views/admin/posts/_filter_posts.html.erb +0 -6
- data/app/views/admin/posts/form.html.erb +0 -103
- data/app/views/admin/sessions/forgot.html.erb +0 -45
- data/app/views/admin/sessions/login.html.erb +0 -49
- data/app/views/admin/sessions/register.html.erb +0 -62
- data/app/views/admin/settings/custom_fields/fields/field_attrs.html.erb +0 -8
- data/app/views/admin/settings/custom_fields/form.html.erb +0 -248
- data/app/views/admin/settings/post_types/_form.html.erb +0 -93
- data/app/views/admin/settings/post_types/index.html.erb +0 -72
- data/app/views/admin/settings/site.html.erb +0 -188
- data/app/views/admin/settings/sites/index.html.erb +0 -55
- data/app/views/admin/taxonomy/_form.html.erb +0 -62
- data/app/views/admin/taxonomy/edit.html.erb +0 -18
- data/app/views/admin/taxonomy/index.html.erb +0 -79
- data/app/views/admin/user_roles/form.html.erb +0 -167
- data/app/views/admin/user_roles/index.html.erb +0 -48
- data/app/views/admin/users/form.html.erb +0 -306
- data/app/views/admin/users/index.html.erb +0 -53
- data/app/views/admin/users/profile.html.erb +0 -118
- data/app/views/admin/users/profile_edit.html.erb +0 -312
- data/app/views/default_theme/admin/settings.html.erb +0 -1
- data/app/views/default_theme/partials/_comments.html.erb +0 -33
- data/app/views/default_theme/robots.text.erb +0 -1
- data/app/views/layouts/admin.html.erb +0 -56
- data/app/views/layouts/admin/_ajax.html.erb +0 -2
- data/app/views/layouts/admin/_sidebar.html.erb +0 -22
- data/app/views/shortcode_templates/form.html.erb +0 -1
- data/config/initializers/cache_helper.rb +0 -17
- data/config/initializers/doorkeeper.rb +0 -128
- data/config/initializers/elfinder.rb +0 -63
- data/config/initializers/page_caching.rb +0 -42
- data/config/initializers/rufus_cron.rb +0 -33
- data/config/initializers/swagger.rb +0 -18
- data/config/locales/admin/en.yml +0 -618
- data/config/locales/admin/es.yml +0 -584
- data/config/locales/admin/it.yml +0 -605
- data/config/locales/admin/js.yml +0 -118
- data/config/locales/common.yml +0 -189
- data/config/locales/doorkeeper.en.yml +0 -123
- data/db/migrate/20150930115030_doorkeeper_configuration.rb +0 -45
- data/lib/generators/camaleon_cms/install_template/apps/plugins/readme.txt +0 -1
- data/lib/generators/camaleon_cms/install_template/apps/themes/readme.txt +0 -1
- data/lib/generators/cplugin_generator.rb +0 -82
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/admin_controller.rb +0 -8
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/assets/css/readme.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/assets/images/readme.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/assets/js/readme.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/config/config.json +0 -21
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/config/locales/readme.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/config/routes_admin.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/config/routes_front.txt +0 -1
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/front_controller.rb +0 -8
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/main_helper.rb +0 -22
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/models/my_plugin.rb +0 -7
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/views/admin/index.html.erb +0 -2
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/views/front/index.html.erb +0 -2
- data/lib/generators/cplugin_template/app/apps/plugins/my_plugin/views/layouts/readme.txt +0 -2
- data/lib/generators/ctheme_generator.rb +0 -65
- data/lib/tasks/camaleon_cms_tasks.rake +0 -23
- data/lib/tasks/precompile_overrides.rake +0 -6
@@ -6,19 +6,19 @@
|
|
6
6
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
7
7
|
See the GNU Affero General Public License (GPLv3) for more details.
|
8
8
|
=end
|
9
|
-
module Frontend::SeoHelper
|
10
|
-
def
|
9
|
+
module CamaleonCms::Frontend::SeoHelper
|
10
|
+
def cama_init_seo(model)
|
11
11
|
@_seo_info = model.the_seo
|
12
12
|
end
|
13
13
|
|
14
14
|
# add seo attributes to your page
|
15
15
|
# you can pass custom data to overwrite default data generated by the system
|
16
|
-
def
|
16
|
+
def cama_the_seo(data = {})
|
17
17
|
(@_seo_info ||= {}).merge(data)
|
18
18
|
end
|
19
19
|
|
20
20
|
# create seo attributes with options + default attributes
|
21
|
-
def
|
21
|
+
def cama_build_seo(options)
|
22
22
|
options[:image] = options[:image] || current_site.get_option("screenshot", current_site.the_logo)
|
23
23
|
options[:title] = I18n.transliterate(is_home? ? current_site.the_title : "#{current_site.the_title} | #{options[:title]}")
|
24
24
|
options[:description] = I18n.transliterate(is_home? ? current_site.the_option("seo_description") : options[:description].to_s)
|
@@ -48,7 +48,7 @@ module Frontend::SeoHelper
|
|
48
48
|
domain: request.host
|
49
49
|
},
|
50
50
|
alternate: [
|
51
|
-
{ type: 'application/rss+xml', href:
|
51
|
+
{ type: 'application/rss+xml', href: cama_rss_url }
|
52
52
|
]
|
53
53
|
}
|
54
54
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
7
7
|
See the GNU Affero General Public License (GPLv3) for more details.
|
8
8
|
=end
|
9
|
-
module Frontend::SiteHelper
|
9
|
+
module CamaleonCms::Frontend::SiteHelper
|
10
10
|
# return full current visited url
|
11
11
|
def site_current_url
|
12
12
|
request.original_url
|
@@ -15,36 +15,43 @@ module Frontend::SiteHelper
|
|
15
15
|
# return current url visited as path
|
16
16
|
# http://localhost:9001/category/cat-post-2 => /category/cat-post-2
|
17
17
|
def site_current_path
|
18
|
-
@_site_current_path ||= site_current_url.sub(
|
18
|
+
@_site_current_path ||= site_current_url.sub(cama_root_url(locale: nil), "/")
|
19
19
|
end
|
20
20
|
|
21
21
|
#**************** section is a? ****************#
|
22
|
+
# check if current section visited is home page
|
22
23
|
def is_home?
|
23
|
-
params[:controller]
|
24
|
+
@cama_visited_home.present? || (["camaleon_cms/frontend", "frontend"].include?(params[:controller]) && params[:action] == "index")
|
24
25
|
end
|
25
26
|
|
27
|
+
# check if current section visited is for post
|
26
28
|
def is_page?
|
27
|
-
params[:controller]
|
29
|
+
["camaleon_cms/frontend", "frontend"].include?(params[:controller]) && params[:action] == "post"
|
28
30
|
end
|
29
31
|
|
32
|
+
# check if current section visited is for ajax
|
30
33
|
def is_ajax?
|
31
|
-
params[:controller]
|
34
|
+
["camaleon_cms/frontend", "frontend"].include?(params[:controller]) && params[:action] == "ajax"
|
32
35
|
end
|
33
36
|
|
37
|
+
# check if current section visited is for search
|
34
38
|
def is_search?
|
35
|
-
params[:controller]
|
39
|
+
["camaleon_cms/frontend", "frontend"].include?(params[:controller]) && params[:action] == "search"
|
36
40
|
end
|
37
41
|
|
42
|
+
# check if current section visited is for post type
|
38
43
|
def is_post_type?
|
39
|
-
params[:controller]
|
44
|
+
["camaleon_cms/frontend", "frontend"].include?(params[:controller]) && params[:action] == "post_type"
|
40
45
|
end
|
41
46
|
|
47
|
+
# check if current section visited is for post tag
|
42
48
|
def is_post_tag?
|
43
49
|
params[:controller] == "frontend" && params[:action] == "post_tag"
|
44
50
|
end
|
45
51
|
|
52
|
+
# check if current section visited is for category
|
46
53
|
def is_category?
|
47
|
-
params[:controller]
|
54
|
+
["camaleon_cms/frontend", "frontend"].include?(params[:controller]) && params[:action] == "category"
|
48
55
|
end
|
49
56
|
#**************** end section is a? ****************#
|
50
57
|
|
@@ -54,7 +61,7 @@ module Frontend::SiteHelper
|
|
54
61
|
# show_seo: (Boolean) control to append or not the seo attributes
|
55
62
|
def the_head(seo_attrs = {}, show_seo = true)
|
56
63
|
icon = "<link rel='shortcut icon' href='#{current_site.the_icon}'>"
|
57
|
-
js = "<script>var ROOT_URL = '#{
|
58
|
-
icon + "\n" + csrf_meta_tag + "\n" + (show_seo ? display_meta_tags(
|
64
|
+
js = "<script>var ROOT_URL = '#{cama_root_url}'; var LANGUAGE = '#{I18n.locale}'; </script>"
|
65
|
+
icon + "\n" + (csrf_meta_tag || "") + "\n" + (show_seo ? display_meta_tags(cama_the_seo.merge(seo_attrs)) : "") + "\n" + js + "\n" + cama_draw_custom_assets
|
59
66
|
end
|
60
67
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
7
7
|
See the GNU Affero General Public License (GPLv3) for more details.
|
8
8
|
=end
|
9
|
-
module HooksHelper
|
9
|
+
module CamaleonCms::HooksHelper
|
10
10
|
# execute hooks for plugin_key with action name hook_key
|
11
11
|
# non public method
|
12
12
|
# plugin: plugin configuration (config.json)
|
@@ -0,0 +1,106 @@
|
|
1
|
+
=begin
|
2
|
+
Camaleon CMS is a content management system
|
3
|
+
Copyright (C) 2015 by Owen Peredo Diaz
|
4
|
+
Email: owenperedo@gmail.com
|
5
|
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
6
|
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
7
|
+
See the GNU Affero General Public License (GPLv3) for more details.
|
8
|
+
=end
|
9
|
+
#encoding: utf-8
|
10
|
+
module CamaleonCms::HtmlHelper
|
11
|
+
def cama_html_helpers_init
|
12
|
+
@_assets_libraries = {}
|
13
|
+
@_assets_content = []
|
14
|
+
end
|
15
|
+
|
16
|
+
# enable to load admin or registered libraries (colorpicker, datepicker, form_builder, tinymce, form_ajax, cropper)
|
17
|
+
# sample: add_asset_library("datepicker", "colorpicker")
|
18
|
+
def cama_load_libraries(*keys)
|
19
|
+
keys.each do |key|
|
20
|
+
library = cama_assets_libraries[key.to_sym]
|
21
|
+
@_assets_libraries[key.to_sym] = library if library.present?
|
22
|
+
end
|
23
|
+
end
|
24
|
+
alias_method :add_asset_library, :cama_load_libraries
|
25
|
+
|
26
|
+
# add custom asset libraries (js, css or both) for the current request, also you can add extra css or js files for existent libraries
|
27
|
+
# sample: (add new library)
|
28
|
+
# append_asset_libraries({"my_library_key"=> { js: [plugin_asset("js/my_js"), "plugins/myplugin/assets/js/my_js2"], css: [plugin_asset("css/my_css"), "plugins/myplugin/assets/css/my_css2"] }})
|
29
|
+
# sample: (update existent library)
|
30
|
+
# append_asset_libraries({"colorpicker"=>{js: [plugin_asset("js/my_custom_js")] } })
|
31
|
+
# return nil
|
32
|
+
def cama_load_custom_assets(libraries)
|
33
|
+
libraries.each do |key, library|
|
34
|
+
if @_assets_libraries.include?(key)
|
35
|
+
@_assets_libraries[key.to_sym] = @_assets_libraries[key.to_sym].merge(library)
|
36
|
+
else
|
37
|
+
@_assets_libraries[key.to_sym] = library
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
alias_method :append_asset_libraries, :cama_load_custom_assets
|
42
|
+
|
43
|
+
# add asset content into custom assets
|
44
|
+
# content may be: <script>alert()</script>
|
45
|
+
# content may be: <style>a{color: red;}</style>
|
46
|
+
# this will be printed with <%raw cama_draw_custom_assets %>
|
47
|
+
def append_asset_content(content)
|
48
|
+
@_assets_content << content
|
49
|
+
end
|
50
|
+
|
51
|
+
# return all js libraries added [aa.js, bb,js, ..]
|
52
|
+
# def get_assets_js
|
53
|
+
def cama_draw_custom_assets
|
54
|
+
cama_html_helpers_init unless @_assets_libraries.present?
|
55
|
+
libs = []
|
56
|
+
@_assets_libraries.each do |key, assets|
|
57
|
+
libs += assets[:css] if assets[:css].present?
|
58
|
+
end
|
59
|
+
css = stylesheet_link_tag *libs.uniq, media: "all"
|
60
|
+
|
61
|
+
libs = []
|
62
|
+
@_assets_libraries.each do |key, assets|
|
63
|
+
libs += assets[:js] if assets[:js].present?
|
64
|
+
end
|
65
|
+
js = javascript_include_tag *libs.uniq
|
66
|
+
css + "\n" + js + "\n" + @_assets_content.join("").html_safe
|
67
|
+
end
|
68
|
+
|
69
|
+
# return category tree for category dropdown
|
70
|
+
# each level is prefixed with -
|
71
|
+
# level: internal recursive control
|
72
|
+
def cama_get_options_html_from_items(terms, level = 0)
|
73
|
+
options = []
|
74
|
+
terms.all.each do |term|
|
75
|
+
options << [("—"*level) + term.name, term.id] unless @term.id == term.id
|
76
|
+
children = term.children
|
77
|
+
options += cama_get_options_html_from_items(children, level + 1) if children.size > 0
|
78
|
+
end
|
79
|
+
options
|
80
|
+
end
|
81
|
+
|
82
|
+
# create a html tooltip to include anywhere
|
83
|
+
# text: text of the tooltip
|
84
|
+
# location: location of the tooltip (left | right | top |bottom)
|
85
|
+
def cama_html_tooltip(text='Tooltip', location='left')
|
86
|
+
"<a href='javascript:;' title='#{text}' data-toggle='tooltip' data-placement='#{location}'><i class='fa fa-info-circle'></i></a>"
|
87
|
+
end
|
88
|
+
|
89
|
+
private
|
90
|
+
def cama_assets_libraries
|
91
|
+
libs = {}
|
92
|
+
libs[:colorpicker] = {js: ['camaleon_cms/admin/bootstrap-colorpicker'], css: ["camaleon_cms/admin/colorpicker.css"]}
|
93
|
+
libs[:datepicker] = {js: ['camaleon_cms/admin/bootstrap-datepicker']}
|
94
|
+
libs[:datetimepicker] = {js: ['camaleon_cms/admin/bootstrap-datetimepicker.min']}
|
95
|
+
libs[:tinymce] = {js: ['camaleon_cms/admin/tinymce/tinymce.min', "camaleon_cms/admin/tinymce/plugins/filemanager/plugin.min"], css: ["camaleon_cms/admin/tinymce/skins/lightgray/content.min"]}
|
96
|
+
libs[:form_builder] = {css:['camaleon_cms/admin/form-builder/formbuilder'],js: ['camaleon_cms/admin/form-builder/vendor', 'camaleon_cms/admin/form-builder/formbuilder' ]}
|
97
|
+
libs[:form_ajax] = {js: ['camaleon_cms/admin/form/jquery.form']}
|
98
|
+
libs[:cropper] = {js: ['camaleon_cms/admin/form/cropper.min'], css: ['camaleon_cms/admin/cropper/cropper.min']}
|
99
|
+
libs[:post] = {js: ["camaleon_cms/admin/jquery.tagsinput.min", 'camaleon_cms/admin/post'], css: ["camaleon_cms/admin/jquery.tagsinput"]}
|
100
|
+
libs[:multiselect] = {js: ['camaleon_cms/admin/bootstrap-select.js']}
|
101
|
+
libs[:validate] = {js: ['camaleon_cms/admin/jquery.validate']}
|
102
|
+
libs[:nav_menu] = {css: ['camaleon_cms/admin/nestable/jquery.nestable', "camaleon_cms/admin/nav-menu"], js: ["camaleon_cms/admin/jquery.nestable", 'camaleon_cms/admin/nav-menu']}
|
103
|
+
libs[:admin_intro] = {js: ['camaleon_cms/admin/introjs/intro.min'], css: ["camaleon_cms/admin/introjs/introjs.min"]}
|
104
|
+
libs
|
105
|
+
end
|
106
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
7
7
|
See the GNU Affero General Public License (GPLv3) for more details.
|
8
8
|
=end
|
9
|
-
module PluginsHelper
|
9
|
+
module CamaleonCms::PluginsHelper
|
10
10
|
# load all plugins + theme installed for current site
|
11
11
|
# METHOD IGNORED (is a partial solution to avoid load helpers and cache it for all sites)
|
12
12
|
# this method try to load helpers for each request without caching
|
@@ -62,45 +62,56 @@ module PluginsHelper
|
|
62
62
|
# remove a plugin from current site
|
63
63
|
# plugin_key: key of the plugin
|
64
64
|
# return model of the plugin removed
|
65
|
+
# DEPRECATED: PLUGINS AND THEMES CANNOT BE DESTROYED
|
65
66
|
def plugin_destroy(plugin_key)
|
66
|
-
# return
|
67
|
-
plugin_model = current_site.plugins.where(slug: plugin_key).first_or_create
|
68
|
-
if !plugin_can_be_deleted?(params[:id]) || true
|
69
|
-
plugin_model.error = false
|
70
|
-
plugin_model
|
71
|
-
else
|
72
|
-
hook_run(plugin_model.settings, "on_destroy", plugin_model)
|
73
|
-
plugin_model.destroy
|
74
|
-
PluginRoutes.destroy_plugin(params[:id])
|
75
|
-
plugin_model.error = true
|
76
|
-
end
|
77
|
-
plugin_model
|
78
67
|
end
|
79
68
|
|
80
69
|
# return plugin full layout path
|
81
70
|
# plugin_key: plugin name
|
82
|
-
def plugin_layout(
|
83
|
-
|
71
|
+
def plugin_layout(layout_name, plugin_key = nil)
|
72
|
+
plugin = current_plugin(plugin_key || self_plugin_key(1))
|
73
|
+
if plugin.settings["gem_mode"]
|
74
|
+
"plugins/#{plugin.slug}/layouts/#{layout_name}"
|
75
|
+
else
|
76
|
+
"plugins/#{plugin.slug}/views/layouts/#{layout_name}"
|
77
|
+
end
|
84
78
|
end
|
85
79
|
|
86
80
|
# return plugin full view path
|
87
81
|
# plugin_key: plugin name
|
88
|
-
def plugin_view(
|
89
|
-
"
|
82
|
+
def plugin_view(view_name, plugin_key = nil)
|
83
|
+
if plugin_key.present? && plugin_key.include?("/") # fix for 1.x
|
84
|
+
k = view_name
|
85
|
+
view_name = plugin_key
|
86
|
+
plugin_key = k
|
87
|
+
end
|
88
|
+
|
89
|
+
plugin = current_plugin(plugin_key || self_plugin_key(1))
|
90
|
+
if plugin.settings["gem_mode"]
|
91
|
+
"plugins/#{plugin.slug}/#{view_name}"
|
92
|
+
else
|
93
|
+
"plugins/#{plugin.slug}/views/#{view_name}"
|
94
|
+
end
|
90
95
|
end
|
91
96
|
|
92
97
|
# return plugin full asset path
|
93
98
|
# plugin_key: plugin name
|
94
99
|
# asset: (String) asset name
|
95
|
-
# sample: <script src="<%= plugin_asset_path("
|
96
|
-
def plugin_asset_path(
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
100
|
+
# sample: <script src="<%= plugin_asset_path("js/admin.js") %>"></script> => /assets/plugins/my_plugin/assets/css/main-54505620f.css
|
101
|
+
def plugin_asset_path(asset, plugin_key = nil)
|
102
|
+
if plugin_key.present? && plugin_key.include?("/")
|
103
|
+
return plugin_asset_url(plugin_key, asset || self_plugin_key(1))
|
104
|
+
end
|
105
|
+
settings = current_plugin(plugin_key || self_plugin_key(1)).settings
|
106
|
+
folder_name = settings["key"]
|
107
|
+
if settings["gem_mode"]
|
108
|
+
"plugins/#{folder_name}/#{asset}"
|
109
|
+
else
|
110
|
+
"plugins/#{folder_name}/assets/#{asset}"
|
102
111
|
end
|
103
112
|
end
|
113
|
+
alias_method :plugin_asset, :plugin_asset_path
|
114
|
+
alias_method :plugin_gem_asset, :plugin_asset_path
|
104
115
|
|
105
116
|
# return the full url for asset of current plugin:
|
106
117
|
# asset: (String) asset name
|
@@ -108,7 +119,9 @@ module PluginsHelper
|
|
108
119
|
# sample:
|
109
120
|
# plugin_asset_url("css/main.css") => return: http://myhost.com/assets/plugins/my_plugin/assets/css/main-54505620f.css
|
110
121
|
def plugin_asset_url(asset, plugin_key = nil)
|
111
|
-
|
122
|
+
settings = current_plugin(plugin_key || self_plugin_key(1)).settings
|
123
|
+
folder_name = settings["key"]
|
124
|
+
p = settings["gem_mode"] ? "plugins/#{folder_name}/#{asset}" : "plugins/#{folder_name}/assets/#{asset}"
|
112
125
|
begin
|
113
126
|
asset_url(p)
|
114
127
|
rescue NoMethodError => e
|
@@ -116,20 +129,6 @@ module PluginsHelper
|
|
116
129
|
end
|
117
130
|
end
|
118
131
|
|
119
|
-
# built asset file for current theme
|
120
|
-
# plugin_name: (String) if nil, will be used self_plugin_key method
|
121
|
-
# return (String), sample: plugin_asset("css/mains.css") => plugins/my_plugin/assets/css/main.css
|
122
|
-
def plugin_asset(asset, plugin_name = nil)
|
123
|
-
"plugins/#{plugin_name || self_plugin_key }/assets/#{asset}"
|
124
|
-
end
|
125
|
-
|
126
|
-
# built asset file for current theme
|
127
|
-
# plugin_name: (String) if nil, will be used self_plugin_key method
|
128
|
-
# return (String), sample: plugin_asset("mains.css") => plugins/my_plugin/main.css
|
129
|
-
def plugin_gem_asset(asset, plugin_name = nil)
|
130
|
-
"plugins/#{plugin_name || self_plugin_key }/#{asset}"
|
131
|
-
end
|
132
|
-
|
133
132
|
# auto load all helpers of this plugin
|
134
133
|
def plugin_load_helpers(plugin)
|
135
134
|
return if !plugin.present? || !plugin["helpers"].present?
|
@@ -141,39 +140,25 @@ module PluginsHelper
|
|
141
140
|
end
|
142
141
|
rescue => e
|
143
142
|
Rails.logger.info "---------------------------app loading error for #{h}: #{e.message}. Please check the plugins and themes presence"
|
144
|
-
# flash.now[:error] = "app loading error for #{h}: #{e.message}. Please check the plugins and themes presence"
|
145
143
|
end
|
146
|
-
|
147
|
-
# self.class.helper h.constantize rescue ActionController::Base.helper(h.constantize)
|
148
144
|
end
|
149
145
|
end
|
150
146
|
|
151
|
-
############# admin helpers ##############
|
152
|
-
# check if this plugin can be deleted
|
153
|
-
def plugin_can_be_deleted?(key)
|
154
|
-
c = 0
|
155
|
-
Site.all.each do |site|
|
156
|
-
c += site.plugins.where(slug: key).count
|
157
|
-
end
|
158
|
-
c == 0
|
159
|
-
end
|
160
|
-
|
161
147
|
# return plugin key for current plugin file (helper|controller|view)
|
162
|
-
|
163
|
-
|
148
|
+
# index: internal control (ignored)
|
149
|
+
def self_plugin_key(index = 0)
|
164
150
|
k = "/plugins/"
|
165
|
-
f = caller[
|
166
|
-
|
167
|
-
if f.include?(k)
|
168
|
-
f.split(k).last.split("/").first
|
169
|
-
elsif f2.include?(k)
|
170
|
-
f2.split(k).last.split("/").first
|
171
|
-
end
|
151
|
+
f = caller[index]
|
152
|
+
f.split(k).last.split("/").first if f.include?(k)
|
172
153
|
end
|
173
154
|
|
174
155
|
# method called only from files within plugins directory
|
175
|
-
# return the plugin model for current site
|
176
|
-
def current_plugin
|
177
|
-
|
156
|
+
# return the plugin model for current site calculated according to the file caller location
|
157
|
+
def current_plugin(plugin_key = nil)
|
158
|
+
_key = plugin_key || self_plugin_key(1)
|
159
|
+
cama_cache_fetch("current_plugin_#{_key}") do
|
160
|
+
current_site.get_plugin(_key)
|
161
|
+
end
|
178
162
|
end
|
163
|
+
|
179
164
|
end
|
@@ -6,33 +6,34 @@
|
|
6
6
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
7
7
|
See the GNU Affero General Public License (GPLv3) for more details.
|
8
8
|
=end
|
9
|
-
module SessionHelper
|
9
|
+
module CamaleonCms::SessionHelper
|
10
10
|
# log in the user in to system
|
11
11
|
# user: User model
|
12
12
|
# remember_me: true/false (remember session permanently)
|
13
13
|
def login_user(user, remember_me = false, redirect_url = nil)
|
14
14
|
c = {value: [user.auth_token, request.user_agent, request.ip], expires: 24.hours.from_now}
|
15
|
-
|
16
|
-
c[:domain] = :all if PluginRoutes.system_info["users_share_sites"].present? && Site.count > 1
|
15
|
+
c[:domain] = :all if PluginRoutes.system_info["users_share_sites"].present? && CamaleonCms::Site.count > 1
|
17
16
|
c[:expires] = 1.month.from_now if remember_me
|
18
17
|
|
19
|
-
Site.main_site.set_meta("share_sessions", false) if cookies.delete(:login).present?
|
18
|
+
CamaleonCms::Site.main_site.set_meta("share_sessions", false) if cookies.delete(:login).present?
|
20
19
|
user.update({last_login_at: Time.zone.now})
|
21
20
|
|
22
21
|
cookies[:auth_token] = c
|
23
22
|
cookies[:login] = true
|
24
23
|
|
25
24
|
# user redirection
|
26
|
-
flash[:notice] = t('admin.login.message.success', locale: current_site.get_admin_language)
|
25
|
+
flash[:notice] = t('camaleon_cms.admin.login.message.success', locale: current_site.get_admin_language)
|
27
26
|
if redirect_url.present?
|
28
27
|
redirect_to redirect_url
|
29
28
|
elsif (return_to = cookies.delete(:return_to)).present?
|
30
29
|
redirect_to return_to
|
31
30
|
else
|
32
|
-
redirect_to
|
31
|
+
redirect_to cama_admin_dashboard_path
|
33
32
|
end
|
34
33
|
end
|
35
34
|
|
35
|
+
# login a user using username and password
|
36
|
+
# return boolean: true => authenticated, false => authentication failed
|
36
37
|
def login_user_with_password(username, password)
|
37
38
|
@user = current_site.users.find_by_username(username)
|
38
39
|
r = {user: @user, params: params, password: password, captcha_validate: true}; hooks_run('user_before_login', r)
|
@@ -40,14 +41,14 @@ module SessionHelper
|
|
40
41
|
end
|
41
42
|
|
42
43
|
# check if current host is heroku
|
43
|
-
def
|
44
|
+
def cama_on_heroku?
|
44
45
|
ENV.keys.any? { |var_name| var_name.match(/(heroku|dyno)/i) }
|
45
46
|
end
|
46
47
|
|
47
48
|
# switch current session user into other (user)
|
48
49
|
# after switched, this will be redirected to redirect_url or admin dashboard
|
49
50
|
def session_switch_user(user, redirect_url = nil)
|
50
|
-
if
|
51
|
+
if cama_sign_in?
|
51
52
|
cookies[:parent_auth_token] = cookies[:auth_token]
|
52
53
|
login_user(user, false, redirect_url)
|
53
54
|
end
|
@@ -56,37 +57,38 @@ module SessionHelper
|
|
56
57
|
# switch current session into parent session called by session_switch_user
|
57
58
|
# after returned into parent session, this will be redirected to redirect_url or admin dashboard
|
58
59
|
def session_back_to_parent(redirect_url = nil)
|
59
|
-
if
|
60
|
+
if cama_sign_in? && cookies[:parent_auth_token].present?
|
60
61
|
cookies[:auth_token] = cookies[:parent_auth_token]
|
61
|
-
redirect_to (redirect_url||
|
62
|
+
redirect_to (redirect_url || cama_admin_dashboard_path), notice: "Welcome back!"
|
62
63
|
end
|
63
64
|
end
|
64
65
|
|
65
66
|
# logout current user
|
66
|
-
def
|
67
|
+
def cama_logout_user
|
67
68
|
cookies.delete(:auth_token, domain: :all)
|
68
69
|
cookies.delete(:auth_token, domain: nil)
|
69
|
-
cookies[:auth_token] = {value: nil, expires: 24.hours.ago, domain: (PluginRoutes.system_info["users_share_sites"] && Site.count > 1 ? :all : nil)}
|
70
|
+
cookies[:auth_token] = {value: nil, expires: 24.hours.ago, domain: (PluginRoutes.system_info["users_share_sites"] && CamaleonCms::Site.count > 1 ? :all : nil)}
|
70
71
|
cookies.delete :login
|
71
|
-
redirect_to params[:return_to].present? ? params[:return_to] :
|
72
|
+
redirect_to params[:return_to].present? ? params[:return_to] : cama_admin_login_path, :notice => t('camaleon_cms.admin.logout.message.closed')
|
72
73
|
end
|
73
74
|
|
74
75
|
# check if current user is already signed
|
75
|
-
def
|
76
|
-
!
|
76
|
+
def cama_sign_in?
|
77
|
+
!cama_current_user.nil?
|
77
78
|
end
|
79
|
+
alias_method :signin?, :cama_sign_in?
|
78
80
|
|
79
81
|
# return the role for current user
|
80
82
|
# if not logged in, then return 'public'
|
81
|
-
def
|
82
|
-
(
|
83
|
+
def cama_current_role
|
84
|
+
(cama_sign_in?) ? cama_current_user.role : 'public'
|
83
85
|
end
|
84
86
|
|
85
87
|
# return current user logged in
|
86
|
-
def
|
88
|
+
def cama_current_user
|
87
89
|
return @current_user if defined?(@current_user)
|
88
90
|
# api current user...
|
89
|
-
@current_user =
|
91
|
+
@current_user = cama_calc_api_current_user
|
90
92
|
return @current_user unless @current_user.nil?
|
91
93
|
|
92
94
|
return nil unless cookies[:auth_token].present?
|
@@ -97,27 +99,28 @@ module SessionHelper
|
|
97
99
|
@current_user = (current_site.users_include_admins.find_by_auth_token(c[0]).decorate rescue nil)
|
98
100
|
end
|
99
101
|
end
|
102
|
+
alias_method :current_user, :cama_current_user
|
100
103
|
|
101
104
|
# check if a visitor was logged in
|
102
105
|
# if the user was not logged in, then redirect to login url
|
103
|
-
def
|
106
|
+
def cama_authenticate(redirect_uri = nil)
|
104
107
|
params[:return_to] = redirect_uri
|
105
|
-
unless
|
106
|
-
flash[:error] = t('admin.login.please_login')
|
108
|
+
unless cama_sign_in?
|
109
|
+
flash[:error] = t('camaleon_cms.admin.login.please_login')
|
107
110
|
cookies[:return_to] = params[:return_to].present? ? params[:return_to] : ((request.get? && params[:controller] != "admin/sessions") ? request.original_url : nil)
|
108
|
-
redirect_to
|
111
|
+
redirect_to cama_admin_login_path
|
109
112
|
end
|
110
113
|
end
|
111
114
|
|
112
115
|
# return the session id
|
113
|
-
def
|
116
|
+
def cama_get_session_id
|
114
117
|
session[:autor] = "Owen Peredo Diaz" unless request.session_options[:id].present?
|
115
118
|
request.session_options[:id]
|
116
119
|
end
|
117
120
|
|
118
121
|
private
|
119
|
-
|
120
|
-
def
|
122
|
+
# calculate the current user for API
|
123
|
+
def cama_calc_api_current_user
|
121
124
|
current_site.users_include_admins.find(doorkeeper_token.resource_owner_id).decorate if doorkeeper_token rescue nil
|
122
125
|
end
|
123
126
|
end
|