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,14 +6,14 @@
|
|
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 FrontendConcern extend ActiveSupport::Concern
|
9
|
+
module CamaleonCms::FrontendConcern extend ActiveSupport::Concern
|
10
10
|
# visiting sitemap.xml
|
11
11
|
# With hook "on_render_sitemap" you can skip post_types, categories, tags or posts
|
12
12
|
# you can change render file and layout
|
13
13
|
# you can add custom sitemap elements in the attr "custom", like: https://github.com/owen2345/camaleon-cms/issues/106#issuecomment-146232211
|
14
14
|
# you can customize your content for html or xml format
|
15
15
|
def sitemap
|
16
|
-
r = {layout: (params[:format] == "html" ? (self.send :_layout) : false), render: "sitemap", custom: {}, format: params[:format], skip_post_ids: [], skip_posttype_ids: [], skip_cat_ids: [], skip_tag_ids: []}
|
16
|
+
r = {layout: (params[:format] == "html" ? (self.send :_layout) : false), render: "sitemap", custom: {a: a}, format: params[:format], skip_post_ids: [], skip_posttype_ids: [], skip_cat_ids: [], skip_tag_ids: []}
|
17
17
|
hooks_run("on_render_sitemap", r)
|
18
18
|
@r = r
|
19
19
|
render r[:render], layout: r[:layout]
|
@@ -38,9 +38,9 @@ module FrontendConcern extend ActiveSupport::Concern
|
|
38
38
|
@post = current_site.posts.find_by_id(params[:post_id]).decorate
|
39
39
|
if @post.can_commented?
|
40
40
|
comment_data = {}
|
41
|
-
comment_data[:user_id] =
|
42
|
-
comment_data[:author] =
|
43
|
-
comment_data[:author_email] =
|
41
|
+
comment_data[:user_id] = cama_current_user.id
|
42
|
+
comment_data[:author] = cama_current_user.the_name
|
43
|
+
comment_data[:author_email] = cama_current_user.email
|
44
44
|
comment_data[:author_url] = ""
|
45
45
|
comment_data[:author_IP] = request.remote_ip.to_s
|
46
46
|
comment_data[:approved] = current_site.front_comment_status
|
@@ -48,14 +48,14 @@ module FrontendConcern extend ActiveSupport::Concern
|
|
48
48
|
comment_data[:content] = params[:post_comment][:content]
|
49
49
|
@comment = @post.comments.main.new(comment_data)
|
50
50
|
if @comment.save
|
51
|
-
flash[:notice] = t('admin.comments.message.created')
|
51
|
+
flash[:notice] = t('camaleon_cms.admin.comments.message.created')
|
52
52
|
redirect_to :back
|
53
53
|
else
|
54
|
-
flash[:error] = t('admin.validate.required')
|
54
|
+
flash[:error] = t('camaleon_cms.admin.validate.required')
|
55
55
|
redirect_to :back
|
56
56
|
end
|
57
57
|
else
|
58
|
-
flash[:error] = t('admin.message.unauthorized')
|
58
|
+
flash[:error] = t('camaleon_cms.admin.message.unauthorized')
|
59
59
|
redirect_to :back
|
60
60
|
end
|
61
61
|
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
|
-
class ApplicationDecorator < Draper::Decorator
|
9
|
+
class CamaleonCms::ApplicationDecorator < Draper::Decorator
|
10
10
|
delegate_all
|
11
11
|
@_deco_locale = nil
|
12
12
|
include MetasDecoratorMethods
|
@@ -14,7 +14,7 @@ class ApplicationDecorator < Draper::Decorator
|
|
14
14
|
# return the keywords for this model
|
15
15
|
def the_keywords
|
16
16
|
k = object.get_option("keywords", "")
|
17
|
-
k = h.current_site.the_keywords if object.class.name != "Site" && !k.present?
|
17
|
+
k = h.current_site.the_keywords if object.class.name != "CamaleonCms::Site" && !k.present?
|
18
18
|
k.to_s.translate(get_locale)
|
19
19
|
end
|
20
20
|
|
@@ -46,7 +46,7 @@ class ApplicationDecorator < Draper::Decorator
|
|
46
46
|
|
47
47
|
# build the attributes for this model
|
48
48
|
def the_seo
|
49
|
-
h.
|
49
|
+
h.cama_build_seo({ image: (the_thumb_url() rescue nil), title: the_title, description: the_excerpt, keywords: the_keywords, object: self })
|
50
50
|
end
|
51
51
|
|
52
52
|
# ---------------------
|
@@ -58,24 +58,12 @@ class ApplicationDecorator < Draper::Decorator
|
|
58
58
|
# if the request is not for frontend, then this will show current locale visited
|
59
59
|
def get_locale(locale = nil)
|
60
60
|
l = locale || @_deco_locale
|
61
|
-
(h.
|
61
|
+
(h.cama_is_admin_request? rescue false) ? h.current_site.get_languages.first : l
|
62
62
|
end
|
63
63
|
|
64
64
|
# internal helper
|
65
65
|
def _calc_locale(_l)
|
66
66
|
_l = (_l || @_deco_locale || I18n.locale).to_s
|
67
|
-
"_#{_l}" if _l != "en"
|
68
|
-
end
|
69
|
-
|
70
|
-
# save a cache value
|
71
|
-
# var_name: (string) cache var name
|
72
|
-
# value: optional (nil => value getter if not value will be saved)
|
73
|
-
# return value saved or recovered if value argument is nil
|
74
|
-
def cache_var(var_name, value = nil)
|
75
|
-
cache_key = "@cache_#{object.id}_#{object.class.name}_#{var_name}"
|
76
|
-
cache = instance_variable_get(cache_key) rescue nil
|
77
|
-
return cache if value.nil?
|
78
|
-
instance_variable_set(cache_key, value)
|
79
|
-
value
|
67
|
+
"_#{_l}"# if _l != "en"
|
80
68
|
end
|
81
69
|
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
|
-
class CategoryDecorator < TermTaxonomyDecorator
|
9
|
+
class CamaleonCms::CategoryDecorator < CamaleonCms::TermTaxonomyDecorator
|
10
10
|
delegate_all
|
11
11
|
|
12
12
|
# return the public url for this category
|
@@ -17,7 +17,12 @@ class CategoryDecorator < TermTaxonomyDecorator
|
|
17
17
|
args[:locale] = @_deco_locale unless args.include?(:locale)
|
18
18
|
args[:format] = "html"
|
19
19
|
as_path = args.delete(:as_path)
|
20
|
-
h.
|
20
|
+
h.cama_url_to_fixed("cama_category#{_calc_locale(args[:locale])}_#{as_path.present? ? "path" : "url"}", args)
|
21
|
+
end
|
22
|
+
|
23
|
+
# return edit url for this category
|
24
|
+
def the_edit_url
|
25
|
+
h.edit_cama_admin_post_type_category_url(object.post_type.id, object)
|
21
26
|
end
|
22
27
|
|
23
28
|
# return all children categories for the current category (active_record) filtered by permissions + hidden posts + roles + etc...
|
@@ -50,7 +55,7 @@ class CategoryDecorator < TermTaxonomyDecorator
|
|
50
55
|
# default: if thumbnail is not present, will render default
|
51
56
|
def the_thumb_url(default = nil)
|
52
57
|
th = object.get_option("thumb")
|
53
|
-
th.present? ? th : (default || h.asset_path("category-icon.png"))
|
58
|
+
th.present? ? th : (default || h.asset_path("camaleon_cms/category-icon.png"))
|
54
59
|
end
|
55
60
|
|
56
61
|
# return the post type of this post tag
|
@@ -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
|
-
class CustomFieldDecorator < Draper::Decorator
|
9
|
+
class CamaleonCms::CustomFieldDecorator < Draper::Decorator
|
10
10
|
delegate_all
|
11
11
|
|
12
12
|
def the_name
|
@@ -6,12 +6,13 @@
|
|
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 CustomFieldsConcern
|
9
|
+
module CamaleonCms::CustomFieldsConcern
|
10
10
|
# ======================CUSTOM FIELDS=====================================
|
11
11
|
# render as html the custom fields marked for frontend
|
12
12
|
def render_fields
|
13
|
-
|
14
|
-
|
13
|
+
object.cama_fetch_cache("render_fields") do
|
14
|
+
h.controller.render_to_string(partial: "partials/render_custom_field", :locals => {fields: object.get_fields_object(true)})
|
15
|
+
end
|
15
16
|
end
|
16
17
|
|
17
18
|
# return custom field content with key field_key
|
@@ -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 MetasDecoratorMethods
|
9
|
+
module CamaleonCms::MetasDecoratorMethods
|
10
10
|
# return meta value translated for key in this model
|
11
11
|
def the_option(key)
|
12
12
|
object.get_meta(key, "").translate(@_deco_locale)
|
@@ -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
|
-
class NavMenuItemDecorator < Draper::Decorator
|
10
|
-
include CustomFieldsConcern
|
9
|
+
class CamaleonCms::NavMenuItemDecorator < Draper::Decorator
|
10
|
+
include CamaleonCms::CustomFieldsConcern
|
11
11
|
delegate_all
|
12
12
|
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
|
-
class PostCommentDecorator < Draper::Decorator
|
9
|
+
class CamaleonCms::PostCommentDecorator < Draper::Decorator
|
10
10
|
delegate_all
|
11
11
|
|
12
12
|
# return created at date formatted
|
@@ -16,8 +16,9 @@ class PostCommentDecorator < Draper::Decorator
|
|
16
16
|
|
17
17
|
# return owner of this comment
|
18
18
|
def the_user
|
19
|
-
object.user
|
19
|
+
object.user.decorate
|
20
20
|
end
|
21
|
+
alias_method :the_author, :the_user
|
21
22
|
|
22
23
|
def the_content
|
23
24
|
object.content
|
@@ -6,8 +6,8 @@
|
|
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
|
-
class PostDecorator < ApplicationDecorator
|
10
|
-
include CustomFieldsConcern
|
9
|
+
class CamaleonCms::PostDecorator < CamaleonCms::ApplicationDecorator
|
10
|
+
include CamaleonCms::CustomFieldsConcern
|
11
11
|
delegate_all
|
12
12
|
|
13
13
|
|
@@ -19,7 +19,7 @@ class PostDecorator < ApplicationDecorator
|
|
19
19
|
|
20
20
|
# return the excerpt of this post
|
21
21
|
def the_excerpt(qty_chars = 200)
|
22
|
-
excerpt = object.
|
22
|
+
excerpt = object.get_meta("summary").to_s.translate(get_locale)
|
23
23
|
# r = {content: (excerpt.present? ? excerpt : object.content_filtered.to_s.translate(get_locale).strip_tags.gsub(/ |\n/, " ").truncate(qty_chars)), post: object}
|
24
24
|
r = {content: (excerpt.present? ? excerpt : h.cama_strip_shortcodes(object.content_filtered.to_s.translate(get_locale).strip_tags.gsub(/ |\n/, " ").truncate(qty_chars))), post: object}
|
25
25
|
h.hooks_run("post_the_excerpt", r)
|
@@ -37,23 +37,70 @@ class PostDecorator < ApplicationDecorator
|
|
37
37
|
# default: default image if thumbails not exist
|
38
38
|
# if default is empty, post_type default thumb will be returned
|
39
39
|
def the_thumb_url(default = nil)
|
40
|
-
th = object.
|
41
|
-
th.present? ? th : (default || object.post_type.get_option('default_thumb', nil) || h.asset_url("image-not-found.png"))
|
40
|
+
th = object.get_meta("thumb")
|
41
|
+
th.present? ? th : (default || object.post_type.get_option('default_thumb', nil) || h.asset_url("camaleon_cms/image-not-found.png"))
|
42
42
|
end
|
43
43
|
|
44
44
|
# check if this page has registered the thumbnail
|
45
45
|
def has_thumb?
|
46
|
-
object.
|
46
|
+
object.get_meta("thumb").present?
|
47
|
+
end
|
48
|
+
|
49
|
+
# return the path for this page
|
50
|
+
# sample: /my-page.html
|
51
|
+
def the_path(*args)
|
52
|
+
args = args.extract_options!
|
53
|
+
args[:as_path] = true
|
54
|
+
the_url(args)
|
47
55
|
end
|
48
56
|
|
49
57
|
# return front url for this post
|
58
|
+
# sample: http://localhost.com/my-page.html
|
59
|
+
# args:
|
60
|
+
# locale: language (default current language)
|
61
|
+
# as_path: return the path instead of full url, sample: /my-page.html
|
62
|
+
# Also, you can pass extra attributes as params for the url, sample: page.the_url(my_param: 'value', other: "asd")
|
63
|
+
# => http://localhost.com/my-page.html?my_param=value&other=asd
|
64
|
+
# Return String URL
|
50
65
|
def the_url(*args)
|
51
66
|
args = args.extract_options!
|
52
67
|
args[:slug] = the_slug
|
53
68
|
args[:locale] = get_locale unless args.include?(:locale)
|
54
69
|
args[:format] = "html"
|
55
|
-
|
56
|
-
|
70
|
+
p = args.delete(:as_path).present? ? "path" : "url"
|
71
|
+
l = _calc_locale(args[:locale])
|
72
|
+
ptype = object.post_type.decorate
|
73
|
+
p_url_format = ptype.contents_route_format
|
74
|
+
case p_url_format
|
75
|
+
when "post_of_post_type"
|
76
|
+
args[:post_type_id] = ptype.id
|
77
|
+
args[:title] = ptype.the_title.parameterize
|
78
|
+
when "post_of_category"
|
79
|
+
if ptype.manage_categories?
|
80
|
+
cat = object.categories.first.decorate rescue ptype.default_category.decorate
|
81
|
+
args[:category_id] = cat.id
|
82
|
+
args[:title] = cat.the_title.parameterize
|
83
|
+
else
|
84
|
+
p_url_format = "post"
|
85
|
+
l = ""
|
86
|
+
end
|
87
|
+
when "post_of_posttype"
|
88
|
+
args[:post_type_title] = ptype.the_title.parameterize
|
89
|
+
l = ""
|
90
|
+
when "post_of_category_post_type"
|
91
|
+
if ptype.manage_categories?
|
92
|
+
cat = object.categories.first.decorate rescue ptype.default_category.decorate
|
93
|
+
args[:post_type_title] = ptype.the_title.parameterize
|
94
|
+
args[:category_id] = cat.id
|
95
|
+
args[:title] = cat.the_title.parameterize
|
96
|
+
else
|
97
|
+
p_url_format = "post"
|
98
|
+
l = ""
|
99
|
+
end
|
100
|
+
else
|
101
|
+
l = ""
|
102
|
+
end
|
103
|
+
h.cama_url_to_fixed("cama_#{p_url_format}#{l}_#{p}", args)
|
57
104
|
end
|
58
105
|
|
59
106
|
# return a hash of frontend urls for this post
|
@@ -70,14 +117,14 @@ class PostDecorator < ApplicationDecorator
|
|
70
117
|
|
71
118
|
# return edit url for this post
|
72
119
|
def the_edit_url
|
73
|
-
h.
|
120
|
+
h.edit_cama_admin_post_type_post_url(object.post_type.id, object)
|
74
121
|
end
|
75
122
|
|
76
123
|
# create the html link with edit link
|
77
124
|
# return html link
|
78
125
|
# attrs: Hash of link tag attributes, sample: {id: "myid", class: "sss" }
|
79
126
|
def the_edit_link(title = nil, attrs = { })
|
80
|
-
return '' unless h.
|
127
|
+
return '' unless h.cama_current_user.present?
|
81
128
|
attrs = {target: "_blank", style: "font-size:11px !important;cursor:pointer;"}.merge(attrs)
|
82
129
|
h.link_to("→ #{title || h.ct("edit")}".html_safe, the_edit_url, attrs)
|
83
130
|
end
|
@@ -100,16 +147,16 @@ class PostDecorator < ApplicationDecorator
|
|
100
147
|
case self.status
|
101
148
|
when "published"
|
102
149
|
color = "info"
|
103
|
-
status = I18n.t('admin.post_type.published')
|
150
|
+
status = I18n.t('camaleon_cms.admin.post_type.published')
|
104
151
|
when "draft"
|
105
152
|
color = "warning"
|
106
|
-
status = I18n.t('admin.table.draft')
|
153
|
+
status = I18n.t('camaleon_cms.admin.table.draft')
|
107
154
|
when "trash"
|
108
155
|
color = "danger"
|
109
|
-
status = I18n.t('admin.table.trash')
|
156
|
+
status = I18n.t('camaleon_cms.admin.table.trash')
|
110
157
|
when "pending"
|
111
158
|
color = "default"
|
112
|
-
status = I18n.t('admin.table.pending')
|
159
|
+
status = I18n.t('camaleon_cms.admin.table.pending')
|
113
160
|
else
|
114
161
|
color = "default"
|
115
162
|
status = self.status
|
@@ -6,18 +6,23 @@
|
|
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
|
-
class PostTagDecorator < TermTaxonomyDecorator
|
9
|
+
class CamaleonCms::PostTagDecorator < CamaleonCms::TermTaxonomyDecorator
|
10
10
|
delegate_all
|
11
11
|
|
12
12
|
# return the public url for this post tag
|
13
13
|
def the_url(*args)
|
14
14
|
args = args.extract_options!
|
15
15
|
args[:post_tag_id] = the_id
|
16
|
-
args[:title] = the_title
|
16
|
+
args[:title] = the_title.parameterize
|
17
17
|
args[:locale] = get_locale unless args.include?(:locale)
|
18
18
|
args[:format] = "html"
|
19
19
|
as_path = args.delete(:as_path)
|
20
|
-
h.
|
20
|
+
h.cama_url_to_fixed("cama_post_tag#{_calc_locale(args[:locale])}_#{as_path.present? ? "path" : "url"}", args)
|
21
|
+
end
|
22
|
+
|
23
|
+
# return edit url for this post
|
24
|
+
def the_edit_url
|
25
|
+
h.edit_cama_admin_post_type_post_tag_url(object.post_type.id, object)
|
21
26
|
end
|
22
27
|
|
23
28
|
# return the post type of this post tag
|
@@ -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
|
-
class PostTypeDecorator < TermTaxonomyDecorator
|
9
|
+
class CamaleonCms::PostTypeDecorator < CamaleonCms::TermTaxonomyDecorator
|
10
10
|
delegate_all
|
11
11
|
|
12
12
|
# return the public url for this post type
|
@@ -17,7 +17,23 @@ class PostTypeDecorator < TermTaxonomyDecorator
|
|
17
17
|
args[:locale] = get_locale unless args.include?(:locale)
|
18
18
|
args[:format] = "html"
|
19
19
|
as_path = args.delete(:as_path)
|
20
|
-
h.
|
20
|
+
h.cama_url_to_fixed("cama_post_type#{_calc_locale(args[:locale])}_#{as_path.present? ? "path" : "url"}", args)
|
21
|
+
end
|
22
|
+
|
23
|
+
# return edit url for this post type
|
24
|
+
def the_edit_url
|
25
|
+
h.edit_cama_admin_settings_post_type_url(object.id)
|
26
|
+
end
|
27
|
+
|
28
|
+
# return the admin list url for this post type
|
29
|
+
def the_admin_url(list_type = "post")
|
30
|
+
if list_type == "post"
|
31
|
+
h.cama_admin_post_type_posts_path(object.id)
|
32
|
+
elsif list_type == "tag"
|
33
|
+
h.cama_admin_post_type_post_tags_path(object.id)
|
34
|
+
else # categories
|
35
|
+
h.cama_admin_post_type_categories_path(object.id)
|
36
|
+
end
|
21
37
|
end
|
22
38
|
|
23
39
|
# add_post_type: true/false to include post type link
|
@@ -26,17 +42,24 @@ class PostTypeDecorator < TermTaxonomyDecorator
|
|
26
42
|
h.breadcrumb_add(self.the_title, is_parent ? self.the_url : nil) if add_post_type
|
27
43
|
end
|
28
44
|
|
29
|
-
# return
|
45
|
+
# return main categories (first level) for the post_type (active_record) filtered by permissions
|
30
46
|
# in return object, you can add custom where's or pagination like here:
|
31
47
|
# http://edgeguides.rubyonrails.org/active_record_querying.html
|
32
48
|
def the_categories
|
33
49
|
object.categories
|
34
50
|
end
|
35
51
|
|
52
|
+
# return full categories (all levels) for the post_type (active_record) filtered by permissions
|
53
|
+
# in return object, you can add custom where's or pagination like here:
|
54
|
+
# http://edgeguides.rubyonrails.org/active_record_querying.html
|
55
|
+
def the_full_categories
|
56
|
+
object.full_categories
|
57
|
+
end
|
58
|
+
|
36
59
|
# return a category from this post_type with id (integer) or by slug (string)
|
37
60
|
def the_category(slug_or_id)
|
38
|
-
return
|
39
|
-
return
|
61
|
+
return the_categories.where(id: slug_or_id).first if slug_or_id.is_a?(Integer)
|
62
|
+
return the_categories.find_by_slug(slug_or_id) if slug_or_id.is_a?(String)
|
40
63
|
end
|
41
64
|
|
42
65
|
# return all post_tags for the post_type (active_record) filtered by permissions + hidden posts + roles + etc...
|
@@ -50,6 +73,6 @@ class PostTypeDecorator < TermTaxonomyDecorator
|
|
50
73
|
# default: if thumbnail is not present, will render default
|
51
74
|
def the_thumb_url(default = nil)
|
52
75
|
th = object.get_option("thumb")
|
53
|
-
th.present? ? th : (default || h.asset_url("image-not-found.png"))
|
76
|
+
th.present? ? th : (default || h.asset_url("camaleon_cms/image-not-found.png"))
|
54
77
|
end
|
55
78
|
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
|
-
class SiteDecorator < TermTaxonomyDecorator
|
9
|
+
class CamaleonCms::SiteDecorator < CamaleonCms::TermTaxonomyDecorator
|
10
10
|
delegate_all
|
11
11
|
|
12
12
|
def the_description
|
@@ -16,29 +16,32 @@ class SiteDecorator < TermTaxonomyDecorator
|
|
16
16
|
# return logo url for this site
|
17
17
|
# default: this url will be returned if logo is not present.
|
18
18
|
def the_logo(default = nil)
|
19
|
-
object.
|
19
|
+
object.get_option("logo") || (default || "#{h.asset_url("camaleon_cms/camaleon.png")}")
|
20
20
|
end
|
21
21
|
|
22
22
|
def the_icon
|
23
|
-
object.
|
23
|
+
object.get_option("icon") || h.asset_url('camaleon_cms/favicon.ico')
|
24
24
|
end
|
25
25
|
|
26
26
|
# return all contents from this site registered for post_type = slug (filter visibility, hidden, expired, ...)
|
27
27
|
# slug_or_id: slug or id of the post_type or array of slugs of post_types, default 'post'
|
28
28
|
def the_contents(slug_or_id = "post")
|
29
|
-
return h.verify_front_visibility(object.posts.where("
|
30
|
-
return h.verify_front_visibility(object.posts.where("
|
31
|
-
return h.verify_front_visibility(object.posts.where("
|
29
|
+
return h.verify_front_visibility(object.posts.where("#{CamaleonCms::TermTaxonomy.table_name}.id = ?", slug_or_id)).eager_load(:post_type) if slug_or_id.is_a?(Integer)
|
30
|
+
return h.verify_front_visibility(object.posts.where("#{CamaleonCms::TermTaxonomy.table_name}.slug = ?", slug_or_id)).eager_load(:post_type) if slug_or_id.is_a?(String)
|
31
|
+
return h.verify_front_visibility(object.posts.where("#{CamaleonCms::TermTaxonomy.table_name}.slug in (?)", slug_or_id)).eager_load(:post_type) if slug_or_id.is_a?(Array)
|
32
32
|
end
|
33
33
|
|
34
|
-
# return all contents for this site
|
35
|
-
#
|
36
|
-
#
|
34
|
+
# return all contents for this site filteredby (visibility, hidden, expired, ...)
|
35
|
+
# slug_or_id: (slug of the post_type) possible values:
|
36
|
+
# empty: return all posts of the current site
|
37
|
+
# string: return all posts of post_type with slug = slug_or_id
|
38
|
+
# integer: return all posts of post_type with id = slug_or_id
|
39
|
+
# array: return all posts of post_types with slug in slug_or_id
|
37
40
|
def the_posts(slug_or_id = nil)
|
38
41
|
if slug_or_id.present?
|
39
42
|
the_contents(slug_or_id)
|
40
43
|
else
|
41
|
-
h.verify_front_visibility(object.posts)
|
44
|
+
h.verify_front_visibility(object.posts).eager_load(:post_type)
|
42
45
|
end
|
43
46
|
end
|
44
47
|
|
@@ -103,11 +106,12 @@ class SiteDecorator < TermTaxonomyDecorator
|
|
103
106
|
# Arguments:
|
104
107
|
# slug_or_id: string or integer
|
105
108
|
# return:
|
106
|
-
# slug_or_id:
|
107
|
-
# slug_or_id:
|
108
|
-
# slug_or_id:
|
109
|
+
# slug_or_id: integer => return the post type with id = slug_or_id
|
110
|
+
# slug_or_id: string => return the post type with slug = slug_or_id
|
111
|
+
# slug_or_id: array => return all post types with slugs in the array of this site
|
109
112
|
def the_post_type(slug_or_id)
|
110
113
|
return object.post_types.find_by_slug(slug_or_id).decorate rescue nil if slug_or_id.is_a?(String)
|
114
|
+
return object.post_types.find_by_slug(slug_or_id).decorate rescue nil if slug_or_id.is_a?(Array)
|
111
115
|
return object.post_types.find(slug_or_id).decorate rescue nil if slug_or_id.is_a?(Integer)
|
112
116
|
end
|
113
117
|
|
@@ -120,8 +124,8 @@ class SiteDecorator < TermTaxonomyDecorator
|
|
120
124
|
res = ["<ul class='#{list_class}'>"]
|
121
125
|
lan.each do |lang|
|
122
126
|
path = lang.to_s+'.png'
|
123
|
-
img = "<img src='#{h.asset_path("language/#{path}")}'/>"
|
124
|
-
res << "<li class='#{ current_class if I18n.locale.to_s == lang.to_s}'> <a href='#{h.
|
127
|
+
img = "<img src='#{h.asset_path("camaleon_cms/language/#{path}")}'/>"
|
128
|
+
res << "<li class='#{ current_class if I18n.locale.to_s == lang.to_s}'> <a href='#{h.cama_url_to_fixed(current_page ? "url_for" : "cama_root_url", {locale: lang})}'>#{img}</a> </li>"
|
125
129
|
end
|
126
130
|
res << "</ul>"
|
127
131
|
res.join("")
|
@@ -135,7 +139,7 @@ class SiteDecorator < TermTaxonomyDecorator
|
|
135
139
|
# return the role_id of current visitor for this site
|
136
140
|
# if the visitor was not logged in, then return -1
|
137
141
|
def visitor_role
|
138
|
-
h.signin? ? h.
|
142
|
+
h.signin? ? h.cama_current_user.get_role(object).slug : "-1"
|
139
143
|
end
|
140
144
|
|
141
145
|
# check if plugin_key is already installed for this site
|
@@ -148,13 +152,12 @@ class SiteDecorator < TermTaxonomyDecorator
|
|
148
152
|
# return root url for this site
|
149
153
|
def the_url(*args)
|
150
154
|
args = args.extract_options!
|
151
|
-
|
152
|
-
args[:host] = object.main_site? ? base_domain : (object.slug.include?(".") ? object.slug : "#{object.slug}.#{base_domain}" )
|
155
|
+
args[:host] = object.main_site? ? object.slug : (object.slug.include?(".") ? object.slug : "#{object.slug}.#{PluginRoutes.system_info["base_domain"]}" )
|
153
156
|
args[:port] = (args[:host].split(":")[1] rescue nil)
|
154
157
|
args[:locale] = @_deco_locale unless args.include?(:locale)
|
155
158
|
args[:host] = args[:host].split(":").first
|
156
159
|
args.delete(:as_path)
|
157
|
-
h.
|
160
|
+
h.cama_url_to_fixed("cama_root_url", args)
|
158
161
|
end
|
159
162
|
|
160
163
|
# draw bread crumb for current site
|
@@ -165,10 +168,9 @@ class SiteDecorator < TermTaxonomyDecorator
|
|
165
168
|
# =============================== ADMIN =======================
|
166
169
|
# admin root url for this site
|
167
170
|
def the_admin_url
|
168
|
-
|
169
|
-
host = object.main_site? ? base_domain : (object.slug.include?(".") ? object.slug : "#{object.slug}.#{base_domain}" )
|
171
|
+
host = object.main_site? ? object.slug : (object.slug.include?(".") ? object.slug : "#{object.slug}.#{PluginRoutes.system_info["base_domain"]}" )
|
170
172
|
port = (host.split(":")[1] rescue nil)
|
171
|
-
h.
|
173
|
+
h.cama_url_to_fixed("cama_admin_dashboard_url", host: host, port: port, locale: false)
|
172
174
|
end
|
173
175
|
|
174
176
|
# check if current user can manage sites
|