alchemy_cms 4.4.4 → 5.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +56 -18
- data/.github/workflows/stale.yml +1 -1
- data/.gitignore +20 -2
- data/.hound.yml +2 -1
- data/.prettierrc +6 -0
- data/.rubocop.yml +33 -20
- data/CHANGELOG.md +121 -0
- data/Gemfile +24 -22
- data/README.md +31 -19
- data/Rakefile +10 -8
- data/alchemy_cms.gemspec +7 -5
- data/app/assets/javascripts/alchemy/admin.js +1 -2
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +2 -1
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +0 -2
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +5 -5
- data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +17 -17
- data/app/assets/javascripts/alchemy/node_select.js +39 -0
- data/app/assets/javascripts/alchemy/templates/index.js +2 -0
- data/app/assets/javascripts/alchemy/templates/node.hbs +16 -0
- data/app/assets/javascripts/alchemy/templates/node_folder.hbs +3 -0
- data/app/assets/javascripts/alchemy/templates/page.hbs +1 -1
- data/app/assets/stylesheets/alchemy/_mixins.scss +2 -3
- data/app/assets/stylesheets/alchemy/_variables.scss +2 -2
- data/app/assets/stylesheets/alchemy/admin.scss +3 -2
- data/app/assets/stylesheets/alchemy/base.scss +0 -1
- data/app/assets/stylesheets/alchemy/elements.scss +1 -1
- data/app/assets/stylesheets/alchemy/forms.scss +5 -0
- data/app/assets/stylesheets/alchemy/lists.scss +0 -8
- data/app/assets/stylesheets/alchemy/node-select.scss +43 -0
- data/app/assets/stylesheets/alchemy/nodes.scss +6 -1
- data/app/assets/stylesheets/alchemy/sitemap.scss +63 -21
- data/app/assets/stylesheets/alchemy/tables.scss +1 -24
- data/app/controllers/alchemy/admin/attachments_controller.rb +8 -7
- data/app/controllers/alchemy/admin/base_controller.rb +13 -33
- data/app/controllers/alchemy/admin/clipboard_controller.rb +5 -4
- data/app/controllers/alchemy/admin/contents_controller.rb +1 -2
- data/app/controllers/alchemy/admin/dashboard_controller.rb +10 -9
- data/app/controllers/alchemy/admin/elements_controller.rb +20 -20
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +12 -14
- data/app/controllers/alchemy/admin/languages_controller.rb +35 -2
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +5 -2
- data/app/controllers/alchemy/admin/nodes_controller.rb +5 -14
- data/app/controllers/alchemy/admin/pages_controller.rb +50 -63
- data/app/controllers/alchemy/admin/pictures_controller.rb +16 -16
- data/app/controllers/alchemy/admin/resources_controller.rb +21 -13
- data/app/controllers/alchemy/admin/sites_controller.rb +18 -0
- data/app/controllers/alchemy/admin/styleguide_controller.rb +1 -0
- data/app/controllers/alchemy/admin/tags_controller.rb +5 -3
- data/app/controllers/alchemy/admin/trash_controller.rb +6 -6
- data/app/controllers/alchemy/api/base_controller.rb +2 -2
- data/app/controllers/alchemy/api/contents_controller.rb +4 -4
- data/app/controllers/alchemy/api/elements_controller.rb +8 -8
- data/app/controllers/alchemy/api/nodes_controller.rb +65 -0
- data/app/controllers/alchemy/api/pages_controller.rb +15 -22
- data/app/controllers/alchemy/attachments_controller.rb +5 -5
- data/app/controllers/alchemy/base_controller.rb +10 -9
- data/app/controllers/alchemy/messages_controller.rb +16 -23
- data/app/controllers/alchemy/pages_controller.rb +13 -11
- data/app/controllers/concerns/alchemy/admin/archive_overlay.rb +3 -2
- data/app/controllers/concerns/alchemy/admin/current_language.rb +23 -0
- data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +5 -5
- data/app/controllers/concerns/alchemy/legacy_page_redirects.rb +4 -4
- data/app/controllers/concerns/alchemy/page_redirects.rb +2 -9
- data/app/controllers/concerns/alchemy/site_redirects.rb +2 -2
- data/app/decorators/alchemy/content_editor.rb +55 -0
- data/app/decorators/alchemy/element_editor.rb +39 -0
- data/app/helpers/alchemy/admin/attachments_helper.rb +6 -6
- data/app/helpers/alchemy/admin/base_helper.rb +36 -35
- data/app/helpers/alchemy/admin/contents_helper.rb +3 -3
- data/app/helpers/alchemy/admin/elements_helper.rb +3 -88
- data/app/helpers/alchemy/admin/essences_helper.rb +8 -117
- data/app/helpers/alchemy/admin/form_helper.rb +1 -1
- data/app/helpers/alchemy/admin/navigation_helper.rb +24 -23
- data/app/helpers/alchemy/admin/pages_helper.rb +12 -12
- data/app/helpers/alchemy/admin/pictures_helper.rb +4 -6
- data/app/helpers/alchemy/admin/tags_helper.rb +8 -7
- data/app/helpers/alchemy/base_helper.rb +13 -8
- data/app/helpers/alchemy/elements_block_helper.rb +2 -31
- data/app/helpers/alchemy/elements_helper.rb +12 -58
- data/app/helpers/alchemy/pages_helper.rb +24 -174
- data/app/helpers/alchemy/url_helper.rb +2 -1
- data/app/mailers/alchemy/base_mailer.rb +1 -1
- data/app/mailers/alchemy/messages_mailer.rb +1 -1
- data/app/models/alchemy/attachment.rb +20 -18
- data/app/models/alchemy/base_record.rb +2 -5
- data/app/models/alchemy/content.rb +33 -52
- data/app/models/alchemy/content/factory.rb +24 -31
- data/app/models/alchemy/element.rb +45 -53
- data/app/models/alchemy/element/definitions.rb +4 -4
- data/app/models/alchemy/element/element_contents.rb +9 -6
- data/app/models/alchemy/element/element_essences.rb +4 -3
- data/app/models/alchemy/element/presenters.rb +3 -2
- data/app/models/alchemy/element_to_page.rb +1 -1
- data/app/models/alchemy/essence_boolean.rb +1 -3
- data/app/models/alchemy/essence_date.rb +2 -3
- data/app/models/alchemy/essence_file.rb +4 -4
- data/app/models/alchemy/essence_html.rb +1 -3
- data/app/models/alchemy/essence_link.rb +1 -3
- data/app/models/alchemy/essence_node.rb +18 -0
- data/app/models/alchemy/essence_page.rb +3 -16
- data/app/models/alchemy/essence_picture.rb +17 -16
- data/app/models/alchemy/essence_picture_view.rb +7 -6
- data/app/models/alchemy/essence_richtext.rb +1 -3
- data/app/models/alchemy/essence_select.rb +1 -3
- data/app/models/alchemy/essence_text.rb +0 -2
- data/app/models/alchemy/folded_page.rb +1 -0
- data/app/models/alchemy/language.rb +21 -35
- data/app/models/alchemy/language/code.rb +4 -4
- data/app/models/alchemy/legacy_page_url.rb +1 -1
- data/app/models/alchemy/message.rb +3 -3
- data/app/models/alchemy/node.rb +55 -9
- data/app/models/alchemy/page.rb +53 -123
- data/app/models/alchemy/page/fixed_attributes.rb +3 -2
- data/app/models/alchemy/page/page_elements.rb +35 -44
- data/app/models/alchemy/page/page_naming.rb +20 -70
- data/app/models/alchemy/page/page_natures.rb +7 -34
- data/app/models/alchemy/page/page_scopes.rb +23 -29
- data/app/models/alchemy/page/url_path.rb +64 -0
- data/app/models/alchemy/picture.rb +40 -30
- data/app/models/alchemy/picture/preprocessor.rb +26 -0
- data/app/models/alchemy/picture/transformations.rb +9 -7
- data/app/models/alchemy/picture/url.rb +5 -5
- data/app/models/alchemy/site.rb +6 -36
- data/app/models/alchemy/site/layout.rb +2 -2
- data/app/models/concerns/alchemy/touch_elements.rb +24 -0
- data/app/serializers/alchemy/content_serializer.rb +0 -3
- data/app/serializers/alchemy/essence_boolean_serializer.rb +3 -3
- data/app/serializers/alchemy/essence_date_serializer.rb +3 -3
- data/app/serializers/alchemy/essence_file_serializer.rb +4 -2
- data/app/serializers/alchemy/essence_html_serializer.rb +3 -3
- data/app/serializers/alchemy/essence_link_serializer.rb +3 -3
- data/app/serializers/alchemy/essence_picture_serializer.rb +5 -4
- data/app/serializers/alchemy/essence_richtext_serializer.rb +3 -3
- data/app/serializers/alchemy/essence_select_serializer.rb +3 -3
- data/app/serializers/alchemy/essence_text_serializer.rb +5 -4
- data/app/serializers/alchemy/node_serializer.rb +14 -0
- data/app/serializers/alchemy/page_serializer.rb +2 -1
- data/app/serializers/alchemy/page_tree_serializer.rb +11 -14
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +1 -2
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +1 -2
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +4 -4
- data/app/views/alchemy/admin/contents/create.js.erb +1 -3
- data/app/views/alchemy/admin/elements/_element.html.erb +9 -18
- data/app/views/alchemy/admin/elements/create.js.erb +1 -1
- data/app/views/alchemy/admin/elements/fold.js.erb +1 -1
- data/app/views/alchemy/admin/elements/index.html.erb +3 -3
- data/app/views/alchemy/admin/essence_files/assign.js.erb +1 -6
- data/app/views/alchemy/admin/essence_files/edit.html.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/assign.js.erb +1 -7
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +7 -7
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +1 -1
- data/app/views/alchemy/admin/languages/_form.html.erb +5 -5
- data/app/views/alchemy/admin/languages/_table.html.erb +3 -3
- data/app/views/alchemy/admin/languages/edit.html.erb +1 -0
- data/app/views/alchemy/admin/languages/index.html.erb +23 -4
- data/app/views/alchemy/admin/languages/new.html.erb +1 -0
- data/app/views/alchemy/admin/layoutpages/index.html.erb +6 -2
- data/app/views/alchemy/admin/nodes/_form.html.erb +23 -15
- data/app/views/alchemy/admin/nodes/_node.html.erb +5 -19
- data/app/views/alchemy/admin/nodes/index.html.erb +3 -18
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +0 -8
- data/app/views/alchemy/admin/pages/_form.html.erb +1 -2
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -0
- data/app/views/alchemy/admin/pages/_page.html.erb +14 -25
- data/app/views/alchemy/admin/pages/_page_infos.html.erb +0 -4
- data/app/views/alchemy/admin/pages/_sitemap.html.erb +6 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +1 -1
- data/app/views/alchemy/admin/pages/info.html.erb +0 -9
- data/app/views/alchemy/admin/pages/unlock.js.erb +13 -6
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +0 -2
- data/app/views/alchemy/admin/partials/_routes.html.erb +8 -0
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -5
- data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -2
- data/app/views/alchemy/admin/pictures/index.html.erb +18 -3
- data/app/views/alchemy/admin/resources/_resource.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_table.html.erb +2 -2
- data/app/views/alchemy/admin/sites/_form.html.erb +8 -0
- data/app/views/alchemy/admin/sites/edit.html.erb +1 -0
- data/app/views/alchemy/admin/sites/index.html.erb +21 -9
- data/app/views/alchemy/admin/sites/new.html.erb +1 -0
- data/app/views/alchemy/admin/tags/index.html.erb +2 -2
- data/app/views/alchemy/essences/_essence_boolean_editor.html.erb +10 -12
- data/app/views/alchemy/essences/_essence_date_editor.html.erb +11 -8
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +16 -17
- data/app/views/alchemy/essences/_essence_html_editor.html.erb +8 -5
- data/app/views/alchemy/essences/_essence_link_editor.html.erb +18 -15
- data/app/views/alchemy/essences/_essence_node_editor.html.erb +27 -0
- data/app/views/alchemy/essences/_essence_node_view.html.erb +1 -0
- data/app/views/alchemy/essences/_essence_page_editor.html.erb +14 -11
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +22 -20
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +10 -7
- data/app/views/alchemy/essences/_essence_select_editor.html.erb +12 -16
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +18 -17
- data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +6 -11
- data/app/views/alchemy/pages/show.rss.builder +3 -2
- data/app/views/layouts/alchemy/admin.html.erb +1 -0
- data/babel.config.js +12 -0
- data/bin/rails +5 -4
- data/config/alchemy/config.yml +23 -22
- data/config/brakeman.ignore +1 -1
- data/config/initializers/assets.rb +2 -1
- data/config/initializers/dragonfly.rb +2 -1
- data/config/initializers/mime_types.rb +1 -0
- data/config/initializers/mini_profiler.rb +3 -2
- data/config/initializers/simple_form.rb +6 -6
- data/config/locales/alchemy.en.yml +37 -14
- data/config/routes.rb +32 -28
- data/config/spring.rb +3 -2
- data/db/migrate/20200226213334_alchemy_four_point_four.rb +313 -0
- data/db/migrate/20200423073425_create_alchemy_essence_nodes.rb +11 -0
- data/db/migrate/20200504210159_remove_site_id_from_nodes.rb +28 -0
- data/db/migrate/20200505215518_add_language_id_foreign_key_to_alchemy_pages.rb +8 -0
- data/db/migrate/20200511113603_add_menu_type_to_alchemy_nodes.rb +27 -0
- data/db/migrate/20200514091507_make_page_layoutpage_null_false.rb +6 -0
- data/db/migrate/20200519073500_remove_visible_from_alchemy_pages.rb +24 -0
- data/lib/alchemy/admin/locale.rb +3 -1
- data/lib/alchemy/admin/preview_url.rb +85 -0
- data/lib/alchemy/auth_accessors.rb +8 -7
- data/lib/alchemy/cache_digests/template_tracker.rb +5 -4
- data/lib/alchemy/config.rb +26 -2
- data/lib/alchemy/configuration_methods.rb +3 -1
- data/lib/alchemy/controller_actions.rb +6 -5
- data/lib/alchemy/deprecation.rb +2 -1
- data/lib/alchemy/elements_finder.rb +5 -5
- data/lib/alchemy/engine.rb +23 -8
- data/lib/alchemy/errors.rb +0 -7
- data/lib/alchemy/essence.rb +17 -16
- data/lib/alchemy/filetypes.rb +5 -5
- data/lib/alchemy/forms/builder.rb +4 -4
- data/lib/alchemy/hints.rb +1 -1
- data/lib/alchemy/i18n.rb +2 -1
- data/lib/alchemy/modules.rb +12 -12
- data/lib/alchemy/name_conversions.rb +5 -5
- data/lib/alchemy/on_page_layout/callbacks_runner.rb +1 -0
- data/lib/alchemy/page_layout.rb +15 -12
- data/lib/alchemy/paths.rb +1 -1
- data/lib/alchemy/permissions.rb +7 -6
- data/lib/alchemy/resource.rb +23 -13
- data/lib/alchemy/resources_helper.rb +12 -18
- data/lib/alchemy/routing_constraints.rb +1 -1
- data/lib/alchemy/seeder.rb +42 -14
- data/lib/alchemy/shell.rb +13 -10
- data/lib/alchemy/taggable.rb +1 -0
- data/lib/alchemy/tasks/tidy.rb +4 -3
- data/lib/alchemy/test_support/config_stubbing.rb +1 -0
- data/lib/alchemy/test_support/essence_shared_examples.rb +72 -72
- data/lib/alchemy/test_support/factories.rb +1 -1
- data/lib/alchemy/test_support/factories/attachment_factory.rb +5 -5
- data/lib/alchemy/test_support/factories/content_factory.rb +6 -6
- data/lib/alchemy/test_support/factories/dummy_user_factory.rb +7 -7
- data/lib/alchemy/test_support/factories/element_factory.rb +9 -9
- data/lib/alchemy/test_support/factories/essence_file_factory.rb +3 -3
- data/lib/alchemy/test_support/factories/essence_page_factory.rb +3 -3
- data/lib/alchemy/test_support/factories/essence_picture_factory.rb +4 -4
- data/lib/alchemy/test_support/factories/essence_text_factory.rb +3 -3
- data/lib/alchemy/test_support/factories/language_factory.rb +21 -14
- data/lib/alchemy/test_support/factories/node_factory.rb +8 -8
- data/lib/alchemy/test_support/factories/page_factory.rb +15 -27
- data/lib/alchemy/test_support/factories/picture_factory.rb +5 -5
- data/lib/alchemy/test_support/factories/site_factory.rb +7 -6
- data/lib/alchemy/test_support/integration_helpers.rb +1 -0
- data/lib/alchemy/test_support/shared_contexts.rb +5 -4
- data/lib/alchemy/test_support/shared_uploader_examples.rb +4 -3
- data/lib/alchemy/tinymce.rb +15 -13
- data/lib/alchemy/upgrader.rb +8 -7
- data/lib/alchemy/upgrader/five_point_zero.rb +41 -0
- data/lib/alchemy/upgrader/tasks/element_views_updater.rb +4 -4
- data/lib/alchemy/upgrader/tasks/harden_gutentag_migrations.rb +29 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +52 -50
- data/lib/{rails/generators → generators}/alchemy/base.rb +5 -4
- data/lib/{rails/generators → generators}/alchemy/elements/elements_generator.rb +13 -9
- data/lib/{rails/generators → generators}/alchemy/elements/templates/view.html.erb +0 -0
- data/lib/{rails/generators → generators}/alchemy/elements/templates/view.html.haml +0 -0
- data/lib/{rails/generators → generators}/alchemy/elements/templates/view.html.slim +0 -0
- data/lib/{rails/generators → generators}/alchemy/essence/essence_generator.rb +15 -13
- data/lib/generators/alchemy/essence/templates/editor.html.erb +17 -0
- data/lib/{rails/generators → generators}/alchemy/essence/templates/view.html.erb +0 -0
- data/lib/{rails/generators → generators}/alchemy/install/files/_article.html.erb +0 -0
- data/lib/{rails/generators → generators}/alchemy/install/files/_standard.html.erb +0 -0
- data/lib/{rails/generators → generators}/alchemy/install/files/alchemy.en.yml +0 -0
- data/lib/generators/alchemy/install/files/alchemy_admin.js +1 -0
- data/lib/{rails/generators → generators}/alchemy/install/files/all.css +0 -0
- data/lib/{rails/generators → generators}/alchemy/install/files/all.js +0 -0
- data/lib/{rails/generators → generators}/alchemy/install/files/application.html.erb +0 -0
- data/lib/{rails/generators → generators}/alchemy/install/files/article.scss +0 -0
- data/lib/generators/alchemy/install/install_generator.rb +110 -0
- data/lib/{rails/generators → generators}/alchemy/install/templates/dragonfly.rb.tt +0 -0
- data/lib/{rails/generators → generators}/alchemy/install/templates/elements.yml.tt +0 -0
- data/lib/generators/alchemy/install/templates/menus.yml.tt +8 -0
- data/lib/{rails/generators → generators}/alchemy/install/templates/page_layouts.yml.tt +0 -0
- data/lib/{rails/generators → generators}/alchemy/menus/menus_generator.rb +5 -5
- data/lib/{rails/generators → generators}/alchemy/menus/templates/node.html.erb +1 -4
- data/lib/{rails/generators → generators}/alchemy/menus/templates/node.html.haml +1 -4
- data/lib/{rails/generators → generators}/alchemy/menus/templates/node.html.slim +1 -4
- data/lib/{rails/generators → generators}/alchemy/menus/templates/wrapper.html.erb +1 -1
- data/lib/{rails/generators → generators}/alchemy/menus/templates/wrapper.html.haml +2 -2
- data/lib/{rails/generators → generators}/alchemy/menus/templates/wrapper.html.slim +2 -2
- data/lib/{rails/generators → generators}/alchemy/module/module_generator.rb +3 -2
- data/lib/{rails/generators → generators}/alchemy/module/templates/ability.rb.tt +0 -0
- data/lib/{rails/generators → generators}/alchemy/module/templates/controller.rb.tt +0 -0
- data/lib/{rails/generators → generators}/alchemy/module/templates/module_config.rb.tt +0 -0
- data/lib/{rails/generators → generators}/alchemy/page_layouts/page_layouts_generator.rb +5 -4
- data/lib/{rails/generators → generators}/alchemy/page_layouts/templates/layout.html.erb +0 -0
- data/lib/{rails/generators → generators}/alchemy/page_layouts/templates/layout.html.haml +0 -0
- data/lib/{rails/generators → generators}/alchemy/page_layouts/templates/layout.html.slim +0 -0
- data/lib/{rails/generators → generators}/alchemy/site_layouts/site_layouts_generator.rb +4 -2
- data/lib/{rails/generators → generators}/alchemy/site_layouts/templates/layout.html.erb +0 -0
- data/lib/{rails/generators → generators}/alchemy/site_layouts/templates/layout.html.haml +0 -0
- data/lib/{rails/generators → generators}/alchemy/site_layouts/templates/layout.html.slim +0 -0
- data/lib/{rails/generators → generators}/alchemy/views/views_generator.rb +7 -6
- data/lib/kaminari/scoped_pagination_url_helper.rb +1 -0
- data/lib/tasks/alchemy/db.rake +3 -19
- data/lib/tasks/alchemy/install.rake +3 -2
- data/lib/tasks/alchemy/tidy.rake +9 -8
- data/lib/tasks/alchemy/upgrade.rake +28 -105
- data/package.json +45 -0
- data/package/admin.js +14 -0
- data/package/src/__tests__/i18n.spec.js +70 -0
- data/package/src/i18n.js +48 -0
- data/package/src/node_tree.js +72 -0
- data/package/src/translations.js +32 -0
- data/package/src/utils/__tests__/ajax.spec.js +124 -0
- data/package/src/utils/__tests__/events.spec.js +38 -0
- data/package/src/utils/ajax.js +48 -0
- data/package/src/utils/events.js +16 -0
- data/vendor/assets/fonts/fa-regular-400.eot +0 -0
- data/vendor/assets/fonts/fa-regular-400.svg +798 -358
- data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fa-solid-900.eot +0 -0
- data/vendor/assets/fonts/fa-solid-900.svg +4933 -1408
- data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.nestedSortable.js +1 -2
- data/vendor/assets/stylesheets/fontawesome/_core.scss +5 -0
- data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +1 -1
- data/vendor/assets/stylesheets/fontawesome/_icons.scss +651 -2
- data/vendor/assets/stylesheets/fontawesome/_mixins.scss +0 -1
- data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +3 -2
- data/vendor/assets/stylesheets/fontawesome/_stacked.scss +1 -1
- data/vendor/assets/stylesheets/fontawesome/_variables.scss +662 -9
- data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +2 -2
- data/vendor/assets/stylesheets/fontawesome/regular.scss +23 -0
- data/vendor/assets/stylesheets/fontawesome/solid.scss +24 -0
- metadata +131 -83
- data/app/assets/javascripts/alchemy/alchemy.i18n.js.coffee +0 -32
- data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +0 -29
- data/app/helpers/alchemy/essences_helper.rb +0 -119
- data/app/models/concerns/alchemy/content_touching.rb +0 -23
- data/app/serializers/alchemy/legacy_element_serializer.rb +0 -15
- data/app/views/alchemy/admin/contents/_missing.html.erb +0 -17
- data/app/views/alchemy/admin/pages/_menu_fields.html.erb +0 -33
- data/app/views/alchemy/admin/pages/configure_external.html.erb +0 -32
- data/app/views/alchemy/elements/_editor_not_found.html.erb +0 -4
- data/app/views/alchemy/navigation/_image_link.html.erb +0 -14
- data/app/views/alchemy/navigation/_link.html.erb +0 -19
- data/app/views/alchemy/navigation/_renderer.html.erb +0 -29
- data/db/migrate/20180226123013_alchemy_four_point_zero.rb +0 -363
- data/db/migrate/20180227224537_migrate_tags_to_gutentag.rb +0 -41
- data/db/migrate/20180519204655_add_fixed_to_alchemy_elements.rb +0 -6
- data/db/migrate/20191016073858_create_alchemy_essence_pages.rb +0 -8
- data/db/migrate/20191029212236_create_alchemy_nodes.rb +0 -24
- data/db/migrate/20200226081535_add_site_id_to_alchemy_nodes.rb +0 -15
- data/lib/alchemy/ssl_protection.rb +0 -32
- data/lib/alchemy/tasks/helpers.rb +0 -81
- data/lib/alchemy/test_support/controller_requests.rb +0 -93
- data/lib/alchemy/upgrader/four_point_four.rb +0 -52
- data/lib/alchemy/upgrader/four_point_one.rb +0 -42
- data/lib/alchemy/upgrader/four_point_two.rb +0 -85
- data/lib/alchemy/upgrader/tasks/cells_migration.rb +0 -43
- data/lib/alchemy/upgrader/tasks/cells_upgrader.rb +0 -148
- data/lib/alchemy/upgrader/tasks/element_partial_name_variable_updater.rb +0 -28
- data/lib/alchemy/upgrader/tasks/harden_acts_as_taggable_on_migrations.rb +0 -27
- data/lib/alchemy/upgrader/tasks/picture_gallery_migration.rb +0 -65
- data/lib/alchemy/upgrader/tasks/picture_gallery_upgrader.rb +0 -210
- data/lib/rails/generators/alchemy/essence/templates/editor.html.erb +0 -15
- data/lib/rails/generators/alchemy/install/install_generator.rb +0 -60
- data/lib/tasks/alchemy/convert.rake +0 -95
- data/vendor/assets/stylesheets/fontawesome/fa-regular.scss +0 -22
- data/vendor/assets/stylesheets/fontawesome/fa-solid.scss +0 -23
@@ -77,7 +77,7 @@ SimpleForm.setup do |config|
|
|
77
77
|
config.boolean_style = :inline
|
78
78
|
|
79
79
|
# Default class for buttons
|
80
|
-
config.button_class =
|
80
|
+
config.button_class = "button"
|
81
81
|
|
82
82
|
# Method used to tidy up errors. Specify any Rails Array method.
|
83
83
|
# :first lists the first message for each field.
|
@@ -88,7 +88,7 @@ SimpleForm.setup do |config|
|
|
88
88
|
config.error_notification_tag = :div
|
89
89
|
|
90
90
|
# CSS class to add for error notification helper.
|
91
|
-
config.error_notification_class =
|
91
|
+
config.error_notification_class = "field_with_errors"
|
92
92
|
|
93
93
|
# ID to add for error notification helper.
|
94
94
|
# config.error_notification_id = nil
|
@@ -103,7 +103,7 @@ SimpleForm.setup do |config|
|
|
103
103
|
config.collection_wrapper_tag = :div
|
104
104
|
|
105
105
|
# You can define the class to use on all collection wrappers. Defaulting to none.
|
106
|
-
config.collection_wrapper_class =
|
106
|
+
config.collection_wrapper_class = "control_group"
|
107
107
|
|
108
108
|
# You can wrap each item in a collection of radio/check boxes with a tag,
|
109
109
|
# defaulting to :span.
|
@@ -116,7 +116,7 @@ SimpleForm.setup do |config|
|
|
116
116
|
config.label_text = proc { |label, required| "#{label}#{required}" }
|
117
117
|
|
118
118
|
# You can define the class to use on all labels. Default is nil.
|
119
|
-
config.label_class =
|
119
|
+
config.label_class = "control-label"
|
120
120
|
|
121
121
|
# You can define the default class to be used on forms. Can be overriden
|
122
122
|
# with `html: { :class }`. Defaulting to none.
|
@@ -170,12 +170,12 @@ SimpleForm.setup do |config|
|
|
170
170
|
# config.input_class = nil
|
171
171
|
|
172
172
|
# Define the default class of the input wrapper of the boolean input.
|
173
|
-
config.boolean_label_class =
|
173
|
+
config.boolean_label_class = "checkbox"
|
174
174
|
|
175
175
|
# Defines if the default input wrapper class should be included in radio
|
176
176
|
# collection wrappers.
|
177
177
|
# config.include_default_input_wrapper_class = true
|
178
178
|
|
179
179
|
# Defines which i18n scope will be used in Simple Form.
|
180
|
-
config.i18n_scope =
|
180
|
+
config.i18n_scope = "alchemy.forms"
|
181
181
|
end
|
@@ -49,6 +49,14 @@ en:
|
|
49
49
|
#
|
50
50
|
content_names:
|
51
51
|
|
52
|
+
|
53
|
+
# === Translations for menu names
|
54
|
+
# Used for the translations of the names of root menu nodes.
|
55
|
+
#
|
56
|
+
menu_names:
|
57
|
+
main_menu: Main Menu
|
58
|
+
footer_menu: Footer Menu
|
59
|
+
|
52
60
|
# === Translations for content validations
|
53
61
|
# Used when a user did not enter (correct) values to the content field.
|
54
62
|
#
|
@@ -155,7 +163,8 @@ en:
|
|
155
163
|
|
156
164
|
resource_help_texts:
|
157
165
|
site:
|
158
|
-
|
166
|
+
host: Either enter a <a href="https://en.wikipedia.org/wiki/Fully_qualified_domain_name" target="_blank">FQDN</a> or use a asterisk (*) to allow all domains to access this site.
|
167
|
+
aliases: Enter additional domains this site should be accessible by. Please separate them by space or new line.
|
159
168
|
|
160
169
|
add_nested_element: "Add %{name}"
|
161
170
|
anchor: 'Anchor'
|
@@ -455,7 +464,11 @@ en:
|
|
455
464
|
no_files_in_archive: "You do not have any files in your archive."
|
456
465
|
no_images_in_archive: "You don't have any images in your archive."
|
457
466
|
no_more_elements_to_add: "No more elements available."
|
458
|
-
no_resource_found:
|
467
|
+
no_resource_found:
|
468
|
+
default: "No %{resource} found. Please add your first one below."
|
469
|
+
alchemy/language: "<h2>Your website does not have any languages yet.</h2><p>You need at least one language to work with. Please create one below.</p>"
|
470
|
+
alchemy/node: "<h2>You do not have any menus yet.</h2><p>With menus your users can navigate your website. You can have multiple menus on your website. How many depends on your website template.</p><p>Please chose which menu you want to create first.</p>"
|
471
|
+
alchemy/site: "<h2>You do not have any websites yet.</h2><p>In order to serve requests you need to create a website first.</p><p>This form has been filled with sensible defaults that work in most cases.</p>"
|
459
472
|
no_search_results: "Your search did not return any results."
|
460
473
|
"not a valid image": "This is not an valid image."
|
461
474
|
"or": 'or'
|
@@ -468,9 +481,6 @@ en:
|
|
468
481
|
page_published: "Published page"
|
469
482
|
page_restricted: "restricted"
|
470
483
|
page_states:
|
471
|
-
visible:
|
472
|
-
"true": "Page is visible in navigation."
|
473
|
-
"false": "Page is not visible in navigation."
|
474
484
|
public:
|
475
485
|
"true": "Page is published."
|
476
486
|
"false": "Page is unpublished."
|
@@ -565,8 +575,6 @@ en:
|
|
565
575
|
button_label: Upload image(s)
|
566
576
|
upload_success: "Picture %{name} uploaded successfully"
|
567
577
|
upload_failure: "Error while uploading %{name}: %{error}"
|
568
|
-
url_name: "URL-Name"
|
569
|
-
visible: "visible"
|
570
578
|
want_to_create_new_language: "Do you want to create a new empty language tree?"
|
571
579
|
want_to_make_copy_of_existing_language: "Do you want to copy an existing language tree?"
|
572
580
|
"We need at least one default.": "A default language must exist."
|
@@ -629,7 +637,7 @@ en:
|
|
629
637
|
time:
|
630
638
|
formats:
|
631
639
|
alchemy:
|
632
|
-
default: "%
|
640
|
+
default: "%m.%d.%Y %H:%M"
|
633
641
|
essence_date: "%Y-%m-%d"
|
634
642
|
page_status: "%m.%d.%Y %H:%M"
|
635
643
|
short_datetime: "%d %b %H:%M"
|
@@ -662,9 +670,9 @@ en:
|
|
662
670
|
page_layout:
|
663
671
|
blank: "^Please choose a page layout."
|
664
672
|
urlname:
|
665
|
-
too_short: "^
|
666
|
-
taken: "^URL-
|
667
|
-
exclusion: "^URL-
|
673
|
+
too_short: "^URL-Path is too short (minimum of 3 characters)."
|
674
|
+
taken: "^URL-Path already taken."
|
675
|
+
exclusion: "^URL-Path reserved."
|
668
676
|
alchemy/picture:
|
669
677
|
attributes:
|
670
678
|
image_file:
|
@@ -696,6 +704,20 @@ en:
|
|
696
704
|
|
697
705
|
# Translations for Alchemy database models
|
698
706
|
activerecord:
|
707
|
+
errors:
|
708
|
+
models:
|
709
|
+
alchemy/node:
|
710
|
+
attributes:
|
711
|
+
base:
|
712
|
+
essence_nodes_present: "This menu item is in use inside an Alchemy element on the following pages: %{page_names}."
|
713
|
+
alchemy/site:
|
714
|
+
attributes:
|
715
|
+
languages:
|
716
|
+
still_present: "are still attached to this site. Please remove them first."
|
717
|
+
alchemy/language:
|
718
|
+
attributes:
|
719
|
+
pages:
|
720
|
+
still_present: "are still attached to this language. Please remove them first."
|
699
721
|
models:
|
700
722
|
gutentag/tag:
|
701
723
|
one: Tag
|
@@ -772,8 +794,9 @@ en:
|
|
772
794
|
locale: Localization
|
773
795
|
code: ISO Code
|
774
796
|
alchemy/legacy_page_url:
|
775
|
-
urlname: "URL
|
797
|
+
urlname: "URL-Path"
|
776
798
|
alchemy/node:
|
799
|
+
menu_type: Menu Type
|
777
800
|
name: "Name"
|
778
801
|
title: "Title"
|
779
802
|
nofollow: "Search engine must not follow"
|
@@ -797,8 +820,8 @@ en:
|
|
797
820
|
tag_list: Tags
|
798
821
|
title: "Title"
|
799
822
|
updated_at: "Updated at"
|
800
|
-
urlname: "
|
801
|
-
|
823
|
+
urlname: "URL-Path"
|
824
|
+
slug: "Slug"
|
802
825
|
alchemy/picture:
|
803
826
|
image_file_name: "Filename"
|
804
827
|
image_file_height: "Height"
|
data/config/routes.rb
CHANGED
@@ -1,27 +1,24 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "alchemy/routing_constraints"
|
2
3
|
|
3
4
|
Alchemy::Engine.routes.draw do
|
4
|
-
root to:
|
5
|
+
root to: "pages#index"
|
5
6
|
|
6
|
-
get
|
7
|
+
get "/sitemap.xml" => "pages#sitemap", format: "xml"
|
7
8
|
|
8
9
|
scope Alchemy.admin_path, {constraints: Alchemy.admin_constraints} do
|
9
|
-
get
|
10
|
-
get
|
11
|
-
get
|
12
|
-
get
|
13
|
-
get
|
14
|
-
get
|
10
|
+
get "/" => redirect("#{Alchemy.admin_path}/dashboard"), as: :admin
|
11
|
+
get "/dashboard" => "admin/dashboard#index", as: :admin_dashboard
|
12
|
+
get "/dashboard/info" => "admin/dashboard#info", as: :dashboard_info
|
13
|
+
get "/help" => "admin/dashboard#help", as: :help
|
14
|
+
get "/dashboard/update_check" => "admin/dashboard#update_check", as: :update_check
|
15
|
+
get "/leave" => "admin/base#leave", as: :leave_admin
|
15
16
|
end
|
16
17
|
|
17
18
|
namespace :admin, {path: Alchemy.admin_path, constraints: Alchemy.admin_constraints} do
|
18
19
|
resources :contents, only: [:create]
|
19
20
|
|
20
|
-
resources :nodes
|
21
|
-
member do
|
22
|
-
patch :toggle
|
23
|
-
end
|
24
|
-
end
|
21
|
+
resources :nodes
|
25
22
|
|
26
23
|
resources :pages do
|
27
24
|
resources :elements
|
@@ -98,7 +95,7 @@ Alchemy::Engine.routes.draw do
|
|
98
95
|
end
|
99
96
|
end
|
100
97
|
|
101
|
-
resource :clipboard, only: :index, controller:
|
98
|
+
resource :clipboard, only: :index, controller: "clipboard" do
|
102
99
|
collection do
|
103
100
|
get :index
|
104
101
|
delete :clear
|
@@ -107,7 +104,7 @@ Alchemy::Engine.routes.draw do
|
|
107
104
|
end
|
108
105
|
end
|
109
106
|
|
110
|
-
resource :trash, only: :index, controller:
|
107
|
+
resource :trash, only: :index, controller: "trash" do
|
111
108
|
collection do
|
112
109
|
get :index
|
113
110
|
delete :clear
|
@@ -122,45 +119,52 @@ Alchemy::Engine.routes.draw do
|
|
122
119
|
|
123
120
|
resources :sites
|
124
121
|
|
125
|
-
get
|
122
|
+
get "/styleguide" => "styleguide#index"
|
126
123
|
end
|
127
124
|
|
128
|
-
get
|
125
|
+
get "/attachment/:id/download(/:name)" => "attachments#download",
|
129
126
|
as: :download_attachment
|
130
|
-
get
|
127
|
+
get "/attachment/:id/show" => "attachments#show",
|
131
128
|
as: :show_attachment
|
132
129
|
|
133
130
|
resources :messages, only: [:index, :new, :create]
|
134
131
|
resources :elements, only: :show
|
135
132
|
resources :contents, only: :show
|
136
133
|
|
137
|
-
namespace :api, defaults: {format:
|
134
|
+
namespace :api, defaults: {format: "json"} do
|
138
135
|
resources :contents, only: [:index, :show]
|
139
136
|
|
140
137
|
resources :elements, only: [:index, :show] do
|
141
|
-
get
|
142
|
-
get
|
138
|
+
get "/contents" => "contents#index", as: "contents"
|
139
|
+
get "/contents/:name" => "contents#show", as: "content"
|
143
140
|
end
|
144
141
|
|
145
142
|
resources :pages, only: [:index] do
|
146
|
-
get
|
147
|
-
get
|
143
|
+
get "elements" => "elements#index", as: "elements"
|
144
|
+
get "elements/:named" => "elements#index", as: "named_elements"
|
148
145
|
collection do
|
149
146
|
get :nested
|
150
147
|
end
|
151
148
|
end
|
152
149
|
|
153
|
-
get
|
154
|
-
get
|
150
|
+
get "/pages/*urlname(.:format)" => "pages#show", as: "page"
|
151
|
+
get "/admin/pages/:id(.:format)" => "pages#show", as: "preview_page"
|
152
|
+
|
153
|
+
resources :nodes, only: [:index] do
|
154
|
+
member do
|
155
|
+
patch :move
|
156
|
+
patch :toggle_folded
|
157
|
+
end
|
158
|
+
end
|
155
159
|
end
|
156
160
|
|
157
|
-
get
|
161
|
+
get "/:locale" => "pages#index",
|
158
162
|
constraints: {locale: Alchemy::RoutingConstraints::LOCALE_REGEXP},
|
159
163
|
as: :show_language_root
|
160
164
|
|
161
165
|
# The page show action has to be last route
|
162
166
|
constraints(locale: Alchemy::RoutingConstraints::LOCALE_REGEXP) do
|
163
|
-
get
|
167
|
+
get "(/:locale)/*urlname(.:format)" => "pages#show",
|
164
168
|
constraints: Alchemy::RoutingConstraints.new,
|
165
169
|
as: :show_page
|
166
170
|
end
|
data/config/spring.rb
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
Spring.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
Spring.application_root = "./spec/dummy"
|
3
|
+
Spring.watch "lib/**/*"
|
@@ -0,0 +1,313 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AlchemyFourPointFour < ActiveRecord::Migration[5.2]
|
4
|
+
def up
|
5
|
+
unless table_exists?("alchemy_attachments")
|
6
|
+
create_table "alchemy_attachments", force: :cascade do |t|
|
7
|
+
t.string "name"
|
8
|
+
t.string "file_name"
|
9
|
+
t.string "file_mime_type"
|
10
|
+
t.integer "file_size"
|
11
|
+
t.references "creator"
|
12
|
+
t.references "updater"
|
13
|
+
t.timestamps null: false
|
14
|
+
t.string "file_uid"
|
15
|
+
t.index ["file_uid"], name: "index_alchemy_attachments_on_file_uid"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
unless table_exists?("alchemy_contents")
|
20
|
+
create_table "alchemy_contents", force: :cascade do |t|
|
21
|
+
t.string "name"
|
22
|
+
t.references "essence", null: false, polymorphic: true, index: { unique: true }
|
23
|
+
t.references "element", null: false
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
unless table_exists?("alchemy_elements")
|
28
|
+
create_table "alchemy_elements", force: :cascade do |t|
|
29
|
+
t.string "name"
|
30
|
+
t.integer "position"
|
31
|
+
t.references "page", null: false, index: false
|
32
|
+
t.boolean "public", default: true
|
33
|
+
t.boolean "folded", default: false
|
34
|
+
t.boolean "unique", default: false
|
35
|
+
t.timestamps null: false
|
36
|
+
t.references "creator"
|
37
|
+
t.references "updater"
|
38
|
+
t.references "parent_element", index: false
|
39
|
+
t.boolean "fixed", default: false, null: false
|
40
|
+
t.index ["fixed"], name: "index_alchemy_elements_on_fixed"
|
41
|
+
t.index ["page_id", "parent_element_id"], name: "index_alchemy_elements_on_page_id_and_parent_element_id"
|
42
|
+
t.index ["page_id", "position"], name: "index_elements_on_page_id_and_position"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
unless table_exists?("alchemy_elements_alchemy_pages")
|
47
|
+
create_table "alchemy_elements_alchemy_pages", id: false, force: :cascade do |t|
|
48
|
+
t.references "element"
|
49
|
+
t.references "page"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
unless table_exists?("alchemy_essence_booleans")
|
54
|
+
create_table "alchemy_essence_booleans", force: :cascade do |t|
|
55
|
+
t.boolean "value"
|
56
|
+
t.index ["value"], name: "index_alchemy_essence_booleans_on_value"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
unless table_exists?("alchemy_essence_dates")
|
61
|
+
create_table "alchemy_essence_dates", force: :cascade do |t|
|
62
|
+
t.datetime "date"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
unless table_exists?("alchemy_essence_files")
|
67
|
+
create_table "alchemy_essence_files", force: :cascade do |t|
|
68
|
+
t.references "attachment"
|
69
|
+
t.string "title"
|
70
|
+
t.string "css_class"
|
71
|
+
t.string "link_text"
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
unless table_exists?("alchemy_essence_htmls")
|
76
|
+
create_table "alchemy_essence_htmls", force: :cascade do |t|
|
77
|
+
t.text "source"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
unless table_exists?("alchemy_essence_links")
|
82
|
+
create_table "alchemy_essence_links", force: :cascade do |t|
|
83
|
+
t.string "link"
|
84
|
+
t.string "link_title"
|
85
|
+
t.string "link_target"
|
86
|
+
t.string "link_class_name"
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
unless table_exists?("alchemy_essence_pages")
|
91
|
+
create_table "alchemy_essence_pages", force: :cascade do |t|
|
92
|
+
t.references "page"
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
unless table_exists?("alchemy_essence_pictures")
|
97
|
+
create_table "alchemy_essence_pictures", force: :cascade do |t|
|
98
|
+
t.references "picture"
|
99
|
+
t.string "caption"
|
100
|
+
t.string "title"
|
101
|
+
t.string "alt_tag"
|
102
|
+
t.string "link"
|
103
|
+
t.string "link_class_name"
|
104
|
+
t.string "link_title"
|
105
|
+
t.string "css_class"
|
106
|
+
t.string "link_target"
|
107
|
+
t.string "crop_from"
|
108
|
+
t.string "crop_size"
|
109
|
+
t.string "render_size"
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
unless table_exists?("alchemy_essence_richtexts")
|
114
|
+
create_table "alchemy_essence_richtexts", force: :cascade do |t|
|
115
|
+
t.text "body"
|
116
|
+
t.text "stripped_body"
|
117
|
+
t.boolean "public"
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
unless table_exists?("alchemy_essence_selects")
|
122
|
+
create_table "alchemy_essence_selects", force: :cascade do |t|
|
123
|
+
t.string "value"
|
124
|
+
t.index ["value"], name: "index_alchemy_essence_selects_on_value"
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
unless table_exists?("alchemy_essence_texts")
|
129
|
+
create_table "alchemy_essence_texts", force: :cascade do |t|
|
130
|
+
t.text "body"
|
131
|
+
t.string "link"
|
132
|
+
t.string "link_title"
|
133
|
+
t.string "link_class_name"
|
134
|
+
t.boolean "public", default: false
|
135
|
+
t.string "link_target"
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
unless table_exists?("alchemy_folded_pages")
|
140
|
+
create_table "alchemy_folded_pages", force: :cascade do |t|
|
141
|
+
t.references "page", null: false, index: false
|
142
|
+
t.references "user", null: false, index: false
|
143
|
+
t.boolean "folded", default: false
|
144
|
+
t.index ["page_id", "user_id"], name: "index_alchemy_folded_pages_on_page_id_and_user_id", unique: true
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
unless table_exists?("alchemy_languages")
|
149
|
+
create_table "alchemy_languages", force: :cascade do |t|
|
150
|
+
t.string "name"
|
151
|
+
t.string "language_code"
|
152
|
+
t.string "frontpage_name"
|
153
|
+
t.string "page_layout", default: "intro"
|
154
|
+
t.boolean "public", default: false
|
155
|
+
t.timestamps null: false
|
156
|
+
t.references "creator"
|
157
|
+
t.references "updater"
|
158
|
+
t.boolean "default", default: false
|
159
|
+
t.string "country_code", default: "", null: false
|
160
|
+
t.references "site", null: false
|
161
|
+
t.string "locale"
|
162
|
+
t.index ["language_code", "country_code"], name: "index_alchemy_languages_on_language_code_and_country_code"
|
163
|
+
t.index ["language_code"], name: "index_alchemy_languages_on_language_code"
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
unless table_exists?("alchemy_legacy_page_urls")
|
168
|
+
create_table "alchemy_legacy_page_urls", force: :cascade do |t|
|
169
|
+
t.string "urlname", null: false
|
170
|
+
t.references "page", null: false
|
171
|
+
t.timestamps null: false
|
172
|
+
t.index ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname"
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
unless table_exists?("alchemy_nodes")
|
177
|
+
create_table "alchemy_nodes", force: :cascade do |t|
|
178
|
+
t.string "name"
|
179
|
+
t.string "title"
|
180
|
+
t.string "url"
|
181
|
+
t.boolean "nofollow", default: false, null: false
|
182
|
+
t.boolean "external", default: false, null: false
|
183
|
+
t.boolean "folded", default: false, null: false
|
184
|
+
t.references "parent"
|
185
|
+
t.integer "lft", null: false
|
186
|
+
t.integer "rgt", null: false
|
187
|
+
t.integer "depth", default: 0, null: false
|
188
|
+
t.references "page"
|
189
|
+
t.references "language", null: false
|
190
|
+
t.references "creator"
|
191
|
+
t.references "updater"
|
192
|
+
t.timestamps null: false
|
193
|
+
t.references "site", null: false
|
194
|
+
t.index ["lft"], name: "index_alchemy_nodes_on_lft"
|
195
|
+
t.index ["rgt"], name: "index_alchemy_nodes_on_rgt"
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
unless table_exists?("alchemy_pages")
|
200
|
+
create_table "alchemy_pages", force: :cascade do |t|
|
201
|
+
t.string "name"
|
202
|
+
t.string "urlname"
|
203
|
+
t.string "title"
|
204
|
+
t.string "language_code"
|
205
|
+
t.boolean "language_root"
|
206
|
+
t.string "page_layout"
|
207
|
+
t.text "meta_keywords"
|
208
|
+
t.text "meta_description"
|
209
|
+
t.integer "lft"
|
210
|
+
t.integer "rgt"
|
211
|
+
t.references "parent", index: false
|
212
|
+
t.integer "depth"
|
213
|
+
t.boolean "visible", default: false
|
214
|
+
t.integer "locked_by"
|
215
|
+
t.boolean "restricted", default: false
|
216
|
+
t.boolean "robot_index", default: true
|
217
|
+
t.boolean "robot_follow", default: true
|
218
|
+
t.boolean "sitemap", default: true
|
219
|
+
t.boolean "layoutpage", default: false
|
220
|
+
t.timestamps null: false
|
221
|
+
t.references "creator"
|
222
|
+
t.references "updater"
|
223
|
+
t.references "language"
|
224
|
+
t.datetime "published_at"
|
225
|
+
t.datetime "public_on"
|
226
|
+
t.datetime "public_until"
|
227
|
+
t.datetime "locked_at"
|
228
|
+
t.index ["locked_at", "locked_by"], name: "index_alchemy_pages_on_locked_at_and_locked_by"
|
229
|
+
t.index ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft"
|
230
|
+
t.index ["public_on", "public_until"], name: "index_alchemy_pages_on_public_on_and_public_until"
|
231
|
+
t.index ["rgt"], name: "index_alchemy_pages_on_rgt"
|
232
|
+
t.index ["urlname"], name: "index_pages_on_urlname"
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
unless table_exists?("alchemy_pictures")
|
237
|
+
create_table "alchemy_pictures", force: :cascade do |t|
|
238
|
+
t.string "name"
|
239
|
+
t.string "image_file_name"
|
240
|
+
t.integer "image_file_width"
|
241
|
+
t.integer "image_file_height"
|
242
|
+
t.timestamps null: false
|
243
|
+
t.references "creator"
|
244
|
+
t.references "updater"
|
245
|
+
t.string "upload_hash"
|
246
|
+
t.string "image_file_uid"
|
247
|
+
t.integer "image_file_size"
|
248
|
+
t.string "image_file_format"
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
252
|
+
unless table_exists?("alchemy_sites")
|
253
|
+
create_table "alchemy_sites", force: :cascade do |t|
|
254
|
+
t.string "host"
|
255
|
+
t.string "name"
|
256
|
+
t.timestamps null: false
|
257
|
+
t.boolean "public", default: false
|
258
|
+
t.text "aliases"
|
259
|
+
t.boolean "redirect_to_primary_host"
|
260
|
+
t.index ["host", "public"], name: "alchemy_sites_public_hosts_idx"
|
261
|
+
t.index ["host"], name: "index_alchemy_sites_on_host"
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
unless foreign_key_exists?("alchemy_contents", column: "element_id")
|
266
|
+
add_foreign_key "alchemy_contents", "alchemy_elements", column: "element_id", on_update: :cascade, on_delete: :cascade
|
267
|
+
end
|
268
|
+
|
269
|
+
unless foreign_key_exists?("alchemy_elements", column: "page_id")
|
270
|
+
add_foreign_key "alchemy_elements", "alchemy_pages", column: "page_id", on_update: :cascade, on_delete: :cascade
|
271
|
+
end
|
272
|
+
|
273
|
+
unless foreign_key_exists?("alchemy_essence_pages", column: "page_id")
|
274
|
+
add_foreign_key "alchemy_essence_pages", "alchemy_pages", column: "page_id"
|
275
|
+
end
|
276
|
+
|
277
|
+
unless foreign_key_exists?("alchemy_nodes", column: "language_id")
|
278
|
+
add_foreign_key "alchemy_nodes", "alchemy_languages", column: "language_id"
|
279
|
+
end
|
280
|
+
|
281
|
+
unless foreign_key_exists?("alchemy_nodes", column: "page_id")
|
282
|
+
add_foreign_key "alchemy_nodes", "alchemy_pages", column: "page_id", on_delete: :cascade
|
283
|
+
end
|
284
|
+
|
285
|
+
unless foreign_key_exists?("alchemy_nodes", column: "site_id")
|
286
|
+
add_foreign_key "alchemy_nodes", "alchemy_sites", column: "site_id", on_delete: :cascade
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
def down
|
291
|
+
drop_table "alchemy_attachments" if table_exists?("alchemy_attachments")
|
292
|
+
drop_table "alchemy_contents" if table_exists?("alchemy_contents")
|
293
|
+
drop_table "alchemy_elements" if table_exists?("alchemy_elements")
|
294
|
+
drop_table "alchemy_elements_alchemy_pages" if table_exists?("alchemy_elements_alchemy_pages")
|
295
|
+
drop_table "alchemy_essence_booleans" if table_exists?("alchemy_essence_booleans")
|
296
|
+
drop_table "alchemy_essence_dates" if table_exists?("alchemy_essence_dates")
|
297
|
+
drop_table "alchemy_essence_files" if table_exists?("alchemy_essence_files")
|
298
|
+
drop_table "alchemy_essence_htmls" if table_exists?("alchemy_essence_htmls")
|
299
|
+
drop_table "alchemy_essence_links" if table_exists?("alchemy_essence_links")
|
300
|
+
drop_table "alchemy_essence_pages" if table_exists?("alchemy_essence_pages")
|
301
|
+
drop_table "alchemy_essence_pictures" if table_exists?("alchemy_essence_pictures")
|
302
|
+
drop_table "alchemy_essence_richtexts" if table_exists?("alchemy_essence_richtexts")
|
303
|
+
drop_table "alchemy_essence_selects" if table_exists?("alchemy_essence_selects")
|
304
|
+
drop_table "alchemy_essence_texts" if table_exists?("alchemy_essence_texts")
|
305
|
+
drop_table "alchemy_folded_pages" if table_exists?("alchemy_folded_pages")
|
306
|
+
drop_table "alchemy_languages" if table_exists?("alchemy_languages")
|
307
|
+
drop_table "alchemy_legacy_page_urls" if table_exists?("alchemy_legacy_page_urls")
|
308
|
+
drop_table "alchemy_nodes" if table_exists?("alchemy_nodes")
|
309
|
+
drop_table "alchemy_pages" if table_exists?("alchemy_pages")
|
310
|
+
drop_table "alchemy_pictures" if table_exists?("alchemy_pictures")
|
311
|
+
drop_table "alchemy_sites" if table_exists?("alchemy_sites")
|
312
|
+
end
|
313
|
+
end
|