alchemy_cms 8.3.10 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +58 -10
- data/app/assets/builds/alchemy/admin/page-select.css +1 -1
- data/app/assets/builds/alchemy/admin/print.css +1 -1
- data/app/assets/builds/alchemy/admin/remote-select.css +1 -0
- data/app/assets/builds/alchemy/admin/tags-autocomplete.css +1 -0
- data/app/assets/builds/alchemy/admin.css +4 -4
- data/app/assets/builds/alchemy/alchemy_admin.min.js +1 -1
- data/app/assets/builds/alchemy/alchemy_admin.min.js.map +1 -1
- data/app/assets/builds/alchemy/dark-theme.css +1 -1
- data/app/assets/builds/alchemy/light-theme.css +1 -1
- data/app/assets/builds/alchemy/preview.min.js +1 -1
- data/app/assets/builds/alchemy/theme.css +1 -1
- data/app/assets/builds/alchemy/welcome.css +1 -1
- data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css +1 -1
- data/app/assets/builds/tinymce/skins/content/alchemy-dark/content.min.css +1 -1
- data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css +1 -1
- data/app/assets/builds/tinymce/skins/ui/alchemy-dark/skin.min.css +1 -1
- data/app/assets/images/alchemy/icons-sprite.svg +1 -1
- data/app/components/alchemy/admin/dashboard/widgets/greeting.html.erb +1 -1
- data/app/components/alchemy/admin/dashboard/widgets/news_reader.html.erb +38 -0
- data/app/components/alchemy/admin/dashboard/widgets/news_reader.rb +54 -0
- data/app/components/alchemy/admin/dashboard/widgets/online_users.html.erb +1 -1
- data/app/components/alchemy/admin/dashboard/widgets/recent_pages.html.erb +1 -1
- data/app/components/alchemy/admin/dashboard/widgets/system_info.html.erb +11 -3
- data/app/components/alchemy/admin/dashboard/widgets/system_info.rb +6 -1
- data/app/components/alchemy/admin/element_editor.html.erb +1 -1
- data/app/components/alchemy/admin/element_select.rb +30 -20
- data/app/components/alchemy/admin/element_status_indicators.html.erb +16 -0
- data/app/components/alchemy/admin/element_status_indicators.rb +31 -0
- data/app/components/alchemy/admin/link_dialog/external_tab.rb +2 -1
- data/app/components/alchemy/admin/main_navigation/entry.rb +61 -0
- data/app/components/alchemy/admin/main_navigation/menu.rb +21 -0
- data/app/components/alchemy/admin/main_navigation/sub_navigation.rb +31 -0
- data/app/components/alchemy/admin/page_node.html.erb +1 -1
- data/app/components/alchemy/admin/page_permitted_roles_select.html.erb +11 -0
- data/app/components/alchemy/admin/page_permitted_roles_select.rb +35 -0
- data/app/components/alchemy/admin/page_select.rb +18 -8
- data/app/components/alchemy/admin/preview_time_select.rb +1 -1
- data/app/components/alchemy/admin/toolbar_button.rb +43 -20
- data/app/components/alchemy/admin/uploader_button.rb +66 -0
- data/app/components/alchemy/ingredients/base_editor.rb +10 -1
- data/app/components/alchemy/ingredients/boolean_editor.rb +1 -0
- data/app/components/alchemy/ingredients/color_editor.rb +6 -3
- data/app/components/alchemy/ingredients/datetime_view.rb +1 -1
- data/app/components/alchemy/ingredients/picture_view.rb +2 -4
- data/app/components/alchemy/menubar.html.erb +157 -0
- data/app/components/alchemy/menubar.rb +15 -0
- data/app/controllers/alchemy/admin/attachments_controller.rb +12 -9
- data/app/controllers/alchemy/admin/base_controller.rb +34 -21
- data/app/controllers/alchemy/admin/dashboard_controller.rb +4 -0
- data/app/controllers/alchemy/admin/elements_controller.rb +4 -23
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/nodes_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pictures_controller.rb +6 -3
- data/app/controllers/alchemy/admin/resources_controller.rb +5 -5
- data/app/controllers/alchemy/admin/sites_controller.rb +1 -1
- data/app/controllers/alchemy/base_controller.rb +24 -16
- data/app/controllers/alchemy/pages_controller.rb +29 -8
- data/app/controllers/alchemy/sitemap_controller.rb +58 -0
- data/app/controllers/concerns/alchemy/admin/csp_protection.rb +43 -0
- data/app/controllers/concerns/alchemy/admin/current_language.rb +1 -1
- data/app/controllers/concerns/alchemy/admin/resource_filter.rb +3 -1
- data/{lib → app/controllers/concerns}/alchemy/controller_actions.rb +13 -0
- data/app/controllers/concerns/alchemy/legacy_page_redirects.rb +4 -4
- data/app/helpers/alchemy/admin/base_helper.rb +4 -1
- data/app/helpers/alchemy/admin/form_helper.rb +0 -2
- data/app/helpers/alchemy/admin/navigation_helper.rb +10 -181
- data/app/helpers/alchemy/elements_block_helper.rb +14 -0
- data/app/helpers/alchemy/resources_helper.rb +15 -1
- data/app/javascript/alchemy_admin/components/attachment_select.js +11 -20
- data/app/javascript/alchemy_admin/components/auto_submit.js +2 -4
- data/app/javascript/alchemy_admin/components/button.js +0 -6
- data/app/javascript/alchemy_admin/components/clear_schedule_button.js +21 -0
- data/app/javascript/alchemy_admin/components/color_select.js +50 -45
- data/app/javascript/alchemy_admin/components/conditional_field.js +50 -0
- data/app/javascript/alchemy_admin/components/dirty_guard.js +77 -0
- data/app/javascript/alchemy_admin/components/dom_id_select.js +17 -10
- data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +7 -2
- data/app/javascript/alchemy_admin/components/element_editor.js +29 -56
- data/app/javascript/alchemy_admin/components/element_select.js +26 -66
- data/app/javascript/alchemy_admin/components/icon.js +9 -4
- data/app/javascript/alchemy_admin/{image_cropper.js → components/image_cropper.js} +39 -53
- data/app/javascript/alchemy_admin/components/image_overlay_link.js +14 -0
- data/app/javascript/alchemy_admin/components/index.js +12 -1
- data/app/javascript/alchemy_admin/components/main_navi_entry.js +75 -0
- data/app/javascript/alchemy_admin/components/menu_node.js +73 -0
- data/app/javascript/alchemy_admin/components/news_reader.js +109 -0
- data/app/javascript/alchemy_admin/components/node_folder.js +36 -0
- data/app/javascript/alchemy_admin/components/node_form.js +34 -0
- data/app/javascript/alchemy_admin/components/node_select.js +25 -30
- data/app/javascript/alchemy_admin/components/node_tree.js +56 -0
- data/app/javascript/alchemy_admin/components/page_node.js +2 -1
- data/app/javascript/alchemy_admin/components/page_select.js +16 -34
- data/app/javascript/alchemy_admin/components/picture_archive.js +92 -0
- data/app/javascript/alchemy_admin/components/picture_editor.js +2 -1
- data/app/javascript/alchemy_admin/components/preview_window.js +11 -3
- data/app/javascript/alchemy_admin/components/remote_select.js +461 -81
- data/app/javascript/alchemy_admin/components/select.js +26 -88
- data/app/javascript/alchemy_admin/components/sitemap.js +2 -1
- data/app/javascript/alchemy_admin/components/sortable_elements.js +2 -1
- data/app/javascript/alchemy_admin/components/tags_autocomplete.js +63 -48
- data/app/javascript/alchemy_admin/components/tinymce.js +2 -1
- data/app/javascript/alchemy_admin/components/uploader/file_upload.js +3 -2
- data/app/javascript/alchemy_admin/components/uploader.js +19 -3
- data/app/javascript/alchemy_admin/confirm_dialog.js +7 -1
- data/app/javascript/alchemy_admin/dialog.js +182 -110
- data/app/javascript/alchemy_admin/hotkeys.js +0 -5
- data/app/javascript/alchemy_admin/i18n.js +3 -9
- data/app/javascript/alchemy_admin/image_overlay.js +58 -42
- data/app/javascript/alchemy_admin/initializer.js +2 -2
- data/app/javascript/alchemy_admin/link_dialog.js +15 -2
- data/app/javascript/alchemy_admin/routes.js +18 -0
- data/app/javascript/alchemy_admin/turbo_stream_actions.js +88 -0
- data/app/javascript/alchemy_admin/utils/ajax.js +14 -3
- data/app/javascript/alchemy_admin/utils/events.js +5 -0
- data/app/javascript/alchemy_admin/utils/json_script.js +12 -0
- data/app/javascript/alchemy_admin/utils/tom_select.js +171 -0
- data/app/javascript/alchemy_admin.js +2 -19
- data/app/javascript/preview.js +131 -113
- data/app/jobs/alchemy/invalidate_elements_cache_job.rb +1 -1
- data/app/models/alchemy/admin/content_security_policy.rb +143 -0
- data/app/models/alchemy/admin/filters/base.rb +7 -0
- data/app/models/alchemy/admin/filters/datepicker.rb +1 -1
- data/app/models/alchemy/admin/filters/select.rb +20 -7
- data/app/models/alchemy/attachment.rb +14 -7
- data/app/models/alchemy/cache_control.rb +104 -0
- data/app/models/alchemy/current.rb +1 -1
- data/app/models/alchemy/eager_loading.rb +0 -2
- data/app/models/alchemy/element.rb +23 -8
- data/app/models/alchemy/element_definition.rb +1 -0
- data/app/models/alchemy/elements_repository.rb +11 -0
- data/app/models/alchemy/folded_page.rb +5 -1
- data/app/models/alchemy/ingredient.rb +26 -0
- data/app/models/alchemy/ingredients/datetime.rb +1 -1
- data/app/models/alchemy/ingredients/link.rb +2 -0
- data/app/models/alchemy/ingredients/picture.rb +3 -0
- data/app/models/alchemy/ingredients/text.rb +2 -0
- data/app/models/alchemy/language.rb +19 -7
- data/app/models/alchemy/legacy_page_url.rb +6 -1
- data/app/models/alchemy/node.rb +51 -0
- data/app/models/alchemy/page/page_natures.rb +41 -8
- data/app/models/alchemy/page/page_scopes.rb +23 -0
- data/app/models/alchemy/page/sitemap_cache_key.rb +56 -0
- data/app/models/alchemy/page.rb +88 -32
- data/app/models/alchemy/page_definition.rb +1 -1
- data/app/models/alchemy/page_mutex.rb +16 -0
- data/app/models/alchemy/page_version.rb +24 -1
- data/app/models/alchemy/permissions.rb +6 -5
- data/app/models/alchemy/picture.rb +15 -7
- data/app/models/alchemy/picture_description.rb +22 -0
- data/app/models/alchemy/picture_thumb.rb +18 -0
- data/app/models/alchemy/publishable/timestamp_resolver.rb +70 -0
- data/app/models/alchemy/resource.rb +1 -1
- data/app/models/alchemy/safe_url_validator.rb +34 -0
- data/app/models/alchemy/site.rb +8 -3
- data/app/models/alchemy/storage_adapter/active_storage/preprocessor.rb +7 -3
- data/app/models/alchemy/storage_adapter/active_storage.rb +4 -1
- data/app/models/alchemy/tag.rb +10 -4
- data/{lib → app/models/concerns}/alchemy/filetypes.rb +5 -0
- data/app/models/concerns/alchemy/picture_thumbnails.rb +61 -6
- data/app/models/concerns/alchemy/publishable.rb +14 -29
- data/app/models/concerns/alchemy/taggable.rb +92 -0
- data/app/models/concerns/alchemy/user_methods.rb +95 -0
- data/app/services/alchemy/duplicate_element.rb +5 -2
- data/app/services/alchemy/element_preloader.rb +1 -2
- data/app/stylesheets/alchemy/_custom-properties.scss +1 -0
- data/app/stylesheets/alchemy/_extends.scss +0 -8
- data/app/stylesheets/alchemy/_themes.scss +10 -9
- data/app/stylesheets/alchemy/admin/_empty-state.scss +29 -0
- data/app/stylesheets/alchemy/admin/_help.scss +10 -0
- data/app/stylesheets/alchemy/admin/_tom-select.scss +104 -15
- data/app/stylesheets/alchemy/admin/archive.scss +56 -11
- data/app/stylesheets/alchemy/admin/base.scss +4 -5
- data/app/stylesheets/alchemy/admin/buttons.scss +12 -1
- data/app/stylesheets/alchemy/admin/dashboard.scss +150 -20
- data/app/stylesheets/alchemy/admin/dialogs.scss +27 -36
- data/app/stylesheets/alchemy/admin/element-select.scss +1 -1
- data/app/stylesheets/alchemy/admin/elements.scss +8 -24
- data/app/stylesheets/alchemy/admin/flash.scss +2 -1
- data/app/stylesheets/alchemy/admin/forms.scss +60 -24
- data/app/stylesheets/alchemy/admin/frame.scss +40 -4
- data/app/stylesheets/alchemy/admin/image_library.scss +9 -12
- data/app/stylesheets/alchemy/admin/navigation.scss +17 -14
- data/app/stylesheets/alchemy/admin/node-select.scss +13 -37
- data/app/stylesheets/alchemy/admin/nodes.scss +1 -1
- data/app/stylesheets/alchemy/admin/page-select.scss +6 -97
- data/app/stylesheets/alchemy/admin/print.scss +0 -4
- data/app/stylesheets/alchemy/admin/remote-select.scss +170 -0
- data/app/stylesheets/alchemy/admin/search.scss +2 -3
- data/app/stylesheets/alchemy/admin/selects.scss +1 -294
- data/app/stylesheets/alchemy/admin/sitemap.scss +2 -1
- data/app/stylesheets/alchemy/admin/tables.scss +7 -1
- data/app/stylesheets/alchemy/admin/tags-autocomplete.scss +17 -0
- data/app/stylesheets/alchemy/admin/tags.scss +0 -13
- data/app/stylesheets/alchemy/admin/toolbar.scss +9 -6
- data/app/stylesheets/alchemy/admin/upload.scss +61 -1
- data/app/stylesheets/alchemy/admin.scss +4 -1
- data/app/stylesheets/tinymce/skins/ui/alchemy/skin.scss +19 -0
- data/app/stylesheets/tinymce/skins/ui/alchemy-dark/skin.scss +19 -0
- data/app/types/alchemy/cache_control_type.rb +84 -0
- data/app/views/alchemy/_edit_mode.html.erb +1 -1
- data/app/views/alchemy/_menubar.html.erb +2 -154
- data/app/views/alchemy/_preview_mode_code.html.erb +0 -3
- data/app/views/alchemy/admin/_left_menu.html.erb +18 -5
- data/app/views/alchemy/admin/_top_menu.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +5 -4
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +3 -3
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +71 -83
- data/app/views/alchemy/admin/attachments/assign.turbo_stream.erb +8 -0
- data/app/views/alchemy/admin/attachments/index.html.erb +32 -7
- data/app/views/alchemy/admin/clipboard/insert.turbo_stream.erb +1 -1
- data/app/views/alchemy/admin/crop.html.erb +20 -20
- data/app/views/alchemy/admin/dashboard/_footer.html.erb +0 -3
- data/app/views/alchemy/admin/dashboard/_top.html.erb +1 -0
- data/app/views/alchemy/admin/dashboard/help.html.erb +84 -57
- data/app/views/alchemy/admin/dashboard/license.html.erb +6 -0
- data/app/views/alchemy/admin/elements/_footer.html.erb +0 -1
- data/app/views/alchemy/admin/elements/_form.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_header.html.erb +2 -19
- data/app/views/alchemy/admin/elements/_preview_text_quote.html.erb +3 -0
- data/app/views/alchemy/admin/elements/_schedule.html.erb +7 -7
- data/app/views/alchemy/admin/elements/_toolbar.html.erb +1 -1
- data/app/views/alchemy/admin/elements/create.turbo_stream.erb +1 -1
- data/app/views/alchemy/admin/elements/index.html.erb +1 -1
- data/app/views/alchemy/admin/elements/publish.turbo_stream.erb +2 -2
- data/app/views/alchemy/admin/elements/update.turbo_stream.erb +31 -0
- data/app/views/alchemy/admin/ingredients/update.turbo_stream.erb +6 -3
- data/app/views/alchemy/admin/languages/_table.html.erb +0 -2
- data/app/views/alchemy/admin/languages/index.html.erb +25 -29
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -3
- data/app/views/alchemy/admin/layoutpages/edit.html.erb +1 -1
- data/app/views/alchemy/admin/layoutpages/index.html.erb +26 -7
- data/app/views/alchemy/admin/nodes/_form.html.erb +3 -21
- data/app/views/alchemy/admin/nodes/_node.html.erb +93 -88
- data/app/views/alchemy/admin/nodes/index.html.erb +15 -23
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +2 -6
- data/app/views/alchemy/admin/pages/_form.html.erb +2 -1
- data/app/views/alchemy/admin/pages/_publication_fields.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_table.html.erb +2 -4
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +2 -1
- data/app/views/alchemy/admin/pages/edit.html.erb +10 -21
- data/app/views/alchemy/admin/pages/flush.turbo_stream.erb +1 -1
- data/app/views/alchemy/admin/pages/index.html.erb +26 -31
- data/app/views/alchemy/admin/pages/info.html.erb +2 -2
- data/app/views/alchemy/admin/pages/update.turbo_stream.erb +2 -2
- data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_routes.html.erb +24 -48
- data/app/views/alchemy/admin/pictures/_archive.html.erb +3 -17
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +5 -3
- data/app/views/alchemy/admin/pictures/_form.html.erb +0 -1
- data/app/views/alchemy/admin/pictures/_infos.html.erb +5 -1
- data/app/views/alchemy/admin/pictures/_picture.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +3 -4
- data/app/views/alchemy/admin/pictures/assign.turbo_stream.erb +7 -0
- data/app/views/alchemy/admin/pictures/index.html.erb +38 -30
- data/app/views/alchemy/admin/pictures/show.html.erb +41 -41
- data/app/views/alchemy/admin/resources/_empty_state.html.erb +27 -0
- data/app/views/alchemy/admin/resources/_pagination.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_resource_table.html.erb +0 -2
- data/app/views/alchemy/admin/resources/_resource_usage_info.html.erb +3 -2
- data/app/views/alchemy/admin/resources/index.html.erb +32 -13
- data/app/views/alchemy/admin/sites/index.html.erb +24 -22
- data/app/views/alchemy/admin/styleguide/index.html.erb +35 -12
- data/app/views/alchemy/admin/tags/index.html.erb +27 -25
- data/app/views/alchemy/admin/tinymce/_setup.html.erb +6 -8
- data/app/views/alchemy/admin/translations/_en.js +3 -0
- data/app/views/alchemy/admin/uploader/_button.html.erb +11 -17
- data/app/views/alchemy/admin/uploader/_setup.html.erb +3 -3
- data/app/views/alchemy/pages/sitemap.xml.erb +2 -0
- data/app/views/kaminari/alchemy/_first_page.html.erb +1 -2
- data/app/views/kaminari/alchemy/_gap.html.erb +0 -1
- data/app/views/kaminari/alchemy/_last_page.html.erb +1 -2
- data/app/views/kaminari/alchemy/_next_page.html.erb +1 -2
- data/app/views/kaminari/alchemy/_page.html.erb +1 -2
- data/app/views/kaminari/alchemy/_paginator.html.erb +0 -1
- data/app/views/kaminari/alchemy/_prev_page.html.erb +1 -2
- data/app/views/layouts/alchemy/admin/dialog.html.erb +3 -0
- data/app/views/layouts/alchemy/admin.html.erb +5 -6
- data/config/brakeman.ignore +23 -1
- data/config/importmap.rb +10 -8
- data/config/initializers/dragonfly.rb +21 -17
- data/config/locales/alchemy.en.yml +53 -12
- data/config/routes.rb +3 -3
- data/db/migrate/20260727120000_add_permitted_roles_to_alchemy_pages.rb +23 -0
- data/db/migrate/20260820120000_add_cached_tag_list_to_taggables.rb +57 -0
- data/lib/alchemy/configuration/number_option.rb +13 -0
- data/lib/alchemy/configuration/proc_option.rb +13 -0
- data/lib/alchemy/configuration.rb +2 -0
- data/lib/alchemy/configurations/admin_components.rb +30 -0
- data/lib/alchemy/configurations/format_matchers.rb +7 -1
- data/lib/alchemy/configurations/main.rb +103 -4
- data/lib/alchemy/configurations/menu.rb +91 -0
- data/lib/alchemy/configurations/menu_item.rb +123 -0
- data/lib/alchemy/configurations/sitemap.rb +1 -0
- data/lib/alchemy/configurations/uploader.rb +15 -1
- data/lib/alchemy/engine.rb +0 -6
- data/lib/alchemy/i18n.rb +26 -0
- data/lib/alchemy/modules.rb +52 -50
- data/lib/alchemy/tasks/generate_thumbnails.rb +99 -0
- data/lib/alchemy/tasks/tidy.rb +1 -1
- data/lib/alchemy/test_support/capybara_helpers.rb +48 -37
- data/lib/alchemy/test_support/current_language_shared_examples.rb +1 -1
- data/lib/alchemy/test_support/factories/dummy_user_factory.rb +4 -1
- data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +132 -0
- data/lib/alchemy/test_support/shared_ingredient_examples.rb +52 -0
- data/lib/alchemy/test_support/shared_publishable_examples.rb +39 -4
- data/lib/alchemy/upgrader/eight_four.rb +237 -0
- data/lib/alchemy/upgrader/register_module_rewriter.rb +177 -0
- data/lib/alchemy/upgrader.rb +2 -1
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy.rb +0 -1
- data/lib/alchemy_cms.rb +0 -13
- data/lib/generators/alchemy/elements/templates/view.html.erb +1 -1
- data/lib/generators/alchemy/elements/templates/view.html.haml +1 -1
- data/lib/generators/alchemy/elements/templates/view.html.slim +1 -1
- data/lib/generators/alchemy/install/install_generator.rb +2 -13
- data/lib/generators/alchemy/install/templates/alchemy.rb.tt +24 -9
- data/lib/generators/alchemy/module/module_generator.rb +1 -0
- data/lib/generators/alchemy/module/templates/ability.rb.tt +1 -1
- data/lib/generators/alchemy/module/templates/module_config.rb.tt +16 -18
- data/lib/generators/alchemy/user_columns_migration/templates/migration.rb.tt +19 -0
- data/lib/generators/alchemy/user_columns_migration/user_columns_migration_generator.rb +30 -0
- data/lib/tasks/alchemy/thumbnails.rake +16 -29
- data/lib/tasks/alchemy/upgrade.rake +45 -3
- data/vendor/javascript/cropperjs.min.js +3 -3
- data/vendor/javascript/floating-ui.min.js +1 -1
- data/vendor/javascript/tinymce.min.js +5 -5
- data/vendor/javascript/tom-select.min.js +1 -1
- metadata +85 -65
- data/app/javascript/alchemy_admin/components/action.js +0 -50
- data/app/javascript/alchemy_admin/dirty.js +0 -55
- data/app/javascript/alchemy_admin/node_tree.js +0 -82
- data/app/javascript/alchemy_admin/picture_selector.js +0 -67
- data/app/javascript/alchemy_admin/templates/compiled.js +0 -1
- data/app/javascript/alchemy_admin/templates/node_folder.hbs +0 -3
- data/app/stylesheets/alchemy/admin/attachment-select.scss +0 -19
- data/app/views/alchemy/admin/_main_navi.html.erb +0 -6
- data/app/views/alchemy/admin/attachments/assign.js.erb +0 -15
- data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +0 -30
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +0 -20
- data/app/views/alchemy/admin/partials/_sub_navigation.html.erb +0 -11
- data/app/views/alchemy/admin/pictures/assign.js.erb +0 -13
- data/app/views/alchemy/base/error_notice.js.erb +0 -1
- data/app/views/alchemy/base/permission_denied.js.erb +0 -3
- data/app/views/alchemy/base/redirect.js.erb +0 -11
- data/config/alchemy/config.yml +0 -217
- data/config/alchemy/modules.yml +0 -82
- data/config/initializers/rails_live_reload.rb +0 -13
- data/lib/alchemy/dev_support/live_reload_watcher.rb +0 -5
- data/lib/alchemy/taggable.rb +0 -49
- data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +0 -34
- data/vendor/assets/stylesheets/alchemy_admin/select2.css +0 -1
- data/vendor/javascript/handlebars.min.js +0 -29
- data/vendor/javascript/jquery.min.js +0 -2
- data/vendor/javascript/rails-ujs.min.js +0 -1
- data/vendor/javascript/select2.min.js +0 -23
- /data/{lib → app/controllers/concerns}/alchemy/ability_helper.rb +0 -0
- /data/{lib → app/controllers/concerns}/alchemy/admin/locale.rb +0 -0
- /data/{lib → app/controllers/concerns}/alchemy/admin/preview_time.rb +0 -0
- /data/{lib → app/controllers/concerns}/alchemy/admin/timezone.rb +0 -0
- /data/{lib → app/controllers/concerns}/alchemy/configuration_methods.rb +0 -0
- /data/{lib → app/models}/alchemy/admin/preview_url.rb +0 -0
- /data/{lib → app/models/concerns}/alchemy/hints.rb +0 -0
- /data/{lib → app/models/concerns}/alchemy/name_conversions.rb +0 -0
- /data/{lib → app/services}/alchemy/elements_finder.rb +0 -0
|
@@ -7,25 +7,25 @@
|
|
|
7
7
|
<%= render_message do %>
|
|
8
8
|
<%= simple_format Alchemy.t(:explain_cropping) %>
|
|
9
9
|
<% end %>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
<% if @settings.present? %>
|
|
11
|
+
<alchemy-image-cropper
|
|
12
|
+
default-box="<%= @settings[:default_box].to_json %>"
|
|
13
|
+
crop-from-field-id="<%= params[:crop_from_form_field_id] %>"
|
|
14
|
+
crop-size-field-id="<%= params[:crop_size_form_field_id] %>"
|
|
15
|
+
element-id="<%= @element.id %>"
|
|
16
|
+
<% if @settings[:ratio] %>ratio="<%= @settings[:ratio] %>"<% end %>
|
|
17
|
+
>
|
|
18
|
+
<div class="thumbnail_background">
|
|
19
|
+
<%= image_tag @picture.url(flatten: true), alt: @picture.name %>
|
|
20
|
+
</div>
|
|
21
|
+
<form>
|
|
22
|
+
<%= button_tag Alchemy.t(:apply), type: 'submit' %>
|
|
23
|
+
<%= button_tag Alchemy.t('Reset Imagemask'), class: 'reset_mask secondary', type: 'reset' %>
|
|
24
|
+
</form>
|
|
25
|
+
</alchemy-image-cropper>
|
|
26
|
+
<% else %>
|
|
27
|
+
<%= content_tag "alchemy-picture-thumbnail", nil,
|
|
28
|
+
src: @picture.url(flatten: true) %>
|
|
29
|
+
<% end %>
|
|
17
30
|
</div>
|
|
18
31
|
<% end %>
|
|
19
|
-
<% if @settings %>
|
|
20
|
-
<script type="module">
|
|
21
|
-
import { ImageCropper } from "alchemy_admin/image_cropper";
|
|
22
|
-
|
|
23
|
-
const image = document.getElementById("imageToCrop")?.querySelector("img");
|
|
24
|
-
|
|
25
|
-
new ImageCropper(image, <%== @settings.merge(
|
|
26
|
-
crop_from_form_field_id: params[:crop_from_form_field_id],
|
|
27
|
-
crop_size_form_field_id: params[:crop_size_form_field_id],
|
|
28
|
-
element_id: @element.id
|
|
29
|
-
).to_json %>);
|
|
30
|
-
</script>
|
|
31
|
-
<% end %>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<div class="top-row">
|
|
2
2
|
<%= render Alchemy::Admin::Dashboard::Widgets::Greeting.new(user: current_alchemy_user) %>
|
|
3
|
+
<%= render Alchemy::Admin::Dashboard::Widget.new(id: "NewsReader", style: "stat") %>
|
|
3
4
|
<%= render Alchemy::Admin::Dashboard::Widgets::SystemInfo.new %>
|
|
4
5
|
</div>
|
|
@@ -1,57 +1,84 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
<div class="help-container">
|
|
2
|
+
<div>
|
|
3
|
+
<h2><%= Alchemy.t('Global shortcuts') %></h2>
|
|
4
|
+
<ul class="shortcuts">
|
|
5
|
+
<li>
|
|
6
|
+
<kbd>?</kbd>
|
|
7
|
+
<%= Alchemy.t('Open help window', scope: 'help.shortcuts') %>
|
|
8
|
+
</li>
|
|
9
|
+
<li>
|
|
10
|
+
<kbd>esc</kbd>
|
|
11
|
+
<%= Alchemy.t('Close current dialog', scope: 'help.shortcuts') %>
|
|
12
|
+
</li>
|
|
13
|
+
<li>
|
|
14
|
+
<kbd>alt</kbd><kbd>q</kbd>
|
|
15
|
+
<%= Alchemy.t('Open logout dialog', scope: 'help.shortcuts') %>
|
|
16
|
+
</li>
|
|
17
|
+
<li>
|
|
18
|
+
<kbd>alt</kbd><kbd>f</kbd>
|
|
19
|
+
<%= Alchemy.t('Focus search field', scope: 'help.shortcuts') %>
|
|
20
|
+
</li>
|
|
21
|
+
<li>
|
|
22
|
+
<kbd>alt</kbd><kbd>n</kbd>
|
|
23
|
+
<%= Alchemy.t('Create a new record', scope: 'help.shortcuts') %>
|
|
24
|
+
</li>
|
|
25
|
+
</ul>
|
|
26
|
+
</div>
|
|
27
|
+
<div>
|
|
28
|
+
<h2><%= Alchemy.t('Page edit shortcuts') %></h2>
|
|
29
|
+
<ul class="shortcuts">
|
|
30
|
+
<li>
|
|
31
|
+
<kbd>alt</kbd><kbd>i</kbd>
|
|
32
|
+
<%= Alchemy.t('Show page infos', scope: 'help.shortcuts') %>
|
|
33
|
+
</li>
|
|
34
|
+
<li>
|
|
35
|
+
<kbd>alt</kbd><kbd>n</kbd>
|
|
36
|
+
<%= Alchemy.t('Create new element', scope: 'help.shortcuts') %>
|
|
37
|
+
</li>
|
|
38
|
+
<li>
|
|
39
|
+
<kbd>alt</kbd><kbd>e</kbd>
|
|
40
|
+
<%= Alchemy.t('Edit page properties', scope: 'help.shortcuts') %>
|
|
41
|
+
</li>
|
|
42
|
+
<li>
|
|
43
|
+
<kbd>alt</kbd><kbd>r</kbd>
|
|
44
|
+
<%= Alchemy.t('Reload the preview', scope: 'help.shortcuts') %>
|
|
45
|
+
</li>
|
|
46
|
+
<li>
|
|
47
|
+
<kbd>alt</kbd><kbd>x</kbd>
|
|
48
|
+
<%= Alchemy.t('Leave the page', scope: 'help.shortcuts') %>
|
|
49
|
+
</li>
|
|
50
|
+
</ul>
|
|
51
|
+
</div>
|
|
52
|
+
<div>
|
|
53
|
+
<h2><%= Alchemy.t('Library shortcuts') %></h2>
|
|
54
|
+
<ul class="shortcuts">
|
|
55
|
+
<li>
|
|
56
|
+
<kbd>alt</kbd><kbd>n</kbd>
|
|
57
|
+
<%= Alchemy.t('Open upload form', scope: 'help.shortcuts') %>
|
|
58
|
+
</li>
|
|
59
|
+
<li>
|
|
60
|
+
<kbd>alt</kbd><kbd>a</kbd>
|
|
61
|
+
<%= Alchemy.t('Select all pictures', scope: 'help.shortcuts') %>
|
|
62
|
+
</li>
|
|
63
|
+
</ul>
|
|
64
|
+
</div>
|
|
65
|
+
<div>
|
|
66
|
+
<h2><%= Alchemy.t("help.resources") %></h2>
|
|
67
|
+
<div class="help-resource-links">
|
|
68
|
+
<a class="button ghost with_icon" href="https://guides.alchemy-cms.com" target="_blank" rel="noopener">
|
|
69
|
+
<alchemy-icon name="external-link"></alchemy-icon>
|
|
70
|
+
<%= Alchemy.t("help.resource_links.guidelines") %>
|
|
71
|
+
</a>
|
|
72
|
+
<a class="button ghost with_icon" href="https://www.alchemy-cms.com" target="_blank" rel="noopener">
|
|
73
|
+
<alchemy-icon name="external-link"></alchemy-icon>
|
|
74
|
+
<%= Alchemy.t("help.resource_links.homepage") %>
|
|
75
|
+
</a>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<form method="dialog">
|
|
81
|
+
<div class="submit">
|
|
82
|
+
<button type="submit"><%= Alchemy.t(:close) %></button>
|
|
83
|
+
</div>
|
|
84
|
+
</form>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<% end %>
|
|
5
5
|
<%- else -%>
|
|
6
6
|
<%= turbo_frame_tag @element do %>
|
|
7
|
-
<%= alchemy_form_for [:admin, @element]
|
|
7
|
+
<%= alchemy_form_for [:admin, @element] do |form| %>
|
|
8
8
|
<%= form.hidden_field :page_version_id %>
|
|
9
9
|
<%= form.input :name, label: Alchemy.t(:element_of_type) do %>
|
|
10
10
|
<%= render Alchemy::Admin::ElementSelect.new(
|
|
@@ -14,26 +14,9 @@
|
|
|
14
14
|
<span class="element-title">
|
|
15
15
|
<span class="preview_text_element_name"><%= element.display_name %></span>
|
|
16
16
|
<%= render_hint_for(element, size: "1x", fixed_width: false) %>
|
|
17
|
-
|
|
18
|
-
<%= sanitize(element.preview_text.presence || ' ') %>
|
|
19
|
-
</span>
|
|
20
|
-
</span>
|
|
21
|
-
<span class="element-status-icons">
|
|
22
|
-
<% unless element.public? || element.scheduled? %>
|
|
23
|
-
<%= render_icon("cloud-off", size: "1x") %>
|
|
24
|
-
<span class="element-hidden-label">
|
|
25
|
-
<%= Alchemy.t(:element_hidden) %>
|
|
26
|
-
</span>
|
|
27
|
-
<% end %>
|
|
28
|
-
<sl-tooltip
|
|
29
|
-
class="element-scheduled-icon"
|
|
30
|
-
content="<%= Alchemy.t(element.public_on&.future? ? :public_on : :public_until, scope: :element_scheduled, public_on: element.public_on && l(element.public_on, format: :"alchemy.default"), public_until: element.public_until && l(element.public_until, format: :"alchemy.default")) %>"
|
|
31
|
-
<%= "hidden" if !element.scheduled? %>
|
|
32
|
-
>
|
|
33
|
-
<%= render_icon("calendar-schedule", size: "1x") %>
|
|
34
|
-
<%= element.public_on&.future? ? element.public_on && l(element.public_on, format: :"alchemy.short_datetime") : element.public_until && l(element.public_until, format: :"alchemy.short_datetime") %>
|
|
35
|
-
</sl-tooltip>
|
|
17
|
+
<%= render "alchemy/admin/elements/preview_text_quote", element: element %>
|
|
36
18
|
</span>
|
|
19
|
+
<%= render Alchemy.config.admin_components.element_status_indicators.new(element:) %>
|
|
37
20
|
<sl-tooltip content="<%= Alchemy.t(element.folded? ? :show_element_content : :hide_element_content) %>">
|
|
38
21
|
<%= button_tag(class: "element-toggle") do %>
|
|
39
22
|
<% if element.compact? %>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p><%= sanitize t(".visibility_status.public_html") %></p>
|
|
10
10
|
<% if element.scheduled? && element.public_until.present? %>
|
|
11
11
|
<%= sanitize t(".public_scheduled_html",
|
|
12
|
-
public_until: l(element.public_until, format: :"alchemy.element_date")) %>
|
|
12
|
+
public_until: Alchemy.l(element.public_until, format: :"alchemy.element_date")) %>
|
|
13
13
|
<% else %>
|
|
14
14
|
<%= t(".public_no_schedule") %>
|
|
15
15
|
<% end %>
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
<% if element.scheduled? %>
|
|
19
19
|
<% if element.public_until.present? %>
|
|
20
20
|
<%= sanitize t(".hidden_window_html",
|
|
21
|
-
public_on:
|
|
22
|
-
public_until: l(element.public_until, format: :"alchemy.element_date")) %>
|
|
21
|
+
public_on: Alchemy.l(element.public_on, format: :"alchemy.element_date"),
|
|
22
|
+
public_until: Alchemy.l(element.public_until, format: :"alchemy.element_date")) %>
|
|
23
23
|
<% else %>
|
|
24
24
|
<%= sanitize t(".hidden_scheduled_html",
|
|
25
|
-
public_on:
|
|
25
|
+
public_on: Alchemy.l(element.public_on, format: :"alchemy.element_date")) %>
|
|
26
26
|
<% end %>
|
|
27
27
|
<% else %>
|
|
28
28
|
<%= t(".hidden_no_schedule") %>
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
</alchemy-message>
|
|
32
32
|
<% end %>
|
|
33
33
|
|
|
34
|
-
<%= alchemy_form_for [:publish, :admin, element],
|
|
34
|
+
<%= alchemy_form_for [:publish, :admin, element], data: {turbo: true}, class: "full_width" do |f| %>
|
|
35
35
|
<%= render "alchemy/admin/elements/schedule_fields", element:, form: f %>
|
|
36
36
|
<div class="submit">
|
|
37
37
|
<button
|
|
38
38
|
type="button"
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
is="alchemy-clear-schedule-button"
|
|
40
|
+
class="secondary">
|
|
41
41
|
<%= Alchemy.t(:clear_schedule) %>
|
|
42
42
|
</button>
|
|
43
43
|
<button type="submit">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%= turbo_frame_tag "alchemy_elements_window" do %>
|
|
2
2
|
<alchemy-elements-window-handle></alchemy-elements-window-handle>
|
|
3
3
|
<alchemy-elements-window>
|
|
4
|
-
<div class="elements-window-toolbar">
|
|
4
|
+
<div class="elements-window-toolbar toolbar">
|
|
5
5
|
<%= render Alchemy::Admin::ToolbarButton.new(
|
|
6
6
|
url: alchemy.new_admin_element_path(page_version_id: @page_version.id),
|
|
7
7
|
icon: :add,
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<%= Alchemy.t(:successfully_scheduled_element) %>
|
|
8
8
|
</alchemy-growl>
|
|
9
9
|
<% end %>
|
|
10
|
-
<
|
|
11
|
-
<
|
|
10
|
+
<turbo-stream action="close_current_dialog"></turbo-stream>
|
|
11
|
+
<turbo-stream action="reload_preview"></turbo-stream>
|
|
12
12
|
<%= turbo_stream.replace "element_#{@element.id}" do %>
|
|
13
13
|
<%= render Alchemy::Admin::ElementEditor.new(
|
|
14
14
|
element: @element
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<% unless @element_validated %>
|
|
2
|
+
<alchemy-growl type="warn"><%= @warning %></alchemy-growl>
|
|
3
|
+
|
|
4
|
+
<% @element.ingredients_with_errors.each do |ingredient| %>
|
|
5
|
+
<%= turbo_stream.replace ingredient do %>
|
|
6
|
+
<%= render Alchemy::Admin::IngredientEditor.new(ingredient: ingredient) %>
|
|
7
|
+
<% end %>
|
|
8
|
+
<% end %>
|
|
9
|
+
<% else %>
|
|
10
|
+
<alchemy-growl><%= Alchemy.t(:element_saved) %></alchemy-growl>
|
|
11
|
+
|
|
12
|
+
<%# Re-render the preview text quote of the element and all its ancestors,
|
|
13
|
+
whose quotes are derived from their nested elements' preview text. %>
|
|
14
|
+
<% el = @element %>
|
|
15
|
+
<% while el %>
|
|
16
|
+
<%= turbo_stream.replace "element_#{el.id}_preview_text_quote" do %>
|
|
17
|
+
<%= render "alchemy/admin/elements/preview_text_quote", element: el %>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% el = el.parent_element %>
|
|
20
|
+
<% end %>
|
|
21
|
+
|
|
22
|
+
<%= turbo_stream.replace "publish_page_button" do %>
|
|
23
|
+
<%= render Alchemy::Admin::PublishPageButton.new(page: @element.page) %>
|
|
24
|
+
<% end %>
|
|
25
|
+
|
|
26
|
+
<% @element.ingredients.each do |ingredient| %>
|
|
27
|
+
<% if ingredient.settings[:anchor] %>
|
|
28
|
+
<turbo-stream action="update_anchor_icon" ingredient-id="<%= ingredient.id %>" active="<%= ingredient.dom_id.present? %>"></turbo-stream>
|
|
29
|
+
<% end %>
|
|
30
|
+
<% end %>
|
|
31
|
+
<% end %>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
<alchemy-
|
|
2
|
-
|
|
1
|
+
<alchemy-growl>
|
|
2
|
+
<%= Alchemy.t(:updated_ingredient, ingredient: @ingredient.translated_role) %>
|
|
3
|
+
</alchemy-growl>
|
|
4
|
+
<turbo-stream action="close_current_dialog"></turbo-stream>
|
|
5
|
+
<turbo-stream action="reload_preview"></turbo-stream>
|
|
3
6
|
<% if @ingredient.settings[:anchor] %>
|
|
4
|
-
<
|
|
7
|
+
<turbo-stream action="update_anchor_icon" ingredient-id="<%= @ingredient.id %>" active="<%= @ingredient.dom_id.present? %>"></turbo-stream>
|
|
5
8
|
<% end %>
|
|
6
9
|
<% if @ingredient.type == "Alchemy::Ingredients::Picture" && @ingredient.css_class.present? %>
|
|
7
10
|
<%= turbo_stream.replace @ingredient do %>
|
|
@@ -1,45 +1,41 @@
|
|
|
1
|
-
<% label_title = Alchemy.t("Create #{resource_name}", default: Alchemy.t('Create')) %>
|
|
2
|
-
|
|
3
1
|
<% content_for :toolbar do %>
|
|
4
2
|
<div class="toolbar_buttons">
|
|
5
3
|
<%= render 'alchemy/admin/partials/site_select' %>
|
|
6
4
|
<%= render Alchemy::Admin::ToolbarButton.new(
|
|
7
5
|
icon: :plus,
|
|
8
|
-
label:
|
|
6
|
+
label: create_resource_label,
|
|
7
|
+
primary: true,
|
|
9
8
|
url: new_resource_path,
|
|
10
|
-
title: label_title,
|
|
11
9
|
hotkey: 'alt+n',
|
|
12
10
|
dialog_options: {
|
|
13
|
-
title:
|
|
11
|
+
title: create_resource_label,
|
|
14
12
|
size: "430x415"
|
|
15
13
|
},
|
|
16
14
|
if_permitted_to: [:create, Alchemy::Language]
|
|
17
|
-
)
|
|
15
|
+
) %>
|
|
18
16
|
</div>
|
|
19
17
|
<%= render 'alchemy/admin/partials/search_form' %>
|
|
20
18
|
<% end %>
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<%= render
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
%>
|
|
43
|
-
</div>
|
|
20
|
+
<% if @languages.any? %>
|
|
21
|
+
<%= render "alchemy/admin/resources/table_header" %>
|
|
22
|
+
<div class="resources-table-wrapper">
|
|
23
|
+
<%= render "table" %>
|
|
24
|
+
</div>
|
|
25
|
+
<%= render "alchemy/admin/resources/pagination", resources: @languages %>
|
|
26
|
+
<% elsif search_filter_params.present? %>
|
|
27
|
+
<%= render_message { Alchemy.t('Nothing found') } %>
|
|
28
|
+
<% else %>
|
|
29
|
+
<%= render "alchemy/admin/resources/empty_state" do %>
|
|
30
|
+
<%= render "form", language: Alchemy::Language.new(
|
|
31
|
+
name: Alchemy.config.default_language.name,
|
|
32
|
+
code: Alchemy.config.default_language.code,
|
|
33
|
+
page_layout: Alchemy.config.default_language.page_layout,
|
|
34
|
+
frontpage_name: Alchemy.config.default_language.frontpage_name,
|
|
35
|
+
site: Alchemy::Current.site,
|
|
36
|
+
default: true,
|
|
37
|
+
public: true
|
|
38
|
+
)
|
|
39
|
+
%>
|
|
44
40
|
<% end %>
|
|
45
|
-
|
|
41
|
+
<% end %>
|
|
@@ -43,14 +43,12 @@
|
|
|
43
43
|
<%- end -%>
|
|
44
44
|
<%- if can?(:copy, layoutpage) -%>
|
|
45
45
|
<sl-tooltip content="<%= Alchemy.t(:copy_page) %>">
|
|
46
|
-
<%=
|
|
46
|
+
<%= button_to(
|
|
47
47
|
render_icon("file-copy"),
|
|
48
48
|
alchemy.insert_admin_clipboard_path(
|
|
49
49
|
remarkable_type: layoutpage.class.name.demodulize.underscore.pluralize,
|
|
50
50
|
remarkable_id: layoutpage.id
|
|
51
51
|
),
|
|
52
|
-
remote: true,
|
|
53
|
-
method: 'post',
|
|
54
52
|
class: "icon_button"
|
|
55
53
|
) %>
|
|
56
54
|
</sl-tooltip>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%= turbo_frame_tag @page do %>
|
|
2
|
-
<%= alchemy_form_for [:admin, @page], url: alchemy.admin_layoutpage_path(@page), class: 'edit_page'
|
|
2
|
+
<%= alchemy_form_for [:admin, @page], url: alchemy.admin_layoutpage_path(@page), class: 'edit_page' do |f| %>
|
|
3
3
|
<%= f.input :name, autofocus: true %>
|
|
4
4
|
<div class="input tags">
|
|
5
5
|
<%= f.label :tag_list, class: "control-label" %>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<%= render 'alchemy/admin/partials/site_select' %>
|
|
4
4
|
<%= render 'alchemy/admin/partials/language_tree_select' %>
|
|
5
5
|
<%= render Alchemy::Admin::ToolbarButton.new(
|
|
6
|
-
icon: "
|
|
6
|
+
icon: "add",
|
|
7
7
|
url: alchemy.new_admin_page_path(language: @current_language, layoutpage: true),
|
|
8
8
|
hotkey: 'alt+n',
|
|
9
9
|
dialog_options: {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
overflow: true
|
|
13
13
|
},
|
|
14
14
|
label: Alchemy.t('Add global page'),
|
|
15
|
+
primary: true,
|
|
15
16
|
tooltip_placement: "top-start",
|
|
16
17
|
if_permitted_to: [:create, Alchemy::Page]
|
|
17
18
|
) %>
|
|
@@ -19,10 +20,28 @@
|
|
|
19
20
|
</div>
|
|
20
21
|
<% end %>
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
|
|
23
|
+
<% if @layout_pages.any? %>
|
|
24
|
+
<h4 id="sitemap_heading">
|
|
25
|
+
<span class="page_name"><%= Alchemy::Page.human_attribute_name(:name) %></span>
|
|
26
|
+
</h4>
|
|
25
27
|
|
|
26
|
-
<ul class="list" id="layoutpages">
|
|
27
|
-
|
|
28
|
-
</ul>
|
|
28
|
+
<ul class="list" id="layoutpages">
|
|
29
|
+
<%= render partial: "layoutpage", collection: @layout_pages %>
|
|
30
|
+
</ul>
|
|
31
|
+
<% else %>
|
|
32
|
+
<%= render "alchemy/admin/resources/empty_state",
|
|
33
|
+
notice: Alchemy.t(:layoutpages, scope: :no_resource_found) do %>
|
|
34
|
+
<% if can?(:create, Alchemy::Page) %>
|
|
35
|
+
<%= link_to_dialog(
|
|
36
|
+
render_icon(:add) + Alchemy.t("Add global page"),
|
|
37
|
+
alchemy.new_admin_page_path(language: @current_language, layoutpage: true),
|
|
38
|
+
{
|
|
39
|
+
title: Alchemy.t("Add global page"),
|
|
40
|
+
size: "340x170",
|
|
41
|
+
overflow: true
|
|
42
|
+
},
|
|
43
|
+
class: "button with_icon"
|
|
44
|
+
) %>
|
|
45
|
+
<% end %>
|
|
46
|
+
<% end %>
|
|
47
|
+
<% end %>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
<alchemy-node-form>
|
|
2
|
+
<%= alchemy_form_for([:admin, node]) do |f| %>
|
|
2
3
|
<% if node.new_record? && node.root? %>
|
|
3
4
|
<%= f.input :menu_type,
|
|
4
5
|
collection: Alchemy::Current.language.available_menu_names.map { |n| [I18n.t(n, scope: [:alchemy, :menu_names]), n] },
|
|
@@ -30,23 +31,4 @@
|
|
|
30
31
|
<%= f.hidden_field :language_id %>
|
|
31
32
|
<%= f.submit button_label %>
|
|
32
33
|
<% end %>
|
|
33
|
-
|
|
34
|
-
<script type="module">
|
|
35
|
-
const nodeName = document.getElementById("node_name")
|
|
36
|
-
const nodeUrl = document.getElementById("node_url")
|
|
37
|
-
const form = document.getElementById("node_form")
|
|
38
|
-
|
|
39
|
-
form.addEventListener("Alchemy.RemoteSelect.Change", (event) => {
|
|
40
|
-
const page = event.detail.added
|
|
41
|
-
|
|
42
|
-
if (page) {
|
|
43
|
-
nodeName.setAttribute("placeholder", page.name)
|
|
44
|
-
nodeUrl.value = page.url_path
|
|
45
|
-
nodeUrl.setAttribute("disabled", "disabled")
|
|
46
|
-
} else {
|
|
47
|
-
nodeName.removeAttribute("placeholder")
|
|
48
|
-
nodeUrl.value = ""
|
|
49
|
-
nodeUrl.removeAttribute("disabled")
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
</script>
|
|
34
|
+
</alchemy-node-form>
|