alchemy_cms 7.1.7 → 7.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +148 -0
- data/Gemfile +2 -4
- data/LICENSE +1 -1
- data/README.md +5 -6
- data/SECURITY.md +1 -1
- data/alchemy_cms.gemspec +3 -4
- data/app/assets/config/alchemy_manifest.js +0 -1
- data/app/assets/javascripts/alchemy/admin.js +0 -9
- data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +5 -15
- data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +5 -4
- data/app/assets/javascripts/alchemy/templates/index.js +0 -1
- data/app/assets/javascripts/alchemy/templates/node_folder.hbs +1 -1
- data/app/assets/javascripts/alchemy/templates/page_folder.hbs +1 -1
- data/app/assets/javascripts/tinymce/plugins/alchemy_link/plugin.min.js +20 -7
- data/app/assets/stylesheets/alchemy/_custom-properties.scss +12 -0
- data/app/assets/stylesheets/alchemy/_mixins.scss +10 -6
- data/app/assets/stylesheets/alchemy/_variables.scss +3 -0
- data/app/assets/stylesheets/alchemy/admin.scss +2 -2
- data/app/assets/stylesheets/alchemy/archive.scss +4 -3
- data/app/assets/stylesheets/alchemy/attachment-select.scss +19 -0
- data/app/assets/stylesheets/alchemy/base.scss +31 -18
- data/app/assets/stylesheets/alchemy/buttons.scss +3 -4
- data/app/assets/stylesheets/alchemy/dashboard.scss +1 -1
- data/app/assets/stylesheets/alchemy/dialogs.scss +2 -5
- data/app/assets/stylesheets/alchemy/elements.scss +72 -46
- data/app/assets/stylesheets/alchemy/flash.scss +20 -70
- data/app/assets/stylesheets/alchemy/forms.scss +41 -36
- data/app/assets/stylesheets/alchemy/frame.scss +12 -3
- data/app/assets/stylesheets/alchemy/icons.scss +34 -2
- data/app/assets/stylesheets/alchemy/image_library.scss +18 -9
- data/app/assets/stylesheets/alchemy/{filter_field.scss → list_filter.scss} +8 -7
- data/app/assets/stylesheets/alchemy/lists.scss +1 -1
- data/app/assets/stylesheets/alchemy/navigation.scss +9 -12
- data/app/assets/stylesheets/alchemy/node-select.scss +10 -2
- data/app/assets/stylesheets/alchemy/nodes.scss +15 -13
- data/app/assets/stylesheets/alchemy/notices.scss +56 -39
- data/app/assets/stylesheets/alchemy/page-select.scss +1 -4
- data/app/assets/stylesheets/alchemy/pagination.scss +11 -1
- data/app/assets/stylesheets/alchemy/preview_window.scss +8 -4
- data/app/assets/stylesheets/alchemy/search.scss +4 -4
- data/app/assets/stylesheets/alchemy/selects.scss +13 -7
- data/app/assets/stylesheets/alchemy/shoelace.scss +33 -2
- data/app/assets/stylesheets/alchemy/sitemap.scss +155 -159
- data/app/assets/stylesheets/alchemy/tables.scss +49 -12
- data/app/assets/stylesheets/alchemy/tags.scss +17 -11
- data/app/assets/stylesheets/alchemy/toolbar.scss +2 -2
- data/app/assets/stylesheets/alchemy/typography.scss +41 -22
- data/app/assets/stylesheets/alchemy/upload.scss +5 -4
- data/app/components/alchemy/admin/attachment_select.rb +39 -0
- data/app/components/alchemy/admin/icon.rb +72 -0
- data/app/components/alchemy/admin/link_dialog/anchor_tab.rb +41 -0
- data/app/components/alchemy/admin/link_dialog/base_tab.rb +75 -0
- data/app/components/alchemy/admin/link_dialog/external_tab.rb +42 -0
- data/app/components/alchemy/admin/link_dialog/file_tab.rb +45 -0
- data/app/components/alchemy/admin/link_dialog/internal_tab.rb +84 -0
- data/app/components/alchemy/admin/link_dialog/tabs.rb +33 -0
- data/app/components/alchemy/admin/list_filter.rb +42 -0
- data/app/components/alchemy/admin/message.rb +19 -0
- data/app/components/alchemy/admin/tags_autocomplete.rb +25 -0
- data/app/components/alchemy/admin/toolbar_button.rb +111 -0
- data/app/components/alchemy/ingredients/link_view.rb +1 -7
- data/app/components/alchemy/ingredients/picture_view.rb +2 -2
- data/app/components/alchemy/ingredients/text_view.rb +1 -2
- data/app/controllers/alchemy/admin/base_controller.rb +1 -1
- data/app/controllers/alchemy/admin/elements_controller.rb +4 -2
- data/app/controllers/alchemy/admin/ingredients_controller.rb +2 -0
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/legacy_page_urls_controller.rb +12 -4
- data/app/controllers/alchemy/admin/nodes_controller.rb +26 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +11 -78
- data/app/controllers/alchemy/admin/picture_descriptions_controller.rb +15 -0
- data/app/controllers/alchemy/admin/pictures_controller.rb +18 -1
- data/app/controllers/alchemy/admin/resources_controller.rb +15 -10
- data/app/controllers/alchemy/api/attachments_controller.rb +44 -0
- data/app/controllers/alchemy/api/nodes_controller.rb +1 -1
- data/app/controllers/alchemy/api/pages_controller.rb +10 -6
- data/app/controllers/alchemy/base_controller.rb +2 -2
- data/app/controllers/alchemy/messages_controller.rb +2 -2
- data/app/controllers/alchemy/pages_controller.rb +8 -6
- data/app/controllers/concerns/alchemy/admin/current_language.rb +1 -1
- data/app/controllers/concerns/alchemy/legacy_page_redirects.rb +1 -1
- data/app/decorators/alchemy/element_editor.rb +2 -2
- data/app/helpers/alchemy/admin/base_helper.rb +8 -60
- data/app/helpers/alchemy/admin/elements_helper.rb +1 -1
- data/app/helpers/alchemy/admin/ingredients_helper.rb +1 -1
- data/app/helpers/alchemy/base_helper.rb +9 -91
- data/app/helpers/alchemy/elements_helper.rb +3 -3
- data/app/helpers/alchemy/pages_helper.rb +16 -9
- data/app/javascript/alchemy_admin/components/action.js +41 -0
- data/app/javascript/alchemy_admin/components/attachment_select.js +24 -0
- data/app/javascript/alchemy_admin/components/button.js +3 -0
- data/app/javascript/alchemy_admin/components/clipboard_button.js +3 -2
- data/app/javascript/alchemy_admin/components/dialog_link.js +10 -7
- data/app/javascript/alchemy_admin/components/dom_id_select.js +69 -0
- data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +42 -0
- data/app/javascript/alchemy_admin/components/element_editor/publish_element_button.js +4 -2
- data/app/javascript/alchemy_admin/components/element_editor.js +21 -13
- data/app/javascript/alchemy_admin/components/elements_window.js +87 -0
- data/app/javascript/alchemy_admin/components/growl.js +13 -0
- data/app/javascript/alchemy_admin/components/icon.js +51 -0
- data/app/javascript/alchemy_admin/components/index.js +25 -0
- data/app/javascript/alchemy_admin/components/ingredient_group.js +6 -0
- data/app/javascript/alchemy_admin/components/link_buttons/link_button.js +21 -11
- data/app/javascript/alchemy_admin/components/link_buttons/unlink_button.js +2 -1
- data/app/javascript/alchemy_admin/components/link_buttons.js +1 -0
- data/app/javascript/alchemy_admin/components/list_filter.js +68 -0
- data/app/javascript/alchemy_admin/components/message.js +69 -0
- data/app/javascript/alchemy_admin/components/node_select.js +4 -2
- data/app/javascript/alchemy_admin/components/overlay.js +6 -6
- data/app/javascript/alchemy_admin/components/page_select.js +3 -7
- data/app/javascript/alchemy_admin/components/preview_window.js +121 -0
- data/app/javascript/alchemy_admin/components/remote_select.js +4 -1
- data/app/javascript/alchemy_admin/components/select.js +37 -1
- data/app/javascript/alchemy_admin/components/tags_autocomplete.js +57 -0
- data/app/javascript/alchemy_admin/components/uploader/file_upload.js +4 -3
- data/app/javascript/alchemy_admin/components/uploader/progress.js +1 -1
- data/app/javascript/alchemy_admin/confirm_dialog.js +133 -0
- data/app/javascript/alchemy_admin/dirty.js +19 -14
- data/app/javascript/alchemy_admin/fixed_elements.js +24 -0
- data/app/javascript/alchemy_admin/growler.js +15 -0
- data/app/javascript/alchemy_admin/gui.js +2 -4
- data/app/javascript/alchemy_admin/hotkeys.js +60 -0
- data/app/javascript/alchemy_admin/image_loader.js +2 -2
- data/app/javascript/alchemy_admin/ingredient_anchor_link.js +2 -3
- data/app/javascript/alchemy_admin/initializer.js +1 -8
- data/app/javascript/alchemy_admin/link_dialog.js +131 -0
- data/app/javascript/alchemy_admin/locales/en.js +3 -0
- data/app/javascript/alchemy_admin/node_tree.js +4 -3
- data/app/javascript/alchemy_admin/page_sorter.js +23 -14
- data/app/javascript/alchemy_admin/picture_editors.js +3 -2
- data/app/javascript/alchemy_admin/shoelace_theme.js +60 -0
- data/app/javascript/alchemy_admin/sitemap.js +9 -3
- data/app/javascript/alchemy_admin/sortable_elements.js +4 -6
- data/app/javascript/alchemy_admin.js +18 -44
- data/app/models/alchemy/current.rb +26 -0
- data/app/models/alchemy/element.rb +1 -1
- data/app/models/alchemy/ingredients/headline.rb +8 -1
- data/app/models/alchemy/ingredients/picture.rb +6 -0
- data/app/models/alchemy/language.rb +8 -6
- data/app/models/alchemy/node.rb +2 -2
- data/app/models/alchemy/page/page_elements.rb +8 -8
- data/app/models/alchemy/page/page_layouts.rb +3 -3
- data/app/models/alchemy/page/page_natures.rb +13 -9
- data/app/models/alchemy/page/page_scopes.rb +2 -2
- data/app/models/alchemy/page/publisher.rb +1 -0
- data/app/models/alchemy/page.rb +13 -28
- data/app/models/alchemy/picture.rb +8 -0
- data/app/models/alchemy/picture_description.rb +8 -0
- data/app/models/alchemy/picture_variant.rb +1 -1
- data/app/models/alchemy/site.rb +10 -7
- data/app/serializers/alchemy/attachment_serializer.rb +8 -0
- data/app/serializers/alchemy/page_node_serializer.rb +9 -0
- data/app/views/alchemy/_menubar.html.erb +127 -14
- data/app/views/alchemy/_preview_mode_code.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_tag_list.html.erb +2 -2
- data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +0 -1
- data/app/views/alchemy/admin/attachments/edit.html.erb +3 -4
- data/app/views/alchemy/admin/clipboard/clear.js.erb +1 -1
- data/app/views/alchemy/admin/clipboard/index.html.erb +1 -1
- data/app/views/alchemy/admin/clipboard/insert.js.erb +1 -1
- data/app/views/alchemy/admin/clipboard/remove.js.erb +1 -1
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/_sites.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/help.html.erb +48 -12
- data/app/views/alchemy/admin/dashboard/index.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/info.html.erb +5 -8
- data/app/views/alchemy/admin/elements/_add_nested_element_form.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_element.html.erb +5 -5
- data/app/views/alchemy/admin/elements/_footer.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_header.html.erb +6 -2
- data/app/views/alchemy/admin/elements/_toolbar.html.erb +8 -6
- data/app/views/alchemy/admin/elements/create.js.erb +0 -5
- data/app/views/alchemy/admin/elements/index.html.erb +70 -34
- data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +2 -2
- data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +4 -5
- data/app/views/alchemy/admin/ingredients/update.turbo_stream.erb +5 -0
- data/app/views/alchemy/admin/languages/_language.html.erb +1 -1
- data/app/views/alchemy/admin/languages/index.html.erb +2 -2
- data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +18 -18
- data/app/views/alchemy/admin/layoutpages/edit.html.erb +3 -4
- data/app/views/alchemy/admin/layoutpages/index.html.erb +2 -2
- data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +10 -11
- data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +15 -17
- data/app/views/alchemy/admin/legacy_page_urls/_table.html.erb +16 -0
- data/app/views/alchemy/admin/legacy_page_urls/_update.turbo_stream.erb +12 -0
- data/app/views/alchemy/admin/legacy_page_urls/create.turbo_stream.erb +8 -0
- data/app/views/alchemy/admin/legacy_page_urls/destroy.turbo_stream.erb +1 -0
- data/app/views/alchemy/admin/legacy_page_urls/edit.html.erb +27 -0
- data/app/views/alchemy/admin/legacy_page_urls/show.html.erb +1 -0
- data/app/views/alchemy/admin/legacy_page_urls/update.turbo_stream.erb +1 -0
- data/app/views/alchemy/admin/nodes/_form.html.erb +12 -11
- data/app/views/alchemy/admin/nodes/_label.html.erb +1 -0
- data/app/views/alchemy/admin/nodes/_node.html.erb +19 -19
- data/app/views/alchemy/admin/nodes/_page_nodes.html.erb +49 -0
- data/app/views/alchemy/admin/nodes/_update.turbo_stream.erb +9 -0
- data/app/views/alchemy/admin/nodes/create.turbo_stream.erb +1 -0
- data/app/views/alchemy/admin/nodes/destroy.turbo_stream.erb +1 -0
- data/app/views/alchemy/admin/nodes/index.html.erb +3 -3
- data/app/views/alchemy/admin/pages/_form.html.erb +3 -4
- data/app/views/alchemy/admin/pages/_legacy_urls.html.erb +4 -15
- data/app/views/alchemy/admin/pages/_page.html.erb +39 -39
- data/app/views/alchemy/admin/pages/_table_row.html.erb +3 -3
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +2 -2
- data/app/views/alchemy/admin/pages/configure.html.erb +6 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +15 -62
- data/app/views/alchemy/admin/pages/unlock.js.erb +2 -2
- data/app/views/alchemy/admin/partials/_autocomplete_tag_list.html.erb +3 -1
- data/app/views/alchemy/admin/partials/_flash_notices.html.erb +4 -2
- data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +5 -2
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +2 -2
- data/app/views/alchemy/admin/partials/_search_form.html.erb +2 -2
- data/app/views/alchemy/admin/partials/_site_select.html.erb +1 -1
- data/app/views/alchemy/admin/picture_descriptions/_form.html.erb +11 -0
- data/app/views/alchemy/admin/picture_descriptions/edit.html.erb +6 -0
- data/app/views/alchemy/admin/pictures/_form.html.erb +4 -3
- data/app/views/alchemy/admin/pictures/_infos.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture_description_field.html.erb +29 -0
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +2 -2
- data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +0 -2
- data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +3 -3
- data/app/views/alchemy/admin/pictures/show.html.erb +3 -3
- data/app/views/alchemy/admin/resources/_form.html.erb +3 -4
- data/app/views/alchemy/admin/resources/_tag_list.html.erb +2 -2
- data/app/views/alchemy/admin/resources/index.html.erb +2 -2
- data/app/views/alchemy/admin/sites/index.html.erb +1 -1
- data/app/views/alchemy/admin/styleguide/index.html.erb +29 -24
- data/app/views/alchemy/admin/tags/_tag.html.erb +1 -1
- data/app/views/alchemy/admin/tags/edit.html.erb +1 -1
- data/app/views/alchemy/admin/tags/index.html.erb +1 -1
- data/app/views/alchemy/base/500.html.erb +7 -18
- data/app/views/alchemy/base/error_notice.html.erb +3 -1
- data/app/views/alchemy/ingredients/_boolean_editor.html.erb +1 -1
- data/app/views/alchemy/ingredients/_datetime_editor.html.erb +1 -1
- data/app/views/alchemy/ingredients/_headline_editor.html.erb +13 -8
- data/app/views/alchemy/ingredients/_picture_editor.html.erb +1 -1
- data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +1 -1
- data/app/views/alchemy/language_links/_language.html.erb +1 -1
- data/app/views/kaminari/alchemy/_first_page.html.erb +2 -2
- data/app/views/kaminari/alchemy/_gap.html.erb +1 -1
- data/app/views/kaminari/alchemy/_last_page.html.erb +2 -2
- data/app/views/kaminari/alchemy/_next_page.html.erb +2 -2
- data/app/views/kaminari/alchemy/_prev_page.html.erb +2 -2
- data/app/views/layouts/alchemy/admin.html.erb +4 -5
- data/bundles/shoelace.js +3 -1
- data/config/locales/alchemy.en.yml +16 -3
- data/config/routes.rb +3 -1
- data/db/migrate/20240314105244_create_alchemy_picture_descriptions.rb +11 -0
- data/lib/alchemy/configuration_methods.rb +1 -1
- data/lib/alchemy/controller_actions.rb +3 -3
- data/lib/alchemy/element_definition.rb +10 -6
- data/lib/alchemy/engine.rb +29 -7
- data/lib/alchemy/page_layout.rb +10 -6
- data/lib/alchemy/permissions.rb +3 -2
- data/lib/alchemy/seeder.rb +2 -2
- data/lib/alchemy/test_support/capybara_helpers.rb +4 -0
- data/lib/alchemy/test_support/factories/language_factory.rb +1 -1
- data/lib/alchemy/test_support/shared_contexts.rb +8 -0
- data/lib/alchemy/test_support/shared_link_tab_examples.rb +57 -0
- data/lib/alchemy/tinymce.rb +2 -1
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy.rb +72 -0
- data/lib/alchemy_cms.rb +0 -1
- data/lib/generators/alchemy/menus/templates/node.html.erb +2 -2
- data/lib/generators/alchemy/menus/templates/node.html.haml +2 -2
- data/lib/generators/alchemy/menus/templates/node.html.slim +2 -2
- data/lib/generators/alchemy/menus/templates/wrapper.html.erb +1 -1
- data/lib/generators/alchemy/menus/templates/wrapper.html.haml +1 -1
- data/lib/generators/alchemy/menus/templates/wrapper.html.slim +1 -1
- data/lib/tasks/alchemy/sitemap.rake +97 -0
- data/package.json +8 -8
- data/vendor/assets/fonts/remixicon.symbol.svg +11 -0
- data/vendor/javascript/shoelace.min.js +333 -118
- data/vendor/javascript/sortable.min.js +1 -1
- data/vendor/javascript/tinymce.min.js +1 -1
- data/vendor/javascript/ungap-custom-elements.min.js +1 -1
- metadata +64 -57
- data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +0 -85
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +0 -107
- data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +0 -66
- data/app/assets/javascripts/alchemy/alchemy.fixed_elements.js +0 -45
- data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +0 -24
- data/app/assets/javascripts/alchemy/alchemy.hotkeys.js.coffee +0 -49
- data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +0 -0
- data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +0 -230
- data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +0 -49
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +0 -82
- data/app/assets/javascripts/alchemy/alchemy.string_extension.js.coffee +0 -11
- data/app/assets/javascripts/alchemy/templates/page.hbs +0 -19
- data/app/assets/stylesheets/alchemy/menubar.scss +0 -81
- data/app/javascript/alchemy_admin/tags_autocomplete.js +0 -46
- data/app/javascript/menubar.js +0 -10
- data/app/models/alchemy/tree_node.rb +0 -7
- data/app/views/alchemy/admin/elements/destroy.js.erb +0 -8
- data/app/views/alchemy/admin/ingredients/update.js.erb +0 -7
- data/app/views/alchemy/admin/legacy_page_urls/_form.html.erb +0 -5
- data/app/views/alchemy/admin/legacy_page_urls/create.js.erb +0 -9
- data/app/views/alchemy/admin/legacy_page_urls/destroy.js.erb +0 -6
- data/app/views/alchemy/admin/legacy_page_urls/update.js.erb +0 -2
- data/app/views/alchemy/admin/pages/_anchor_link.html.erb +0 -22
- data/app/views/alchemy/admin/pages/_external_link.html.erb +0 -31
- data/app/views/alchemy/admin/pages/_file_link.html.erb +0 -31
- data/app/views/alchemy/admin/pages/_internal_link.html.erb +0 -35
- data/app/views/alchemy/admin/pages/link.html.erb +0 -26
- data/app/views/alchemy/admin/partials/_flash.html.erb +0 -4
- data/app/views/alchemy/admin/partials/_toolbar_button.html.erb +0 -29
- data/vendor/assets/fonts/remixicon.eot +0 -0
- data/vendor/assets/fonts/remixicon.svg +0 -7816
- data/vendor/assets/fonts/remixicon.ttf +0 -0
- data/vendor/assets/fonts/remixicon.woff +0 -0
- data/vendor/assets/fonts/remixicon.woff2 +0 -0
- data/vendor/assets/stylesheets/remixicon.scss +0 -10480
@@ -12,20 +12,25 @@
|
|
12
12
|
<%= render "alchemy/ingredients/shared/anchor", ingredient_editor: headline_editor %>
|
13
13
|
<% end %>
|
14
14
|
|
15
|
-
|
16
|
-
<
|
15
|
+
<div class="input-addon right<%= " second" if has_size_select %>">
|
16
|
+
<sl-tooltip content="<%= f.object.class.human_attribute_name(:level) %>">
|
17
17
|
<%= f.select :level,
|
18
18
|
options_for_select(headline_editor.level_options, headline_editor.level),
|
19
19
|
{},
|
20
|
-
{
|
21
|
-
|
22
|
-
|
20
|
+
{
|
21
|
+
class: "custom-select",
|
22
|
+
disabled: !has_level_select
|
23
|
+
} %>
|
24
|
+
</sl-tooltip>
|
25
|
+
</div>
|
23
26
|
|
24
27
|
<% if has_size_select %>
|
25
28
|
<div class="input-addon right">
|
26
|
-
<%= f.
|
27
|
-
|
28
|
-
|
29
|
+
<sl-tooltip content="<%= f.object.class.human_attribute_name(:size) %>">
|
30
|
+
<%= f.select :size, options_for_select(headline_editor.size_options, headline_editor.size),
|
31
|
+
{},
|
32
|
+
{ class: "custom-select" } %>
|
33
|
+
</sl-tooltip>
|
29
34
|
</div>
|
30
35
|
<% end %>
|
31
36
|
<% end %>
|
@@ -41,7 +41,7 @@
|
|
41
41
|
|
42
42
|
<%= content_tag "sl-tooltip", content: Alchemy.t(:edit_image_properties), placement: "top-end" do %>
|
43
43
|
<%= link_to_dialog render_icon(:edit),
|
44
|
-
alchemy.edit_admin_ingredient_path(id: picture_editor.id),
|
44
|
+
alchemy.edit_admin_ingredient_path(id: picture_editor.id, language_id: @page.language_id),
|
45
45
|
{
|
46
46
|
title: Alchemy.t(:edit_image_properties),
|
47
47
|
size: "380x255"
|
@@ -6,7 +6,7 @@
|
|
6
6
|
),
|
7
7
|
class: [
|
8
8
|
language.code,
|
9
|
-
Alchemy::
|
9
|
+
Alchemy::Current.language.id == language.id ? 'active' : nil,
|
10
10
|
languages.first == language ? 'first' : nil,
|
11
11
|
languages.last == language ? 'last' : nil
|
12
12
|
].compact,
|
@@ -8,10 +8,10 @@
|
|
8
8
|
-%>
|
9
9
|
<% if current_page.first? %>
|
10
10
|
<span class="first-page disabled">
|
11
|
-
|
11
|
+
<%= render_icon("skip-left") %>
|
12
12
|
</span>
|
13
13
|
<% else %>
|
14
14
|
<%= link_to url, remote: remote, title: Alchemy.t(:first, scope: 'pagination'), class: 'first-page' do %>
|
15
|
-
|
15
|
+
<%= render_icon("skip-left") %>
|
16
16
|
<% end %>
|
17
17
|
<% end %>
|
@@ -8,10 +8,10 @@
|
|
8
8
|
-%>
|
9
9
|
<% if current_page.last? %>
|
10
10
|
<span class="last-page disabled">
|
11
|
-
|
11
|
+
<%= render_icon("skip-right") %>
|
12
12
|
</span>
|
13
13
|
<% else %>
|
14
14
|
<%= link_to url, remote: remote, title: Alchemy.t(:last, scope: 'pagination'), class: 'last-page' do %>
|
15
|
-
|
15
|
+
<%= render_icon("skip-right") %>
|
16
16
|
<% end %>
|
17
17
|
<% end %>
|
@@ -8,10 +8,10 @@
|
|
8
8
|
-%>
|
9
9
|
<% if current_page.last? -%>
|
10
10
|
<span class="next_page disabled">
|
11
|
-
|
11
|
+
<%= render_icon("arrow-right-s") %>
|
12
12
|
</span>
|
13
13
|
<% else -%>
|
14
14
|
<%= link_to url, rel: 'next', remote: remote, title: Alchemy.t(:next_page, scope: 'pagination'), class: 'next_page' do %>
|
15
|
-
|
15
|
+
<%= render_icon("arrow-right-s") %>
|
16
16
|
<% end %>
|
17
17
|
<% end -%>
|
@@ -8,10 +8,10 @@
|
|
8
8
|
-%>
|
9
9
|
<% if current_page.first? -%>
|
10
10
|
<span class="previous_page disabled">
|
11
|
-
|
11
|
+
<%= render_icon("arrow-left-s") %>
|
12
12
|
</span>
|
13
13
|
<% else -%>
|
14
14
|
<%= link_to url, rel: 'prev', remote: remote, class: 'previous_page', title: Alchemy.t(:previous_page, scope: 'pagination') do %>
|
15
|
-
|
15
|
+
<%= render_icon("arrow-left-s") %>
|
16
16
|
<% end %>
|
17
17
|
<% end -%>
|
@@ -7,6 +7,7 @@
|
|
7
7
|
<link rel="shortcut icon" href="<%= asset_path('alchemy/favicon.ico') %>">
|
8
8
|
<%= csrf_meta_tag %>
|
9
9
|
<meta name="robots" content="noindex">
|
10
|
+
<meta name="alchemy-icon-sprite" content="<%= asset_path("remixicon.symbol.svg") %>">
|
10
11
|
<%= stylesheet_link_tag('alchemy/admin/all', media: 'screen', 'data-turbo-track' => true) %>
|
11
12
|
<%= stylesheet_link_tag('alchemy/print', media: 'print', 'data-turbo-track' => true) %>
|
12
13
|
<%= yield :stylesheets %>
|
@@ -20,11 +21,9 @@
|
|
20
21
|
<%= render 'alchemy/admin/partials/routes' %>
|
21
22
|
<%= javascript_include_tag('alchemy/admin/all', 'data-turbo-track' => true) %>
|
22
23
|
<%= javascript_importmap_tags("alchemy_admin", importmap: Alchemy.importmap) %>
|
23
|
-
<%
|
24
|
+
<% Alchemy.admin_js_imports.each do |path| %>
|
24
25
|
<script type="module">
|
25
|
-
|
26
|
-
import "<%= path %>"
|
27
|
-
<% end %>
|
26
|
+
import "<%= path %>"
|
28
27
|
</script>
|
29
28
|
<% end %>
|
30
29
|
<%= yield :javascript_includes %>
|
@@ -55,7 +54,7 @@
|
|
55
54
|
}, {'data-alchemy-hotkey' => 'alt+q'}) %>
|
56
55
|
<% else %>
|
57
56
|
<%= link_to(alchemy.root_path) do %>
|
58
|
-
|
57
|
+
<%= render_icon "logout-box-r", size: "lg" %>
|
59
58
|
<label><%= Alchemy.t(:leave) %></label>
|
60
59
|
<% end %>
|
61
60
|
<% end %>
|
data/bundles/shoelace.js
CHANGED
@@ -6,5 +6,7 @@ import "@shoelace-style/shoelace/dist/components/tab-group/tab-group.js"
|
|
6
6
|
import "@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js"
|
7
7
|
import "@shoelace-style/shoelace/dist/components/tooltip/tooltip.js"
|
8
8
|
import "@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js"
|
9
|
+
import "@shoelace-style/shoelace/dist/components/dialog/dialog.js"
|
10
|
+
import { registerIconLibrary } from "@shoelace-style/shoelace/dist/utilities/icon-library.js"
|
9
11
|
import { setDefaultAnimation } from "@shoelace-style/shoelace/dist/utilities/animation-registry.js"
|
10
|
-
export { setDefaultAnimation }
|
12
|
+
export { registerIconLibrary, setDefaultAnimation }
|
@@ -250,6 +250,7 @@ en:
|
|
250
250
|
"Confirm new password": "Confirm new password"
|
251
251
|
"Copy": "Copy"
|
252
252
|
"Could not load Adobe Flash® Plugin!": "Could not load Adobe Flash® Plugin!"
|
253
|
+
"Create node on parent:": "Create node on parent:"
|
253
254
|
"Currently locked pages": "Currently locked pages"
|
254
255
|
"Default language has to be public": "Default language has to be public"
|
255
256
|
"Delete image": "Delete image"
|
@@ -286,6 +287,7 @@ en:
|
|
286
287
|
"New": "New"
|
287
288
|
"New Element": "New element"
|
288
289
|
"New page": "New page"
|
290
|
+
"No menu node for this page found": "No menu node for this page found"
|
289
291
|
"No page links for this page found": "No page links for this page found"
|
290
292
|
"New password": "New password"
|
291
293
|
"New Tag": "New tag"
|
@@ -300,7 +302,6 @@ en:
|
|
300
302
|
"Page deleted": "%{name} deleted"
|
301
303
|
"Page saved": "%{name} saved"
|
302
304
|
"Page cache flushed": "Page cache flushed"
|
303
|
-
"Pages order saved": "Pages order saved"
|
304
305
|
"Password": "Password"
|
305
306
|
"Password reset": "Password reset"
|
306
307
|
"Paste from clipboard": "Paste from clipboard"
|
@@ -411,6 +412,9 @@ en:
|
|
411
412
|
delete_node: "Delete this menu node"
|
412
413
|
delete_page: "Delete this page"
|
413
414
|
delete_tag: "Delete tag"
|
415
|
+
search_page: "Search page"
|
416
|
+
search_node: "Search menu node"
|
417
|
+
search_tag: "Search tag"
|
414
418
|
document: "File"
|
415
419
|
download_csv: "Download CSV"
|
416
420
|
download_file: "Download file '%{filename}'"
|
@@ -587,7 +591,12 @@ en:
|
|
587
591
|
replace: replace
|
588
592
|
replace_file: Replace file
|
589
593
|
"Replaced Tag": "Tag '%{old_tag}' was replaced with '%{new_tag}'"
|
594
|
+
"%{resource_name} successfully %{action}": "%{resource_name} successfully %{action}."
|
590
595
|
resources:
|
596
|
+
actions:
|
597
|
+
created: "created"
|
598
|
+
updated: "updated"
|
599
|
+
removed: "removed"
|
591
600
|
relation_select:
|
592
601
|
blank: "- none -"
|
593
602
|
right: "right"
|
@@ -656,7 +665,6 @@ en:
|
|
656
665
|
"Successfully updated": "Successfully updated"
|
657
666
|
"Successfully removed": "Successfully removed"
|
658
667
|
"Nothing found": "Nothing found."
|
659
|
-
complete: "Abgeschlossen"
|
660
668
|
"Update available": "Update available"
|
661
669
|
"Update status unavailable": "Update status unavailable"
|
662
670
|
"Uploading": "Uploading"
|
@@ -790,7 +798,7 @@ en:
|
|
790
798
|
other: "Elements"
|
791
799
|
alchemy/ingredients/headline:
|
792
800
|
one: Headline
|
793
|
-
other:
|
801
|
+
other: Headlines
|
794
802
|
alchemy/legacy_page_url:
|
795
803
|
one: "Link"
|
796
804
|
other: "Links"
|
@@ -809,6 +817,9 @@ en:
|
|
809
817
|
alchemy/picture:
|
810
818
|
one: Picture
|
811
819
|
other: Pictures
|
820
|
+
alchemy/picture_description:
|
821
|
+
one: Picture Description
|
822
|
+
other: Picture Descriptions
|
812
823
|
alchemy/user:
|
813
824
|
one: User
|
814
825
|
other: User
|
@@ -899,6 +910,8 @@ en:
|
|
899
910
|
image_file_size: "Filesize"
|
900
911
|
name: "Name"
|
901
912
|
tag_list: Tags
|
913
|
+
alchemy/picture_description:
|
914
|
+
text: "Description"
|
902
915
|
alchemy/site:
|
903
916
|
name: "Name"
|
904
917
|
host: "Primary Host"
|
data/config/routes.rb
CHANGED
@@ -22,7 +22,6 @@ Alchemy::Engine.routes.draw do
|
|
22
22
|
resources :pages do
|
23
23
|
resources :elements
|
24
24
|
collection do
|
25
|
-
post :order
|
26
25
|
post :flush
|
27
26
|
post :copy_language_tree
|
28
27
|
get :create_language
|
@@ -65,6 +64,8 @@ Alchemy::Engine.routes.draw do
|
|
65
64
|
end
|
66
65
|
end
|
67
66
|
|
67
|
+
resources :picture_descriptions, only: [:index, :edit]
|
68
|
+
|
68
69
|
resources :attachments, except: [:new] do
|
69
70
|
member do
|
70
71
|
get :download
|
@@ -116,6 +117,7 @@ Alchemy::Engine.routes.draw do
|
|
116
117
|
resources :elements, only: :show
|
117
118
|
|
118
119
|
namespace :api, defaults: {format: "json"} do
|
120
|
+
resources :attachments, only: [:index]
|
119
121
|
resources :ingredients, only: [:index]
|
120
122
|
|
121
123
|
resources :elements, only: [:index, :show]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class CreateAlchemyPictureDescriptions < ActiveRecord::Migration[7.0]
|
2
|
+
def change
|
3
|
+
create_table :alchemy_picture_descriptions do |t|
|
4
|
+
t.belongs_to :picture, null: false, foreign_key: {to_table: :alchemy_pictures}
|
5
|
+
t.belongs_to :language, null: false, foreign_key: {to_table: :alchemy_languages}
|
6
|
+
t.text :text
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -28,7 +28,7 @@ module Alchemy
|
|
28
28
|
# matches the current I18n.locale then the prefix os omitted.
|
29
29
|
# Also, if only one published language exists.
|
30
30
|
#
|
31
|
-
def prefix_locale?(locale =
|
31
|
+
def prefix_locale?(locale = Current.language&.code)
|
32
32
|
return false unless locale
|
33
33
|
|
34
34
|
multi_language? && locale != ::I18n.default_locale.to_s
|
@@ -56,7 +56,7 @@ module Alchemy
|
|
56
56
|
# can be scoped against it.
|
57
57
|
#
|
58
58
|
def set_current_alchemy_site
|
59
|
-
|
59
|
+
Current.site = current_alchemy_site
|
60
60
|
end
|
61
61
|
|
62
62
|
# Sets the current language for Alchemy.
|
@@ -83,11 +83,11 @@ module Alchemy
|
|
83
83
|
Language.find_by_code(id_or_code)
|
84
84
|
end
|
85
85
|
|
86
|
-
# Stores language in +
|
86
|
+
# Stores language in +Current.language+
|
87
87
|
#
|
88
88
|
def store_current_alchemy_language(language)
|
89
89
|
if language&.id
|
90
|
-
|
90
|
+
Current.language = language
|
91
91
|
end
|
92
92
|
end
|
93
93
|
end
|
@@ -42,6 +42,16 @@ module Alchemy
|
|
42
42
|
all.detect { |a| a["name"] == name }
|
43
43
|
end
|
44
44
|
|
45
|
+
def reset!
|
46
|
+
@definitions = nil
|
47
|
+
end
|
48
|
+
|
49
|
+
# The absolute +elements.yml+ file path
|
50
|
+
# @return [Pathname]
|
51
|
+
def definitions_file_path
|
52
|
+
Rails.root.join("config", "alchemy", "elements.yml")
|
53
|
+
end
|
54
|
+
|
45
55
|
private
|
46
56
|
|
47
57
|
# Reads the element definitions from +config/alchemy/elements.yml+.
|
@@ -58,12 +68,6 @@ module Alchemy
|
|
58
68
|
"Could not find elements.yml file! Please run `rails generate alchemy:install`"
|
59
69
|
end
|
60
70
|
end
|
61
|
-
|
62
|
-
# Returns the elements.yml file path
|
63
|
-
#
|
64
|
-
def definitions_file_path
|
65
|
-
Rails.root.join "config/alchemy/elements.yml"
|
66
|
-
end
|
67
71
|
end
|
68
72
|
end
|
69
73
|
end
|
data/lib/alchemy/engine.rb
CHANGED
@@ -21,20 +21,42 @@ module Alchemy
|
|
21
21
|
end
|
22
22
|
|
23
23
|
initializer "alchemy.importmap" do |app|
|
24
|
-
|
24
|
+
watch_paths = []
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
Alchemy.admin_importmaps.each do |admin_import|
|
27
|
+
Alchemy.importmap.draw admin_import[:importmap_path]
|
28
|
+
watch_paths += admin_import[:source_paths]
|
29
|
+
app.config.assets.paths += admin_import[:source_paths]
|
30
|
+
if admin_import[:name] != "alchemy_admin"
|
31
|
+
Alchemy.admin_js_imports.add(admin_import[:name])
|
32
|
+
end
|
33
|
+
end
|
29
34
|
|
30
35
|
if app.config.importmap.sweep_cache
|
31
|
-
Alchemy.importmap.cache_sweeper(watches:
|
36
|
+
Alchemy.importmap.cache_sweeper(watches: watch_paths)
|
32
37
|
ActiveSupport.on_load(:action_controller_base) do
|
33
38
|
before_action { Alchemy.importmap.cache_sweeper.execute_if_updated }
|
34
39
|
end
|
35
40
|
end
|
36
41
|
end
|
37
42
|
|
43
|
+
initializer "alchemy.watch_definition_changes" do |app|
|
44
|
+
elements_reloader = app.config.file_watcher.new([ElementDefinition.definitions_file_path]) do
|
45
|
+
Rails.logger.info "[#{engine_name}] Reloading Element Definitions."
|
46
|
+
ElementDefinition.reset!
|
47
|
+
end
|
48
|
+
page_layouts_reloader = app.config.file_watcher.new([PageLayout.layouts_file_path]) do
|
49
|
+
Rails.logger.info "[#{engine_name}] Reloading Page Layouts."
|
50
|
+
PageLayout.reset!
|
51
|
+
end
|
52
|
+
[elements_reloader, page_layouts_reloader].each do |reloader|
|
53
|
+
app.reloaders << reloader
|
54
|
+
app.reloader.to_run do
|
55
|
+
reloader.execute_if_updated
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
38
60
|
# Gutentag downcases all tags before save
|
39
61
|
# and Gutentag validations are not case sensitive.
|
40
62
|
# But we support having tags with uppercase characters.
|
@@ -47,8 +69,8 @@ module Alchemy
|
|
47
69
|
initializer "alchemy.ransack" do
|
48
70
|
Ransack.configure do |config|
|
49
71
|
config.custom_arrows = {
|
50
|
-
up_arrow: '<
|
51
|
-
down_arrow: '<
|
72
|
+
up_arrow: '<alchemy-icon name="arrow-up" size="1x"></alchemy-icon>',
|
73
|
+
down_arrow: '<alchemy-icon name="arrow-down" size="1x"></alchemy-icon>'
|
52
74
|
}
|
53
75
|
end
|
54
76
|
end
|
data/lib/alchemy/page_layout.rb
CHANGED
@@ -41,6 +41,16 @@ module Alchemy
|
|
41
41
|
all.detect { |a| a["name"].casecmp(name).zero? }
|
42
42
|
end
|
43
43
|
|
44
|
+
def reset!
|
45
|
+
@definitions = nil
|
46
|
+
end
|
47
|
+
|
48
|
+
# The absolute +page_layouts.yml+ file path
|
49
|
+
# @return [Pathname]
|
50
|
+
def layouts_file_path
|
51
|
+
Rails.root.join("config", "alchemy", "page_layouts.yml")
|
52
|
+
end
|
53
|
+
|
44
54
|
private
|
45
55
|
|
46
56
|
# Reads the layout definitions from +config/alchemy/page_layouts.yml+.
|
@@ -58,12 +68,6 @@ module Alchemy
|
|
58
68
|
raise LoadError, "Could not find page_layouts.yml file! Please run `rails generate alchemy:install`"
|
59
69
|
end
|
60
70
|
end
|
61
|
-
|
62
|
-
# Returns the page_layouts.yml file path
|
63
|
-
#
|
64
|
-
def layouts_file_path
|
65
|
-
Rails.root.join "config/alchemy/page_layouts.yml"
|
66
|
-
end
|
67
71
|
end
|
68
72
|
end
|
69
73
|
end
|
data/lib/alchemy/permissions.rb
CHANGED
@@ -42,7 +42,7 @@ module Alchemy
|
|
42
42
|
end
|
43
43
|
|
44
44
|
can :read, Alchemy::Page, Alchemy::Page.published.not_restricted.from_current_site do |p|
|
45
|
-
p.public? && !p.restricted? && p.site == Alchemy::
|
45
|
+
p.public? && !p.restricted? && p.site == Alchemy::Current.site
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
@@ -65,7 +65,7 @@ module Alchemy
|
|
65
65
|
end
|
66
66
|
|
67
67
|
can :read, Alchemy::Page, Alchemy::Page.published.from_current_site do |p|
|
68
|
-
p.public? && p.site == Alchemy::
|
68
|
+
p.public? && p.site == Alchemy::Current.site
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
@@ -157,6 +157,7 @@ module Alchemy
|
|
157
157
|
end
|
158
158
|
|
159
159
|
can :manage, Alchemy::Picture
|
160
|
+
can :manage, Alchemy::PictureDescription
|
160
161
|
can :manage, Alchemy::Attachment
|
161
162
|
can :manage, Alchemy::Tag
|
162
163
|
can :index, Alchemy::Language
|
data/lib/alchemy/seeder.rb
CHANGED
@@ -31,7 +31,7 @@ module Alchemy
|
|
31
31
|
log "There are already pages present in your database. " \
|
32
32
|
"Please use `rake db:reset' if you want to rebuild your database.", :skip
|
33
33
|
else
|
34
|
-
create_default_site! unless Alchemy::Site.
|
34
|
+
create_default_site! unless Alchemy::Site.first
|
35
35
|
create_default_language! unless Alchemy::Language.default
|
36
36
|
seed_pages if contentpages.present?
|
37
37
|
seed_layoutpages if layoutpages.present?
|
@@ -126,7 +126,7 @@ module Alchemy
|
|
126
126
|
page_layout: default_language["page_layout"],
|
127
127
|
public: true,
|
128
128
|
default: true,
|
129
|
-
site: Alchemy::Site.
|
129
|
+
site: Alchemy::Site.first
|
130
130
|
)
|
131
131
|
else
|
132
132
|
raise DefaultLanguageNotFoundError
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails_helper"
|
4
|
+
|
5
|
+
RSpec.shared_examples_for "a link dialog tab" do |name, title|
|
6
|
+
context "default configuration" do
|
7
|
+
it "should render a tab with a panel" do
|
8
|
+
expect(page).to have_selector("sl-tab[panel='overlay_tab_#{name}_link']")
|
9
|
+
expect(page).to have_selector("sl-tab-panel[name='overlay_tab_#{name}_link']")
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should have a title" do
|
13
|
+
expect(page).to have_text(title)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should allow to add title input" do
|
17
|
+
expect(page).to have_selector("input[name=#{name}_link_title]", text: "")
|
18
|
+
end
|
19
|
+
|
20
|
+
it "is not active" do
|
21
|
+
expect(page).to_not have_selector("sl-tab[active]")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
context "active tab" do
|
26
|
+
let(:is_selected) { true }
|
27
|
+
|
28
|
+
it "is active" do
|
29
|
+
expect(page).to have_selector("sl-tab[active]")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
context "title input" do
|
34
|
+
let(:link_title) { "test" }
|
35
|
+
|
36
|
+
it "should have a pre-filled value" do
|
37
|
+
expect(page.find(:css, "input[name=#{name}_link_title]").value).to eq(link_title)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
shared_examples_for "a link dialog - target select" do |name|
|
43
|
+
context "target select" do
|
44
|
+
context "without content" do
|
45
|
+
it "should allow to add target select" do
|
46
|
+
expect(page).to have_selector("select[name=#{name}_link_target]")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context "with content"
|
51
|
+
let(:link_target) { "_blank" }
|
52
|
+
|
53
|
+
it "should have a pre-filled value" do
|
54
|
+
expect(page.find(:css, "select[name=#{name}_link_target]").value).to eq(link_target)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/lib/alchemy/tinymce.rb
CHANGED