kcy1 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.codeclimate.yml +4 -0
- data/.gitattributes +2 -0
- data/.github/issue_template.md +22 -0
- data/.github/pull_request_template.md +6 -0
- data/.gitignore +21 -0
- data/.rubocop.yml +100 -0
- data/.travis.yml +43 -0
- data/CONTRIBUTING.md +35 -0
- data/Gemfile +29 -0
- data/LICENSE +20 -0
- data/README.md +116 -0
- data/Rakefile +5 -0
- data/app/assets/fonts/comfy/admin/cms/lib/redactor-font.eot +0 -0
- data/app/assets/javascripts/comfy/admin/cms/application.js +39 -0
- data/app/assets/javascripts/comfy/admin/cms/base.js +46 -0
- data/app/assets/javascripts/comfy/admin/cms/categories.js +17 -0
- data/app/assets/javascripts/comfy/admin/cms/codemirror.js +31 -0
- data/app/assets/javascripts/comfy/admin/cms/custom.js +1 -0
- data/app/assets/javascripts/comfy/admin/cms/diff.js +10 -0
- data/app/assets/javascripts/comfy/admin/cms/file_link.js +67 -0
- data/app/assets/javascripts/comfy/admin/cms/file_upload.js +194 -0
- data/app/assets/javascripts/comfy/admin/cms/files_modal.js +40 -0
- data/app/assets/javascripts/comfy/admin/cms/page_fragments.js +22 -0
- data/app/assets/javascripts/comfy/admin/cms/slugify.js +34 -0
- data/app/assets/javascripts/comfy/admin/cms/sortable_list.js +40 -0
- data/app/assets/javascripts/comfy/admin/cms/timepicker.js +30 -0
- data/app/assets/javascripts/comfy/admin/cms/wysiwyg.js +65 -0
- data/app/assets/javascripts/comfy/vendor/Moxie.swf +0 -0
- data/app/assets/javascripts/comfy/vendor/Moxie.xap +0 -0
- data/app/assets/javascripts/comfy/vendor/bootstrap.bundle.min.js +7 -0
- data/app/assets/javascripts/comfy/vendor/bootstrap.bundle.min.js.map +1 -0
- data/app/assets/javascripts/comfy/vendor/codemirror.js +9653 -0
- data/app/assets/javascripts/comfy/vendor/codemirror/addon/edit/closetag.js +169 -0
- data/app/assets/javascripts/comfy/vendor/codemirror/mode/css/css.js +832 -0
- data/app/assets/javascripts/comfy/vendor/codemirror/mode/htmlmixed/htmlmixed.js +152 -0
- data/app/assets/javascripts/comfy/vendor/codemirror/mode/javascript/javascript.js +875 -0
- data/app/assets/javascripts/comfy/vendor/codemirror/mode/markdown/markdown.js +861 -0
- data/app/assets/javascripts/comfy/vendor/codemirror/mode/xml/xml.js +394 -0
- data/app/assets/javascripts/comfy/vendor/diff/diff_match_patch.min.js +49 -0
- data/app/assets/javascripts/comfy/vendor/diff/pretty_text_diff.js +76 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr.min.js +2 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/ar.js +52 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/bg.js +65 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/bn.js +65 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/ca.js +83 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/cs.js +70 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/cy.js +92 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/da.js +71 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/de.js +70 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/default.js +80 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/eo.js +73 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/es.js +69 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/et.js +73 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/fa.js +68 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/fi.js +69 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/fr.js +75 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/gr.js +74 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/he.js +57 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/hi.js +65 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/hr.js +66 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/hu.js +72 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/id.js +61 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/it.js +70 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/ja.js +57 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/ko.js +60 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/lt.js +72 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/lv.js +67 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/mk.js +69 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/mn.js +67 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/ms.js +68 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/my.js +69 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/nl.js +75 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/no.js +73 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/pa.js +65 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/pl.js +68 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/pt-BR.js +66 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/pt.js +66 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/ro.js +69 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/ru.js +66 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/si.js +65 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/sk.js +70 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/sl.js +70 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/sq.js +65 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/sr.js +69 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/sv.js +70 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/th.js +72 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/tr.js +66 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/uk.js +66 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/vn.js +66 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/zh-CN.js +61 -0
- data/app/assets/javascripts/comfy/vendor/flatpickr/i18n/zh-TW.js +61 -0
- data/app/assets/javascripts/comfy/vendor/fontawesome.js +5 -0
- data/app/assets/javascripts/comfy/vendor/moxie.min.js +16 -0
- data/app/assets/javascripts/comfy/vendor/plupload.dev.js +2497 -0
- data/app/assets/javascripts/comfy/vendor/redactor.js +9561 -0
- data/app/assets/javascripts/comfy/vendor/redactor/definedlinks.js +53 -0
- data/app/assets/javascripts/comfy/vendor/redactor/filemanager.js +64 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/ar.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/az.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/ba.js +79 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/bg.js +77 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/by.js +77 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/ca.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/cs.js +87 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/da.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/de.js +80 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/el.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/en.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/eo.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/es.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/es_AR.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/fa.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/fi.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/fr.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/ge.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/gr.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/he.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/hr.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/hu.js +77 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/id.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/it.js +78 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/ja.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/kn.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/ko.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/lt.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/lv.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/mk.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/nb.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/nl.js +80 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/pl.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/pt-BR.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/pt.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/ro.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/ru.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/sk.js +76 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/sl.js +79 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/sq.js +79 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/sr-CIR.js +79 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/sr-LAT.js +79 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/sv.js +74 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/th.js +74 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/tr.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/ua.js +77 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/uk.js +77 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/vi.js +74 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/zh-CN.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/i18n/zh-TW.js +75 -0
- data/app/assets/javascripts/comfy/vendor/redactor/imagemanager.js +57 -0
- data/app/assets/javascripts/comfy/vendor/redactor/table.js +337 -0
- data/app/assets/javascripts/comfy/vendor/redactor/video.js +77 -0
- data/app/assets/javascripts/comfy/vendor/sortable.min.js +5 -0
- data/app/assets/stylesheets/comfy/admin/cms/application.sass +11 -0
- data/app/assets/stylesheets/comfy/admin/cms/base.sass +256 -0
- data/app/assets/stylesheets/comfy/admin/cms/codemirror_overrides.sass +19 -0
- data/app/assets/stylesheets/comfy/admin/cms/custom.sass +1 -0
- data/app/assets/stylesheets/comfy/admin/cms/redactor_overrides.sass +22 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_alert.scss +51 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_badge.scss +54 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_breadcrumb.scss +41 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_button-group.scss +163 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_buttons.scss +137 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_card.scss +289 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_carousel.scss +197 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_close.scss +41 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_code.scss +48 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_custom-forms.scss +507 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_dropdown.scss +191 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_forms.scss +330 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_functions.scss +86 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_grid.scss +52 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_images.scss +42 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_input-group.scss +193 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_jumbotron.scss +17 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_list-group.scss +149 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_media.scss +8 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_mixins.scss +47 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_modal.scss +229 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_nav.scss +120 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_navbar.scss +294 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_pagination.scss +73 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_popover.scss +171 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_print.scss +141 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_progress.scss +43 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_reboot.scss +483 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_root.scss +19 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_spinners.scss +55 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_tables.scss +185 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_toasts.scss +44 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_tooltip.scss +115 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_transitions.scss +20 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_type.scss +125 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_utilities.scss +17 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/_variables.scss +1123 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/bootstrap-grid.scss +29 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/bootstrap-reboot.scss +12 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/bootstrap.scss +44 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_alert.scss +13 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_background-variant.scss +21 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_badge.scss +17 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_border-radius.scss +63 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_box-shadow.scss +20 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_breakpoints.scss +123 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_buttons.scss +107 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_caret.scss +62 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_clearfix.scss +7 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_deprecate.scss +10 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_float.scss +14 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_forms.scss +192 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_gradients.scss +45 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_grid-framework.scss +66 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_grid.scss +51 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_hover.scss +37 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_image.scss +36 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_list-group.scss +21 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_lists.scss +7 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_pagination.scss +22 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_reset-text.scss +17 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_screen-reader.scss +33 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_size.scss +7 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_table-row.scss +39 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_text-emphasis.scss +16 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_text-hide.scss +11 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_text-truncate.scss +8 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_transition.scss +16 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/mixins/_visibility.scss +8 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_align.scss +8 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_background.scss +19 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_borders.scss +75 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_clearfix.scss +3 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_display.scss +26 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_embed.scss +39 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_flex.scss +51 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_float.scss +11 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_overflow.scss +5 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_position.scss +32 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_screenreaders.scss +11 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_shadows.scss +6 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_sizing.scss +20 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_spacing.scss +73 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_stretched-link.scss +19 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_text.scss +72 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/utilities/_visibility.scss +13 -0
- data/app/assets/stylesheets/comfy/vendor/bootstrap/vendor/_rfs.scss +204 -0
- data/app/assets/stylesheets/comfy/vendor/codemirror.css +346 -0
- data/app/assets/stylesheets/comfy/vendor/flatpickr.min.css +13 -0
- data/app/assets/stylesheets/comfy/vendor/fontawesome.css +343 -0
- data/app/assets/stylesheets/comfy/vendor/redactor.css +948 -0
- data/app/controllers/application_controller.rb +7 -0
- data/app/controllers/comfy/admin/base_controller.rb +22 -0
- data/app/controllers/comfy/admin/cms/base_controller.rb +55 -0
- data/app/controllers/comfy/admin/cms/categories_controller.rb +40 -0
- data/app/controllers/comfy/admin/cms/files_controller.rb +142 -0
- data/app/controllers/comfy/admin/cms/layouts_controller.rb +69 -0
- data/app/controllers/comfy/admin/cms/pages_controller.rb +156 -0
- data/app/controllers/comfy/admin/cms/revisions/base_controller.rb +50 -0
- data/app/controllers/comfy/admin/cms/revisions/layout_controller.rb +18 -0
- data/app/controllers/comfy/admin/cms/revisions/page_controller.rb +30 -0
- data/app/controllers/comfy/admin/cms/revisions/snippet_controller.rb +18 -0
- data/app/controllers/comfy/admin/cms/revisions/translation_controller.rb +31 -0
- data/app/controllers/comfy/admin/cms/sites_controller.rb +69 -0
- data/app/controllers/comfy/admin/cms/snippets_controller.rb +66 -0
- data/app/controllers/comfy/admin/cms/translations_controller.rb +107 -0
- data/app/controllers/comfy/cms/assets_controller.rb +40 -0
- data/app/controllers/comfy/cms/base_controller.rb +33 -0
- data/app/controllers/comfy/cms/content_controller.rb +87 -0
- data/app/controllers/concerns/comfy/paginate.rb +16 -0
- data/app/controllers/concerns/comfy/reorder_action.rb +19 -0
- data/app/helpers/comfy/admin/cms_helper.rb +49 -0
- data/app/helpers/comfy/cms_helper.rb +73 -0
- data/app/models/comfy/cms/categorization.rb +16 -0
- data/app/models/comfy/cms/category.rb +24 -0
- data/app/models/comfy/cms/file.rb +57 -0
- data/app/models/comfy/cms/fragment.rb +59 -0
- data/app/models/comfy/cms/layout.rb +113 -0
- data/app/models/comfy/cms/page.rb +169 -0
- data/app/models/comfy/cms/revision.rb +12 -0
- data/app/models/comfy/cms/site.rb +94 -0
- data/app/models/comfy/cms/snippet.rb +45 -0
- data/app/models/comfy/cms/translation.rb +43 -0
- data/app/models/concerns/comfy/cms/with_categories.rb +53 -0
- data/app/models/concerns/comfy/cms/with_fragments.rb +125 -0
- data/app/views/comfy/admin/cms/categories/_categories.html.haml +4 -0
- data/app/views/comfy/admin/cms/categories/_edit.html.haml +7 -0
- data/app/views/comfy/admin/cms/categories/_form.html.haml +5 -0
- data/app/views/comfy/admin/cms/categories/_index.html.haml +28 -0
- data/app/views/comfy/admin/cms/categories/_show.html.haml +15 -0
- data/app/views/comfy/admin/cms/categories/create.js.erb +7 -0
- data/app/views/comfy/admin/cms/categories/destroy.js.erb +8 -0
- data/app/views/comfy/admin/cms/categories/edit.js.erb +3 -0
- data/app/views/comfy/admin/cms/categories/update.js.erb +6 -0
- data/app/views/comfy/admin/cms/files/_file.html.haml +31 -0
- data/app/views/comfy/admin/cms/files/_form.html.haml +26 -0
- data/app/views/comfy/admin/cms/files/_modal.html.haml +3 -0
- data/app/views/comfy/admin/cms/files/destroy.js.erb +4 -0
- data/app/views/comfy/admin/cms/files/edit.html.haml +5 -0
- data/app/views/comfy/admin/cms/files/index.html.haml +29 -0
- data/app/views/comfy/admin/cms/files/new.html.haml +5 -0
- data/app/views/comfy/admin/cms/fragments/_form_fragment_attachments.html.haml +23 -0
- data/app/views/comfy/admin/cms/fragments/_form_fragments.html.haml +38 -0
- data/app/views/comfy/admin/cms/layouts/_form.html.haml +20 -0
- data/app/views/comfy/admin/cms/layouts/_index_branch.html.haml +26 -0
- data/app/views/comfy/admin/cms/layouts/edit.html.haml +9 -0
- data/app/views/comfy/admin/cms/layouts/index.html.haml +10 -0
- data/app/views/comfy/admin/cms/layouts/new.html.haml +5 -0
- data/app/views/comfy/admin/cms/pages/_form.html.haml +31 -0
- data/app/views/comfy/admin/cms/pages/_index_branch.html.haml +44 -0
- data/app/views/comfy/admin/cms/pages/edit.html.haml +10 -0
- data/app/views/comfy/admin/cms/pages/index.html.haml +13 -0
- data/app/views/comfy/admin/cms/pages/new.html.haml +5 -0
- data/app/views/comfy/admin/cms/pages/toggle_branch.js.erb +13 -0
- data/app/views/comfy/admin/cms/revisions/_sidebar.html.haml +2 -0
- data/app/views/comfy/admin/cms/revisions/show.html.haml +36 -0
- data/app/views/comfy/admin/cms/sites/_form.html.haml +15 -0
- data/app/views/comfy/admin/cms/sites/edit.html.haml +5 -0
- data/app/views/comfy/admin/cms/sites/index.html.haml +28 -0
- data/app/views/comfy/admin/cms/sites/new.html.haml +5 -0
- data/app/views/comfy/admin/cms/snippets/_form.html.haml +13 -0
- data/app/views/comfy/admin/cms/snippets/edit.html.haml +9 -0
- data/app/views/comfy/admin/cms/snippets/index.html.haml +33 -0
- data/app/views/comfy/admin/cms/snippets/new.html.haml +5 -0
- data/app/views/comfy/admin/cms/translations/_form.html.haml +20 -0
- data/app/views/comfy/admin/cms/translations/_sidebar.html.haml +19 -0
- data/app/views/comfy/admin/cms/translations/edit.html.haml +10 -0
- data/app/views/comfy/admin/cms/translations/new.html.haml +5 -0
- data/app/views/kaminari/comfy/_first_page.html.haml +3 -0
- data/app/views/kaminari/comfy/_gap.html.haml +2 -0
- data/app/views/kaminari/comfy/_last_page.html.haml +3 -0
- data/app/views/kaminari/comfy/_next_page.html.haml +2 -0
- data/app/views/kaminari/comfy/_page.html.haml +2 -0
- data/app/views/kaminari/comfy/_paginator.html.haml +11 -0
- data/app/views/kaminari/comfy/_prev_page.html.haml +2 -0
- data/app/views/layouts/comfy/admin/cms.html.haml +4 -0
- data/app/views/layouts/comfy/admin/cms/_body.html.haml +14 -0
- data/app/views/layouts/comfy/admin/cms/_flash.html.haml +4 -0
- data/app/views/layouts/comfy/admin/cms/_footer_js.html.haml +6 -0
- data/app/views/layouts/comfy/admin/cms/_head.html.haml +19 -0
- data/app/views/layouts/comfy/admin/cms/_left.html.haml +39 -0
- data/app/views/layouts/comfy/admin/cms/_right.html.haml +5 -0
- data/bin/bundle +3 -0
- data/bin/rails +4 -0
- data/bin/rake +4 -0
- data/bin/setup +36 -0
- data/bin/update +31 -0
- data/bin/yarn +11 -0
- data/comfortable_mexican_sofa.gemspec +33 -0
- data/config.ru +6 -0
- data/config/application.rb +39 -0
- data/config/boot.rb +7 -0
- data/config/cms_routes.rb +8 -0
- data/config/database.yml +11 -0
- data/config/environment.rb +7 -0
- data/config/environments/development.rb +64 -0
- data/config/environments/test.rb +55 -0
- data/config/initializers/comfortable_mexican_sofa.rb +122 -0
- data/config/locales/ca.yml +263 -0
- data/config/locales/cs.yml +263 -0
- data/config/locales/da.yml +263 -0
- data/config/locales/de.yml +263 -0
- data/config/locales/en.yml +263 -0
- data/config/locales/es.yml +263 -0
- data/config/locales/fi.yml +263 -0
- data/config/locales/fr.yml +263 -0
- data/config/locales/gr.yml +263 -0
- data/config/locales/hr.yml +263 -0
- data/config/locales/it.yml +263 -0
- data/config/locales/ja.yml +263 -0
- data/config/locales/nb.yml +263 -0
- data/config/locales/nl.yml +263 -0
- data/config/locales/pl.yml +263 -0
- data/config/locales/pt-BR.yml +263 -0
- data/config/locales/ru.yml +263 -0
- data/config/locales/sk.yml +263 -0
- data/config/locales/sv.yml +263 -0
- data/config/locales/tr.yml +263 -0
- data/config/locales/uk.yml +263 -0
- data/config/locales/zh-CN.yml +263 -0
- data/config/locales/zh-TW.yml +263 -0
- data/config/storage.yml +35 -0
- data/db/cms_seeds/sample-site/files/_default.jpg.yml +5 -0
- data/db/cms_seeds/sample-site/files/default.jpg +0 -0
- data/db/cms_seeds/sample-site/layouts/default/content.html +16 -0
- data/db/cms_seeds/sample-site/layouts/default/nested/content.html +14 -0
- data/db/cms_seeds/sample-site/pages/index/child_a/content.html +7 -0
- data/db/cms_seeds/sample-site/pages/index/child_b/content.html +6 -0
- data/db/cms_seeds/sample-site/pages/index/cms logo.png +0 -0
- data/db/cms_seeds/sample-site/pages/index/content.es.html +6 -0
- data/db/cms_seeds/sample-site/pages/index/content.fr.html +6 -0
- data/db/cms_seeds/sample-site/pages/index/content.html +25 -0
- data/db/cms_seeds/sample-site/pages/index/footer.png +0 -0
- data/db/cms_seeds/sample-site/pages/index/header.png +0 -0
- data/db/cms_seeds/sample-site/snippets/default.html +8 -0
- data/db/migrate/00_create_active_storage_tables.active_storage.rb +26 -0
- data/db/migrate/01_create_cms.rb +142 -0
- data/lib/comfortable_mexican_sofa.rb +60 -0
- data/lib/comfortable_mexican_sofa/access_control/admin_authentication.rb +24 -0
- data/lib/comfortable_mexican_sofa/access_control/admin_authorization.rb +12 -0
- data/lib/comfortable_mexican_sofa/access_control/public_authentication.rb +12 -0
- data/lib/comfortable_mexican_sofa/access_control/public_authorization.rb +12 -0
- data/lib/comfortable_mexican_sofa/configuration.rb +139 -0
- data/lib/comfortable_mexican_sofa/content.rb +31 -0
- data/lib/comfortable_mexican_sofa/content/block.rb +14 -0
- data/lib/comfortable_mexican_sofa/content/params_parser.rb +149 -0
- data/lib/comfortable_mexican_sofa/content/renderer.rb +149 -0
- data/lib/comfortable_mexican_sofa/content/tag.rb +50 -0
- data/lib/comfortable_mexican_sofa/content/tags/asset.rb +59 -0
- data/lib/comfortable_mexican_sofa/content/tags/checkbox.rb +29 -0
- data/lib/comfortable_mexican_sofa/content/tags/date.rb +21 -0
- data/lib/comfortable_mexican_sofa/content/tags/datetime.rb +44 -0
- data/lib/comfortable_mexican_sofa/content/tags/file.rb +72 -0
- data/lib/comfortable_mexican_sofa/content/tags/file_link.rb +63 -0
- data/lib/comfortable_mexican_sofa/content/tags/files.rb +43 -0
- data/lib/comfortable_mexican_sofa/content/tags/fragment.rb +66 -0
- data/lib/comfortable_mexican_sofa/content/tags/helper.rb +55 -0
- data/lib/comfortable_mexican_sofa/content/tags/markdown.rb +24 -0
- data/lib/comfortable_mexican_sofa/content/tags/mixins/file_content.rb +43 -0
- data/lib/comfortable_mexican_sofa/content/tags/number.rb +20 -0
- data/lib/comfortable_mexican_sofa/content/tags/page_file_link.rb +84 -0
- data/lib/comfortable_mexican_sofa/content/tags/partial.rb +49 -0
- data/lib/comfortable_mexican_sofa/content/tags/snippet.rb +34 -0
- data/lib/comfortable_mexican_sofa/content/tags/template.rb +44 -0
- data/lib/comfortable_mexican_sofa/content/tags/text.rb +20 -0
- data/lib/comfortable_mexican_sofa/content/tags/textarea.rb +20 -0
- data/lib/comfortable_mexican_sofa/content/tags/wysiwyg.rb +21 -0
- data/lib/comfortable_mexican_sofa/engine.rb +31 -0
- data/lib/comfortable_mexican_sofa/error.rb +32 -0
- data/lib/comfortable_mexican_sofa/extensions/acts_as_tree.rb +120 -0
- data/lib/comfortable_mexican_sofa/extensions/has_revisions.rb +72 -0
- data/lib/comfortable_mexican_sofa/form_builder.rb +47 -0
- data/lib/comfortable_mexican_sofa/render_methods.rb +112 -0
- data/lib/comfortable_mexican_sofa/routes/cms.rb +18 -0
- data/lib/comfortable_mexican_sofa/routes/cms_admin.rb +58 -0
- data/lib/comfortable_mexican_sofa/routing.rb +12 -0
- data/lib/comfortable_mexican_sofa/seeds.rb +114 -0
- data/lib/comfortable_mexican_sofa/seeds/file/exporter.rb +43 -0
- data/lib/comfortable_mexican_sofa/seeds/file/importer.rb +63 -0
- data/lib/comfortable_mexican_sofa/seeds/layout/exporter.rb +40 -0
- data/lib/comfortable_mexican_sofa/seeds/layout/importer.rb +62 -0
- data/lib/comfortable_mexican_sofa/seeds/page/exporter.rb +92 -0
- data/lib/comfortable_mexican_sofa/seeds/page/importer.rb +219 -0
- data/lib/comfortable_mexican_sofa/seeds/snippet/exporter.rb +34 -0
- data/lib/comfortable_mexican_sofa/seeds/snippet/importer.rb +51 -0
- data/lib/comfortable_mexican_sofa/version.rb +7 -0
- data/lib/comfortable_mexican_sofa/view_hooks.rb +35 -0
- data/lib/generators/comfy/cms/README +17 -0
- data/lib/generators/comfy/cms/assets_generator.rb +18 -0
- data/lib/generators/comfy/cms/cms_generator.rb +69 -0
- data/lib/generators/comfy/cms/controllers_generator.rb +17 -0
- data/lib/generators/comfy/cms/models_generator.rb +17 -0
- data/lib/generators/comfy/cms/views_generator.rb +17 -0
- data/lib/generators/comfy/scaffold/scaffold_generator.rb +80 -0
- data/lib/generators/comfy/scaffold/templates/controller.rb.tt +62 -0
- data/lib/generators/comfy/scaffold/templates/migration.rb.tt +11 -0
- data/lib/generators/comfy/scaffold/templates/model.rb.tt +21 -0
- data/lib/generators/comfy/scaffold/templates/tests/controller.rb.tt +115 -0
- data/lib/generators/comfy/scaffold/templates/tests/fixture.yml.tt +4 -0
- data/lib/generators/comfy/scaffold/templates/tests/model.rb.tt +26 -0
- data/lib/generators/comfy/scaffold/templates/views/_form.haml.tt +7 -0
- data/lib/generators/comfy/scaffold/templates/views/edit.haml.tt +5 -0
- data/lib/generators/comfy/scaffold/templates/views/index.haml.tt +21 -0
- data/lib/generators/comfy/scaffold/templates/views/new.haml.tt +5 -0
- data/lib/generators/comfy/scaffold/templates/views/show.haml.tt +4 -0
- data/lib/tasks/cms_seeds.rake +40 -0
- data/public/favicon.ico +0 -0
- metadata +648 -0
data/bin/update
ADDED
@@ -0,0 +1,31 @@
|
|
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
|
data/bin/yarn
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
VENDOR_PATH = File.expand_path('..', __dir__)
|
3
|
+
Dir.chdir(VENDOR_PATH) do
|
4
|
+
begin
|
5
|
+
exec "yarnpkg #{ARGV.join(' ')}"
|
6
|
+
rescue Errno::ENOENT
|
7
|
+
$stderr.puts "Yarn executable was not detected in the system."
|
8
|
+
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift File.expand_path("lib", __dir__)
|
4
|
+
require "comfortable_mexican_sofa/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "kcy1"
|
8
|
+
s.version = ComfortableMexicanSofa::VERSION
|
9
|
+
s.authors = ["Oleg Khabarov"]
|
10
|
+
s.email = ["oleg@khabarov.ca"]
|
11
|
+
s.homepage = "http://github.com/comfy/comfortable-mexican-sofa"
|
12
|
+
s.summary = "Rails 5.2+ CMS Engine"
|
13
|
+
s.description = "kcy2"
|
14
|
+
#s.description = "ComfortableMexicanSofa is a powerful Rails 5.2+ CMS Engine"
|
15
|
+
s.license = "MIT"
|
16
|
+
|
17
|
+
s.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|doc)/})
|
19
|
+
end
|
20
|
+
|
21
|
+
s.required_ruby_version = ">= 2.3.0"
|
22
|
+
|
23
|
+
s.add_dependency "active_link_to", ">= 1.0.0"
|
24
|
+
s.add_dependency "comfy_bootstrap_form", ">= 4.0.0"
|
25
|
+
s.add_dependency "haml-rails", ">= 1.0.0"
|
26
|
+
s.add_dependency "jquery-rails", ">= 4.3.1"
|
27
|
+
s.add_dependency "kramdown", ">= 1.0.0"
|
28
|
+
s.add_dependency "mimemagic", ">= 0.3.2"
|
29
|
+
s.add_dependency "mini_magick", ">= 4.8.0"
|
30
|
+
s.add_dependency "rails", ">= 5.2.0"
|
31
|
+
s.add_dependency "rails-i18n", ">= 5.0.0"
|
32
|
+
s.add_dependency "sassc-rails", ">= 2.0.0"
|
33
|
+
end
|
data/config.ru
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "boot"
|
4
|
+
|
5
|
+
require "rails/all"
|
6
|
+
|
7
|
+
# Require the gems listed in Gemfile, including any gems
|
8
|
+
# you've limited to :test, :development, or :production.
|
9
|
+
Bundler.require(*Rails.groups)
|
10
|
+
|
11
|
+
module ComfortableMexicanSofa
|
12
|
+
class Application < Rails::Application
|
13
|
+
|
14
|
+
require_relative "../lib/comfortable_mexican_sofa"
|
15
|
+
|
16
|
+
config.load_defaults 5.2
|
17
|
+
|
18
|
+
# Settings in config/environments/* take precedence over those specified here.
|
19
|
+
# Application configuration should go into files in config/initializers
|
20
|
+
# -- all .rb files in that directory are automatically loaded.
|
21
|
+
|
22
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
23
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
24
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
25
|
+
|
26
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
27
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
28
|
+
# config.i18n.default_locale = :de
|
29
|
+
|
30
|
+
# Ensuring that all ActiveStorage routes are loaded before out globbing route.
|
31
|
+
config.railties_order = [ActiveStorage::Engine, :main_app, :all]
|
32
|
+
|
33
|
+
# Making sure we don't load our dev routes as part of the engine
|
34
|
+
config.paths["config/routes.rb"] << "config/cms_routes.rb"
|
35
|
+
|
36
|
+
config.i18n.enforce_available_locales = true
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
data/config/boot.rb
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# We can't have this in config/routes.rb as they will get pulled in into parent
|
4
|
+
# application automatically. We want user to manually place them.
|
5
|
+
ComfortableMexicanSofa::Application.routes.draw do
|
6
|
+
comfy_route :cms_admin
|
7
|
+
comfy_route :cms
|
8
|
+
end
|
data/config/database.yml
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
defined?(ComfortableMexicanSofa::Application) && ComfortableMexicanSofa::Application.configure do
|
4
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
+
|
6
|
+
# In the development environment your application's code is reloaded on
|
7
|
+
# every request. This slows down response time but is perfect for development
|
8
|
+
# since you don't have to restart the web server when you make code changes.
|
9
|
+
config.cache_classes = false
|
10
|
+
|
11
|
+
# Do not eager load code on boot.
|
12
|
+
config.eager_load = false
|
13
|
+
|
14
|
+
# Show full error reports.
|
15
|
+
config.consider_all_requests_local = true
|
16
|
+
|
17
|
+
# Enable/disable caching. By default caching is disabled.
|
18
|
+
# Run rails dev:cache to toggle caching.
|
19
|
+
if Rails.root.join("tmp/caching-dev.txt").exist?
|
20
|
+
config.action_controller.perform_caching = true
|
21
|
+
|
22
|
+
config.cache_store = :memory_store
|
23
|
+
config.public_file_server.headers = {
|
24
|
+
"Cache-Control" => "public, max-age=#{2.days.to_i}"
|
25
|
+
}
|
26
|
+
else
|
27
|
+
config.action_controller.perform_caching = false
|
28
|
+
|
29
|
+
config.cache_store = :null_store
|
30
|
+
end
|
31
|
+
|
32
|
+
# Store uploaded files on the local file system (see config/storage.yml for options)
|
33
|
+
config.active_storage.service = :local
|
34
|
+
|
35
|
+
# Don't care if the mailer can't send.
|
36
|
+
config.action_mailer.raise_delivery_errors = false
|
37
|
+
|
38
|
+
config.action_mailer.perform_caching = false
|
39
|
+
|
40
|
+
# Print deprecation notices to the Rails logger.
|
41
|
+
config.active_support.deprecation = :log
|
42
|
+
|
43
|
+
# Raise an error on page load if there are pending migrations.
|
44
|
+
config.active_record.migration_error = :page_load
|
45
|
+
|
46
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
47
|
+
# This option may cause significant delays in view rendering with a large
|
48
|
+
# number of complex assets.
|
49
|
+
config.assets.debug = true
|
50
|
+
|
51
|
+
# Suppress logger output for asset requests.
|
52
|
+
config.assets.quiet = true
|
53
|
+
|
54
|
+
# Raises error for missing translations
|
55
|
+
# config.action_view.raise_on_missing_translations = true
|
56
|
+
|
57
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
58
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
59
|
+
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
60
|
+
|
61
|
+
config.active_job.queue_adapter = :inline
|
62
|
+
|
63
|
+
config.action_view.raise_on_missing_translations = true
|
64
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
defined?(ComfortableMexicanSofa::Application) && ComfortableMexicanSofa::Application.configure do
|
4
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
+
|
6
|
+
# The test environment is used exclusively to run your application's
|
7
|
+
# test suite. You never need to work with it otherwise. Remember that
|
8
|
+
# your test database is "scratch space" for the test suite and is wiped
|
9
|
+
# and recreated between test runs. Don't rely on the data there!
|
10
|
+
config.cache_classes = true
|
11
|
+
|
12
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
13
|
+
# just for the purpose of running a single test. If you are using a tool that
|
14
|
+
# preloads Rails for running tests, you may have to set it to true.
|
15
|
+
config.eager_load = false
|
16
|
+
|
17
|
+
# Configure public file server for tests with Cache-Control for performance.
|
18
|
+
config.public_file_server.enabled = true
|
19
|
+
config.public_file_server.headers = {
|
20
|
+
"Cache-Control" => "public, max-age=#{1.hour.to_i}"
|
21
|
+
}
|
22
|
+
|
23
|
+
# Show full error reports and disable caching.
|
24
|
+
config.consider_all_requests_local = true
|
25
|
+
config.action_controller.perform_caching = false
|
26
|
+
|
27
|
+
# Raise exceptions instead of rendering exception templates.
|
28
|
+
config.action_dispatch.show_exceptions = false
|
29
|
+
|
30
|
+
# Disable request forgery protection in test environment.
|
31
|
+
config.action_controller.allow_forgery_protection = false
|
32
|
+
|
33
|
+
# Store uploaded files on the local file system in a temporary directory
|
34
|
+
config.active_storage.service = :test
|
35
|
+
config.action_mailer.perform_caching = false
|
36
|
+
|
37
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
38
|
+
# The :test delivery method accumulates sent emails in the
|
39
|
+
# ActionMailer::Base.deliveries array.
|
40
|
+
config.action_mailer.delivery_method = :test
|
41
|
+
|
42
|
+
# Print deprecation notices to the stderr.
|
43
|
+
config.active_support.deprecation = :stderr
|
44
|
+
|
45
|
+
# Raises error for missing translations
|
46
|
+
# config.action_view.raise_on_missing_translations = true
|
47
|
+
|
48
|
+
config.active_job.queue_adapter = :inline
|
49
|
+
|
50
|
+
config.action_view.raise_on_missing_translations = true
|
51
|
+
|
52
|
+
# TODO: This is temporary fix so TravisCI runs until Rails 5.2.3 is out.
|
53
|
+
# See: https://github.com/rails/rails/pull/35607
|
54
|
+
config.secret_key_base = SecureRandom.hex(64)
|
55
|
+
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
ComfortableMexicanSofa.configure do |config|
|
4
|
+
# Title of the admin area
|
5
|
+
# config.cms_title = 'ComfortableMexicanSofa CMS Engine'
|
6
|
+
|
7
|
+
# Controller that is inherited from CmsAdmin::BaseController
|
8
|
+
# config.admin_base_controller = 'ApplicationController'
|
9
|
+
|
10
|
+
# Controller that Comfy::Cms::BaseController will inherit from
|
11
|
+
# config.public_base_controller = 'ApplicationController'
|
12
|
+
|
13
|
+
# Module responsible for authentication. You can replace it with your own.
|
14
|
+
# It simply needs to have #authenticate method. See http_auth.rb for reference.
|
15
|
+
# config.admin_auth = 'ComfyAdminAuthentication'
|
16
|
+
|
17
|
+
# Module responsible for authorization on admin side. It should have #authorize
|
18
|
+
# method that returns true or false based on params and loaded instance
|
19
|
+
# variables available for a given controller.
|
20
|
+
# config.admin_authorization = 'ComfyAdminAuthorization'
|
21
|
+
|
22
|
+
# Module responsible for public authentication. Similar to the above. You also
|
23
|
+
# will have access to @cms_site, @cms_layout, @cms_page so you can use them in
|
24
|
+
# your logic. Default module doesn't do anything.
|
25
|
+
# config.public_auth = 'ComfyPublicAuthentication'
|
26
|
+
|
27
|
+
# Module responsible for public authorization. It should have #authorize
|
28
|
+
# method that returns true or false based on params and loaded instance
|
29
|
+
# variables available for a given controller.
|
30
|
+
# config.public_authorization = 'ComfyPublicAuthorization'
|
31
|
+
|
32
|
+
# When arriving at /cms-admin you may chose to redirect to arbirtary path,
|
33
|
+
# for example '/cms-admin/users'
|
34
|
+
# config.admin_route_redirect = ''
|
35
|
+
|
36
|
+
# Sofa allows you to setup entire site from files. Database is updated with each
|
37
|
+
# request (if necessary). Please note that database entries are destroyed if there's
|
38
|
+
# no corresponding file. Seeds are disabled by default.
|
39
|
+
# config.enable_seeds = false
|
40
|
+
|
41
|
+
# Path where seeds can be located.
|
42
|
+
# config.seeds_path = File.expand_path('db/cms_seeds', Rails.root)
|
43
|
+
|
44
|
+
# Content for Layouts, Pages and Snippets has a revision history. You can revert
|
45
|
+
# a previous version using this system. You can control how many revisions per
|
46
|
+
# object you want to keep. Set it to 0 if you wish to turn this feature off.
|
47
|
+
# config.revisions_limit = 25
|
48
|
+
|
49
|
+
# Locale definitions. If you want to define your own locale merge
|
50
|
+
# {:locale => 'Locale Title'} with this.
|
51
|
+
# config.locales = {:en => 'English', :es => 'Español'}
|
52
|
+
|
53
|
+
# Admin interface will respect the locale of the site being managed. However you can
|
54
|
+
# force it to English by setting this to `:en`
|
55
|
+
# config.admin_locale = nil
|
56
|
+
|
57
|
+
# A class that is included as a sweeper to admin base controller if it's set
|
58
|
+
# config.admin_cache_sweeper = nil
|
59
|
+
|
60
|
+
# By default you cannot have irb code inside your layouts/pages/snippets.
|
61
|
+
# Generally this is to prevent putting something like this:
|
62
|
+
# <% User.delete_all %> but if you really want to allow it...
|
63
|
+
# config.allow_erb = false
|
64
|
+
|
65
|
+
# Whitelist of all helper methods that can be used via {{cms:helper}} tag. By default
|
66
|
+
# all helpers are allowed except `eval`, `send`, `call` and few others. Empty array
|
67
|
+
# will prevent rendering of all helpers.
|
68
|
+
# config.allowed_helpers = nil
|
69
|
+
|
70
|
+
# Whitelist of partials paths that can be used via {{cms:partial}} tag. All partials
|
71
|
+
# are accessible by default. Empty array will prevent rendering of all partials.
|
72
|
+
# config.allowed_partials = nil
|
73
|
+
|
74
|
+
# Site aliases, if you want to have aliases for your site. Good for harmonizing
|
75
|
+
# production env with dev/testing envs.
|
76
|
+
# e.g. config.hostname_aliases = {'host.com' => 'host.inv', 'host_a.com' => ['host.lvh.me', 'host.dev']}
|
77
|
+
# Default is nil (not used)
|
78
|
+
# config.hostname_aliases = nil
|
79
|
+
|
80
|
+
# Reveal partials that can be overwritten in the admin area.
|
81
|
+
# Default is false.
|
82
|
+
# config.reveal_cms_partials = false
|
83
|
+
#
|
84
|
+
# Customize the returned content json data
|
85
|
+
# include fragments in content json
|
86
|
+
# config.content_json_options = {
|
87
|
+
# include: [:fragments]
|
88
|
+
# }
|
89
|
+
end
|
90
|
+
|
91
|
+
# Default credentials for ComfortableMexicanSofa::AccessControl::AdminAuthentication
|
92
|
+
# YOU REALLY WANT TO CHANGE THIS BEFORE PUTTING YOUR SITE LIVE
|
93
|
+
ComfortableMexicanSofa::AccessControl::AdminAuthentication.username = "username"
|
94
|
+
ComfortableMexicanSofa::AccessControl::AdminAuthentication.password = "password"
|
95
|
+
|
96
|
+
# Uncomment this module and `config.admin_auth` above to use custom admin authentication
|
97
|
+
# module ComfyAdminAuthentication
|
98
|
+
# def authenticate
|
99
|
+
# return true
|
100
|
+
# end
|
101
|
+
# end
|
102
|
+
|
103
|
+
# Uncomment this module and `config.admin_authorization` above to use custom admin authorization
|
104
|
+
# module ComfyAdminAuthorization
|
105
|
+
# def authorize
|
106
|
+
# return true
|
107
|
+
# end
|
108
|
+
# end
|
109
|
+
|
110
|
+
# Uncomment this module and `config.public_auth` above to use custom public authentication
|
111
|
+
# module ComfyPublicAuthentication
|
112
|
+
# def authenticate
|
113
|
+
# return true
|
114
|
+
# end
|
115
|
+
# end
|
116
|
+
|
117
|
+
# Uncomment this module and `config.public_authorization` above to use custom public authorization
|
118
|
+
# module ComfyPublicAuthorization
|
119
|
+
# def authorize
|
120
|
+
# return true
|
121
|
+
# end
|
122
|
+
# end
|
@@ -0,0 +1,263 @@
|
|
1
|
+
ca:
|
2
|
+
activerecord:
|
3
|
+
models:
|
4
|
+
comfy/cms/site: Lloc
|
5
|
+
comfy/cms/layout: Plantilla
|
6
|
+
comfy/cms/page: Pàgina
|
7
|
+
comfy/cms/snippet: Fragment
|
8
|
+
comfy/cms/file: Arxiu
|
9
|
+
comfy/cms/translation: Traducció
|
10
|
+
|
11
|
+
attributes:
|
12
|
+
comfy/cms/site:
|
13
|
+
identifier: Identificador
|
14
|
+
label: Nom
|
15
|
+
hostname: Adreça
|
16
|
+
path: Ruta
|
17
|
+
locale: Lengua
|
18
|
+
comfy/cms/layout:
|
19
|
+
identifier: Identificador
|
20
|
+
label: Nom de la plantilla
|
21
|
+
app_layout: Plantilla base
|
22
|
+
parent_id: Plantilla pare
|
23
|
+
content: Contingut
|
24
|
+
css: Full d'estil
|
25
|
+
js: JavaScript
|
26
|
+
comfy/cms/page:
|
27
|
+
label: Títol
|
28
|
+
layout_id: Plantilla
|
29
|
+
slug: Ruta
|
30
|
+
full_path: Ruta complerta
|
31
|
+
parent_id: Pare
|
32
|
+
target_page_id: Redirigir a
|
33
|
+
content: Contingut
|
34
|
+
is_published: Publicada
|
35
|
+
comfy/cms/file:
|
36
|
+
label: Nom
|
37
|
+
file: Arxiu
|
38
|
+
description: Descripció
|
39
|
+
comfy/cms/snippet:
|
40
|
+
label: Nom
|
41
|
+
identifier: Identificador
|
42
|
+
content: Contingut
|
43
|
+
comfy/cms/translation:
|
44
|
+
locale: Idioma
|
45
|
+
label: Nom
|
46
|
+
layout_id: Plantilla
|
47
|
+
is_published: Publicat
|
48
|
+
|
49
|
+
comfy:
|
50
|
+
cms:
|
51
|
+
content:
|
52
|
+
site_not_found: El lloc no s'ha pogut trobar
|
53
|
+
layout_not_found: El disseny no s'ha pogut trobar
|
54
|
+
page_not_found: La pàgina no s'ha pogut trobar
|
55
|
+
|
56
|
+
admin:
|
57
|
+
cms:
|
58
|
+
base:
|
59
|
+
site_not_found: El lloc no s'ha pogut trobar
|
60
|
+
seeds_enabled: CMS Fixtures habilitades. Tots els canvis realitzats seran rebutjats.
|
61
|
+
|
62
|
+
sites: Llocs
|
63
|
+
layouts: Dissenys
|
64
|
+
pages: Pàgines
|
65
|
+
snippets: Fragments
|
66
|
+
files: Arxius
|
67
|
+
|
68
|
+
sites:
|
69
|
+
created: S'ha creat el lloc
|
70
|
+
creation_failure: El lloc no s'ha pogut ser crear
|
71
|
+
updated: S'ha actualitzat el lloc
|
72
|
+
update_failure: El lloc no s'ha pogut actualitzar
|
73
|
+
deleted: S'ha esborrat el lloc
|
74
|
+
not_found: El lloc no s'ha pogut trobar
|
75
|
+
|
76
|
+
index:
|
77
|
+
title: Llistat de llocs
|
78
|
+
new_link: Crea un nou lloc
|
79
|
+
select: Selecciona el lloc
|
80
|
+
edit: Edita
|
81
|
+
delete: Esborra
|
82
|
+
are_you_sure: Esteu segur de que voleu eliminar aquest lloc?
|
83
|
+
new:
|
84
|
+
title: Creant lloc
|
85
|
+
edit:
|
86
|
+
title: Editant lloc
|
87
|
+
form:
|
88
|
+
create: Crea lloc
|
89
|
+
cancel: Cancel·la
|
90
|
+
update: Actualiza el lloc
|
91
|
+
|
92
|
+
layouts:
|
93
|
+
created: S'ha creat el disseny
|
94
|
+
creation_failure: El disseny no s'ha pogut crear
|
95
|
+
updated: S'ha actualitzat el disseny
|
96
|
+
update_failure: El disseny NO s'ha pogut actualitzar
|
97
|
+
deleted: S'ha esborrat el disseny
|
98
|
+
not_found: El disseny no s'ha pogut trobar
|
99
|
+
|
100
|
+
index:
|
101
|
+
title: Dissenys
|
102
|
+
new_link: Crea un nou disseny
|
103
|
+
index_branch:
|
104
|
+
add_child_layout: Afegeix un disseny fill
|
105
|
+
edit: Edita
|
106
|
+
delete: Esborra
|
107
|
+
are_you_sure: Esteu segur?
|
108
|
+
new:
|
109
|
+
title: Nou disseny
|
110
|
+
edit:
|
111
|
+
title: Editant disseny
|
112
|
+
form:
|
113
|
+
select_parent_layout: Seleccioneu el disseny pare
|
114
|
+
select_app_layout: Seleccioneu el disseny per a l'aplicació
|
115
|
+
create: Crea el disseny
|
116
|
+
cancel: Cancel·la
|
117
|
+
update: Actualitza el disseny
|
118
|
+
|
119
|
+
pages:
|
120
|
+
created: S'ha creat la pàgina
|
121
|
+
creation_failure: La pàgina no s'ha pogut crear
|
122
|
+
updated: S'ha actualitzat la pàgina
|
123
|
+
update_failure: La pàgina no s'ha pogut actualitzar
|
124
|
+
deleted: S'ha esborrat la pàgina
|
125
|
+
not_found: La pàgina no s'ha pogut esborrar
|
126
|
+
layout_not_found: No s'ha trobat cap disseny. Creeu-ne un primer.
|
127
|
+
|
128
|
+
index:
|
129
|
+
title: Pàgines
|
130
|
+
new_link: Crea una nova pàgina
|
131
|
+
index_branch:
|
132
|
+
toggle: Canvia
|
133
|
+
add_child_page: Afegeix una pàgina filla
|
134
|
+
edit: Edita
|
135
|
+
delete: Elimina
|
136
|
+
are_you_sure: Esteu segur?
|
137
|
+
new:
|
138
|
+
title: Nova pàgina
|
139
|
+
edit:
|
140
|
+
title: Editant pàgina
|
141
|
+
form:
|
142
|
+
select_target_page: No redirigir
|
143
|
+
preview: Vista prèvia
|
144
|
+
create: Crea la pàgina
|
145
|
+
cancel: Cancel·la
|
146
|
+
update: Actualitza la pàgina
|
147
|
+
choose_link: Sel·leccioneu una pàgina…
|
148
|
+
|
149
|
+
fragments:
|
150
|
+
form_fragments:
|
151
|
+
no_tags: |-
|
152
|
+
La plantilla no té etiquetes de contingut definides.<br/>
|
153
|
+
Editeu el contingut per a incloure alguna etiqueta de pàgina o camp, com per exemple: <code>{{cms:wysiwyg content}}</code>
|
154
|
+
|
155
|
+
translations:
|
156
|
+
created: S'ha creat la traducció
|
157
|
+
creation_failure: La traducció no s'ha pogut crear
|
158
|
+
updated: S'ha actualitzat la traducció
|
159
|
+
update_failure: La traducció no s'ha pogut actualitzar
|
160
|
+
deleted: S'ha esborrat la traducció
|
161
|
+
not_found: La traducció no s'ha pogut esborrar
|
162
|
+
|
163
|
+
new:
|
164
|
+
title: Nova traducció
|
165
|
+
edit:
|
166
|
+
title: Editant traducció
|
167
|
+
form:
|
168
|
+
preview: Vista prèvia
|
169
|
+
create: Crea
|
170
|
+
update: Actualitza
|
171
|
+
cancel: Cancel·la
|
172
|
+
sidebar:
|
173
|
+
new: Crea una nova traducció
|
174
|
+
confirm: Esteu segur?
|
175
|
+
|
176
|
+
snippets:
|
177
|
+
created: S'ha creat el fragment
|
178
|
+
creation_failure: El fragment no s'ha pogut crear
|
179
|
+
updated: S'ha actualitzat el fragment
|
180
|
+
update_failure: El fragment no s'ha pogut actualitzar
|
181
|
+
deleted: S'ha esborrat el fragment
|
182
|
+
not_found: Fragment no trobat
|
183
|
+
|
184
|
+
index:
|
185
|
+
title: Fragments
|
186
|
+
new_link: Crea un nou fragment
|
187
|
+
edit: Edita
|
188
|
+
delete: Elimina
|
189
|
+
are_you_sure: Esteu segur?
|
190
|
+
new:
|
191
|
+
title: Nou fragment
|
192
|
+
edit:
|
193
|
+
title: Editant fragment
|
194
|
+
form:
|
195
|
+
create: Crear el fragment
|
196
|
+
cancel: Cancel·la
|
197
|
+
update: Actualitza el fragment
|
198
|
+
|
199
|
+
revisions:
|
200
|
+
reverted: S'ha revertit el contingut
|
201
|
+
record_not_found: El fragment no s'ha pogut trobar
|
202
|
+
not_found: La revisió no s'ha pogut trobar
|
203
|
+
|
204
|
+
show:
|
205
|
+
title: Revisions de
|
206
|
+
revision: Revisió
|
207
|
+
update: Actualitza a aquesta versió
|
208
|
+
cancel: Cancel·la
|
209
|
+
content: Contingut
|
210
|
+
changes: Canvis
|
211
|
+
previous: Anterior
|
212
|
+
current: Actual
|
213
|
+
sidebar:
|
214
|
+
revision:
|
215
|
+
zero: No hi ha cap revisió
|
216
|
+
one: '%{count} revisió'
|
217
|
+
few: '%{count} revisions'
|
218
|
+
many: '%{count} revisions'
|
219
|
+
other: '%{count} revisions'
|
220
|
+
|
221
|
+
files:
|
222
|
+
created: S'ha pujat l'arxiu
|
223
|
+
creation_failure: L'arxiu no s'ha pogut pujar
|
224
|
+
updated: S'ha actualitzat l'arxiu
|
225
|
+
update_failure: L'arxiu no s'ha pogut actualitzar
|
226
|
+
deleted: S'ha esborrat l'arxiu
|
227
|
+
not_found: L'arxiu no s'ha pogut trobar
|
228
|
+
|
229
|
+
index:
|
230
|
+
title: Arxius
|
231
|
+
new_link: Puja un nou arxiu
|
232
|
+
button: Carrega els arxius
|
233
|
+
new:
|
234
|
+
title: Nou arxiu
|
235
|
+
edit:
|
236
|
+
title: Editant arxiu
|
237
|
+
form:
|
238
|
+
current_file: Arxiu actual
|
239
|
+
create: Pujar arxiu
|
240
|
+
cancel: Cancel·la
|
241
|
+
update: Actualitza arxiu
|
242
|
+
delete: Esborra
|
243
|
+
are_you_sure: Esteu segur?
|
244
|
+
page_form:
|
245
|
+
are_you_sure: Esteu segur?
|
246
|
+
file:
|
247
|
+
edit: Edita
|
248
|
+
delete: Esborra
|
249
|
+
are_you_sure: Esteu segur?
|
250
|
+
|
251
|
+
categories:
|
252
|
+
index:
|
253
|
+
edit: Edita
|
254
|
+
done: Fet
|
255
|
+
all: Tots
|
256
|
+
add: Afegeix
|
257
|
+
add_placeholder: Afegeix una categoria
|
258
|
+
show:
|
259
|
+
are_you_sure: Esteu segur?
|
260
|
+
edit:
|
261
|
+
save: Guarda
|
262
|
+
form:
|
263
|
+
label: Categories
|