alchemy_cms 7.1.12 → 7.2.0.b
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +132 -29
- 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/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 +73 -41
- 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 +1 -1
- 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 +3 -3
- 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 +66 -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/datetime_view.rb +2 -3
- 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/layoutpages_controller.rb +0 -19
- 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/pages_controller.rb +10 -6
- data/app/controllers/alchemy/base_controller.rb +2 -2
- data/app/controllers/alchemy/messages_controller.rb +3 -3
- data/app/controllers/alchemy/pages_controller.rb +8 -6
- data/app/controllers/concerns/alchemy/admin/current_language.rb +1 -11
- 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/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 +24 -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 +1 -1
- 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 +6 -5
- 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 -42
- data/app/models/alchemy/current.rb +26 -0
- data/app/models/alchemy/element.rb +1 -1
- data/app/models/alchemy/ingredients/audio.rb +0 -11
- data/app/models/alchemy/ingredients/datetime.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/ingredients/video.rb +0 -12
- 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 +1 -1
- 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 +1 -2
- data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +3 -5
- 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 +4 -5
- 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 +48 -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 +3 -3
- 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/_per_page_select.html.erb +1 -1
- 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 +2 -3
- 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 +2 -1
- data/bundles/shoelace.js +3 -1
- data/config/locales/alchemy.en.yml +16 -3
- data/config/routes.rb +4 -2
- 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 +19 -2
- data/lib/alchemy/page_layout.rb +10 -6
- data/lib/alchemy/permissions.rb +4 -3
- data/lib/alchemy/routing_constraints.rb +1 -1
- 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/tinymce.rb +2 -1
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy.rb +36 -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/lib/tasks/alchemy/tidy.rake +1 -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 +61 -55
- 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/javascript/alchemy_admin/tags_autocomplete.js +0 -46
- 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/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/lib/alchemy/test_support/current_language_shared_examples.rb +0 -33
- 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
@@ -1,31 +0,0 @@
|
|
1
|
-
<form data-link-form-type="file">
|
2
|
-
<%= render_message do %>
|
3
|
-
<h3><%= Alchemy.t(:choose_file_to_link) %></h3>
|
4
|
-
<% end %>
|
5
|
-
<div class="input select">
|
6
|
-
<label for="file_link" class="control-label">
|
7
|
-
<%= Alchemy.t(:file) %>
|
8
|
-
</label>
|
9
|
-
<%= select_tag "file_link",
|
10
|
-
options_for_select(@attachments),
|
11
|
-
prompt: Alchemy.t('Please choose'),
|
12
|
-
is: "alchemy-select" %>
|
13
|
-
</div>
|
14
|
-
<div class="input text">
|
15
|
-
<label for="file_link_title" class="control-label">
|
16
|
-
<%= Alchemy.t(:link_title) %>
|
17
|
-
</label>
|
18
|
-
<%= text_field_tag "file_link_title", '', class: 'link_title' %>
|
19
|
-
</div>
|
20
|
-
<div class="input select">
|
21
|
-
<label for="file_link_target" class="control-label">
|
22
|
-
<%= Alchemy.t("Open Link in") %>
|
23
|
-
</label>
|
24
|
-
<%= select_tag 'file_link_target',
|
25
|
-
options_for_select(Alchemy::Page.link_target_options),
|
26
|
-
class: 'link_target' %>
|
27
|
-
</div>
|
28
|
-
<div class="submit">
|
29
|
-
<%= button_tag Alchemy.t(:apply) %>
|
30
|
-
</div>
|
31
|
-
</form>
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<form data-link-form-type="internal">
|
2
|
-
<%= render_message do %>
|
3
|
-
<h3><%= Alchemy.t(:internal_link_headline) %></h3>
|
4
|
-
<p><%= Alchemy.t(:internal_link_page_elements_explanation) %></p>
|
5
|
-
<% end %>
|
6
|
-
<div class="input select">
|
7
|
-
<label for="internal_link" class="control-label">
|
8
|
-
<%= Alchemy.t(:page) %>
|
9
|
-
</label>
|
10
|
-
<input type="text" id="internal_link" class="alchemy_selectbox full_width">
|
11
|
-
</div>
|
12
|
-
<div class="input select">
|
13
|
-
<label for="element_anchor" class="control-label">
|
14
|
-
<%= Alchemy.t(:anchor) %>
|
15
|
-
</label>
|
16
|
-
<input type="text" id="element_anchor" class="alchemy_selectbox full_width" disabled placeholder="<%= Alchemy.t('Select a page first') %>">
|
17
|
-
</div>
|
18
|
-
<div class="input text">
|
19
|
-
<label for="internal_link_title" class="control-label">
|
20
|
-
<%= Alchemy.t(:link_title) %>
|
21
|
-
</label>
|
22
|
-
<%= text_field_tag "internal_link_title", '', class: 'link_title' %>
|
23
|
-
</div>
|
24
|
-
<div class="input select">
|
25
|
-
<label for="internal_link_target" class="control-label">
|
26
|
-
<%= Alchemy.t("Open Link in") %>
|
27
|
-
</label>
|
28
|
-
<%= select_tag 'internal_link_target',
|
29
|
-
options_for_select(Alchemy::Page.link_target_options),
|
30
|
-
class: 'link_target' %>
|
31
|
-
</div>
|
32
|
-
<div class="submit">
|
33
|
-
<%= button_tag Alchemy.t(:apply) %>
|
34
|
-
</div>
|
35
|
-
</form>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<sl-tab-group id="overlay_tabs">
|
2
|
-
<sl-tab slot="nav" panel="overlay_tab_internal_link">
|
3
|
-
<%= Alchemy.t('link_overlay_tab_label.internal') %>
|
4
|
-
</sl-tab>
|
5
|
-
<sl-tab slot="nav" panel="overlay_tab_anchor_link">
|
6
|
-
<%= Alchemy.t('link_overlay_tab_label.anchor') %>
|
7
|
-
</sl-tab>
|
8
|
-
<sl-tab slot="nav" panel="overlay_tab_external_link">
|
9
|
-
<%= Alchemy.t('link_overlay_tab_label.external') %>
|
10
|
-
</sl-tab>
|
11
|
-
<sl-tab slot="nav" panel="overlay_tab_file_link">
|
12
|
-
<%= Alchemy.t('link_overlay_tab_label.file') %>
|
13
|
-
</sl-tab>
|
14
|
-
<sl-tab-panel name="overlay_tab_internal_link">
|
15
|
-
<%= render partial: 'internal_link' %>
|
16
|
-
</sl-tab-panel>
|
17
|
-
<sl-tab-panel name="overlay_tab_anchor_link">
|
18
|
-
<%= render partial: 'anchor_link' %>
|
19
|
-
</sl-tab-panel>
|
20
|
-
<sl-tab-panel name="overlay_tab_external_link">
|
21
|
-
<%= render partial: 'external_link' %>
|
22
|
-
</sl-tab-panel>
|
23
|
-
<sl-tab-panel name="overlay_tab_file_link">
|
24
|
-
<%= render partial: 'file_link' %>
|
25
|
-
</sl-tab-panel>
|
26
|
-
</sl-tab-group>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<div class="toolbar_button">
|
2
|
-
<%= content_tag "sl-tooltip", content: options[:label], placement: options[:tooltip_placement] do %>
|
3
|
-
<% if options[:dialog] %>
|
4
|
-
<%= link_to_dialog(
|
5
|
-
render_icon(options[:icon]),
|
6
|
-
options[:url],
|
7
|
-
options[:dialog_options],
|
8
|
-
{
|
9
|
-
class: ["icon_button", options[:active] && "active"].compact,
|
10
|
-
"data-alchemy-hotkey" => options[:hotkey]
|
11
|
-
}.merge(options[:link_options])
|
12
|
-
) %>
|
13
|
-
<% else %>
|
14
|
-
<%= link_to(
|
15
|
-
options[:url], {
|
16
|
-
class: [
|
17
|
-
"icon_button",
|
18
|
-
options[:loading_indicator] && "please_wait",
|
19
|
-
options[:active] && "active",
|
20
|
-
].compact,
|
21
|
-
title: options[:title],
|
22
|
-
"data-alchemy-hotkey" => options[:hotkey]
|
23
|
-
}.merge(options[:link_options])
|
24
|
-
) do %>
|
25
|
-
<%= render_icon(options[:icon]) %>
|
26
|
-
<% end %>
|
27
|
-
<% end %>
|
28
|
-
<% end %>
|
29
|
-
</div>
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
RSpec.shared_examples_for "a controller that loads current language" do |args|
|
4
|
-
context "when session has current language id key" do
|
5
|
-
let!(:site_1) { create(:alchemy_site) }
|
6
|
-
let!(:site_1_default_language) { create :alchemy_language, site: site_1, default: true }
|
7
|
-
let!(:another_site_1_language) { create :alchemy_language, site: site_1, code: :de }
|
8
|
-
let(:site_2) { create :alchemy_site, host: "another.host", languages: [build(:alchemy_language, code: :en), build(:alchemy_language, code: :de)] }
|
9
|
-
|
10
|
-
context "on index action" do
|
11
|
-
context "when switching the current site" do
|
12
|
-
before do
|
13
|
-
session[:alchemy_site_id] = site_1.id
|
14
|
-
session[:alchemy_language_id] = another_site_1_language.id
|
15
|
-
end
|
16
|
-
|
17
|
-
it "sets @current_language to the new site default language" do
|
18
|
-
get :index, params: {site_id: site_2.id}
|
19
|
-
expect(assigns(:current_language)).to eq site_2.default_language
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
context "when no language to set" do
|
24
|
-
it "shows flash warning with redirect" do
|
25
|
-
Alchemy::Language.destroy_all
|
26
|
-
get :index, params: {site_id: site_1.id}
|
27
|
-
expect(flash[:warning]).to eq Alchemy.t("Please create a language first.")
|
28
|
-
expect(response).to redirect_to admin_languages_path
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
Binary file
|