├── .eslintrc.js ├── .github └── workflows │ ├── current_support.yml │ └── experimental_support.yml ├── .gitignore ├── .rspec ├── .rubocop.yml ├── .rubocop_todo.yml ├── CHANGELOG.md ├── Dockerfile ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── Rakefile ├── SECURITY.md ├── app ├── apps │ ├── plugins │ │ ├── attack │ │ │ ├── admin_controller.rb │ │ │ ├── attack_helper.rb │ │ │ ├── config │ │ │ │ ├── config.json │ │ │ │ ├── custom_models.rb │ │ │ │ ├── locales │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── translation.yml │ │ │ │ └── routes_admin.txt │ │ │ ├── models │ │ │ │ └── attack.rb │ │ │ └── views │ │ │ │ └── admin │ │ │ │ └── settings.html.erb │ │ ├── authoring_post │ │ │ ├── authoring_post_helper.rb │ │ │ └── config │ │ │ │ └── config.json │ │ ├── front_cache │ │ │ ├── admin_controller.rb │ │ │ ├── config │ │ │ │ ├── config.json │ │ │ │ ├── initializer.rb │ │ │ │ ├── locales │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── translation.yml │ │ │ │ └── routes_admin.txt │ │ │ ├── front_cache_helper.rb │ │ │ └── views │ │ │ │ └── admin │ │ │ │ └── settings.html.erb │ │ └── visibility_post │ │ │ ├── assets │ │ │ └── js │ │ │ │ └── form.js │ │ │ ├── config │ │ │ └── config.json │ │ │ └── visibility_post_helper.rb │ └── themes │ │ ├── camaleon_first │ │ ├── assets │ │ │ ├── css │ │ │ │ ├── magnific-ver.css │ │ │ │ ├── main.css │ │ │ │ ├── style-ver.css.scss │ │ │ │ └── wpbase.css │ │ │ ├── images │ │ │ │ ├── empe.jpg │ │ │ │ ├── image.png │ │ │ │ ├── loader.gif │ │ │ │ └── zoom.png │ │ │ └── js │ │ │ │ ├── hover.zoom.js │ │ │ │ ├── magnific.min.js │ │ │ │ ├── main-ver.js │ │ │ │ ├── main.js │ │ │ │ └── modernizr.custom.js │ │ ├── config │ │ │ └── config.json │ │ ├── main_helper.rb │ │ └── views │ │ │ ├── index.html.erb │ │ │ ├── layouts │ │ │ ├── camaleon_cms │ │ │ │ └── mailer.html.erb │ │ │ └── index.html.erb │ │ │ ├── mailer.html.erb │ │ │ ├── partials │ │ │ └── readme.txt │ │ │ └── template_sample_page.html.erb │ │ ├── default │ │ ├── assets │ │ │ ├── css │ │ │ │ ├── main.css │ │ │ │ ├── style.css.scss │ │ │ │ └── styles.css.scss │ │ │ ├── genericons │ │ │ │ ├── COPYING.txt │ │ │ │ ├── Genericons-Regular.otf │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── README.txt │ │ │ │ ├── font │ │ │ │ │ ├── genericons-regular-webfont.eot │ │ │ │ │ ├── genericons-regular-webfont.svg │ │ │ │ │ ├── genericons-regular-webfont.ttf │ │ │ │ │ └── genericons-regular-webfont.woff │ │ │ │ └── genericons.css │ │ │ ├── images │ │ │ │ ├── circle.png │ │ │ │ ├── dotted-line-2x.png │ │ │ │ ├── dotted-line-light-2x.png │ │ │ │ ├── dotted-line-light.png │ │ │ │ ├── dotted-line.png │ │ │ │ ├── headers │ │ │ │ │ ├── circle-thumbnail.png │ │ │ │ │ ├── circle.png │ │ │ │ │ ├── diamond-thumbnail.png │ │ │ │ │ ├── diamond.png │ │ │ │ │ ├── star-thumbnail.png │ │ │ │ │ └── star.png │ │ │ │ ├── image.png │ │ │ │ ├── search-icon-2x.png │ │ │ │ └── search-icon.png │ │ │ └── js │ │ │ │ └── main.js │ │ ├── config │ │ │ └── config.json │ │ ├── default_helper.rb │ │ └── views │ │ │ ├── admin │ │ │ └── settings.html.erb │ │ │ ├── category.html.erb │ │ │ ├── index.html.erb │ │ │ ├── layouts │ │ │ └── index.html.erb │ │ │ ├── page.html.erb │ │ │ ├── partials │ │ │ ├── _breadcrumb.html.erb │ │ │ ├── _categories_list.html.erb │ │ │ ├── _comments.html.erb │ │ │ ├── _comments_list.html.erb │ │ │ ├── _flash_messages.html.erb │ │ │ ├── _forms.html.erb │ │ │ ├── _post_list_item.html.erb │ │ │ ├── _search_form.html.erb │ │ │ └── _sidebar.html.erb │ │ │ ├── post.html.erb │ │ │ ├── post_tag.html.erb │ │ │ ├── post_type.html.erb │ │ │ └── search.html.erb │ │ └── new │ │ ├── assets │ │ ├── css │ │ │ ├── main.css │ │ │ └── styles.css.scss │ │ ├── images │ │ │ └── image.png │ │ └── js │ │ │ └── main.js │ │ ├── config │ │ └── config.json │ │ ├── custom_helper.rb │ │ ├── image.png │ │ └── views │ │ ├── admin │ │ └── settings.html.erb │ │ ├── category.html.erb │ │ ├── index.html.erb │ │ ├── layouts │ │ ├── _footer.html.erb │ │ ├── _header.html.erb │ │ └── index.html.erb │ │ ├── page.html.erb │ │ ├── post.html.erb │ │ ├── post_tag.html.erb │ │ ├── post_type.html.erb │ │ └── search.html.erb ├── assets │ ├── config │ │ └── camaleon-cms.js │ ├── images │ │ ├── camaleon.png │ │ └── camaleon_cms │ │ │ ├── admin │ │ │ ├── admin_spinner.gif │ │ │ ├── glyphicons-halflings.png │ │ │ ├── intro │ │ │ │ └── menus.png │ │ │ └── no_image.jpg │ │ │ ├── bg-tree.jpeg │ │ │ ├── camaleon-dark.png │ │ │ ├── camaleon.png │ │ │ ├── category-icon.png │ │ │ ├── favicon.ico │ │ │ ├── image-not-found.png │ │ │ ├── language │ │ │ ├── de.png │ │ │ ├── en.png │ │ │ ├── es.png │ │ │ ├── fr.png │ │ │ ├── it.png │ │ │ ├── md.png │ │ │ ├── nl.png │ │ │ ├── pl.png │ │ │ ├── pt-BR.png │ │ │ ├── pt.png │ │ │ ├── ru.png │ │ │ ├── uk.png │ │ │ └── zh-CN.png │ │ │ ├── loader.gif │ │ │ └── users │ │ │ └── no-image.jpg │ ├── javascripts │ │ └── camaleon_cms │ │ │ ├── admin │ │ │ ├── _actions.js │ │ │ ├── _bootstrap-datepicker.js │ │ │ ├── _bootstrap-select.js │ │ │ ├── _custom_fields.js │ │ │ ├── _data.js │ │ │ ├── _i18n.js │ │ │ ├── _jquery-ui.min.js │ │ │ ├── _jquery.slugify.js │ │ │ ├── _jquery.tagsinput.min.js │ │ │ ├── _libraries.js │ │ │ ├── _modal.js │ │ │ ├── _post.js │ │ │ ├── _posttype.js │ │ │ ├── _translator.js │ │ │ ├── _user_profile.js │ │ │ ├── admin-basic-manifest.js │ │ │ ├── admin-manifest.js │ │ │ ├── bootstrap-colorpicker.js │ │ │ ├── custom_fields_form.js │ │ │ ├── introjs │ │ │ │ ├── intro.min.js │ │ │ │ └── intro.min.js.map │ │ │ ├── jquery-sieve.js │ │ │ ├── jquery.nestable.js │ │ │ ├── jquery.validate.js │ │ │ ├── jquery_validate │ │ │ │ ├── messages_ar.js │ │ │ │ ├── messages_de.js │ │ │ │ ├── messages_es.js │ │ │ │ ├── messages_fr.js │ │ │ │ ├── messages_it.js │ │ │ │ ├── messages_nl.js │ │ │ │ ├── messages_pt-BR.js │ │ │ │ ├── messages_ru.js │ │ │ │ ├── messages_uk.js │ │ │ │ ├── messages_zh-CN.js │ │ │ │ ├── methods_de.js │ │ │ │ ├── methods_nl.js │ │ │ │ └── methods_pt.js │ │ │ ├── lte │ │ │ │ └── app.js │ │ │ ├── momentjs │ │ │ │ ├── _moment.js │ │ │ │ ├── ar.js │ │ │ │ ├── ca.js │ │ │ │ ├── de.js │ │ │ │ ├── es.js │ │ │ │ ├── fr.js │ │ │ │ ├── it.js │ │ │ │ ├── ja.js │ │ │ │ ├── nl.js │ │ │ │ ├── pl.js │ │ │ │ ├── pt-BR.js │ │ │ │ ├── pt.js │ │ │ │ ├── ru.js │ │ │ │ ├── uk.js │ │ │ │ └── zh-CN.js │ │ │ ├── nav_menu.js │ │ │ ├── tageditor │ │ │ │ ├── _jquery.caret.min.js │ │ │ │ └── _jquery.tag-editor.js │ │ │ ├── tinymce │ │ │ │ ├── langs │ │ │ │ │ ├── de.js │ │ │ │ │ ├── en.js │ │ │ │ │ ├── es.js │ │ │ │ │ ├── fr.js │ │ │ │ │ ├── it.js │ │ │ │ │ ├── nl.js │ │ │ │ │ ├── pt-BR.js │ │ │ │ │ ├── readme.md │ │ │ │ │ ├── ru.js │ │ │ │ │ ├── uk.js │ │ │ │ │ └── zh-CN.js │ │ │ │ └── plugins │ │ │ │ │ └── filemanager │ │ │ │ │ └── plugin.min.js │ │ │ └── uploader │ │ │ │ ├── _cropper.min.js │ │ │ │ ├── _jquery.form.js │ │ │ │ ├── _jquery.uploadfile.min.js │ │ │ │ ├── _media_manager.js │ │ │ │ └── uploader_manifest.js │ │ │ └── bootstrap.min.js │ └── stylesheets │ │ ├── camaleon_cms │ │ ├── admin │ │ │ ├── _bootstrap-datepicker.css.scss │ │ │ ├── _bootstrap-select.css │ │ │ ├── _custom_admin.css.scss │ │ │ ├── _jquery.tagsinput.css │ │ │ ├── admin-basic-manifest.css │ │ │ ├── admin-manifest.css │ │ │ ├── colorpicker.css │ │ │ ├── img │ │ │ │ ├── bg.png │ │ │ │ ├── colorpicker │ │ │ │ │ ├── alpha.png │ │ │ │ │ ├── hue.png │ │ │ │ │ └── saturation.png │ │ │ │ ├── girls-1.jpg │ │ │ │ ├── jquery │ │ │ │ │ └── resize-icon.png │ │ │ │ ├── loading.gif │ │ │ │ ├── logo-small.png │ │ │ │ ├── logo.png │ │ │ │ ├── no_image.jpg │ │ │ │ ├── rormeleon-white.png │ │ │ │ └── thumb_no_found.jpg │ │ │ ├── introjs │ │ │ │ ├── introjs.min.css │ │ │ │ └── introjs.min.css.map │ │ │ ├── jquery │ │ │ │ ├── _jquery-ui.scss │ │ │ │ └── images │ │ │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ │ ├── ui-icons_888888_256x240.png │ │ │ │ │ └── ui-icons_cd0a0a_256x240.png │ │ │ ├── lte │ │ │ │ ├── _admin.css.scss │ │ │ │ └── skins │ │ │ │ │ ├── skin-black-light.css │ │ │ │ │ ├── skin-black.css │ │ │ │ │ ├── skin-blue-light.css │ │ │ │ │ ├── skin-blue.css │ │ │ │ │ ├── skin-green-light.css │ │ │ │ │ ├── skin-green.css │ │ │ │ │ ├── skin-purple-light.css │ │ │ │ │ ├── skin-purple.css │ │ │ │ │ ├── skin-red-light.css │ │ │ │ │ ├── skin-red.css │ │ │ │ │ ├── skin-yellow-light.css │ │ │ │ │ └── skin-yellow.css │ │ │ ├── nestable │ │ │ │ └── jquery.nestable.css │ │ │ ├── tageditor │ │ │ │ └── _jquery.tag-editor.css.scss │ │ │ ├── uploader │ │ │ │ ├── _cropper.min.css │ │ │ │ ├── _uploadfile.css.scss │ │ │ │ └── uploader_manifest.css │ │ │ └── widgets.css.scss │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ └── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 ├── controllers │ ├── camaleon_cms │ │ ├── admin │ │ │ ├── appearances │ │ │ │ ├── nav_menus_controller.rb │ │ │ │ ├── themes_controller.rb │ │ │ │ └── widgets │ │ │ │ │ ├── assign_controller.rb │ │ │ │ │ ├── main_controller.rb │ │ │ │ │ └── sidebar_controller.rb │ │ │ ├── categories_controller.rb │ │ │ ├── comments_controller.rb │ │ │ ├── installers_controller.rb │ │ │ ├── media_controller.rb │ │ │ ├── plugins_controller.rb │ │ │ ├── post_tags_controller.rb │ │ │ ├── posts │ │ │ │ └── drafts_controller.rb │ │ │ ├── posts_controller.rb │ │ │ ├── sessions_controller.rb │ │ │ ├── settings │ │ │ │ ├── custom_fields_controller.rb │ │ │ │ ├── post_types_controller.rb │ │ │ │ └── sites_controller.rb │ │ │ ├── settings_controller.rb │ │ │ ├── user_roles_controller.rb │ │ │ └── users_controller.rb │ │ ├── admin_controller.rb │ │ ├── apps │ │ │ ├── plugins_admin_controller.rb │ │ │ ├── plugins_front_controller.rb │ │ │ ├── themes_admin_controller.rb │ │ │ └── themes_front_controller.rb │ │ ├── camaleon_controller.rb │ │ └── frontend_controller.rb │ └── concerns │ │ └── camaleon_cms │ │ └── frontend_concern.rb ├── decorators │ └── camaleon_cms │ │ ├── application_decorator.rb │ │ ├── category_decorator.rb │ │ ├── custom_field_decorator.rb │ │ ├── custom_fields_concern.rb │ │ ├── metas_decorator_methods.rb │ │ ├── nav_menu_item_decorator.rb │ │ ├── plugin_decorator.rb │ │ ├── post_comment_decorator.rb │ │ ├── post_decorator.rb │ │ ├── post_tag_decorator.rb │ │ ├── post_type_decorator.rb │ │ ├── site_decorator.rb │ │ ├── term_taxonomy_decorator.rb │ │ ├── theme_decorator.rb │ │ ├── user_decorator.rb │ │ ├── user_role_decorator.rb │ │ └── widget_decorator.rb ├── helpers │ └── camaleon_cms │ │ ├── admin │ │ ├── application_helper.rb │ │ ├── breadcrumb_helper.rb │ │ ├── category_helper.rb │ │ ├── custom_fields_helper.rb │ │ ├── menus_helper.rb │ │ └── post_type_helper.rb │ │ ├── camaleon_helper.rb │ │ ├── captcha_helper.rb │ │ ├── comment_helper.rb │ │ ├── content_helper.rb │ │ ├── email_helper.rb │ │ ├── frontend │ │ ├── application_helper.rb │ │ ├── content_select_helper.rb │ │ ├── nav_menu_helper.rb │ │ ├── seo_helper.rb │ │ └── site_helper.rb │ │ ├── hooks_helper.rb │ │ ├── html_helper.rb │ │ ├── plugins_helper.rb │ │ ├── session_helper.rb │ │ ├── short_code_helper.rb │ │ ├── site_helper.rb │ │ ├── theme_helper.rb │ │ ├── uploader_helper.rb │ │ └── user_roles_helper.rb ├── mailers │ └── camaleon_cms │ │ └── html_mailer.rb ├── models │ ├── camaleon_cms │ │ ├── ability.rb │ │ ├── category.rb │ │ ├── custom_field.rb │ │ ├── custom_field_group.rb │ │ ├── custom_fields_relationship.rb │ │ ├── media.rb │ │ ├── meta.rb │ │ ├── nav_menu.rb │ │ ├── nav_menu_item.rb │ │ ├── plugin.rb │ │ ├── post.rb │ │ ├── post_comment.rb │ │ ├── post_default.rb │ │ ├── post_relationship.rb │ │ ├── post_tag.rb │ │ ├── post_type.rb │ │ ├── site.rb │ │ ├── term_relationship.rb │ │ ├── term_taxonomy.rb │ │ ├── theme.rb │ │ ├── user.rb │ │ ├── user_role.rb │ │ ├── widget.rb │ │ └── widget │ │ │ ├── assigned.rb │ │ │ ├── main.rb │ │ │ └── sidebar.rb │ ├── camaleon_record.rb │ ├── concerns │ │ ├── .keep │ │ └── camaleon_cms │ │ │ ├── categories_tags_for_posts.rb │ │ │ ├── common_relationships.rb │ │ │ ├── custom_fields_read.rb │ │ │ ├── metas.rb │ │ │ ├── normalize_attrs.rb │ │ │ ├── site_default_settings.rb │ │ │ └── user_methods.rb │ ├── plugins.rb │ └── themes.rb ├── uploaders │ ├── camaleon_cms_aws_uploader.rb │ ├── camaleon_cms_local_uploader.rb │ └── camaleon_cms_uploader.rb ├── validators │ └── camaleon_cms │ │ ├── post_uniq_validator.rb │ │ ├── uniq_validator.rb │ │ └── user_url_validator.rb └── views │ ├── camaleon_cms │ ├── 404.html.erb │ ├── 500.html.erb │ ├── _flash_messages.html.erb │ ├── admin │ │ ├── appearances │ │ │ ├── nav_menus │ │ │ │ ├── _custom_fields.html.erb │ │ │ │ ├── _custom_menus.html.erb │ │ │ │ ├── _external_menu.html.erb │ │ │ │ ├── _form.html.erb │ │ │ │ ├── _left_menu_items.html.erb │ │ │ │ ├── _menu_items.html.erb │ │ │ │ ├── _menu_items_list.html.erb │ │ │ │ ├── _menu_options.html.erb │ │ │ │ └── index.html.erb │ │ │ ├── themes │ │ │ │ ├── index.html.erb │ │ │ │ ├── preview.html.erb │ │ │ │ └── theme_load_data.html.erb │ │ │ └── widgets │ │ │ │ ├── assign │ │ │ │ └── _form.html.erb │ │ │ │ ├── main │ │ │ │ ├── _sidebar.html.erb │ │ │ │ ├── form.html.erb │ │ │ │ └── index.html.erb │ │ │ │ └── sidebar │ │ │ │ └── form.html.erb │ │ ├── categories │ │ │ ├── _form.html.erb │ │ │ ├── edit.html.erb │ │ │ └── index.html.erb │ │ ├── comments │ │ │ ├── form.html.erb │ │ │ ├── form_answer.html.erb │ │ │ ├── index.html.erb │ │ │ └── list.html.erb │ │ ├── dashboard.html.erb │ │ ├── installers │ │ │ ├── form.html.erb │ │ │ └── welcome.html.erb │ │ ├── media │ │ │ ├── _render_file_item.html.erb │ │ │ └── index.html.erb │ │ ├── plugins │ │ │ ├── _plugins_list.html.erb │ │ │ └── index.html.erb │ │ ├── post_tags │ │ │ ├── _form.html.erb │ │ │ ├── edit.html.erb │ │ │ └── index.html.erb │ │ ├── posts │ │ │ ├── _filter_posts.html.erb │ │ │ ├── _sidebar.html.erb │ │ │ ├── form.html.erb │ │ │ ├── index.html.erb │ │ │ └── show.html.erb │ │ ├── search.html.erb │ │ ├── sessions │ │ │ ├── forgot.html.erb │ │ │ ├── login.html.erb │ │ │ └── register.html.erb │ │ ├── settings │ │ │ ├── _configuration_settings.html.erb │ │ │ ├── _email_settings.html.erb │ │ │ ├── _file_system_settings.html.erb │ │ │ ├── _media_settings.html.erb │ │ │ ├── _seo_settings.html.erb │ │ │ ├── custom_fields │ │ │ │ ├── _get_items.html.erb │ │ │ │ ├── _meta_data.html.erb │ │ │ │ ├── _render.html.erb │ │ │ │ ├── _render_category_simple.html.erb │ │ │ │ ├── fields │ │ │ │ │ ├── _audio.html.erb │ │ │ │ │ ├── _categories.html.erb │ │ │ │ │ ├── _checkbox.html.erb │ │ │ │ │ ├── _checkboxes.html.erb │ │ │ │ │ ├── _colorpicker.html.erb │ │ │ │ │ ├── _date.html.erb │ │ │ │ │ ├── _editor.html.erb │ │ │ │ │ ├── _email.html.erb │ │ │ │ │ ├── _field_attrs.html.erb │ │ │ │ │ ├── _file.html.erb │ │ │ │ │ ├── _image.html.erb │ │ │ │ │ ├── _numeric.html.erb │ │ │ │ │ ├── _phone.html.erb │ │ │ │ │ ├── _post_types.html.erb │ │ │ │ │ ├── _posts.html.erb │ │ │ │ │ ├── _private_file.html.erb │ │ │ │ │ ├── _radio.html.erb │ │ │ │ │ ├── _select.html.erb │ │ │ │ │ ├── _select_eval.html.erb │ │ │ │ │ ├── _text_area.html.erb │ │ │ │ │ ├── _text_box.html.erb │ │ │ │ │ ├── _url.html.erb │ │ │ │ │ ├── _users.html.erb │ │ │ │ │ └── _video.html.erb │ │ │ │ ├── form.html.erb │ │ │ │ └── index.html.erb │ │ │ ├── languages.html.erb │ │ │ ├── post_types │ │ │ │ ├── _form.html.erb │ │ │ │ ├── edit.html.erb │ │ │ │ └── index.html.erb │ │ │ ├── shortcodes.html.erb │ │ │ ├── site.html.erb │ │ │ ├── sites │ │ │ │ ├── form.html.erb │ │ │ │ └── index.html.erb │ │ │ └── theme.html.erb │ │ ├── user_roles │ │ │ ├── form.html.erb │ │ │ └── index.html.erb │ │ └── users │ │ │ ├── form.html.erb │ │ │ ├── index.html.erb │ │ │ ├── profile.html.erb │ │ │ └── profile │ │ │ ├── _activity.html.erb │ │ │ └── _settings.html.erb │ ├── default_theme │ │ ├── category.html.erb │ │ ├── category.json.jbuilder │ │ ├── category.rss.builder │ │ ├── custom_fields │ │ │ ├── audio.html.erb │ │ │ ├── checkbox.html.erb │ │ │ ├── checkboxes.html.erb │ │ │ ├── colorpicker.html.erb │ │ │ ├── date.html.erb │ │ │ ├── editor.html.erb │ │ │ ├── email.html.erb │ │ │ ├── field_attrs.html.erb │ │ │ ├── file.html.erb │ │ │ ├── image.html.erb │ │ │ ├── numeric.html.erb │ │ │ ├── phone.html.erb │ │ │ ├── posts.html.erb │ │ │ ├── radio.html.erb │ │ │ ├── select.html.erb │ │ │ ├── select_eval.html.erb │ │ │ ├── text_area.html.erb │ │ │ ├── text_box.html.erb │ │ │ ├── url.html.erb │ │ │ ├── users.html.erb │ │ │ └── video.html.erb │ │ ├── index.html.erb │ │ ├── index.json.jbuilder │ │ ├── partials │ │ │ ├── _breadcrumb.html.erb │ │ │ ├── _cama_category_entry.json.jbuilder │ │ │ ├── _cama_comments_entry.json.jbuilder │ │ │ ├── _cama_post_entry.json.jbuilder │ │ │ ├── _cama_post_type_entry.json.jbuilder │ │ │ ├── _cama_posts_entries.json.jbuilder │ │ │ ├── _cama_tag_entry.json.jbuilder │ │ │ ├── _cama_user_entry.json.jbuilder │ │ │ ├── _categories_list.html.erb │ │ │ ├── _comments.html.erb │ │ │ ├── _comments_list.html.erb │ │ │ ├── _comments_list2.html.erb │ │ │ ├── _flash_messages.html.erb │ │ │ ├── _forms.html.erb │ │ │ ├── _post_list_item.html.erb │ │ │ ├── _render_custom_field.html.erb │ │ │ ├── _search_form.html.erb │ │ │ └── _sidebar.html.erb │ │ ├── post_tag.html.erb │ │ ├── post_tag.json.jbuilder │ │ ├── post_tag.rss.builder │ │ ├── post_type.html.erb │ │ ├── post_type.json.jbuilder │ │ ├── post_type.rss.builder │ │ ├── profile.html.erb │ │ ├── profile.json.jbuilder │ │ ├── robots.text.erb │ │ ├── rss.rss.builder │ │ ├── search.html.erb │ │ ├── search.json.jbuilder │ │ ├── single.html.erb │ │ ├── single.json.jbuilder │ │ ├── single.rss.builder │ │ ├── sitemap.html.erb │ │ └── sitemap.xml.builder │ ├── html_mailer │ │ ├── confirm_email.html.erb │ │ ├── mailer.html.erb │ │ └── password_reset.html.erb │ └── shortcode_templates │ │ └── widget.html.erb │ └── layouts │ └── camaleon_cms │ ├── admin.html.erb │ ├── admin │ ├── _ajax.html.erb │ ├── _flash_messages.html.erb │ ├── _footer.html.erb │ ├── _form_error.html.erb │ ├── _header.html.erb │ ├── _sidebar.html.erb │ └── installer.html.erb │ ├── application.html.erb │ ├── login.html.erb │ └── mailer.html.erb ├── bin └── rails ├── camaleon_cms.gemspec ├── config ├── initializers │ ├── action_view.rb │ ├── active_record_extension.rb │ ├── assets.rb │ ├── custom_initializers.rb │ ├── mobu.rb │ ├── model_alias.rb │ ├── non_digest_assets.rb │ └── sass.rb ├── locales │ ├── ar.yml │ ├── camaleon_cms │ │ ├── admin │ │ │ ├── ar.yml │ │ │ ├── de.yml │ │ │ ├── en.yml │ │ │ ├── es.yml │ │ │ ├── fr.yml │ │ │ ├── it.yml │ │ │ ├── js │ │ │ │ ├── de.yml │ │ │ │ ├── en.yml │ │ │ │ ├── es.yml │ │ │ │ ├── it.yml │ │ │ │ ├── nl.yml │ │ │ │ ├── pt-BR.yml │ │ │ │ ├── ru.yml │ │ │ │ ├── uk.yml │ │ │ │ └── zh-CN.yml │ │ │ ├── nl.yml │ │ │ ├── pt-BR.yml │ │ │ ├── pt.yml │ │ │ ├── ru.yml │ │ │ ├── uk.yml │ │ │ └── zh-CH.yml │ │ ├── common.md │ │ ├── common │ │ │ ├── ar.yml │ │ │ ├── de.yml │ │ │ ├── en.yml │ │ │ ├── es.yml │ │ │ ├── fr.yml │ │ │ ├── it.yml │ │ │ ├── md.yml │ │ │ ├── nl.yml │ │ │ ├── pt-BR.yml │ │ │ ├── pt.yml │ │ │ ├── ru.yml │ │ │ ├── uk.yml │ │ │ └── zh-CN.yml │ │ ├── languages │ │ │ ├── ar.yml │ │ │ ├── de.yml │ │ │ ├── en.yml │ │ │ ├── es.yml │ │ │ ├── it.yml │ │ │ ├── md.yml │ │ │ ├── nl.yml │ │ │ ├── pt-BR.yml │ │ │ ├── pt.yml │ │ │ ├── ru.yml │ │ │ ├── uk.yml │ │ │ └── zh-CN.yml │ │ └── routes │ │ │ ├── de.yml │ │ │ ├── es.yml │ │ │ ├── fr.yml │ │ │ ├── it.yml │ │ │ ├── md.yml │ │ │ ├── pt-BR.yml │ │ │ ├── pt.yml │ │ │ ├── ru.yml │ │ │ ├── uk.yml │ │ │ └── zh-CN.yml │ ├── de.yml │ ├── en.yml │ ├── es.yml │ ├── fr.yml │ ├── it.yml │ ├── md.yml │ ├── nl.yml │ ├── pl.yml │ ├── pt-BR.yml │ ├── pt.yml │ ├── ru.yml │ ├── uk.yml │ └── zh-CH.yml ├── routes.rb ├── routes │ ├── admin.rb │ └── frontend.rb └── system.json ├── db └── migrate │ ├── 20150611161134_post_table_into_utf8.rb │ ├── 20150926095310_rename_column_posts.rb │ ├── 20151212095328_add_confirm_token_to_users.rb │ ├── 20160504155652_add_feature_to_posts.rb │ ├── 20160504155653_move_first_name_of_users.rb │ ├── 20160606135421_improve_menus_structure.rb │ ├── 20160609121449_add_group_to_custom_field_values.rb │ ├── 20161206211917_install_migrated_seo_plugin.rb │ ├── 20161215202255_drop_user_relationship_table.rb │ ├── 20180124132318_create_media.rb │ └── 20180704211100_adjust_field_length.rb ├── docs └── example_gemfile.rb ├── gemfiles ├── rails_6_1.gemfile ├── rails_7_0.gemfile ├── rails_7_1.gemfile ├── rails_7_2.gemfile ├── rails_8_0.gemfile └── rails_edge.gemfile ├── lib ├── camaleon_cms.rb ├── camaleon_cms │ ├── engine.rb │ └── version.rb ├── captcha │ ├── bumpyroad.ttf │ ├── captcha_0.jpg │ ├── captcha_1.jpg │ ├── captcha_10.jpg │ ├── captcha_11.jpg │ ├── captcha_2.jpg │ ├── captcha_3.jpg │ ├── captcha_4.jpg │ ├── captcha_5.jpg │ ├── captcha_6.jpg │ ├── captcha_7.jpg │ ├── captcha_8.jpg │ └── captcha_9.jpg ├── ext │ ├── array.rb │ ├── hash.rb │ ├── string.rb │ └── translator.rb ├── generators │ └── camaleon_cms │ │ ├── gem_plugin_generator.rb │ │ ├── gem_plugin_template │ │ ├── app │ │ │ ├── assets │ │ │ │ ├── images │ │ │ │ │ └── plugins │ │ │ │ │ │ └── my_plugin │ │ │ │ │ │ └── .keep │ │ │ │ ├── javascripts │ │ │ │ │ └── plugins │ │ │ │ │ │ └── my_plugin │ │ │ │ │ │ └── .keep │ │ │ │ └── stylesheets │ │ │ │ │ └── plugins │ │ │ │ │ └── my_plugin │ │ │ │ │ └── .keep │ │ │ ├── controllers │ │ │ │ └── plugins │ │ │ │ │ └── my_plugin │ │ │ │ │ ├── admin_controller.rb │ │ │ │ │ └── front_controller.rb │ │ │ ├── helpers │ │ │ │ └── plugins │ │ │ │ │ └── my_plugin │ │ │ │ │ └── main_helper.rb │ │ │ ├── models │ │ │ │ └── plugins │ │ │ │ │ └── my_plugin │ │ │ │ │ └── my_plugin.rb │ │ │ └── views │ │ │ │ └── plugins │ │ │ │ └── my_plugin │ │ │ │ ├── admin │ │ │ │ ├── index.html.erb │ │ │ │ └── settings.html.erb │ │ │ │ ├── front │ │ │ │ └── index.html.erb │ │ │ │ └── layouts │ │ │ │ └── readme.txt │ │ ├── config │ │ │ ├── camaleon_plugin.json │ │ │ ├── initializers │ │ │ │ └── custom_models.rb │ │ │ └── locales │ │ │ │ └── .keep │ │ └── db │ │ │ └── migrate │ │ │ └── .keep │ │ ├── install_generator.rb │ │ ├── install_template │ │ ├── apps │ │ │ └── themes │ │ │ │ └── readme.txt │ │ ├── plugin_routes.rb │ │ └── system.json │ │ ├── theme_generator.rb │ │ └── theme_template │ │ ├── assets │ │ ├── css │ │ │ └── main.css │ │ ├── images │ │ │ └── image.png │ │ └── js │ │ │ └── main.js │ │ ├── config │ │ ├── config.json │ │ └── locales │ │ │ └── .keep │ │ ├── main_helper.rb │ │ └── views │ │ ├── admin │ │ └── settings.html.erb │ │ ├── index.html.erb │ │ ├── layouts │ │ └── index.html.erb │ │ └── partials │ │ └── readme.txt ├── plugin_routes.rb └── tasks │ └── camaleon_cms │ ├── camaleon_tasks.rake │ └── rspec_test.rake ├── package.json ├── screenshot.png ├── spec ├── decorators │ └── application_decorator_spec.rb ├── dummy │ ├── .gitignore │ ├── README.rdoc │ ├── Rakefile │ ├── app │ │ ├── apps │ │ │ └── themes │ │ │ │ ├── camaleon_first │ │ │ │ ├── assets │ │ │ │ │ ├── css │ │ │ │ │ │ ├── magnific-ver.css │ │ │ │ │ │ ├── main.css │ │ │ │ │ │ ├── style-ver.css.scss │ │ │ │ │ │ └── wpbase.css │ │ │ │ │ └── js │ │ │ │ │ │ ├── hover.zoom.js │ │ │ │ │ │ ├── magnific.min.js │ │ │ │ │ │ ├── main-ver.js │ │ │ │ │ │ ├── main.js │ │ │ │ │ │ └── modernizr.custom.js │ │ │ │ ├── config │ │ │ │ │ └── config.json │ │ │ │ ├── main_helper.rb │ │ │ │ └── views │ │ │ │ │ ├── index.html.erb │ │ │ │ │ ├── layouts │ │ │ │ │ ├── camaleon_cms │ │ │ │ │ │ └── mailer.html.erb │ │ │ │ │ └── index.html.erb │ │ │ │ │ ├── mailer.html.erb │ │ │ │ │ ├── partials │ │ │ │ │ └── readme.txt │ │ │ │ │ └── template_sample_page.html.erb │ │ │ │ ├── default │ │ │ │ ├── assets │ │ │ │ │ ├── css │ │ │ │ │ │ ├── main.css │ │ │ │ │ │ ├── style.css.scss │ │ │ │ │ │ └── styles.css.scss │ │ │ │ │ ├── genericons │ │ │ │ │ │ ├── COPYING.txt │ │ │ │ │ │ ├── Genericons-Regular.otf │ │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ │ ├── README.txt │ │ │ │ │ │ ├── font │ │ │ │ │ │ │ ├── genericons-regular-webfont.eot │ │ │ │ │ │ │ ├── genericons-regular-webfont.svg │ │ │ │ │ │ │ ├── genericons-regular-webfont.ttf │ │ │ │ │ │ │ └── genericons-regular-webfont.woff │ │ │ │ │ │ └── genericons.css │ │ │ │ │ └── js │ │ │ │ │ │ └── main.js │ │ │ │ ├── config │ │ │ │ │ └── config.json │ │ │ │ ├── default_helper.rb │ │ │ │ └── views │ │ │ │ │ ├── admin │ │ │ │ │ └── settings.html.erb │ │ │ │ │ ├── category.html.erb │ │ │ │ │ ├── index.html.erb │ │ │ │ │ ├── layouts │ │ │ │ │ └── index.html.erb │ │ │ │ │ ├── page.html.erb │ │ │ │ │ ├── partials │ │ │ │ │ ├── _breadcrumb.html.erb │ │ │ │ │ ├── _categories_list.html.erb │ │ │ │ │ ├── _comments.html.erb │ │ │ │ │ ├── _comments_list.html.erb │ │ │ │ │ ├── _flash_messages.html.erb │ │ │ │ │ ├── _forms.html.erb │ │ │ │ │ ├── _post_list_item.html.erb │ │ │ │ │ ├── _search_form.html.erb │ │ │ │ │ └── _sidebar.html.erb │ │ │ │ │ ├── post.html.erb │ │ │ │ │ ├── post_tag.html.erb │ │ │ │ │ ├── post_type.html.erb │ │ │ │ │ └── search.html.erb │ │ │ │ └── new │ │ │ │ ├── assets │ │ │ │ ├── css │ │ │ │ │ ├── main.css │ │ │ │ │ └── styles.css.scss │ │ │ │ └── js │ │ │ │ │ └── main.js │ │ │ │ ├── config │ │ │ │ └── config.json │ │ │ │ ├── custom_helper.rb │ │ │ │ └── views │ │ │ │ ├── admin │ │ │ │ └── settings.html.erb │ │ │ │ ├── category.html.erb │ │ │ │ ├── index.html.erb │ │ │ │ ├── layouts │ │ │ │ ├── _footer.html.erb │ │ │ │ ├── _header.html.erb │ │ │ │ └── index.html.erb │ │ │ │ ├── page.html.erb │ │ │ │ ├── post.html.erb │ │ │ │ ├── post_tag.html.erb │ │ │ │ ├── post_type.html.erb │ │ │ │ └── search.html.erb │ │ ├── assets │ │ │ ├── config │ │ │ │ └── manifest.js │ │ │ ├── images │ │ │ │ └── .keep │ │ │ ├── javascripts │ │ │ │ └── application.js │ │ │ └── stylesheets │ │ │ │ └── application.css │ │ ├── controllers │ │ │ ├── application_controller.rb │ │ │ └── concerns │ │ │ │ └── .keep │ │ ├── helpers │ │ │ └── application_helper.rb │ │ ├── mailers │ │ │ └── .keep │ │ ├── models │ │ │ ├── .keep │ │ │ └── concerns │ │ │ │ └── .keep │ │ └── views │ │ │ └── layouts │ │ │ └── application.html.erb │ ├── bin │ │ ├── bundle │ │ ├── rails │ │ ├── rake │ │ ├── setup │ │ ├── update │ │ └── yarn │ ├── config.ru │ ├── config │ │ ├── application.rb │ │ ├── boot.rb │ │ ├── database.yml │ │ ├── environment.rb │ │ ├── environments │ │ │ ├── development.rb │ │ │ ├── production.rb │ │ │ └── test.rb │ │ ├── initializers │ │ │ ├── assets.rb │ │ │ ├── backtrace_silencers.rb │ │ │ ├── cookies_serializer.rb │ │ │ ├── filter_parameter_logging.rb │ │ │ ├── inflections.rb │ │ │ ├── mime_types.rb │ │ │ ├── session_store.rb │ │ │ └── wrap_parameters.rb │ │ ├── locales │ │ │ └── en.yml │ │ ├── routes.rb │ │ └── secrets.yml │ ├── db │ │ └── schema.rb │ ├── lib │ │ └── assets │ │ │ └── .keep │ └── public │ │ └── favicon.ico ├── factories │ ├── post.rb │ ├── post_type.rb │ ├── site.rb │ └── user.rb ├── features │ ├── admin │ │ ├── categories_spec.rb │ │ ├── comments_spec.rb │ │ ├── contact_form_spec.rb │ │ ├── content_groups_spec.rb │ │ ├── custom_fields_spec.rb │ │ ├── languages_spec.rb │ │ ├── media_spec.rb │ │ ├── menus_spec.rb │ │ ├── not_found_spec.rb │ │ ├── pages_spec.rb │ │ ├── plugins_spec.rb │ │ ├── posts_spec.rb │ │ ├── session_spec.rb │ │ ├── settings_spec.rb │ │ ├── shortcodes_spec.rb │ │ ├── sites_spec.rb │ │ ├── tags_spec.rb │ │ ├── themes_spec.rb │ │ ├── user_roles_spec.rb │ │ ├── users_spec.rb │ │ └── widgets_spec.rb │ └── frontend │ │ ├── pages_spec.rb │ │ └── post_type_spec.rb ├── helpers │ ├── email_helper_spec.rb │ ├── seo_helper_spec.rb │ ├── short_code_helper_spec.rb │ └── uploader_helper_spec.rb ├── mailers │ └── send_mail_spec.rb ├── models │ ├── category_spec.rb │ ├── meta_spec.rb │ ├── nav_menu_item_spec.rb │ ├── nav_menu_spec.rb │ ├── plugin_spec.rb │ ├── post_comment_spec.rb │ ├── post_spec.rb │ ├── post_tag_spec.rb │ ├── post_type_spec.rb │ ├── site_spec.rb │ ├── term_taxonomy_spec.rb │ ├── theme_spec.rb │ ├── user_role_spec.rb │ ├── user_spec.rb │ └── widget │ │ ├── widget_main_spec.rb │ │ └── widget_sidebar_spec.rb ├── rails_helper.rb ├── requests │ └── admin │ │ ├── media_controller │ │ ├── download_private_file_spec.rb │ │ └── new_folder_spec.rb │ │ └── users_controller │ │ └── updated_ajax_spec.rb ├── routing │ └── post_type_routes_spec.rb ├── shared_specs │ └── sanitize_attrs.rb ├── spec_helper.rb ├── support │ ├── capybara_normalize_whitespace_patch.rb │ ├── common.rb │ ├── fixtures │ │ ├── rails.png │ │ └── unsafe-test-xss.svg │ ├── helpers │ │ └── stub_requests.rb │ ├── wait_for_ajax.rb │ └── webfont_icon_check.rb ├── uploaders │ └── local_uploader_spec.rb └── validators │ └── user_url_validator_spec.rb └── yarn.lock /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | commonjs: true, 5 | es6: true 6 | }, 7 | extends: 'standard', 8 | overrides: [ 9 | ], 10 | parserOptions: { 11 | ecmaVersion: 6 12 | }, 13 | rules: { 14 | 'space-before-function-paren': ['error', 'never'], 15 | curly: ['error', 'multi-or-nest'] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /.byebug_history 3 | **/.DS_Store 4 | .DS_Store 5 | *~ 6 | .~* 7 | spec/dummy/**/*.png 8 | spec/dummy/**/*.jpg 9 | spec/dummy/**/*.sqlite3-journal 10 | spec/dummy/**/*.sqlite3.db 11 | spec/dummy/**/*.sqlite3 12 | spec/support/fixtures/rails_tmp.png 13 | *.gem 14 | .tool-versions 15 | node_modules 16 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --require spec_helper 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec 4 | gem 'non-digest-assets', '2.5.0' 5 | gem 'rails', '~> 8.0.1' 6 | gem 'selenium-webdriver', '4.23.0' 7 | gem 'sprockets-rails', '>= 3.5.2' 8 | 9 | gem 'capybara-screenshot' 10 | 11 | gem 'rspec_junit_formatter' 12 | 13 | gem 'factory_bot_rails' 14 | gem 'faker' 15 | gem 'puma' 16 | gem 'rack_session_access' 17 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | begin 2 | require 'bundler/setup' 3 | rescue LoadError 4 | puts 'You must `gem install bundler` and `bundle install` to run rake tasks' 5 | end 6 | 7 | require 'rdoc/task' 8 | 9 | RDoc::Task.new(:rdoc) do |rdoc| 10 | rdoc.rdoc_dir = 'rdoc' 11 | rdoc.title = 'CamaleonCms' 12 | rdoc.options << '--line-numbers' 13 | rdoc.rdoc_files.include('README.rdoc') 14 | rdoc.rdoc_files.include('lib/**/*.rb') 15 | end 16 | 17 | APP_RAKEFILE = File.expand_path('spec/dummy/Rakefile', __dir__) 18 | load 'rails/tasks/engine.rake' 19 | 20 | load 'rails/tasks/statistics.rake' 21 | 22 | Bundler::GemHelper.install_tasks 23 | 24 | Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each { |f| load f } 25 | 26 | require 'rspec/core' 27 | require 'rspec/core/rake_task' 28 | 29 | desc 'Run all specs in spec directory (excluding plugin specs)' 30 | RSpec::Core::RakeTask.new(spec: 'app:db:test:prepare') 31 | 32 | task default: :spec 33 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | Please email vulnerability reports to the maintainers: 5 | 6 | Email 7 | - owenperedo@gmail.com (Owen Peredo Diaz) 8 | - briantkephart@gmail.com (Brian Kephart) 9 | - branzeanu.aurel@gmail.com (Aurel Branzeanu) 10 | -------------------------------------------------------------------------------- /app/apps/plugins/attack/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Attack", 3 | "descr": "Please check documentation here.", 4 | "version": "0.1", 5 | "key": "attack", 6 | "position": 1, 7 | "helpers": [ 8 | "Plugins::Attack::AttackHelper" 9 | ], 10 | "options": [ 11 | {"label": "Settings", "url": "admin_plugins_attack_settings_path", "eval_url": true} 12 | ], 13 | "hooks": { 14 | "on_destroy": [ 15 | "attack_on_destroy" 16 | ], 17 | "on_active": [ 18 | "attack_on_active" 19 | ], 20 | "on_inactive": [ 21 | "attack_on_inactive" 22 | ], 23 | "front_before_load": [ 24 | "attack_app_before_load" 25 | ], 26 | "plugin_options":[ 27 | "attack_plugin_options" 28 | ] 29 | //here you can add all your hooks (read documentation) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/apps/plugins/attack/config/custom_models.rb: -------------------------------------------------------------------------------- 1 | # custom class for site 2 | CamaleonCms::Site.class_eval do 3 | has_many :attack, class_name: 'Plugins::Attack::Models::Attack' 4 | end 5 | 6 | module Plugins 7 | module Attack 8 | module Config 9 | class CustomModels; end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/apps/plugins/attack/config/locales/readme.txt: -------------------------------------------------------------------------------- 1 | Here all your plugin locales -------------------------------------------------------------------------------- /app/apps/plugins/attack/config/routes_admin.txt: -------------------------------------------------------------------------------- 1 | get 'settings' => "admin#settings" 2 | post "settings" => "admin#save_settings" -------------------------------------------------------------------------------- /app/apps/plugins/attack/models/attack.rb: -------------------------------------------------------------------------------- 1 | module Plugins 2 | module Attack 3 | module Models 4 | class Attack < CamaleonRecord 5 | belongs_to :site, class_name: 'CamaleonCms::Site' 6 | end 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/apps/plugins/authoring_post/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Authoring Posts", 3 | "descr": "Permit to change post author", 4 | "version": "0.1", 5 | "key": "authoring_post", 6 | "helpers": [ 7 | "Plugins::AuthoringPost::AuthoringPostHelper" 8 | ], 9 | "options": [ 10 | ], 11 | "hooks": { 12 | "on_active": ["plugin_authoring_on_active"], 13 | "on_inactive": ["plugin_authoring_on_inactive"], 14 | "list_post": ["plugin_authoring_post_list"], 15 | "new_post":["plugin_authoring_new_post"], 16 | "edit_post":["plugin_authoring_new_post"], 17 | "created_post":["plugin_authoring_create_post"], 18 | "updated_post":["plugin_authoring_create_post"], 19 | "post_the_content": ["plugin_authoring_post_the_content"], 20 | "filter_post": ["plugin_authoring_filter_post"], 21 | "post_can_visit": ["plugin_authoring_can_visit"], 22 | "list_post_extra_columns": ["plugin_authoring_extra_columns"] 23 | } 24 | } -------------------------------------------------------------------------------- /app/apps/plugins/front_cache/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Front Cache", 3 | "descr": "Please check documentation here.", 4 | "version": "0.2", 5 | "key": "front_cache", 6 | "position": 1, 7 | "helpers": [ 8 | "Plugins::FrontCache::FrontCacheHelper" 9 | ], 10 | "hooks": { 11 | "admin_before_load": ["front_cache_post_requests"], 12 | "front_before_load": ["front_cache_front_before_load", "front_cache_post_requests"], 13 | "on_active": ["front_cache_on_active"], 14 | "on_inactive": ["front_cache_on_inactive"], 15 | "on_render": ["front_cache_on_render"], 16 | "app_before_load": ["front_cache_before_load"], 17 | "plugin_options":["front_cache_plugin_options"], 18 | "front_after_load": ["front_cache_front_after_load"] 19 | //here you can add all your hooks (read documentation) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/apps/plugins/front_cache/config/initializer.rb: -------------------------------------------------------------------------------- 1 | if begin 2 | CamaleonCms::Site.any? 3 | rescue StandardError 4 | false 5 | end 6 | CamaleonCms::Site.all.each do |site| 7 | site.set_option('refresh_cache', true) 8 | end 9 | end 10 | 11 | module Plugins 12 | module FrontCache 13 | module Config 14 | class Initializer; end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/apps/plugins/front_cache/config/locales/readme.txt: -------------------------------------------------------------------------------- 1 | Here all your plugin locales -------------------------------------------------------------------------------- /app/apps/plugins/front_cache/config/routes_admin.txt: -------------------------------------------------------------------------------- 1 | get 'settings' => "admin#settings" 2 | get 'clean' => "admin#clean_cache" 3 | post 'settings' => "admin#save_settings" -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require camaleon_cms/bootstrap.min.css 12 | *= require font-awesome 13 | *= require ./wpbase 14 | *= require ./magnific-ver 15 | *= require ./style-ver 16 | */ -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/assets/images/empe.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/camaleon_first/assets/images/empe.jpg -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/assets/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/camaleon_first/assets/images/image.png -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/assets/images/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/camaleon_first/assets/images/loader.gif -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/assets/images/zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/camaleon_first/assets/images/zoom.png -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/assets/js/main.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery2 14 | //= require camaleon_cms/bootstrap.min.js 15 | //= require ./modernizr.custom 16 | //= require ./magnific.min 17 | //= require ./hover.zoom 18 | //= require ./main-ver 19 | -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Default Theme", 3 | "description" : "This is the default theme of Camaleon CMS (folder = camaleon_first)", 4 | "thumb" : "images/image.png", 5 | "helpers": [ 6 | "Themes::CamaleonFirst::MainHelper" 7 | ], 8 | "hooks": { 9 | "on_active": ["camaleon_first_on_install_theme"], 10 | "on_inactive": ["camaleon_first_on_uninstall_theme"], 11 | "on_theme_settings": ["camaleon_first_settings"] 12 | //here all your hooks 13 | } 14 | } -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/views/layouts/camaleon_cms/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 |
<%= image_tag @current_site.the_logo %>
14 | <%= yield %> 15 |
Visit Site
21 | 22 | 23 | -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/views/mailer.html.erb: -------------------------------------------------------------------------------- 1 |
<%= raw @subject %>
2 |
3 | <%= raw @html %> 4 |
-------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/views/partials/readme.txt: -------------------------------------------------------------------------------- 1 | here all your partials -------------------------------------------------------------------------------- /app/apps/themes/camaleon_first/views/template_sample_page.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
<%= raw @post.the_title.upcase %>
3 |
4 | <%= raw @post.the_content %> 5 |
6 |
-------------------------------------------------------------------------------- /app/apps/themes/default/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require ./style 12 | *= require ./styles 13 | */ 14 | -------------------------------------------------------------------------------- /app/apps/themes/default/assets/genericons/Genericons-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/genericons/Genericons-Regular.otf -------------------------------------------------------------------------------- /app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.eot -------------------------------------------------------------------------------- /app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.ttf -------------------------------------------------------------------------------- /app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.woff -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/circle.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/dotted-line-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/dotted-line-2x.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/dotted-line-light-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/dotted-line-light-2x.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/dotted-line-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/dotted-line-light.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/dotted-line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/dotted-line.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/headers/circle-thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/headers/circle-thumbnail.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/headers/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/headers/circle.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/headers/diamond-thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/headers/diamond-thumbnail.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/headers/diamond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/headers/diamond.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/headers/star-thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/headers/star-thumbnail.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/headers/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/headers/star.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/image.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/search-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/search-icon-2x.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/images/search-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/assets/images/search-icon.png -------------------------------------------------------------------------------- /app/apps/themes/default/assets/js/main.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery2 14 | -------------------------------------------------------------------------------- /app/apps/themes/default/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Wordpress theme", 3 | "description" : "This is a wordpress theme rebuilt with Camaleon cms (folder = default)", 4 | "thumb" : "images/image.png", 5 | "settings":[ 6 | {"label": "Settings", "action_name": "settings"} 7 | ], 8 | 9 | "helpers": [ 10 | "Themes::Default::DefaultHelper" 11 | ], 12 | "hooks": { 13 | "on_theme_settings": [ 14 | "theme_default_settings" 15 | ], 16 | "on_active": ["theme_default_on_install"] 17 | //"on_inactive": ["camaleon_first_on_uninstall_theme"] 18 | } 19 | } -------------------------------------------------------------------------------- /app/apps/themes/default/views/admin/settings.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/default/views/admin/settings.html.erb -------------------------------------------------------------------------------- /app/apps/themes/default/views/category.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <% @posts.each_with_index do |post, index| %> 6 | <%= raw "
" if index%3 == 0 && index > 0 %> 7 | <%= render partial: 'partials/post_list_item', locals: {post: post.decorate} %> 8 | <% end %> 9 |
10 | <%= content_tag("div", raw(ct('no_contents_found', default: 'No contents found')), class: "alert alert-warning") if @posts.empty? %> 11 | <%= raw cama_do_pagination(@posts) %> 12 |
13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /app/apps/themes/default/views/page.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% if @post.has_thumb? %> 4 |
5 | <%= raw @post.the_thumb %> 6 |
7 | <% end %> 8 |

<%= @post.the_title %>

9 |
10 |
11 | <%= raw @post.the_content %> 12 |
13 |
14 | <%= render partial: 'partials/comments', locals: {post: @post} if @post.can_commented? %> 15 | -------------------------------------------------------------------------------- /app/apps/themes/default/views/partials/_breadcrumb.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 |
7 |
8 | <%= render partial: 'partials/search_form' %> 9 |
10 |
-------------------------------------------------------------------------------- /app/apps/themes/default/views/partials/_forms.html.erb: -------------------------------------------------------------------------------- 1 | <% @form = current_site.forms.find_by_id(id) %> 2 | <% options = @form.options[:fields] 3 | settings = @form.get_meta("_settings") 4 | %> 5 | 6 |
7 | <%= form_for @form, url:{action: :save_form}, html: {method: "post", class: "railscf-form", multipart: true} do |f| %> 8 | 9 | <%= hidden_field_tag "id", @form.id %> 10 | <%= hidden_field_tag "post_id", post_id %> 11 | 12 |
13 | <%= render :partial => "camaleon_cms/flash_messages", locals: @validation %> 14 |
15 | <%= raw form_element_object(@form.id, options, post_id) %> 16 | 17 | 18 | <% end %> 19 |
20 | -------------------------------------------------------------------------------- /app/apps/themes/default/views/partials/_search_form.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag(cama_search_path, :method => "get", :class => "form-search form-horizontal search-form") do %> 2 | 6 | " class="search-submit" /> 7 | <% end %> 8 | 9 | -------------------------------------------------------------------------------- /app/apps/themes/default/views/post.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% if @post.has_thumb? %> 4 |
5 | <%= raw @post.the_thumb %> 6 |
7 | <% end %> 8 |

<%= @post.the_title %>

9 |
10 |
11 | <%= raw @post.the_content %> 12 |
13 |
14 | <%= render partial: 'partials/comments', locals: {post: @post} %> -------------------------------------------------------------------------------- /app/apps/themes/default/views/post_tag.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <% @posts.each_with_index do |post, index| %> 6 | <%= raw "
" if index%3 == 0 && index > 0 %> 7 | <%= render partial: 'partials/post_list_item', locals: {post: post.decorate} %> 8 | <% end %> 9 |
10 | <%= content_tag("div", raw(ct('no_contents_found', default: 'No contents found')), class: "alert alert-warning") if @posts.empty? %> 11 | <%= raw cama_do_pagination(@posts) %> 12 |
13 |
14 |
-------------------------------------------------------------------------------- /app/apps/themes/default/views/search.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 |
7 |
8 | <% @posts.each_with_index do |post, index| %> 9 | <%= raw "
" if index%3 == 0 && index > 0 %> 10 | <%= render partial: 'partials/post_list_item', locals: {post: post.decorate} %> 11 | <% end %> 12 |
13 | <%= content_tag("div", raw(ct('no_contents_found', default: 'No contents found')), class: "alert alert-warning") if @posts.empty? %> 14 | <%= raw cama_do_pagination(@posts) %> 15 |
16 |
17 |
-------------------------------------------------------------------------------- /app/apps/themes/new/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require camaleon_cms/bootstrap.min 12 | *= require font-awesome 13 | *= require ./styles 14 | */ 15 | -------------------------------------------------------------------------------- /app/apps/themes/new/assets/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/new/assets/images/image.png -------------------------------------------------------------------------------- /app/apps/themes/new/assets/js/main.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery2 14 | //= require camaleon_cms/bootstrap.min 15 | -------------------------------------------------------------------------------- /app/apps/themes/new/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Clean Theme", 3 | "description" : "Clean and basic theme (folder = new)", 4 | "thumb" : "images/image.png", 5 | "settings":[ 6 | {"label": "Settings", "action_name": "settings"} 7 | ], 8 | 9 | "helpers": [ 10 | "Themes::New::CustomHelper" 11 | ], 12 | "hooks": { 13 | "on_destroy": [ 14 | "theme_custom_on_destroy_theme" 15 | ], 16 | "on_active": [ 17 | "theme_custom_on_install_theme" 18 | ], 19 | "on_inactive": [ 20 | "theme_custom_on_uninstall_theme" 21 | ], 22 | "on_theme_settings": [ 23 | "theme_custom_settings" 24 | ] 25 | } 26 | } -------------------------------------------------------------------------------- /app/apps/themes/new/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/apps/themes/new/image.png -------------------------------------------------------------------------------- /app/apps/themes/new/views/admin/settings.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/apps/themes/new/views/layouts/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /app/apps/themes/new/views/layouts/index.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <%= stylesheet_link_tag theme_asset_path("css/main.css") %> 11 | <%= javascript_include_tag theme_asset_path("js/main.js") %> 12 | <%= raw the_head %> 13 | 14 | 15 | 16 | 17 |
18 | 19 | <%= render "layouts/header" %> 20 | 21 | 22 |
23 | <%= yield %> 24 |
25 | 26 | 27 | <%= render "layouts/footer" %> 28 | 29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/apps/themes/new/views/page.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render partial: 'partials/breadcrumb', locals: {breadcrumb: @post.the_breadcrumb} %> 3 |
4 |
5 |
6 |

<%= @post.the_title %>

7 |
8 | 9 |
10 |
11 | <%= raw @post.the_content %> 12 |
13 |
14 |
15 |
16 |
-------------------------------------------------------------------------------- /app/apps/themes/new/views/post.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render partial: 'partials/breadcrumb', locals: {breadcrumb: @post.the_breadcrumb} %> 3 |
4 |
5 |
6 |

<%= @post.the_title %>

7 |
8 | 9 |
10 |
11 | <%= raw @post.the_content %> 12 |
13 |
14 | <%= render partial: 'partials/comments', locals: {post: @post} if @post.can_commented? %> 15 |
16 |
17 | <%= render partial: 'partials/sidebar', locals: {post: @post} %> 18 |
19 |
20 |
-------------------------------------------------------------------------------- /app/assets/config/camaleon-cms.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_tree ../javascripts 3 | //= link_tree ../stylesheets 4 | //= link_tree ../../apps/plugins/visibility_post/assets/js 5 | //= link plugins/cama_contact_form/admin_editor.js 6 | //= link camaleon_cms/admin/nav_menu.js 7 | 8 | -------------------------------------------------------------------------------- /app/assets/images/camaleon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/admin/admin_spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/admin/admin_spinner.gif -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/admin/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/admin/glyphicons-halflings.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/admin/intro/menus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/admin/intro/menus.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/admin/no_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/admin/no_image.jpg -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/bg-tree.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/bg-tree.jpeg -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/camaleon-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/camaleon-dark.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/camaleon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/camaleon.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/category-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/category-icon.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/favicon.ico -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/image-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/image-not-found.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/de.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/en.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/es.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/fr.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/it.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/md.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/md.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/nl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/nl.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/pl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/pl.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/pt-BR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/pt-BR.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/pt.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/ru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/ru.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/uk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/uk.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/language/zh-CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/language/zh-CN.png -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/loader.gif -------------------------------------------------------------------------------- /app/assets/images/camaleon_cms/users/no-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/images/camaleon_cms/users/no-image.jpg -------------------------------------------------------------------------------- /app/assets/javascripts/camaleon_cms/admin/admin-basic-manifest.js: -------------------------------------------------------------------------------- 1 | //= require jquery2 2 | //= require camaleon_cms/bootstrap.min 3 | //= require ./jquery.validate 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/camaleon_cms/admin/jquery_validate/methods_de.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Localized default methods for the jQuery validation plugin. 3 | * Locale: DE 4 | */ 5 | $.extend( $.validator.methods, { 6 | date: function( value, element ) { 7 | return this.optional( element ) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test( value ); 8 | }, 9 | number: function( value, element ) { 10 | return this.optional( element ) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test( value ); 11 | } 12 | } ); 13 | -------------------------------------------------------------------------------- /app/assets/javascripts/camaleon_cms/admin/jquery_validate/methods_nl.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Localized default methods for the jQuery validation plugin. 3 | * Locale: NL 4 | */ 5 | $.extend( $.validator.methods, { 6 | date: function( value, element ) { 7 | return this.optional( element ) || /^\d\d?[\.\/\-]\d\d?[\.\/\-]\d\d\d?\d?$/.test( value ); 8 | }, 9 | number: function( value, element ) { 10 | return this.optional( element ) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test( value ); 11 | } 12 | } ); 13 | -------------------------------------------------------------------------------- /app/assets/javascripts/camaleon_cms/admin/jquery_validate/methods_pt.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Localized default methods for the jQuery validation plugin. 3 | * Locale: PT_BR 4 | */ 5 | $.extend( $.validator.methods, { 6 | date: function( value, element ) { 7 | return this.optional( element ) || /^\d\d?\/\d\d?\/\d\d\d?\d?$/.test( value ); 8 | } 9 | } ); 10 | -------------------------------------------------------------------------------- /app/assets/javascripts/camaleon_cms/admin/tinymce/langs/readme.md: -------------------------------------------------------------------------------- 1 | This is where language files should be placed. 2 | 3 | Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ 4 | -------------------------------------------------------------------------------- /app/assets/javascripts/camaleon_cms/admin/uploader/uploader_manifest.js: -------------------------------------------------------------------------------- 1 | //= require ./_jquery.form 2 | //= require ./_jquery.uploadfile.min 3 | //= require ./_media_manager 4 | //= require ./_cropper.min 5 | //= require ../_modal -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/admin-basic-manifest.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require camaleon_cms/bootstrap.min 12 | *= require font-awesome 13 | *= require ./lte/_admin 14 | *= require ./_custom_admin 15 | *= require ./lte/skins/skin-blue 16 | */ 17 | -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/bg.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/colorpicker/alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/colorpicker/alpha.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/colorpicker/hue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/colorpicker/hue.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/colorpicker/saturation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/colorpicker/saturation.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/girls-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/girls-1.jpg -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/jquery/resize-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/jquery/resize-icon.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/loading.gif: -------------------------------------------------------------------------------- 1 | Coming Soon! -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/logo-small.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/logo.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/no_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/no_image.jpg -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/rormeleon-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/rormeleon-white.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/img/thumb_no_found.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/img/thumb_no_found.jpg -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/camaleon_cms/admin/jquery/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/uploader/uploader_manifest.css: -------------------------------------------------------------------------------- 1 | /* 2 | *= require ./_cropper.min 3 | *= require ./_uploadfile 4 | */ -------------------------------------------------------------------------------- /app/assets/stylesheets/camaleon_cms/admin/widgets.css.scss: -------------------------------------------------------------------------------- 1 | #content-widget{ 2 | .panel-widget{ 3 | cursor: move; 4 | &, *{ color: #fff; } 5 | 6 | .shortcode{ 7 | cursor: default; 8 | width: 100%; 9 | } 10 | } 11 | } 12 | #content-sidebar{ 13 | .sidebar-body{ 14 | min-height:150px; 15 | .panel-default:hover{ 16 | cursor: move; 17 | } 18 | } 19 | form{ 20 | overflow: hidden; 21 | } 22 | } 23 | 24 | .ui-draggable-dragging{ 25 | z-index: 999999999; 26 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /app/assets/stylesheets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/assets/stylesheets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /app/controllers/camaleon_cms/apps/themes_admin_controller.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | module Apps 3 | class ThemesAdminController < CamaleonCms::AdminController 4 | before_action :init_theme 5 | 6 | private 7 | 8 | def init_theme 9 | theme_name = params[:controller].split('/')[1] 10 | @theme = current_theme 11 | return render_error(404) unless current_theme.slug == theme_name 12 | 13 | lookup_context.prefixes.prepend(params[:controller].sub("themes/#{theme_name}", "#{theme_name}/views")) 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/controllers/camaleon_cms/apps/themes_front_controller.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | module Apps 3 | class ThemesFrontController < CamaleonCms::FrontendController 4 | before_action :init_theme 5 | 6 | private 7 | 8 | def init_theme 9 | theme_name = params[:controller].split('/')[1] 10 | @theme = current_theme 11 | return render_error(404) unless current_theme.slug == theme_name 12 | 13 | lookup_context.prefixes.prepend(params[:controller].sub("themes/#{theme_name}", "themes/#{theme_name}/views")) 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/decorators/camaleon_cms/custom_field_decorator.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class CustomFieldDecorator < Draper::Decorator 3 | delegate_all 4 | 5 | def the_name 6 | h.cama_print_i18n_value(object.name) 7 | end 8 | 9 | def the_description 10 | h.cama_print_i18n_value(object.description) 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/decorators/camaleon_cms/metas_decorator_methods.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | module MetasDecoratorMethods 3 | # return meta value translated for key in this model 4 | def the_meta(key) 5 | object.get_meta(key, '').translate(@_deco_locale) 6 | end 7 | 8 | # return option value translated for key in this model 9 | def the_option(key) 10 | object.get_option(key, '').translate(@_deco_locale) 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/decorators/camaleon_cms/nav_menu_item_decorator.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class NavMenuItemDecorator < Draper::Decorator 3 | include CamaleonCms::CustomFieldsConcern 4 | delegate_all 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/decorators/camaleon_cms/plugin_decorator.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class PluginDecorator < CamaleonCms::TermTaxonomyDecorator 3 | delegate_all 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/decorators/camaleon_cms/theme_decorator.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class ThemeDecorator < CamaleonCms::TermTaxonomyDecorator 3 | delegate_all 4 | 5 | def the_id 6 | object.id 7 | end 8 | 9 | def the_settings_url 10 | args = h.cama_current_site_host_port({}) 11 | h.cama_admin_settings_theme_url(args) 12 | end 13 | 14 | def the_settings_link 15 | return '' unless h.cama_current_user.present? 16 | 17 | attrs = { target: '_blank', style: 'font-size:11px !important;cursor:pointer;' }.merge(attrs) 18 | h.link_to("→ #{title || h.ct('edit', default: 'Edit')}".html_safe, the_settings_url, attrs) 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /app/decorators/camaleon_cms/user_role_decorator.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class UserRoleDecorator < CamaleonCms::ApplicationDecorator 3 | include CamaleonCms::CustomFieldsConcern 4 | delegate_all 5 | 6 | def the_title 7 | object.name.to_s.translate(get_locale) 8 | end 9 | 10 | def the_content 11 | object.description.to_s.translate(get_locale) 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/decorators/camaleon_cms/widget_decorator.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class WidgetDecorator < Draper::Decorator 3 | include CamaleonCms::CustomFieldsConcern 4 | delegate_all 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/helpers/camaleon_cms/admin/breadcrumb_helper.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | module Admin 3 | module BreadcrumbHelper 4 | # draw the title for the admin admin panel according the breadcrumb 5 | def cama_admin_title_draw 6 | res = [t('camaleon_cms.admin.sidebar_top.admin_panel')] 7 | breadcrumbs.reverse.slice(0, 2).reverse.each { |b| res << (b.is_a?(Hash) ? b[:name] : b.name) } 8 | res.join(' » ') 9 | end 10 | 11 | # add breadcrumb item at the end 12 | # label => label of the link 13 | # url: url for the link 14 | # DEPRECATED 15 | def admin_breadcrumb_add(label, url = ''); end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/helpers/camaleon_cms/user_roles_helper.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | module UserRolesHelper 3 | def cama_get_roles_values 4 | @_cache_cama_get_roles_values ||= lambda { 5 | roles_list = CamaleonCms::UserRole::ROLES 6 | # permit to add custom roles to be listed in editing roles form 7 | # sample: args[:roles_list][:manager] << { key: 'my_role_key', label: "my_custom_permission", description: "lorem ipsum"} 8 | # authorize! :manage, :my_role_key 9 | args = { roles_list: roles_list } 10 | hooks_run('available_user_roles_list', args) 11 | args[:roles_list] 12 | }.call 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/models/camaleon_cms/meta.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class Meta < CamaleonRecord 3 | self.table_name = "#{PluginRoutes.static_system_info['db_prefix']}metas" 4 | # attr_accessible :objectid, :key, :value, :object_class 5 | 6 | extend CamaleonCms::NormalizeAttrs 7 | 8 | normalize_attrs(:value) 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/models/camaleon_cms/post_tag.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class PostTag < CamaleonCms::TermTaxonomy 3 | default_scope { where(taxonomy: :post_tag) } 4 | 5 | has_many :posts, foreign_key: :objectid, through: :term_relationships, source: :object 6 | belongs_to :post_type, foreign_key: :parent_id, inverse_of: :post_tags, required: false 7 | belongs_to :owner, class_name: CamaManager.get_user_class_name, foreign_key: :user_id, required: false 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/models/camaleon_cms/term_relationship.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class TermRelationship < CamaleonRecord 3 | self.table_name = "#{PluginRoutes.static_system_info['db_prefix']}term_relationships" 4 | default_scope -> { order(term_order: :asc) } 5 | 6 | belongs_to :term_taxonomy, inverse_of: :term_relationships, required: false 7 | belongs_to :object, lambda { 8 | order("#{CamaleonCms::Post.table_name}.id DESC") 9 | }, class_name: 'CamaleonCms::Post', foreign_key: :objectid, inverse_of: :term_relationships, required: false 10 | 11 | # callbacks 12 | after_create :update_count 13 | before_destroy :update_count 14 | 15 | private 16 | 17 | # update counter of post published items 18 | # TODO verify counter 19 | def update_count 20 | term_taxonomy.update_column('count', term_taxonomy.posts.published.size) if term_taxonomy&.try(:posts) 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /app/models/camaleon_cms/theme.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class Theme < CamaleonCms::TermTaxonomy 3 | # attrs: 4 | # slug => plugin key 5 | belongs_to :site, class_name: 'CamaleonCms::Site', foreign_key: :parent_id, required: false 6 | 7 | default_scope { where(taxonomy: :theme) } 8 | 9 | before_validation :fix_name 10 | before_destroy :destroy_custom_fields 11 | 12 | # return theme settings configured in config.json 13 | def settings 14 | PluginRoutes.theme_info(slug) 15 | end 16 | 17 | # return the path to the settings file for current theme 18 | def settings_file 19 | File.join(settings['path'], 'views/admin/settings').to_s 20 | end 21 | 22 | private 23 | 24 | def fix_name 25 | self.name = slug if name.blank? 26 | end 27 | 28 | def destroy_custom_fields 29 | get_field_groups.destroy_all 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /app/models/camaleon_cms/user.rb: -------------------------------------------------------------------------------- 1 | unless PluginRoutes.static_system_info['user_model'].present? 2 | module CamaleonCms 3 | class User < CamaleonRecord 4 | include CamaleonCms::UserMethods 5 | 6 | self.table_name = PluginRoutes.static_system_info['cama_users_db_table'] || "#{PluginRoutes.static_system_info['db_prefix']}users" 7 | 8 | default_scope { order(role: :asc) } 9 | 10 | validates :username, presence: true 11 | validates :email, presence: true, format: { with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i } # , :unless => Proc.new { |a| a.auth_social.present? } 12 | has_secure_password 13 | 14 | def self.find_by_email(email) 15 | where(['lower(email) = ?', email.to_s.downcase]).take 16 | end 17 | 18 | def self.find_by_username(username) 19 | where(['lower(username) = ?', username.to_s.downcase]).take 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /app/models/camaleon_cms/widget.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | module Widget 3 | def self.table_name_prefix 4 | 'widget_' 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/app/models/concerns/.keep -------------------------------------------------------------------------------- /app/models/plugins.rb: -------------------------------------------------------------------------------- 1 | module Plugins 2 | def self.table_name_prefix 3 | 'plugins_' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/models/themes.rb: -------------------------------------------------------------------------------- 1 | module Themes 2 | def self.table_name_prefix 3 | 'themes_' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/validators/camaleon_cms/uniq_validator.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | class UniqValidator < ActiveModel::Validator 3 | def validate(record) 4 | return if record.skip_slug_validation? 5 | 6 | taxonomy_table = CamaleonCms::TermTaxonomy.table_name 7 | slug_exists = CamaleonCms::TermTaxonomy.where(slug: record.slug) 8 | .where.not(id: record.id) 9 | .where("#{taxonomy_table}.taxonomy" => record.taxonomy) 10 | .where("#{taxonomy_table}.parent_id" => record.parent_id).exists? 11 | 12 | return unless slug_exists 13 | 14 | record.errors[:base] << I18n.t('camaleon_cms.admin.post.message.requires_different_slug').to_s 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/404.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= raw t("camaleon_cms.page_not_exist") %> 3 | <%= content_tag(:code, @message, class: "",) if @message.present? %> 4 |
5 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/500.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= raw t("camaleon_cms.page_error_500") %> 3 | <%= content_tag(:code, @message, class: "",) if @message.present? %> 4 |
5 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/appearances/nav_menus/_custom_fields.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag url_for({action: :save_custom_settings, nav_menu_id: @nav_menu.id, id: @nav_menu_item.id}), class: 'validate' do %> 2 | <%= render partial: "camaleon_cms/admin/settings/custom_fields/render", locals: {record: @nav_menu_item, field_groups: @nav_menu_item.get_field_groups } %> 3 |
4 | 5 |
6 | <% end %> 7 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/appearances/nav_menus/_form.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_for @nav_menu, url: {action: (@nav_menu.new_record? ? :create : :update), id: @nav_menu.id}, as: "nav_menu", method: (@nav_menu.new_record? ? 'post' : 'patch'), html: {id: "menu_form"} do |f| %> 2 |
3 | 4 | <%= f.text_field :name, class: 'form-control menu-input-title' %> 5 |
6 |
7 | 8 | <%= f.text_field :slug, class: 'form-control menu-input-slug slug', 'data-parent' => 'nav_menu_name' %> 9 |
10 |
11 | 12 |
13 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/appearances/nav_menus/_menu_items_list.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <%= t('camaleon_cms.admin.message.add_menus') %> <%= image_tag('camaleon_cms/admin/admin_spinner.gif', id: 'menu_reoreder_loading', class: 'pull-right', style: 'background: #3C8DBC; width: 20px; border-radius: 10px; display: none;') %> 5 |
6 |
7 | 10 |
11 |
12 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/appearances/nav_menus/index.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

<%= t('camaleon_cms.admin.menus.menus', default: 'Menus') %>

3 |
4 |
5 |
6 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/appearances/themes/preview.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/categories/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

<%= @category.id.present? ? t('camaleon_cms.admin.post_type.edit_category') : t('camaleon_cms.admin.post_type.add_category') %>

7 |
8 | <%= render partial: 'form' %> 9 |
10 | 11 |
12 |
13 | 14 |
15 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/comments/form.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_for @comment, as: "comment", url:url_for(action: @comment.new_record? ? :create : :update, post_id: @post.id), html: { class: "validate cama_ajax_request" } do |f| %> 2 |
3 | <%= render partial: 'layouts/camaleon_cms/admin/form_error', locals: {data: @comment} %> 4 |
5 | <%= f.label :content %>
6 | <%= f.text_area :content, :class => "form-control required", :rows => 4 %> 7 |
8 |
9 | 12 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/comments/form_answer.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_for @answer, as: "comment", url:cama_admin_post_comment_save_answer_path(@post.id, @comment.id), html: { class: "validate cama_ajax_request" } do |f| %> 2 |
3 | <%= render partial: 'layouts/camaleon_cms/admin/form_error', locals: {data: @comment} %> 4 |
5 | <%= f.label :content %>
6 | <%= f.text_area :content, :class => "form-control required", :rows => 4 %> 7 |
8 |
9 | 12 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/dashboard.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 |
7 |

<%= t('camaleon_cms.admin.sidebar.dashboard') %>

8 |
9 |
10 |

<%= t('camaleon_cms.admin.message.welcome') %>

11 | 12 | <% r = {content: ""}; hooks_run("on_notification", r); %> 13 |
14 | <%= raw r[:content] %> 15 |
16 | 17 | <% r = {content: ""}; hooks_run("on_dashboard", r); %> 18 |
19 | <%= raw r[:content] %> 20 |
21 |
22 |
23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/installers/welcome.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

Your site was created successfully.

3 |
4 |

Vist Frontend: <%= link_to("Here.", cama_root_url, target: "_blank") %>

5 |

Visit Admin panel <%= link_to("Here.", cama_admin_login_url, target: "_blank") %>

6 |

user: admin

7 |

pass: admin123

8 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/post_tags/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

<%= @post_tag.id.present? ? t('camaleon_cms.admin.page_title.edit') : t('camaleon_cms.admin.page_title.add') %> <%= "post_tag".to_s.titleize %>

7 |
8 | <%= render partial: 'form' %> 9 |
10 | 11 |
12 |
13 | 14 |
15 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/posts/_filter_posts.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <% @btns.each do |status, value| %> 3 | <%= link_to "#{value}", {action: :index, s: status, q: params[:q] }, class: "btn cama_ajax_request #{ status.to_s == params[:s] ? "btn-info" : "btn-default" }" %> 4 | <% end %> 5 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/posts/show.html.erb: -------------------------------------------------------------------------------- 1 |

2 | Title: 3 | <%= @post.title %> 4 |

5 | 6 |

7 | Text: 8 | <%= @post.content %> 9 |

10 | <%= debug @post %> 11 | 12 |

meta

13 | <%= debug @post.metas %> 14 | 15 |

category:

16 | <%= debug @post.categories %> 17 |

post_tag:

18 | <%= debug @post.post_tags %> 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_audio.html.erb: -------------------------------------------------------------------------------- 1 |
2 | " /> 3 | <%= t('camaleon_cms.admin.button.upload_audio')%> 4 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_categories.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 11 |
12 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_checkbox.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | 7 |
8 |
9 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_checkboxes.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <% field.options[:multiple_options].each do |option| %> 3 |
4 | <% end %> 5 |
6 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_colorpicker.html.erb: -------------------------------------------------------------------------------- 1 | <% add_asset_library('colorpicker') %> 2 |
3 |
4 | " /> 5 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_date.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
"> 3 | " /> 4 | 5 |
6 |
7 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_editor.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_email.html.erb: -------------------------------------------------------------------------------- 1 |
2 | " /> 3 |
4 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_field_attrs.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | " /> 4 |
5 |
6 | 7 |
8 |
9 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_file.html.erb: -------------------------------------------------------------------------------- 1 |
2 | " name="<%= field_name %>[<%= field.slug %>][values][]" class="form-control input-value data-error-place-parent file_format <%= "required" if field.options[:required].to_s.to_bool %>" /> 3 | <%= t('camaleon_cms.admin.button.upload_file') %> 4 |
5 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_numeric.html.erb: -------------------------------------------------------------------------------- 1 |
2 | " /> 3 |
4 | 5 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_phone.html.erb: -------------------------------------------------------------------------------- 1 |
2 | " /> 3 |
4 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_post_types.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 8 |
9 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 14 |
15 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_private_file.html.erb: -------------------------------------------------------------------------------- 1 |
2 | " name="<%= field_name %>[<%= field.slug %>][values][]" class="disabled form-control input-value data-error-place-parent file_format <%= "required" if field.options[:required].to_s.to_bool %>" /> 3 | <%= t('camaleon_cms.admin.button.upload_file') %> 4 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_radio.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <% field.options[:multiple_options].each do |option| %> 3 |
4 | <% end %> 5 |
6 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_select.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 7 |
8 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_select_eval.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= select_tag "#{field_name}[#{field.slug}][values][]", instance_eval(field.options[:command].to_s.strip), class: "form-control input-value #{'required' if field.options[:required].to_s.to_bool}" %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_text_area.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_text_box.html.erb: -------------------------------------------------------------------------------- 1 |
2 | " /> 3 |
4 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_url.html.erb: -------------------------------------------------------------------------------- 1 |
2 | " /> 3 |
4 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_users.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 8 |
9 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/custom_fields/fields/_video.html.erb: -------------------------------------------------------------------------------- 1 |
2 | " /> 3 | <%= t('camaleon_cms.admin.button.upload_video')%> 4 |
5 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/settings/post_types/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |
6 |

<%= @post_type.id.present? ? t('camaleon_cms.admin.post_type.edit_post_type') : t('camaleon_cms.admin.post_type.add_post_type') %>

7 |
8 | <%= render partial: 'form' %> 9 |
10 | 11 |
12 |
13 | 14 |
15 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/users/profile.html.erb: -------------------------------------------------------------------------------- 1 | Profile content pending for now! -------------------------------------------------------------------------------- /app/views/camaleon_cms/admin/users/profile/_settings.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Settings

4 | 8 |
9 |
10 | Content settings 11 |
12 | 15 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/category.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @category, :created_at, :updated_at, :term_order, :user_id 2 | json.partial! partial: 'partials/cama_category_entry', locals: { category: @category } 3 | 4 | json.post_type do 5 | json.partial! partial: 'partials/cama_post_type_entry', locals: { post_type: @category.post_type.decorate } 6 | end 7 | 8 | json.posts do 9 | json.partial! partial: 'partials/cama_posts_entries', locals: { posts: @posts } 10 | end 11 | 12 | json.children @category.children.decorate do |category| 13 | json.partial! partial: 'partials/cama_category_entry', locals: { category: category } 14 | end 15 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/category.rss.builder: -------------------------------------------------------------------------------- 1 | xml.instruct! :xml, version: '1.0' 2 | xml.rss version: '2.0' do 3 | xml.channel do 4 | xml.title @category.the_title 5 | xml.description @category.the_excerpt 6 | xml.link @category.the_url 7 | xml.guid @category.the_id 8 | xml.items @posts.size 9 | 10 | @posts.decorate.each do |post| 11 | xml.item do 12 | xml.title post.the_title 13 | xml.description post.the_excerpt 14 | xml.pubDate post.the_created_at 15 | xml.upDate post.the_updated_at 16 | xml.link post.the_url 17 | xml.guid post.the_id 18 | xml.thumb post.the_thumb_url 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/audio.html.erb: -------------------------------------------------------------------------------- 1 | <% object.get_fields(field_key).each do |value| %> 2 | 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/checkbox.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | <%= attibutes["attrs"] || "controls" %> /> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/checkboxes.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | <%= attibutes["attrs"] || "controls" %> /> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/colorpicker.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/date.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/editor.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 |
><%= do_shortcode(value) %>
3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/email.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/field_attrs.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/file.html.erb: -------------------------------------------------------------------------------- 1 | <% object.get_fields(field_key).each do |value| %> 2 | "_blank"}.merge(attibutes["attrs"]) %>><%= value.split('/').last %> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/image.html.erb: -------------------------------------------------------------------------------- 1 | <% object.get_fields(field_key).each do |value| %> 2 | > 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/numeric.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/phone.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/posts.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| p = current_site.the_posts.find(value).decorate rescue nil; next unless p.present? %> 2 | href="<%= p.the_url %>"><%= p.the_title %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/radio.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/select.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/select_eval.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/text_area.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/text_box.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/url.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| %> 2 | ><%= value %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/users.html.erb: -------------------------------------------------------------------------------- 1 | <% object.the_fields(field_key).each do |value| p = current_site.users.find(value).decorate rescue nil; next unless p.present? %> 2 | href="<%= p.the_url %>"><%= p.the_name %> 3 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/custom_fields/video.html.erb: -------------------------------------------------------------------------------- 1 | <% object.get_fields(field_key).each do |value| %> 2 | 3 | <% end %> 4 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | # sample request: http://localhost:3000/?format=json 2 | json.extract! current_site, :id, :created_at 3 | json.title current_site.the_title 4 | json.description current_site.the_excerpt 5 | json.url current_site.the_url 6 | json.languages current_site.get_languages 7 | if cama_current_user.present? 8 | json.current_user do 9 | json.partial! partial: 'partials/cama_user_entry', locals: { user: cama_current_user } 10 | end 11 | end 12 | json.post_types current_site.the_post_types.decorate do |post_type| 13 | json.partial! partial: 'partials/cama_post_type_entry', locals: { post_type: post_type } 14 | end 15 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_breadcrumb.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 |
7 |
8 | <%= render partial: 'partials/search_form' %> 9 |
10 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_cama_category_entry.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! category, :id, :created_at 2 | json.title category.the_title 3 | json.description category.the_excerpt 4 | json.url category.the_url 5 | json.slug category.the_slug 6 | json.thumb category.the_thumb_url 7 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_cama_comments_entry.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.comments post.the_comments.decorate do |comment| 2 | json.extract! comment, :id, :user_id, :content, :is_anonymous 3 | json.children comment.the_answers.decorate do |children| 4 | json.extract! children, :id, :user_id, :content, :is_anonymous 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_cama_post_entry.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! post, :id, :created_at 2 | json.title post.the_title 3 | json.description post.the_excerpt 4 | json.url post.the_url 5 | json.slug post.the_slug 6 | json.thumb post.the_thumb_url 7 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_cama_post_type_entry.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! post_type, :id 2 | json.title post_type.the_title 3 | json.description post_type.the_excerpt 4 | json.url post_type.the_url 5 | json.slug post_type.the_slug 6 | json.thumb post_type.the_thumb_url 7 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_cama_posts_entries.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.current_page posts.current_page 2 | json.per_page posts.per_page 3 | json.total_entries posts.total_entries 4 | json.previous_page url_for(page: posts.previous_page, only_path: false) if posts.previous_page.present? 5 | json.next_page url_for(page: posts.next_page, only_path: false) if posts.next_page.present? 6 | json.entries posts.decorate do |post| 7 | json.partial! partial: 'partials/cama_post_entry', locals: { post: post } 8 | end 9 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_cama_tag_entry.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! post_tag, :id, :created_at 2 | json.title post_tag.the_title 3 | json.description post_tag.the_excerpt 4 | json.url post_tag.the_url 5 | json.slug post_tag.the_slug 6 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_cama_user_entry.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! user, :id 2 | json.username user.the_username 3 | json.name user.the_name 4 | json.avatar user.the_avatar 5 | json.url user.the_url 6 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_forms.html.erb: -------------------------------------------------------------------------------- 1 | <% @form = current_site.forms.find_by_id(id) %> 2 | <% options = @form.options[:fields] 3 | settings = @form.get_meta("_settings") 4 | %> 5 | 6 |
7 | <%= form_for @form, url:{action: :save_form}, html: {method: "post", class: "railscf-form", multipart: true} do |f| %> 8 | 9 | <%= hidden_field_tag "id", @form.id %> 10 | <%= hidden_field_tag "post_id", post_id %> 11 | 12 |
13 | <%= render :partial => "camaleon_cms/flash_messages", locals: @validation %> 14 |
15 | <%= raw form_element_object(@form.id, options, post_id) %> 16 | 17 | 18 | <% end %> 19 |
20 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_post_list_item.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= raw post.the_link_thumb({}, {style: "height: 200px; width: 100%; display: block;"}) %> 4 |
5 |

6 | <%= post.the_title %> 7 |

8 | <%= post.the_created_at %> 9 |
10 |

<%= raw post.the_excerpt %> <%= post.the_edit_link %>

11 |
12 |
13 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/partials/_search_form.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag(cama_search_path, :method => "get", :class => "form-search form-horizontal") do %> 2 |
3 | ..."> 4 |
5 | 6 |
7 |
8 | <% end %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/post_tag.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @post_tag, :created_at, :updated_at, :term_order, :user_id 2 | json.partial! partial: 'partials/cama_tag_entry', locals: { post_tag: @post_tag } 3 | 4 | json.post_type do 5 | json.partial! partial: 'partials/cama_post_type_entry', locals: { post_type: @post_tag.post_type.decorate } 6 | end 7 | 8 | json.posts do 9 | json.partial! partial: 'partials/cama_posts_entries', locals: { posts: @posts } 10 | end 11 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/post_tag.rss.builder: -------------------------------------------------------------------------------- 1 | xml.instruct! :xml, version: '1.0' 2 | xml.rss version: '2.0' do 3 | xml.channel do 4 | xml.title @post_tag.the_title 5 | xml.description @post_tag.the_excerpt 6 | xml.link @post_tag.the_url 7 | xml.guid @post_tag.the_id 8 | xml.items @posts.size 9 | 10 | @posts.decorate.each do |post| 11 | xml.item do 12 | xml.title post.the_title 13 | xml.description post.the_excerpt 14 | xml.pubDate post.the_created_at 15 | xml.upDate post.the_updated_at 16 | xml.link post.the_url 17 | xml.guid post.the_id 18 | xml.thumb post.the_thumb_url 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/post_type.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.extract! @post_type, :created_at, :updated_at, :term_order, :user_id 2 | json.partial! partial: 'partials/cama_post_type_entry', locals: { post_type: @post_type } 3 | json.posts do 4 | json.partial! partial: 'partials/cama_posts_entries', locals: { posts: @posts } 5 | end 6 | json.categories @post_type.categories.decorate do |category| 7 | json.partial! partial: 'partials/cama_category_entry', locals: { category: category } 8 | end 9 | 10 | json.tags @post_type.post_tags.decorate do |post_tag| 11 | json.partial! partial: 'partials/cama_tag_entry', locals: { post_tag: post_tag } 12 | end 13 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/post_type.rss.builder: -------------------------------------------------------------------------------- 1 | xml.instruct! :xml, version: '1.0' 2 | xml.rss version: '2.0' do 3 | xml.channel do 4 | xml.title @post_type.the_title 5 | xml.description @post_type.the_excerpt 6 | xml.link @post_type.the_url 7 | xml.guid @post_type.the_id 8 | xml.items @posts.size 9 | 10 | @posts.decorate.each do |post| 11 | xml.item do 12 | xml.title post.the_title 13 | xml.description post.the_excerpt 14 | xml.pubDate post.the_created_at 15 | xml.upDate post.the_updated_at 16 | xml.link post.the_url 17 | xml.guid post.the_id 18 | xml.thumb post.the_thumb_url 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/profile.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
) no-repeat center top; height: 200px; margin-bottom: -50px;"> 5 |
6 |
7 |
8 | 9 |
10 |

<%= link_to(@user.username, "#") %>

11 |
<%= @user.the_name %>
12 |
<%= @user.the_role %>
13 |
<%= @user.the_slogan %>
14 |
<%= @user.created_at %>
15 |
16 |
17 |
18 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/profile.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.partial! partial: 'partials/cama_user_entry', locals: { user: cama_current_user } 2 | json.role cama_current_user.the_role 3 | json.slogan cama_current_user.the_slogan 4 | json.slogan cama_current_user.the_slogan 5 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/robots.text.erb: -------------------------------------------------------------------------------- 1 | Sitemap: <%= cama_sitemap_url %> -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/rss.rss.builder: -------------------------------------------------------------------------------- 1 | xml.instruct! :xml, version: '1.0' 2 | xml.rss version: '2.0' do 3 | xml.channel do 4 | xml.title current_site.the_title 5 | xml.description current_site.the_excerpt 6 | xml.link current_site.the_url 7 | 8 | current_site.the_contents.paginate(page: params[:page], 9 | per_page: current_site.front_per_page).decorate.each do |post| 10 | xml.item do 11 | xml.title post.the_title 12 | xml.description post.the_excerpt 13 | xml.pubDate post.the_created_at 14 | xml.upDate post.the_updated_at 15 | xml.link post.the_url 16 | xml.guid post.the_id 17 | xml.thumb post.the_thumb_url 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/search.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 3 | <%= render partial: 'partials/breadcrumb', locals: {breadcrumb: breadcrumb_draw } %> 4 |

(<%= @posts.total_entries %>) <%= ct('search_msg')%> <%= params[:q] %>

5 |
6 | <% @posts.each_with_index do |post, index| %> 7 | <%#= raw "
" if index%3 == 0 && index > 0 %> 8 | <%= render partial: 'partials/post_list_item', locals: {post: post.decorate, index: index} %> 9 | <% end %> 10 |
11 | <%= content_tag("div", raw(ct('no_contents_found', default: 'No contents found')), class: "alert alert-warning") if @posts.empty? %> 12 | <%= will_paginate @posts, renderer: BootstrapPagination::Rails if @posts.present? %> 13 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/search.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.partial! partial: 'partials/cama_posts_entries', locals: { posts: @posts } 2 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/default_theme/single.rss.builder: -------------------------------------------------------------------------------- 1 | xml.instruct! :xml, version: '1.0' 2 | xml.rss version: '2.0' do 3 | xml.channel do 4 | xml.title @post.the_title 5 | xml.description @post.the_excerpt 6 | xml.pubDate @post.the_created_at 7 | xml.upDate @post.the_updated_at 8 | xml.link @post.the_url 9 | xml.guid @post.the_id 10 | xml.thumb @post.the_thumb_url 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/views/camaleon_cms/html_mailer/confirm_email.html.erb: -------------------------------------------------------------------------------- 1 |

<%= t('camaleon_cms.admin.login.welcome') %> <%= @extra_data[:fullname] %>

2 |

<%= t('camaleon_cms.admin.login.confirm.text') %>:

3 |

<%= @extra_data[:url] %>

-------------------------------------------------------------------------------- /app/views/camaleon_cms/html_mailer/mailer.html.erb: -------------------------------------------------------------------------------- 1 |

<%= raw @subject %>

2 |
3 | <%= raw @html %> 4 |
-------------------------------------------------------------------------------- /app/views/camaleon_cms/html_mailer/password_reset.html.erb: -------------------------------------------------------------------------------- 1 |

<%= t('camaleon_cms.admin.login.message.hello') %>, <%= @extra_data[:fullname] %>

2 |

<%= t('camaleon_cms.admin.login.message.reset_url') %>:

3 |

<%= @extra_data[:url] %>

-------------------------------------------------------------------------------- /app/views/camaleon_cms/shortcode_templates/widget.html.erb: -------------------------------------------------------------------------------- 1 | <% 2 | key = attributes.keys.first.to_s 3 | widget = @current_site.widgets.where("slug = ?", key).first 4 | %> 5 | <% if widget.present? %> 6 | <% if (r = widget.renderer).present? %> 7 | <%= render partial: r, locals: {attributes: attributes } %> 8 | <% else %> 9 | <%= raw do_shortcode(widget[:description].translate) %> 10 | <% end %> 11 | <% end %> 12 | -------------------------------------------------------------------------------- /app/views/layouts/camaleon_cms/admin/_ajax.html.erb: -------------------------------------------------------------------------------- 1 |
"> 2 | <% unless params[:cama_skip_breadcrumb] %> 3 | 4 | <% end %> 5 | <%= render "camaleon_cms/flash_messages" %> 6 | <%= cama_draw_custom_assets %> 7 | <%= yield %> 8 |
-------------------------------------------------------------------------------- /app/views/layouts/camaleon_cms/admin/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /app/views/layouts/camaleon_cms/admin/_form_error.html.erb: -------------------------------------------------------------------------------- 1 | <% if data.errors.any? %> 2 |
3 | <%= "#{(data.errors.count > 1)? "#{data.errors.count} #{t('camaleon_cms.admin.table.errors')}" : "#{data.errors.count} #{t('camaleon_cms.admin.table.error')}" }" %>, <%= t('camaleon_cms.admin.message.so_their_data_has_not_been_saved')%>: 4 | 9 |
10 | <% end %> -------------------------------------------------------------------------------- /app/views/layouts/camaleon_cms/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <%= display_meta_tags seo(@seo) %> 5 | 6 | <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> 7 | <%= javascript_include_tag "application", "data-turbolinks-track" => true %> 8 | <%= csrf_meta_tags %> 9 | 10 | 11 | 12 | <%= yield %> 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/views/layouts/camaleon_cms/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 |
<%= image_tag @current_site.the_logo %>
14 | <%= yield %> 15 |
Visit Site
21 | 22 | 23 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application. 3 | 4 | ENGINE_ROOT = File.expand_path('..', __dir__) 5 | ENGINE_PATH = File.expand_path('../lib/camaleon_cms/engine', __dir__) 6 | 7 | # Set up gems listed in the Gemfile. 8 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 9 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 10 | 11 | require 'rails/all' 12 | require 'rails/engine/commands' 13 | -------------------------------------------------------------------------------- /config/initializers/mobu.rb: -------------------------------------------------------------------------------- 1 | # this is a mobu customization to add prefixes for views and not use another views directory 2 | module Mobu 3 | module DetectMobile 4 | extend ActiveSupport::Concern 5 | 6 | private 7 | 8 | def check_mobile_site 9 | case params.delete(:prefer) 10 | when 'f' 11 | session[:prefer_full_site] = 1 12 | when 'm' 13 | session.delete :prefer_full_site 14 | end 15 | 16 | if mobile_request? 17 | # prepend_view_path mobile_views_path 18 | lookup_context.prefixes.prepend('mobile') unless lookup_context.prefixes.include?('mobile') 19 | elsif tablet_request? 20 | # prepend_view_path tablet_views_path 21 | lookup_context.prefixes.prepend('tablet') unless lookup_context.prefixes.include?('tablet') 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /config/initializers/model_alias.rb: -------------------------------------------------------------------------------- 1 | Rails.application.config.to_prepare do 2 | module Cama 3 | end 4 | 5 | Cama::Site = CamaleonCms::Site 6 | Cama::Post = CamaleonCms::Post 7 | Cama::Category = CamaleonCms::Category 8 | Cama::PostTag = CamaleonCms::PostTag 9 | Cama::PostType = CamaleonCms::PostType 10 | Cama::TermTaxonomy = CamaleonCms::TermTaxonomy 11 | Cama::TermRelationship = CamaleonCms::TermRelationship 12 | 13 | if PluginRoutes.static_system_info['user_model'].present? 14 | CamaleonCms::User = PluginRoutes.static_system_info['user_model'].constantize 15 | CamaleonCms::User.class_eval do 16 | include CamaleonCms::UserMethods 17 | end 18 | end 19 | 20 | Cama::User = CamaleonCms::User unless defined? Cama::User 21 | end 22 | -------------------------------------------------------------------------------- /config/initializers/non_digest_assets.rb: -------------------------------------------------------------------------------- 1 | require 'non-digest-assets' 2 | 3 | NonDigestAssets.asset_selectors += [/glyphicons*/] 4 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/common.md: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | # this is used for common translations plugin 3 | # note: doesn't support multi level 4 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/ar.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | ar: 3 | languages: 4 | ar: "العربية" 5 | es: "الاسبانية" 6 | en: "الانجليزية" 7 | fr: "الفرنسية" 8 | zh-CN: "الصينية" 9 | de: "الألمانية" 10 | md: "مولدوفا" 11 | pt: "البرتغالية (البرتغال)" 12 | pt-BR: "البرتغالية (البرازيل)" 13 | it: "الايطالية" 14 | uk: "الأوكرانية" 15 | ru: "الروسية" 16 | nl: "الهولندية" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/de.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | de: 3 | languages: 4 | ar: "Arabisch" 5 | es: "Spanisch" 6 | en: "Englisch" 7 | fr: "Französisch" 8 | zh-CN: "Chinesisch" 9 | de: "Deutsch" 10 | md: Moldawisch 11 | pt: "Portugiesisch (Portugal)" 12 | pt-BR: "Portugiesisch (Brasilien)" 13 | it: "Italienisch" 14 | uk: "Ukrainische" 15 | ru: "Russisch" 16 | nl: "Niederländisch" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/en.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | en: 3 | languages: 4 | ar: "Arabic" 5 | es: "Spanish" 6 | en: "English" 7 | fr: "French" 8 | zh-CN: "Chinese" 9 | de: "Deutsch" 10 | md: Moldavian 11 | pt: "Português (Portugal)" 12 | pt-BR: "Português (Brazil)" 13 | it: "Italian" 14 | uk: "Ukrainian" 15 | ru: "Russian" 16 | nl: "Dutch" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/es.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | es: 3 | languages: 4 | ar: "Árabe" 5 | es: "Español" 6 | en: "Inglés" 7 | fr: "Francés" 8 | zh-CN: "Chino" 9 | de: "Alemán" 10 | md: Moldavo 11 | pt: "Portugues (Portugal)" 12 | pt-BR: "Portugues (Brasil)" 13 | it: "Italiano" 14 | uk: "Ucraniano" 15 | ru: "Russian" 16 | nl: "Holandés" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/it.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | it: 3 | languages: 4 | ar: "Arabo" 5 | es: "Spagnolo" 6 | en: "Inglese" 7 | fr: "Francese" 8 | zh-CN: "Cinese" 9 | de: "Tedesco" 10 | md: Moldavo 11 | pt: "Portoghese (Portogallo)" 12 | pt-BR: "Portoghese (Brasile)" 13 | it: "Italiano" 14 | uk: "Ucraina" 15 | ru: "Russian" 16 | nl: "Olandese" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/md.yml: -------------------------------------------------------------------------------- 1 | md: 2 | languages: 3 | ar: Arabic 4 | es: Spaniola 5 | en: Engleza 6 | fr: Franceza 7 | zh-CN: Chineza 8 | de: Germana 9 | md: Moldoveneasca 10 | pt: Portugeza (Portugalia) 11 | pt-BR: Portugeza (Brazilia) 12 | it: Italiana 13 | uk: Ukrainiana 14 | ru: Rusa 15 | nl: Olandeza 16 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/nl.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | nl: 3 | languages: 4 | ar: "Arabisch" 5 | es: "Spaans" 6 | en: "Engels" 7 | fr: "Frans" 8 | zh-CN: "Chinees" 9 | de: "Duits" 10 | md: Moldavisch 11 | pt: "Portugees (Portugal)" 12 | pt-BR: "Portugees (Brazilië)" 13 | it: "Italiaans" 14 | uk: "Oekraïense" 15 | ru: "Russisch" 16 | nl: "Nederlands" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/pt-BR.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | pt-BR: 3 | languages: 4 | ar: "Árabe" 5 | es: "Espanhol" 6 | en: "Inglês" 7 | fr: "Francês" 8 | zh-CN: "Chinês" 9 | de: "Alemão" 10 | md: Moldavo 11 | pt: "Português (Portugal)" 12 | pt-BR: "Português (Brasil)" 13 | it: "Italiano" 14 | uk: "Ucraniano" 15 | ru: "Russo" 16 | nl: "Holandês" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/pt.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | pt: 3 | languages: 4 | ar: "Árabe" 5 | es: "Espanhol" 6 | en: "Inglês" 7 | fr: "Francês" 8 | zh-CN: "Chinês" 9 | de: "Alemão" 10 | md: Moldavo 11 | pt: "Português (Portugal)" 12 | pt-BR: "Português (Brasil)" 13 | it: "Italiano" 14 | uk: "Ucraniano" 15 | ru: "Russo" 16 | nl: "Holandês" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/ru.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | ru: 3 | languages: 4 | ar: "арабский" 5 | es: "Испанский" 6 | en: "Английский" 7 | fr: "Французский" 8 | zh-CN: "Китайский" 9 | de: "Немецкий" 10 | md: Молдавский 11 | pt: "Португальский (Португалия)" 12 | pt-BR: "Португальский (Бразилия)" 13 | it: "Итальянский" 14 | uk: "Украинский" 15 | ru: "Русский" 16 | nl: "Голландский" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/uk.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | uk: 3 | languages: 4 | ar: "арабська" 5 | es: "Іспанська" 6 | en: "Англійська" 7 | fr: "Французька" 8 | zh-CN: "Китайська" 9 | de: "Німецька" 10 | md: Молдавський 11 | pt: "Португальська (Португалія)" 12 | pt-BR: "Португальська (Бразилія)" 13 | it: "Італійська" 14 | uk: "Українська" 15 | ru: "Російська" 16 | nl: "Голландська" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/languages/zh-CN.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | zh-CN: 3 | languages: 4 | ar: "阿拉伯语" 5 | es: "西班牙语" 6 | en: "英语" 7 | fr: "法语" 8 | zh-CN: "中文" 9 | de: "德语" 10 | md: "摩尔达维亚人" 11 | pt: "葡萄牙" 12 | pt-BR: "巴西" 13 | it: "意大利语" 14 | uk: "乌克兰语" 15 | ru: "俄语" 16 | nl: "荷兰语" 17 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/de.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | de: 3 | routes: 4 | group: Gruppe 5 | category: Kategorie 6 | tag: Tag 7 | search: Suche 8 | profile: Profil 9 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/es.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | es: 3 | routes: 4 | group: grupo 5 | category: categoria 6 | tag: etiqueta 7 | search: buscar 8 | profile: perfil 9 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/fr.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | fr: 3 | routes: 4 | group: groupe 5 | category: categorie 6 | tag: balise 7 | search: recherche 8 | profile: profil 9 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/it.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | it: 3 | routes: 4 | group: gruppo 5 | category: categoria 6 | tag: etichetta 7 | search: ricerca 8 | profile: profilo 9 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/md.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | md: 3 | routes: 4 | group: grupul 5 | category: categoria 6 | tag: marcaj 7 | search: căutare 8 | profile: profil 9 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/pt-BR.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | pt-BR: 3 | routes: 4 | group: grupo 5 | category: categoria 6 | tag: tag 7 | search: buscar 8 | profile: perfil 9 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/pt.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | pt: 3 | routes: 4 | group: grupo 5 | category: categoria 6 | tag: etiqueta 7 | search: buscar 8 | profile: perfil 9 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/ru.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | ru: 3 | routes: 4 | group: группа 5 | category: категория 6 | tag: тег 7 | search: поиск 8 | profile: профиль 9 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/uk.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | uk: 3 | routes: 4 | group: група 5 | category: категорія 6 | tag: тег 7 | search: пошук 8 | profile: профіль 9 | -------------------------------------------------------------------------------- /config/locales/camaleon_cms/routes/zh-CN.yml: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | zh-CN: 3 | routes: 4 | group: 群组 5 | category: 分类 6 | tag: 标签 7 | search: 搜索 8 | profile: 资料 9 | -------------------------------------------------------------------------------- /config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | scope PluginRoutes.system_info['relative_url_root'], as: 'cama' do 3 | # root "application#index" 4 | default_url_options PluginRoutes.default_url_options 5 | 6 | # public 7 | get 'error', as: 'error', to: 'camaleon_cms/camaleon#render_error' 8 | get 'captcha', as: 'captcha', to: 'camaleon_cms/camaleon#captcha' 9 | eval(PluginRoutes.load('main')) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20150926095310_rename_column_posts.rb: -------------------------------------------------------------------------------- 1 | # change post structure to optimize query speed 2 | class RenameColumnPosts < CamaManager.migration_class 3 | def change 4 | remove_column "#{PluginRoutes.static_system_info["db_prefix"]}posts", :comment_count 5 | add_column "#{PluginRoutes.static_system_info["db_prefix"]}posts", :post_order, :integer, default: 0 6 | add_column "#{PluginRoutes.static_system_info["db_prefix"]}posts", :taxonomy_id, :integer, default: nil, index: true 7 | CamaleonCms::Post.all.each do |post| 8 | begin 9 | post_id = post.get_post_type_depre.id 10 | post.update_column("taxonomy_id", post_id) 11 | post_order = post.term_relationships.where("term_taxonomy_id = ?", post_id).first.term_order 12 | post.update_column("post_order", post_order) 13 | rescue 14 | # puts "**************** The following Post is invalid: #{post.inspect}" 15 | end 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /db/migrate/20151212095328_add_confirm_token_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddConfirmTokenToUsers < CamaManager.migration_class 2 | def change 3 | add_column CamaleonCms::User.table_name, :confirm_email_token, :string, default: nil 4 | add_column CamaleonCms::User.table_name, :confirm_email_sent_at, :datetime, default: nil 5 | add_column CamaleonCms::User.table_name, :is_valid_email, :boolean, default: true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20160504155652_add_feature_to_posts.rb: -------------------------------------------------------------------------------- 1 | class AddFeatureToPosts < CamaManager.migration_class 2 | def change 3 | add_column "#{PluginRoutes.static_system_info["db_prefix"]}posts", :is_feature, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160504155653_move_first_name_of_users.rb: -------------------------------------------------------------------------------- 1 | class MoveFirstNameOfUsers < CamaManager.migration_class 2 | def change 3 | add_column CamaleonCms::User.table_name, :first_name, :string unless column_exists?(CamaleonCms::User.table_name, :first_name) 4 | add_column CamaleonCms::User.table_name, :last_name, :string unless column_exists?(CamaleonCms::User.table_name, :last_name) 5 | CamaleonCms::User.all.each do |u| 6 | u.update_columns(first_name: u.get_meta('first_name'), last_name: u.get_meta('last_name')) if u.get_meta('first_name').present? 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20160606135421_improve_menus_structure.rb: -------------------------------------------------------------------------------- 1 | class ImproveMenusStructure < CamaManager.migration_class 2 | def change 3 | CamaleonCms::NavMenuItem.all.each do |menu| 4 | menu.update_columns({description: menu.get_option('object_id'), slug: menu.get_option('type')}) 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20160609121449_add_group_to_custom_field_values.rb: -------------------------------------------------------------------------------- 1 | class AddGroupToCustomFieldValues < CamaManager.migration_class 2 | def change 3 | add_column "#{PluginRoutes.static_system_info["db_prefix"]}custom_fields_relationships", :group_number, :integer, default: 0 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161206211917_install_migrated_seo_plugin.rb: -------------------------------------------------------------------------------- 1 | class InstallMigratedSeoPlugin < CamaManager.migration_class 2 | # install seo plugin without calling hooks (seo logic moved to separated plugin) 3 | def change 4 | CamaleonCms::Site.all.each do |s| 5 | s.plugins.where(slug: 'cama_meta_tag').first_or_create!(term_group: 1) 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20161215202255_drop_user_relationship_table.rb: -------------------------------------------------------------------------------- 1 | class DropUserRelationshipTable < CamaManager.migration_class 2 | def change 3 | drop_table "#{PluginRoutes.static_system_info["db_prefix"]}user_relationships" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180124132318_create_media.rb: -------------------------------------------------------------------------------- 1 | class CreateMedia < CamaManager.migration_class 2 | def change 3 | create_table "#{PluginRoutes.static_system_info["db_prefix"]}media" do |t| 4 | t.references :site, index: true 5 | t.string :name, index: true 6 | t.boolean :is_folder, index: true, default: false 7 | t.string :folder_path, index: true 8 | t.string :file_size 9 | t.string :dimension, default: '' 10 | t.string :file_type 11 | t.string :url 12 | t.string :thumb 13 | t.boolean :is_public, default: true 14 | t.timestamps 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20180704211100_adjust_field_length.rb: -------------------------------------------------------------------------------- 1 | class AdjustFieldLength < CamaManager.migration_class 2 | def change 3 | post_table = CamaleonCms::Post.table_name 4 | change_column post_table, :title, :text 5 | remove_index(post_table, :slug) if index_exists?(post_table, :slug) 6 | change_column post_table, :slug, :text 7 | add_index post_table, :slug, length: 255 8 | change_column "#{PluginRoutes.static_system_info["db_prefix"]}term_taxonomy", :name, :text 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /gemfiles/rails_6_1.gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec path: '..' 4 | 5 | gem 'cancancan', '~> 3.0' 6 | gem 'capybara-screenshot' 7 | gem 'drb' 8 | gem 'factory_bot_rails' 9 | gem 'faker' 10 | gem 'mutex_m' 11 | gem 'non-digest-assets', '2.2.0' 12 | gem 'puma' 13 | gem 'rack_session_access' 14 | gem 'rails', '~> 6.1.0' 15 | gem 'rspec_junit_formatter' 16 | gem 'selenium-webdriver', '4.23.0' 17 | gem 'sprockets-rails', '>= 3.5.1' 18 | gem 'sqlite3', '~> 1.4' 19 | -------------------------------------------------------------------------------- /gemfiles/rails_7_0.gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec path: '..' 4 | 5 | gem 'cancancan', '~> 3.0' 6 | gem 'capybara-screenshot' 7 | gem 'drb' 8 | gem 'factory_bot_rails' 9 | gem 'faker' 10 | gem 'mutex_m' 11 | gem 'non-digest-assets', '2.2.0' 12 | gem 'puma' 13 | gem 'rack_session_access' 14 | gem 'rails', '~> 7.0.1' 15 | gem 'rspec_junit_formatter' 16 | gem 'selenium-webdriver', '4.23.0' 17 | gem 'sprockets-rails', '>= 3.5.1' 18 | gem 'sqlite3', '~> 1.4' 19 | -------------------------------------------------------------------------------- /gemfiles/rails_7_1.gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec path: '..' 4 | 5 | gem 'cancancan', '~> 3.0' 6 | gem 'capybara-screenshot' 7 | gem 'factory_bot_rails' 8 | gem 'faker' 9 | gem 'non-digest-assets', '~> 2.3' 10 | gem 'puma' 11 | gem 'rack_session_access' 12 | gem 'rails', '~> 7.1.2' 13 | gem 'rspec_junit_formatter' 14 | gem 'selenium-webdriver', '4.23.0' 15 | gem 'sprockets-rails', '>= 3.5.1' 16 | gem 'sqlite3', '~> 1.4' 17 | -------------------------------------------------------------------------------- /gemfiles/rails_7_2.gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec path: '..' 4 | 5 | gem 'cancancan', '~> 3.0' 6 | gem 'capybara-screenshot' 7 | gem 'factory_bot_rails' 8 | gem 'faker' 9 | gem 'non-digest-assets', '2.5.0' 10 | gem 'puma' 11 | gem 'rack_session_access' 12 | gem 'rails', '~> 7.2.0' 13 | gem 'rspec_junit_formatter' 14 | gem 'selenium-webdriver', '4.23.0' 15 | gem 'sprockets-rails', '>= 3.5.1' 16 | gem 'sqlite3' 17 | -------------------------------------------------------------------------------- /gemfiles/rails_8_0.gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec path: '..' 4 | 5 | gem 'cancancan', '~> 3.0' 6 | gem 'capybara-screenshot' 7 | gem 'factory_bot_rails' 8 | gem 'faker' 9 | gem 'non-digest-assets', '2.5.0' 10 | gem 'puma' 11 | gem 'rack_session_access' 12 | gem 'rails', '~> 8.0.1' 13 | gem 'rspec_junit_formatter' 14 | gem 'selenium-webdriver', '4.23.0' 15 | gem 'sprockets-rails', '>= 3.5.2' 16 | gem 'sqlite3' 17 | -------------------------------------------------------------------------------- /gemfiles/rails_edge.gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec path: '..' 4 | 5 | gem 'cancancan', '~> 3.0' 6 | gem 'capybara-screenshot' 7 | gem 'factory_bot_rails' 8 | gem 'faker' 9 | gem 'non-digest-assets', git: 'https://github.com/texpert/non-digest-assets', branch: 'no-max-limit-for-rails-version' 10 | gem 'puma' 11 | gem 'rack_session_access' 12 | gem 'rails', git: 'https://github.com/rails/rails', branch: 'main' 13 | gem 'rspec_junit_formatter' 14 | gem 'selenium-webdriver', '4.23.0' 15 | gem 'sprockets-rails', '>= 3.5.2' 16 | gem 'sqlite3', '~> 2.0' 17 | -------------------------------------------------------------------------------- /lib/camaleon_cms.rb: -------------------------------------------------------------------------------- 1 | require 'camaleon_cms/engine' 2 | require 'camaleon_cms/version' 3 | 4 | module CamaleonCms 5 | end 6 | -------------------------------------------------------------------------------- /lib/camaleon_cms/version.rb: -------------------------------------------------------------------------------- 1 | module CamaleonCms 2 | VERSION = '2.9.1'.freeze 3 | end 4 | -------------------------------------------------------------------------------- /lib/captcha/bumpyroad.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/bumpyroad.ttf -------------------------------------------------------------------------------- /lib/captcha/captcha_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_0.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_1.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_10.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_11.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_2.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_3.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_4.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_5.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_6.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_7.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_8.jpg -------------------------------------------------------------------------------- /lib/captcha/captcha_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/captcha/captcha_9.jpg -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/app/assets/images/plugins/my_plugin/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/generators/camaleon_cms/gem_plugin_template/app/assets/images/plugins/my_plugin/.keep -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/app/assets/javascripts/plugins/my_plugin/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/generators/camaleon_cms/gem_plugin_template/app/assets/javascripts/plugins/my_plugin/.keep -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/app/assets/stylesheets/plugins/my_plugin/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/generators/camaleon_cms/gem_plugin_template/app/assets/stylesheets/plugins/my_plugin/.keep -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/admin_controller.rb: -------------------------------------------------------------------------------- 1 | module Plugins 2 | module PluginClass 3 | class AdminController < CamaleonCms::Apps::PluginsAdminController 4 | include Plugins::PluginClass::MainHelper 5 | def index; end 6 | 7 | # show settings form 8 | def settings; end 9 | 10 | # save values from settings form 11 | def save_settings 12 | @plugin.set_options(params[:options]) if params[:options].present? # save option values 13 | @plugin.set_metas(params[:metas]) if params[:metas].present? # save meta values 14 | @plugin.set_field_values(params[:field_options]) if params[:field_options].present? # save custom field values 15 | redirect_to url_for(action: :settings), notice: 'Settings Saved Successfully' 16 | end 17 | # add custom methods below .... 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/app/controllers/plugins/my_plugin/front_controller.rb: -------------------------------------------------------------------------------- 1 | module Plugins 2 | module PluginClass 3 | class FrontController < CamaleonCms::Apps::PluginsFrontController 4 | include Plugins::PluginClass::MainHelper 5 | def index 6 | # actions for frontend module 7 | end 8 | 9 | # add custom methods below 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/app/models/plugins/my_plugin/my_plugin.rb: -------------------------------------------------------------------------------- 1 | # class Plugins::PluginClass::PluginClass < CamaleonRecord 2 | # belongs_to :site, class_name: "CamleonCms::Site" 3 | 4 | # here create your models normally 5 | # notice: your tables in database will be plugins_pluginKey in plural (check rails documentation) 6 | # end 7 | -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/admin/index.html.erb: -------------------------------------------------------------------------------- 1 | <%#= javascript_include_tag plugin_asset("my_file.js") %> 2 |
3 |
4 |

My Title

5 |
6 |
7 |

Plugin ready to use in admin panel!.

8 |
9 |
-------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/front/index.html.erb: -------------------------------------------------------------------------------- 1 | <%#= javascript_include_tag plugin_gem_asset("js/my_file.js") %> 2 | Plugin ready to use! in frontend. -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/app/views/plugins/my_plugin/layouts/readme.txt: -------------------------------------------------------------------------------- 1 | You can create your layouts here. 2 | To load your custom layout you can use: layout: plugin_layout() in your controller -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/config/camaleon_plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "pluginTitle", 3 | "descr": "", 4 | "key": "pluginKey", // must be the name of the folder of your plugin, sample: app/views/plugins/ ==> 'my_plugin' 5 | "helpers": [ 6 | "Plugins::PluginClass::MainHelper" 7 | ], 8 | "hooks": { 9 | "on_active": ["pluginKey_on_active"], 10 | "on_inactive": ["pluginKey_on_inactive"], 11 | "plugin_options": ["pluginKey_on_plugin_options"] 12 | //here you can add all your hooks (read documentation) 13 | } 14 | } -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/config/initializers/custom_models.rb: -------------------------------------------------------------------------------- 1 | # Rails.application.config.to_prepare do 2 | # CamaleonCms::Site.class_eval do 3 | # has_many :attack, class_name: "Plugins::Attack::Models::Attack" 4 | # end 5 | # end 6 | -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/config/locales/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/generators/camaleon_cms/gem_plugin_template/config/locales/.keep -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/gem_plugin_template/db/migrate/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/generators/camaleon_cms/gem_plugin_template/db/migrate/.keep -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/install_template/apps/themes/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/generators/camaleon_cms/install_template/apps/themes/readme.txt -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/install_template/plugin_routes.rb: -------------------------------------------------------------------------------- 1 | require 'json' 2 | class PluginRoutes 3 | # draw "all" gems registered for the plugins or themes and camaleon gems 4 | def self.draw_gems 5 | res = [] 6 | dirs = [] + Dir["#{apps_dir}/plugins/*"] + Dir["#{apps_dir}/themes/*"] 7 | 8 | dirs.each do |path| 9 | next if ['.', '..'].include?(path) 10 | 11 | g = File.join(path, 'config', 'Gemfile') 12 | res << File.read(g) if File.exist?(g) 13 | end 14 | res.join("\n") 15 | end 16 | 17 | # return apps directory path 18 | def self.apps_dir 19 | dir = File.dirname(__FILE__).to_s.split('/') 20 | dir.pop 21 | "#{dir.join('/')}/app/apps" 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/install_template/system.json: -------------------------------------------------------------------------------- 1 | { 2 | "share_sessions": true, // (boolean) share user sessions between subdomains of base_domain (only for users_share_sites = true) 3 | "default_user_role": "client", // default user role for all new users 4 | "users_share_sites": true, //(boolean) true: permit to share users between sites, false: All users are assigned for a unique site. (Only changed before installation) 5 | "db_prefix": "cama_", // prefix name for database tables 6 | "relative_url_root": "", // URL prefix, for example to get http://localhost:3000/blog/, this should be "blog" 7 | "auto_include_migrations": false, // permit to avoid auto include of all migrations of camaleon cms and its related plugins 8 | "hooks": {} 9 | } 10 | 11 | // Note: after any change in this file, you need to restart your server to apply changes. 12 | -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/theme_template/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require camaleon_cms/bootstrap.min 12 | *= require font-awesome 13 | */ -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/theme_template/assets/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/generators/camaleon_cms/theme_template/assets/images/image.png -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/theme_template/assets/js/main.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery2 14 | //= require camaleon_cms/bootstrap.min.js 15 | -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/theme_template/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "themeTitle", 3 | "description" : "", 4 | "thumb" : "images/image.png", 5 | "helpers": [ 6 | "Themes::ThemeClass::MainHelper" 7 | ], 8 | "hooks": { 9 | "on_active": ["themeKey_on_install_theme"], 10 | "on_inactive": ["themeKey_on_uninstall_theme"], 11 | "on_theme_settings": ["themeKey_settings"] 12 | //here all your hooks 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/theme_template/config/locales/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/lib/generators/camaleon_cms/theme_template/config/locales/.keep -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/theme_template/views/admin/settings.html.erb: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/generators/camaleon_cms/theme_template/views/index.html.erb: -------------------------------------------------------------------------------- 1 |

Hello Camaleon CMS

-------------------------------------------------------------------------------- /lib/generators/camaleon_cms/theme_template/views/partials/readme.txt: -------------------------------------------------------------------------------- 1 | here all your partials -------------------------------------------------------------------------------- /lib/tasks/camaleon_cms/rspec_test.rake: -------------------------------------------------------------------------------- 1 | namespace :camaleon_cms do 2 | desc 'Process all rspec features of camaleon cms' 3 | # Please add this gems in your Gemfile and run: rake camaleon_cms:rspec 4 | # group :test do 5 | # gem 'mysql2', '~> 0.3.11' 6 | # gem 'rspec-rails', '~> 3.0' 7 | # gem 'capybara' 8 | # gem "selenium-webdriver" 9 | # end 10 | # After run: rails generate rspec:install, support folder 11 | # copy rails helper, rspec_helper, 12 | task :rspec, [:file] => :environment do |_task, args| 13 | if args.file.present? 14 | puts "************* running: #{"rspec #{File.join($camaleon_engine_dir, args.file)}"}" 15 | system("rspec #{File.join($camaleon_engine_dir, args.file)}") 16 | else 17 | Dir[File.join($camaleon_engine_dir, 'spec', 'features', '*.rb')].each { |p| system("rspec #{p}") } 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "eslint": "^8.0.1", 4 | "eslint-config-standard": "^17.0.0", 5 | "eslint-plugin-import": "^2.25.2", 6 | "eslint-plugin-n": "^15.0.0", 7 | "eslint-plugin-promise": "^6.0.0" 8 | }, 9 | "name": "camaleon-cms", 10 | "version": "2.6.6", 11 | "description": "Camaleon CMS is a dynamic and advanced content management system based on Ruby on Rails", 12 | "main": "index.js", 13 | "repository": "https://github.com/owen2345/camaleon-cms", 14 | "author": "owen2345 ", 15 | "license": "MIT", 16 | "packageManager": "yarn@4.3.1+sha256.2535167e742927e1d2a1610d5004576e4e8f764d2ca5470d19536790f55cd6e2" 17 | } 18 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/screenshot.png -------------------------------------------------------------------------------- /spec/decorators/application_decorator_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | RSpec.describe CamaleonCms::SiteDecorator, type: :model do 6 | %i[post_type post site user].each do |klass| 7 | describe 'Marshal compatibility' do 8 | let!(:object) { create(klass) } 9 | let!(:decorator) { object.decorate } 10 | 11 | it 'Marshal dumps and loads the same object' do 12 | dump = Marshal.dump(decorator) 13 | recovered_decorator = Marshal.load(dump) 14 | expect(recovered_decorator).to eql(decorator) 15 | expect(recovered_decorator.object).to eql(object) 16 | end 17 | 18 | it 'Writes to the Rails cache' do 19 | Rails.cache.write(klass, decorator) 20 | cache_result = Rails.cache.read klass 21 | expect(cache_result.object).to eql(object) 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /spec/dummy/.gitignore: -------------------------------------------------------------------------------- 1 | /log/*.log 2 | /db/*.sqlite3 3 | /tmp/**/* 4 | /public/media 5 | /public/tmp 6 | /public/assets 7 | -------------------------------------------------------------------------------- /spec/dummy/README.rdoc: -------------------------------------------------------------------------------- 1 | == README 2 | 3 | This README would normally document whatever steps are necessary to get the 4 | application up and running. 5 | 6 | Things you may want to cover: 7 | 8 | * Ruby version 9 | 10 | * System dependencies 11 | 12 | * Configuration 13 | 14 | * Database creation 15 | 16 | * Database initialization 17 | 18 | * How to run the test suite 19 | 20 | * Services (job queues, cache servers, search engines, etc.) 21 | 22 | * Deployment instructions 23 | 24 | * ... 25 | 26 | 27 | Please feel free to use a different markup language if you do not plan to run 28 | rake doc:app. 29 | -------------------------------------------------------------------------------- /spec/dummy/Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require File.expand_path('config/application', __dir__) 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/camaleon_first/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require camaleon_cms/bootstrap.min.css 12 | *= require font-awesome 13 | *= require ./wpbase 14 | *= require ./magnific-ver 15 | *= require ./style-ver 16 | */ -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/camaleon_first/assets/js/main.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery2 14 | //= require camaleon_cms/bootstrap.min.js 15 | //= require ./modernizr.custom 16 | //= require ./magnific.min 17 | //= require ./hover.zoom 18 | //= require ./main-ver 19 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/camaleon_first/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Default Theme", 3 | "description" : "This is the default theme of Camaleon CMS (folder = camaleon_first)", 4 | "thumb" : "images/image.png", 5 | "helpers": [ 6 | "Themes::CamaleonFirst::MainHelper" 7 | ], 8 | "hooks": { 9 | "on_active": ["camaleon_first_on_install_theme"], 10 | "on_inactive": ["camaleon_first_on_uninstall_theme"], 11 | "on_theme_settings": ["camaleon_first_settings"] 12 | //here all your hooks 13 | } 14 | } -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/camaleon_first/views/layouts/camaleon_cms/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 |
<%= image_tag @current_site.the_logo %>
14 | <%= yield %> 15 |
Visit Site
21 | 22 | 23 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/camaleon_first/views/mailer.html.erb: -------------------------------------------------------------------------------- 1 |
<%= raw @subject %>
2 |
3 | <%= raw @html %> 4 |
-------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/camaleon_first/views/partials/readme.txt: -------------------------------------------------------------------------------- 1 | here all your partials -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/camaleon_first/views/template_sample_page.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
<%= raw @post.the_title.upcase %>
3 |
4 | <%= raw @post.the_content %> 5 |
6 |
-------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require ./style 12 | *= require ./styles 13 | */ 14 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/assets/genericons/Genericons-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/apps/themes/default/assets/genericons/Genericons-Regular.otf -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.eot -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.ttf -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/apps/themes/default/assets/genericons/font/genericons-regular-webfont.woff -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/assets/js/main.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery2 14 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Wordpress theme", 3 | "description" : "This is a wordpress theme rebuilt with Camaleon cms (folder = default)", 4 | "thumb" : "images/image.png", 5 | "settings":[ 6 | {"label": "Settings", "action_name": "settings"} 7 | ], 8 | 9 | "helpers": [ 10 | "Themes::Default::DefaultHelper" 11 | ], 12 | "hooks": { 13 | "on_theme_settings": [ 14 | "theme_default_settings" 15 | ], 16 | "on_active": ["theme_default_on_install"] 17 | //"on_inactive": ["camaleon_first_on_uninstall_theme"] 18 | } 19 | } -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/views/admin/settings.html.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/apps/themes/default/views/admin/settings.html.erb -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/views/category.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <% @posts.each_with_index do |post, index| %> 6 | <%= raw "
" if index%3 == 0 && index > 0 %> 7 | <%= render partial: 'partials/post_list_item', locals: {post: post.decorate} %> 8 | <% end %> 9 |
10 | <%= content_tag("div", raw(ct('no_contents_found', default: 'No contents found')), class: "alert alert-warning") if @posts.empty? %> 11 | <%= raw cama_do_pagination(@posts) %> 12 |
13 |
14 |
15 | 16 | 17 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/views/page.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% if @post.has_thumb? %> 4 |
5 | <%= raw @post.the_thumb %> 6 |
7 | <% end %> 8 |

<%= @post.the_title %>

9 |
10 |
11 | <%= raw @post.the_content %> 12 |
13 |
14 | <%= render partial: 'partials/comments', locals: {post: @post} if @post.can_commented? %> 15 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/views/partials/_breadcrumb.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 |
7 |
8 | <%= render partial: 'partials/search_form' %> 9 |
10 |
-------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/views/partials/_forms.html.erb: -------------------------------------------------------------------------------- 1 | <% @form = current_site.forms.find_by_id(id) %> 2 | <% options = @form.options[:fields] 3 | settings = @form.get_meta("_settings") 4 | %> 5 | 6 |
7 | <%= form_for @form, url:{action: :save_form}, html: {method: "post", class: "railscf-form", multipart: true} do |f| %> 8 | 9 | <%= hidden_field_tag "id", @form.id %> 10 | <%= hidden_field_tag "post_id", post_id %> 11 | 12 |
13 | <%= render :partial => "camaleon_cms/flash_messages", locals: @validation %> 14 |
15 | <%= raw form_element_object(@form.id, options, post_id) %> 16 | 17 | 18 | <% end %> 19 |
20 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/views/partials/_search_form.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag(cama_search_path, :method => "get", :class => "form-search form-horizontal search-form") do %> 2 | 6 | " class="search-submit" /> 7 | <% end %> 8 | 9 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/views/post.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% if @post.has_thumb? %> 4 |
5 | <%= raw @post.the_thumb %> 6 |
7 | <% end %> 8 |

<%= @post.the_title %>

9 |
10 |
11 | <%= raw @post.the_content %> 12 |
13 |
14 | <%= render partial: 'partials/comments', locals: {post: @post} %> -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/views/post_tag.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | <% @posts.each_with_index do |post, index| %> 6 | <%= raw "
" if index%3 == 0 && index > 0 %> 7 | <%= render partial: 'partials/post_list_item', locals: {post: post.decorate} %> 8 | <% end %> 9 |
10 | <%= content_tag("div", raw(ct('no_contents_found', default: 'No contents found')), class: "alert alert-warning") if @posts.empty? %> 11 | <%= raw cama_do_pagination(@posts) %> 12 |
13 |
14 |
-------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/default/views/search.html.erb: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 |
7 |
8 | <% @posts.each_with_index do |post, index| %> 9 | <%= raw "
" if index%3 == 0 && index > 0 %> 10 | <%= render partial: 'partials/post_list_item', locals: {post: post.decorate} %> 11 | <% end %> 12 |
13 | <%= content_tag("div", raw(ct('no_contents_found', default: 'No contents found')), class: "alert alert-warning") if @posts.empty? %> 14 | <%= raw cama_do_pagination(@posts) %> 15 |
16 |
17 |
-------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/new/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the 9 | * compiled file, but it's generally better to create a new file per style scope. 10 | * 11 | *= require camaleon_cms/bootstrap.min 12 | *= require font-awesome 13 | *= require ./styles 14 | */ 15 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/new/assets/js/main.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require jquery2 14 | //= require camaleon_cms/bootstrap.min 15 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/new/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Clean Theme", 3 | "description" : "Clean and basic theme (folder = new)", 4 | "thumb" : "images/image.png", 5 | "settings":[ 6 | {"label": "Settings", "action_name": "settings"} 7 | ], 8 | 9 | "helpers": [ 10 | "Themes::New::CustomHelper" 11 | ], 12 | "hooks": { 13 | "on_destroy": [ 14 | "theme_custom_on_destroy_theme" 15 | ], 16 | "on_active": [ 17 | "theme_custom_on_install_theme" 18 | ], 19 | "on_inactive": [ 20 | "theme_custom_on_uninstall_theme" 21 | ], 22 | "on_theme_settings": [ 23 | "theme_custom_settings" 24 | ] 25 | } 26 | } -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/new/views/admin/settings.html.erb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/new/views/layouts/_footer.html.erb: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/new/views/layouts/index.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <%= stylesheet_link_tag theme_asset_path("css/main.css") %> 11 | <%= javascript_include_tag theme_asset_path("js/main.js") %> 12 | <%= raw the_head %> 13 | 14 | 15 | 16 | 17 |
18 | 19 | <%= render "layouts/header" %> 20 | 21 | 22 |
23 | <%= yield %> 24 |
25 | 26 | 27 | <%= render "layouts/footer" %> 28 | 29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/new/views/page.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render partial: 'partials/breadcrumb', locals: {breadcrumb: @post.the_breadcrumb} %> 3 |
4 |
5 |
6 |

<%= @post.the_title %>

7 |
8 | 9 |
10 |
11 | <%= raw @post.the_content %> 12 |
13 |
14 |
15 |
16 |
-------------------------------------------------------------------------------- /spec/dummy/app/apps/themes/new/views/post.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render partial: 'partials/breadcrumb', locals: {breadcrumb: @post.the_breadcrumb} %> 3 |
4 |
5 |
6 |

<%= @post.the_title %>

7 |
8 | 9 |
10 |
11 | <%= raw @post.the_content %> 12 |
13 |
14 | <%= render partial: 'partials/comments', locals: {post: @post} if @post.can_commented? %> 15 |
16 |
17 | <%= render partial: 'partials/sidebar', locals: {post: @post} %> 18 |
19 |
20 |
-------------------------------------------------------------------------------- /spec/dummy/app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_tree ../javascripts 3 | //= link_tree ../stylesheets 4 | //= link_tree ../../../../../app/apps/themes/default/assets 5 | //= link_tree ../../../../../app/apps/themes/camaleon_first/assets 6 | //= link_tree ../../../../../app/apps/themes/new/assets 7 | //= link camaleon-cms.js 8 | //= link camaleon_cms/admin/nav_menu.js 9 | -------------------------------------------------------------------------------- /spec/dummy/app/assets/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/assets/images/.keep -------------------------------------------------------------------------------- /spec/dummy/app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // This is a manifest file that'll be compiled into application.js, which will include all the files 2 | // listed below. 3 | // 4 | // Any JavaScript file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5 | // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. 6 | // 7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8 | // compiled file. 9 | // 10 | // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details 11 | // about supported directives. 12 | // 13 | //= require_tree . 14 | -------------------------------------------------------------------------------- /spec/dummy/app/assets/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a manifest file that'll be compiled into application.css, which will include all the files 3 | * listed below. 4 | * 5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 6 | * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. 7 | * 8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the 9 | * compiled file so the styles you add here take precedence over styles defined in any styles 10 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new 11 | * file per style scope. 12 | * 13 | *= require_tree . 14 | *= require_self 15 | */ 16 | -------------------------------------------------------------------------------- /spec/dummy/app/controllers/application_controller.rb: -------------------------------------------------------------------------------- 1 | class ApplicationController < ActionController::Base 2 | # Prevent CSRF attacks by raising an exception. 3 | # For APIs, you may want to use :null_session instead. 4 | protect_from_forgery with: :exception 5 | end 6 | -------------------------------------------------------------------------------- /spec/dummy/app/controllers/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/controllers/concerns/.keep -------------------------------------------------------------------------------- /spec/dummy/app/helpers/application_helper.rb: -------------------------------------------------------------------------------- 1 | module ApplicationHelper 2 | end 3 | -------------------------------------------------------------------------------- /spec/dummy/app/mailers/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/mailers/.keep -------------------------------------------------------------------------------- /spec/dummy/app/models/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/models/.keep -------------------------------------------------------------------------------- /spec/dummy/app/models/concerns/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/app/models/concerns/.keep -------------------------------------------------------------------------------- /spec/dummy/app/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dummy 5 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> 6 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> 7 | <%= csrf_meta_tags %> 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spec/dummy/bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /spec/dummy/bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path('../config/application', __dir__) 3 | require_relative '../config/boot' 4 | require 'rails/commands' 5 | -------------------------------------------------------------------------------- /spec/dummy/bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative '../config/boot' 3 | require 'rake' 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /spec/dummy/bin/update: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'fileutils' 3 | include FileUtils 4 | 5 | # path to your application root. 6 | APP_ROOT = File.expand_path('..', __dir__) 7 | 8 | def system!(*args) 9 | system(*args) || abort("\n== Command #{args} failed ==") 10 | end 11 | 12 | chdir APP_ROOT do 13 | # This script is a way to update your development environment automatically. 14 | # Add necessary update steps to this file. 15 | 16 | puts '== Installing dependencies ==' 17 | system! 'gem install bundler --conservative' 18 | system('bundle check') || system!('bundle install') 19 | 20 | # Install JavaScript dependencies if using Yarn 21 | # system('bin/yarn') 22 | 23 | puts "\n== Updating database ==" 24 | system! 'bin/rails db:migrate' 25 | 26 | puts "\n== Removing old logs and tempfiles ==" 27 | system! 'bin/rails log:clear tmp:clear' 28 | 29 | puts "\n== Restarting application server ==" 30 | system! 'bin/rails restart' 31 | end 32 | -------------------------------------------------------------------------------- /spec/dummy/bin/yarn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_ROOT = File.expand_path('..', __dir__) 3 | Dir.chdir(APP_ROOT) do 4 | exec 'yarnpkg', *ARGV 5 | rescue Errno::ENOENT 6 | warn 'Yarn executable was not detected in the system.' 7 | warn 'Download Yarn at https://yarnpkg.com/en/docs/install' 8 | exit 1 9 | end 10 | -------------------------------------------------------------------------------- /spec/dummy/config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require ::File.expand_path('config/environment', __dir__) 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /spec/dummy/config/boot.rb: -------------------------------------------------------------------------------- 1 | # Set up gems listed in the Gemfile. 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../Gemfile', __dir__) 3 | 4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 5 | require 'logger' 6 | $LOAD_PATH.unshift File.expand_path('../../../lib', __dir__) 7 | -------------------------------------------------------------------------------- /spec/dummy/config/database.yml: -------------------------------------------------------------------------------- 1 | # SQLite version 3.x 2 | # gem install sqlite3 3 | # 4 | # Ensure the SQLite 3 gem is defined in your Gemfile 5 | # gem 'sqlite3' 6 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: 5 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /spec/dummy/config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require File.expand_path('application', __dir__) 3 | require 'camaleon_cms' 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = '1.0' 5 | 6 | # Add additional assets to the asset load path 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | 9 | # Precompile additional assets. 10 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. 11 | Rails.application.config.assets.precompile += %w[manifest.js] 12 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 7 | # Rails.backtrace_cleaner.remove_silencers! 8 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :json 4 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, '\1en' 8 | # inflect.singular /^(ox)en/i, '\1' 9 | # inflect.irregular 'person', 'people' 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym 'RESTful' 16 | # end 17 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.session_store :cookie_store, key: '_dummy_session' 4 | -------------------------------------------------------------------------------- /spec/dummy/config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters) 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /spec/dummy/config/locales/en.yml: -------------------------------------------------------------------------------- 1 | # Files in the config/locales directory are used for internationalization 2 | # and are automatically loaded by Rails. If you want to use locales other 3 | # than English, add the necessary files in this directory. 4 | # 5 | # To use the locales, use `I18n.t`: 6 | # 7 | # I18n.t 'hello' 8 | # 9 | # In views, this is aliased to just `t`: 10 | # 11 | # <%= t('hello') %> 12 | # 13 | # To use a different locale, set it with `I18n.locale`: 14 | # 15 | # I18n.locale = :es 16 | # 17 | # This would use the information in config/locales/es.yml. 18 | # 19 | # To learn more, please read the Rails Internationalization guide 20 | # available at https://guides.rubyonrails.org/i18n.html. 21 | 22 | en: 23 | hello: "Hello world" 24 | -------------------------------------------------------------------------------- /spec/dummy/config/routes.rb: -------------------------------------------------------------------------------- 1 | Rails.application.routes.draw do 2 | mount CamaleonCms::Engine => '/camaleon_cms' 3 | end 4 | -------------------------------------------------------------------------------- /spec/dummy/lib/assets/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/lib/assets/.keep -------------------------------------------------------------------------------- /spec/dummy/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/dummy/public/favicon.ico -------------------------------------------------------------------------------- /spec/factories/post_type.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :post_type, class: 'CamaleonCms::PostType' do 3 | name { Faker::Name.unique.name } 4 | sequence(:slug) { |n| "posttyp#{n}" } 5 | description { Faker::Lorem.sentence } 6 | data_options {} 7 | site 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/factories/site.rb: -------------------------------------------------------------------------------- 1 | include CamaleonCms::SiteHelper 2 | include CamaleonCms::HooksHelper 3 | 4 | FactoryBot.define do 5 | factory :site, class: 'CamaleonCms::Site' do 6 | name { Faker::Name.unique.name } 7 | slug do 8 | current_session = Capybara.current_session 9 | current_session.server ? "#{current_session.server.host}:#{current_session.server.port}" : 'key' 10 | end 11 | # sequence(:slug) { |n| Capybara.current_session.server ? "#{Capybara.current_session.server.host}:#{Capybara.current_session.server.port}" : "site#{n}" } 12 | description { Faker::Lorem.sentence } 13 | transient do 14 | theme { 'default' } 15 | skip_intro { true } 16 | end 17 | 18 | after(:create) do |site, evaluator| 19 | site_after_install(site, evaluator.theme) 20 | site.set_option('save_intro', true) if evaluator.skip_intro 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /spec/factories/user.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :user, class: CamaManager.get_user_class_name do 3 | first_name { Faker::Name.first_name } 4 | last_name { Faker::Name.last_name } 5 | email { Faker::Internet.unique.email } 6 | username { Faker::Internet.unique.user_name } 7 | password { '12345678' } 8 | password_confirmation { '12345678' } 9 | site 10 | 11 | factory :user_admin do 12 | role { 'admin' } 13 | end 14 | 15 | factory :user_shared do 16 | site_id { nil } 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/features/admin/not_found_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | describe 'no found', :js do 6 | init_site 7 | 8 | it '404s' do 9 | admin_sign_in 10 | visit "#{cama_root_relative_path}/admin/nothing-here" 11 | expect(page).to have_content('Invalid route') 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/features/admin/shortcodes_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | describe 'the Shortcodes', :js do 6 | init_site 7 | 8 | it 'Shortcodes list' do 9 | admin_sign_in 10 | visit "#{cama_root_relative_path}/admin/settings/shortcodes" 11 | expect(page).to have_content('Short Code') 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/features/admin/themes_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | describe 'the Themes', :js do 6 | init_site 7 | 8 | it 'Themes list' do 9 | admin_sign_in 10 | visit "#{cama_root_relative_path}/admin/appearances/themes" 11 | expect(page).to have_css('#themes_page') 12 | within '#themes_page' do 13 | first('.preview_link').click 14 | end 15 | # wait_for_ajax 16 | # page.within_frame '#ow_inline_modal_iframe' do 17 | # page.should have_selector 'body' 18 | # end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/features/frontend/post_type_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | describe 'Posttype frontend', :js do 6 | before do 7 | @site = create(:site).decorate 8 | @post = @site.the_post('sample-post').decorate 9 | @post_type = @post.post_type.decorate 10 | end 11 | 12 | it 'public uri with group structure' do 13 | expect(@post_type.the_group_url(as_path: true)).to include("/group/#{@post_type.id}") 14 | end 15 | 16 | it 'public url' do 17 | expect(@post_type.the_url).to include("/#{@post_type.slug}") 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/helpers/email_helper_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | describe 'CamaleonCms::EmailHelper' do 6 | init_site 7 | 8 | describe '#send_email (old way)' do 9 | it 'returns empty' do 10 | expect(helper.send_email('test@gmail.com', 'Test Email', 'test content', 'owenperedo@gmail.com')) 11 | .to be_a(ActionMailer::MailDeliveryJob) 12 | end 13 | end 14 | 15 | describe '#send_email (new way)' do 16 | it 'returns empty' do 17 | expect( 18 | helper.cama_send_email('test@gmail.com', 'Test Email', 19 | { content: 'test content', from: 'owenperedo@gmail.com' }) 20 | ).to be_a(ActionMailer::MailDeliveryJob) 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /spec/models/category_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::Category, type: :model do 7 | before { allow_any_instance_of(described_class).to receive(:set_site) } 8 | 9 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 10 | end 11 | -------------------------------------------------------------------------------- /spec/models/meta_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'shared_specs/sanitize_attrs' 4 | 5 | RSpec.describe CamaleonCms::Meta, type: :model do 6 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[value] 7 | end 8 | -------------------------------------------------------------------------------- /spec/models/nav_menu_item_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::NavMenuItem, type: :model do 7 | before { allow_any_instance_of(described_class).to receive(:update_count) } 8 | 9 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 10 | end 11 | -------------------------------------------------------------------------------- /spec/models/nav_menu_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::NavMenu, type: :model do 7 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 8 | end 9 | -------------------------------------------------------------------------------- /spec/models/plugin_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::Plugin, type: :model do 7 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 8 | end 9 | -------------------------------------------------------------------------------- /spec/models/post_comment_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'shared_specs/sanitize_attrs' 4 | 5 | RSpec.describe CamaleonCms::PostComment, type: :model do 6 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[content] 7 | end 8 | -------------------------------------------------------------------------------- /spec/models/post_tag_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::PostTag, type: :model do 7 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 8 | end 9 | -------------------------------------------------------------------------------- /spec/models/post_type_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::PostType, type: :model do 7 | init_site 8 | 9 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 10 | end 11 | -------------------------------------------------------------------------------- /spec/models/site_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::Site, type: :model do 7 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 8 | 9 | describe 'check metas relationships' do 10 | let!(:site) { create(:site).decorate } 11 | 12 | it 'creates metas with correct `object_class`' do 13 | front_cache_elements = site.metas.where(key: 'front_cache_elements').first 14 | 15 | expect(front_cache_elements.object_class).to eql('Site') 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /spec/models/term_taxonomy_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'shared_specs/sanitize_attrs' 4 | 5 | RSpec.describe CamaleonCms::TermTaxonomy, type: :model do 6 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 7 | end 8 | -------------------------------------------------------------------------------- /spec/models/theme_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::Theme, type: :model do 7 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 8 | end 9 | -------------------------------------------------------------------------------- /spec/models/user_role_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::UserRole, type: :model do 7 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 8 | end 9 | -------------------------------------------------------------------------------- /spec/models/user_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'shared_specs/sanitize_attrs' 4 | 5 | RSpec.describe CamaleonCms::User, type: :model do 6 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[first_name last_name username] 7 | 8 | describe 'email' do 9 | it 'is lowercased' do 10 | user = described_class.create!(email: 'FOO@BAR.COM', username: 'test', password: 'test') 11 | 12 | expect(user.email).to eql('foo@bar.com') 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/models/widget/widget_main_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::Widget::Main, type: :model do 7 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 8 | end 9 | -------------------------------------------------------------------------------- /spec/models/widget/widget_sidebar_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | require 'shared_specs/sanitize_attrs' 5 | 6 | RSpec.describe CamaleonCms::Widget::Sidebar, type: :model do 7 | it_behaves_like 'sanitize attrs', model: described_class, attrs_to_sanitize: %i[name description] 8 | end 9 | -------------------------------------------------------------------------------- /spec/rails_helper.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | RSpec.configure do |config| 4 | config.include FactoryBot::Syntax::Methods 5 | end 6 | -------------------------------------------------------------------------------- /spec/routing/post_type_routes_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe 'routes for Post Types', type: :routing do 4 | init_site 5 | 6 | it 'routes for /test-post-type' do 7 | post_type = create_test_post_type(slug: 'test-post-type') 8 | expect(post_type.id).to be_present 9 | expect(get('/test-post-type')) 10 | .to route_to('camaleon_cms/frontend#post_type', post_type_id: post_type.id, post_type_slug: 'test-post-type') 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /spec/support/capybara_normalize_whitespace_patch.rb: -------------------------------------------------------------------------------- 1 | ### https://github.com/thoughtbot/capybara-webkit/issues/1065#issuecomment-411116972 2 | 3 | module Capybara 4 | module Helpers 5 | class << self 6 | alias normalize_whitespace_with_warning normalize_whitespace 7 | 8 | def normalize_whitespace(*args) 9 | silence_warnings do 10 | normalize_whitespace_with_warning(*args) 11 | end 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/support/fixtures/rails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/owen2345/camaleon-cms/67de8835871935b18409c1a87a1666641c69c420/spec/support/fixtures/rails.png -------------------------------------------------------------------------------- /spec/support/helpers/stub_requests.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module StubRequests 4 | def stub_dns(url, ip_address:, port: 443) 5 | url = parse_url(url) 6 | socket = Socket.sockaddr_in(port, ip_address) 7 | addr = Addrinfo.new(socket) 8 | 9 | # See CamaleonCms::UserUrlValidator 10 | allow(Addrinfo).to receive(:getaddrinfo).with(url.hostname, url.port || port, nil, :STREAM).and_return([addr]) 11 | end 12 | 13 | private 14 | 15 | def parse_url(url) 16 | url.is_a?(URI) ? url : Addressable::URI.parse(url) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /spec/support/wait_for_ajax.rb: -------------------------------------------------------------------------------- 1 | # spec/support/wait_for_ajax.rb 2 | def wait_for_ajax 3 | Timeout.timeout(10) do 4 | loop until finished_all_ajax_requests? 5 | end 6 | end 7 | 8 | def finished_all_ajax_requests? 9 | page.evaluate_script('jQuery.active').zero? 10 | end 11 | 12 | def wait_for_visible_modal(key = nil) 13 | Timeout.timeout(5) do 14 | loop until visible_modal?(key) 15 | end 16 | end 17 | 18 | def wait_for_hidden_modal(key = nil) 19 | Timeout.timeout(5) do 20 | loop until hidden_modal?(key) 21 | end 22 | end 23 | 24 | def hidden_modal?(key = nil) 25 | page.evaluate_script("jQuery('#{key || '#ow_inline_modal'}').is(':visible')") == false 26 | end 27 | 28 | def visible_modal?(key = nil) 29 | page.evaluate_script("jQuery('#{key || '#ow_inline_modal'}').is(':visible')") == true 30 | end 31 | -------------------------------------------------------------------------------- /spec/uploaders/local_uploader_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | RSpec.describe CamaleonCmsLocalUploader do 6 | init_site 7 | 8 | let(:current_site) { Cama::Site.first.decorate } 9 | let(:uploader) { described_class.new(current_site: current_site) } 10 | 11 | context 'with an invalid path containing path traversal characters' do 12 | describe '#add_folder' do 13 | it 'returns an error' do 14 | expect(uploader.add_folder('../tmp')).to eql(error: 'Invalid folder path') 15 | end 16 | end 17 | 18 | describe '#delete_folder' do 19 | it 'returns an error' do 20 | expect(uploader.delete_folder('../tmp')).to eql(error: 'Invalid folder path') 21 | end 22 | end 23 | 24 | describe '#delete_file' do 25 | it 'returns an error' do 26 | expect(uploader.delete_file('../test.rb')).to eql(error: 'Invalid file path') 27 | end 28 | end 29 | end 30 | end 31 | --------------------------------------------------------------------------------