alchemy_cms 8.0.11 → 8.1.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/README.md +14 -10
- data/app/assets/builds/alchemy/admin.css +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/{views/alchemy/admin/elements/_element.html.erb → components/alchemy/admin/element_editor.html.erb} +34 -29
- data/app/components/alchemy/admin/element_editor.rb +115 -0
- data/app/components/alchemy/admin/element_select.rb +12 -9
- data/app/components/alchemy/admin/ingredient_editor.rb +54 -0
- data/app/components/alchemy/admin/list_filter.rb +16 -5
- data/app/components/alchemy/admin/page_node.html.erb +214 -0
- data/app/components/alchemy/admin/page_node.rb +70 -0
- data/app/components/alchemy/admin/picture_thumbnail.rb +36 -0
- data/app/components/alchemy/admin/publish_page_button.html.erb +15 -0
- data/app/components/alchemy/admin/publish_page_button.rb +54 -0
- data/app/{helpers/alchemy/admin/tags_helper.rb → components/alchemy/admin/tags_list.rb} +19 -11
- data/app/components/alchemy/admin/toolbar_button.rb +17 -13
- data/app/components/alchemy/ingredients/audio_editor.rb +8 -0
- data/app/components/alchemy/ingredients/base_editor.rb +222 -0
- data/app/components/alchemy/ingredients/boolean_editor.rb +21 -0
- data/app/components/alchemy/ingredients/color_editor.rb +80 -0
- data/app/components/alchemy/ingredients/color_view.rb +13 -0
- data/app/components/alchemy/ingredients/datetime_editor.rb +28 -0
- data/app/components/alchemy/ingredients/file_editor.rb +69 -0
- data/app/components/alchemy/ingredients/headline_editor.rb +88 -0
- data/app/components/alchemy/ingredients/html_editor.rb +11 -0
- data/app/components/alchemy/ingredients/link_editor.rb +29 -0
- data/app/components/alchemy/ingredients/node_editor.rb +23 -0
- data/app/components/alchemy/ingredients/number_editor.rb +28 -0
- data/app/components/alchemy/ingredients/page_editor.rb +19 -0
- data/app/components/alchemy/ingredients/picture_editor.rb +81 -0
- data/app/components/alchemy/ingredients/richtext_editor.rb +31 -0
- data/app/components/alchemy/ingredients/select_editor.rb +37 -0
- data/app/components/alchemy/ingredients/select_view.rb +7 -0
- data/app/components/alchemy/ingredients/text_editor.rb +41 -0
- data/app/components/alchemy/ingredients/video_editor.rb +8 -0
- data/app/controllers/alchemy/admin/attachments_controller.rb +8 -6
- data/app/controllers/alchemy/admin/base_controller.rb +7 -18
- data/app/controllers/alchemy/admin/clipboard_controller.rb +15 -11
- data/app/controllers/alchemy/admin/dashboard_controller.rb +2 -2
- data/app/controllers/alchemy/admin/elements_controller.rb +34 -32
- data/app/controllers/alchemy/admin/ingredients_controller.rb +1 -0
- data/app/controllers/alchemy/admin/languages_controller.rb +0 -3
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +2 -1
- data/app/controllers/alchemy/admin/legacy_page_urls_controller.rb +1 -1
- data/app/controllers/alchemy/admin/nodes_controller.rb +24 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +36 -42
- data/app/controllers/alchemy/admin/pictures_controller.rb +2 -5
- data/app/controllers/alchemy/admin/resources_controller.rb +1 -1
- data/app/controllers/alchemy/api/ingredients_controller.rb +1 -1
- data/app/controllers/alchemy/api/pages_controller.rb +5 -3
- data/app/controllers/alchemy/base_controller.rb +6 -6
- data/app/controllers/alchemy/pages_controller.rb +12 -6
- data/app/controllers/concerns/alchemy/admin/archive_overlay.rb +0 -1
- data/app/controllers/concerns/alchemy/admin/clipboard.rb +57 -0
- data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +2 -2
- data/app/controllers/concerns/alchemy/site_redirects.rb +1 -1
- data/app/decorators/alchemy/ingredient_editor.rb +37 -4
- data/app/helpers/alchemy/admin/base_helper.rb +10 -6
- data/app/helpers/alchemy/admin/ingredients_helper.rb +6 -3
- data/app/helpers/alchemy/base_helper.rb +1 -1
- data/app/helpers/alchemy/pages_helper.rb +1 -1
- data/app/javascript/alchemy_admin/components/action.js +5 -1
- data/app/javascript/alchemy_admin/components/color_select.js +73 -0
- data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +11 -3
- data/app/javascript/alchemy_admin/components/element_editor/publish_element_button.js +7 -2
- data/app/javascript/alchemy_admin/components/element_editor.js +11 -12
- data/app/javascript/alchemy_admin/components/element_select.js +39 -17
- data/app/javascript/alchemy_admin/components/elements_window.js +0 -2
- data/app/javascript/alchemy_admin/components/file_editor.js +26 -0
- data/app/javascript/alchemy_admin/components/index.js +9 -0
- data/app/javascript/alchemy_admin/components/list_filter.js +57 -8
- data/app/javascript/alchemy_admin/components/message.js +9 -3
- data/app/javascript/alchemy_admin/components/page_node.js +119 -0
- data/app/javascript/alchemy_admin/{page_publication_fields.js → components/page_publication_fields.js} +9 -8
- data/app/javascript/alchemy_admin/{picture_editors.js → components/picture_editor.js} +30 -45
- data/app/javascript/alchemy_admin/components/picture_thumbnail.js +107 -0
- data/app/javascript/alchemy_admin/components/publish_page_button.js +41 -0
- data/app/javascript/alchemy_admin/components/select.js +3 -1
- data/app/javascript/alchemy_admin/components/sitemap.js +210 -0
- data/app/javascript/alchemy_admin/{sortable_elements.js → components/sortable_elements.js} +22 -25
- data/app/javascript/alchemy_admin/components/tinymce.js +10 -5
- data/app/javascript/alchemy_admin/components/uploader.js +30 -0
- data/app/javascript/alchemy_admin/image_overlay.js +0 -2
- data/app/javascript/alchemy_admin/initializer.js +0 -3
- data/app/javascript/alchemy_admin/link_dialog.js +1 -6
- data/app/javascript/alchemy_admin/templates/compiled.js +1 -1
- data/app/javascript/alchemy_admin/utils/ajax.js +15 -3
- data/app/javascript/alchemy_admin.js +0 -6
- data/app/models/alchemy/attachment.rb +4 -4
- data/app/models/alchemy/element/definitions.rb +1 -2
- data/app/models/alchemy/element/element_ingredients.rb +6 -2
- data/app/models/alchemy/element.rb +54 -13
- data/app/models/alchemy/element_definition.rb +4 -1
- data/app/models/alchemy/elements_repository.rb +6 -0
- data/app/models/alchemy/folded_page.rb +2 -2
- data/app/models/alchemy/ingredient.rb +38 -1
- data/app/models/alchemy/ingredient_definition.rb +4 -1
- data/app/models/alchemy/ingredient_validator.rb +6 -2
- data/app/models/alchemy/ingredients/color.rb +10 -0
- data/app/models/alchemy/ingredients/headline.rb +2 -17
- data/app/models/alchemy/ingredients/picture.rb +4 -4
- data/app/models/alchemy/ingredients/select.rb +19 -0
- data/app/models/alchemy/language/code.rb +0 -1
- data/app/models/alchemy/node.rb +28 -1
- data/app/models/alchemy/page/page_naming.rb +0 -7
- data/app/models/alchemy/page/page_natures.rb +7 -3
- data/app/models/alchemy/page/page_scopes.rb +13 -1
- data/app/models/alchemy/page/publisher.rb +14 -2
- data/app/models/alchemy/page.rb +102 -23
- data/app/models/alchemy/page_definition.rb +4 -1
- data/app/models/alchemy/page_version.rb +22 -6
- data/app/models/alchemy/picture.rb +10 -11
- data/app/models/alchemy/picture_variant.rb +1 -3
- data/app/models/alchemy/resource.rb +1 -1
- data/app/models/alchemy/storage_adapter/active_storage.rb +14 -2
- data/app/models/alchemy/storage_adapter/dragonfly.rb +12 -0
- data/app/models/alchemy/storage_adapter.rb +2 -0
- data/app/models/concerns/alchemy/picture_thumbnails.rb +4 -4
- data/app/models/concerns/alchemy/publishable.rb +54 -0
- data/app/serializers/alchemy/page_tree_serializer.rb +11 -31
- data/app/services/alchemy/copy_page.rb +17 -0
- data/app/services/alchemy/duplicate_element.rb +1 -1
- data/app/services/alchemy/page_tree_preloader.rb +105 -0
- data/app/stylesheets/alchemy/_extends.scss +3 -9
- data/app/stylesheets/alchemy/_mixins.scss +3 -1
- data/app/stylesheets/alchemy/_themes.scss +19 -10
- data/app/stylesheets/alchemy/admin/archive.scss +1 -0
- data/app/stylesheets/alchemy/admin/base.scss +5 -2
- data/app/stylesheets/alchemy/admin/buttons.scss +3 -3
- data/app/stylesheets/alchemy/admin/element-select.scss +18 -0
- data/app/stylesheets/alchemy/admin/elements.scss +123 -23
- data/app/stylesheets/alchemy/admin/errors.scss +1 -1
- data/app/stylesheets/alchemy/admin/flash.scss +6 -4
- data/app/stylesheets/alchemy/admin/images.scss +9 -5
- data/app/stylesheets/alchemy/admin/list_filter.scss +4 -4
- data/app/stylesheets/alchemy/admin/navigation.scss +1 -1
- data/app/stylesheets/alchemy/admin/notices.scss +1 -2
- data/app/stylesheets/alchemy/admin/selects.scss +36 -21
- data/app/stylesheets/alchemy/admin/shoelace.scss +14 -1
- data/app/stylesheets/alchemy/admin/sitemap.scss +11 -3
- data/app/stylesheets/alchemy/admin/tags.scss +3 -1
- data/app/stylesheets/alchemy/admin/toolbar.scss +1 -1
- data/app/views/alchemy/_edit_mode.html.erb +1 -1
- data/app/views/alchemy/_menubar.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +35 -31
- data/app/views/alchemy/admin/attachments/_library_sidebar.html.erb +6 -0
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_replace_button.html.erb +1 -8
- data/app/views/alchemy/admin/attachments/_sorting_select.html.erb +13 -0
- data/app/views/alchemy/admin/attachments/_tag_list.html.erb +2 -3
- data/app/views/alchemy/admin/attachments/index.html.erb +5 -11
- data/app/views/alchemy/admin/attachments/show.html.erb +1 -1
- data/app/views/alchemy/admin/clipboard/_button.html.erb +1 -0
- data/app/views/alchemy/admin/clipboard/index.html.erb +4 -5
- data/app/views/alchemy/admin/clipboard/insert.turbo_stream.erb +1 -1
- data/app/views/alchemy/admin/crop.html.erb +5 -7
- data/app/views/alchemy/admin/dashboard/widgets/_locked_pages.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_add_nested_element_form.html.erb +6 -6
- data/app/views/alchemy/admin/elements/_fixed_element.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_footer.html.erb +7 -1
- data/app/views/alchemy/admin/elements/_header.html.erb +5 -5
- data/app/views/alchemy/admin/elements/_toolbar.html.erb +33 -8
- data/app/views/alchemy/admin/elements/create.turbo_stream.erb +10 -10
- data/app/views/alchemy/admin/elements/index.html.erb +29 -16
- data/app/views/alchemy/admin/elements/new.html.erb +2 -2
- data/app/views/alchemy/admin/ingredients/update.turbo_stream.erb +3 -5
- data/app/views/alchemy/admin/leave.html.erb +1 -1
- data/app/views/alchemy/admin/nodes/_node.html.erb +19 -0
- data/app/views/alchemy/admin/nodes/edit.html.erb +1 -1
- data/app/views/alchemy/admin/nodes/index.html.erb +3 -1
- data/app/views/alchemy/admin/nodes/new.html.erb +14 -1
- data/app/views/alchemy/admin/pages/_current_page.html.erb +3 -1
- data/app/views/alchemy/admin/pages/_form.html.erb +21 -9
- data/app/views/alchemy/admin/pages/_page_status.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_publication_fields.html.erb +28 -26
- data/app/views/alchemy/admin/pages/_table.html.erb +0 -7
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +3 -6
- data/app/views/alchemy/admin/pages/edit.html.erb +5 -11
- data/app/views/alchemy/admin/pages/flush.turbo_stream.erb +2 -0
- data/app/views/alchemy/admin/pages/fold.turbo_stream.erb +5 -0
- data/app/views/alchemy/admin/pages/index.html.erb +5 -3
- data/app/views/alchemy/admin/pages/new.html.erb +2 -12
- data/app/views/alchemy/admin/pages/publish.turbo_stream.erb +12 -0
- data/app/views/alchemy/admin/pages/tree.html.erb +13 -0
- data/app/views/alchemy/admin/pages/update.turbo_stream.erb +5 -16
- data/app/views/alchemy/admin/partials/_flash_notices.html.erb +1 -1
- data/app/views/alchemy/admin/partials/{_remote_search_form.html.erb → _overlay_search_form.html.erb} +1 -2
- data/app/views/alchemy/admin/partials/_paste_from_clipboard_form.html.erb +12 -0
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +24 -21
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +18 -26
- data/app/views/alchemy/admin/pictures/_picture.html.erb +11 -15
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +3 -6
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +2 -3
- data/app/views/alchemy/admin/pictures/index.html.erb +0 -1
- data/app/views/alchemy/admin/pictures/update.turbo_stream.erb +1 -1
- data/app/views/alchemy/admin/resources/_resource_usage_info.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_tag_list.html.erb +2 -3
- data/app/views/alchemy/admin/styleguide/index.html.erb +25 -20
- data/app/views/alchemy/admin/tags/edit.html.erb +1 -1
- data/app/views/alchemy/admin/tinymce/_setup.html.erb +2 -2
- data/app/views/alchemy/admin/uploader/_button.html.erb +1 -15
- data/app/views/alchemy/attachments/show.html.erb +1 -1
- data/app/views/alchemy/base/permission_denied.js.erb +1 -1
- data/app/views/alchemy/ingredients/shared/_anchor.html.erb +9 -7
- data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +12 -5
- data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +10 -11
- data/app/views/alchemy/language_links/_spacer.html.erb +1 -1
- data/app/views/alchemy/messages_mailer/new.html.erb +1 -1
- data/app/views/alchemy/welcome.html.erb +1 -1
- data/config/locales/alchemy.en.yml +12 -3
- data/config/routes.rb +2 -2
- data/db/migrate/20230123112425_add_searchable_to_alchemy_pages.rb +1 -1
- data/db/migrate/20230505132743_add_indexes_to_alchemy_pictures.rb +1 -1
- data/db/migrate/20231113104432_create_page_mutexes.rb +1 -1
- data/db/migrate/20240314105244_create_alchemy_picture_descriptions.rb +1 -1
- data/db/migrate/20250626160259_add_unique_index_to_picture_descriptions.rb +1 -1
- data/db/migrate/20250905140323_add_created_at_index_to_pictures_and_attachments.rb +1 -1
- data/db/migrate/20251106150010_convert_select_value_for_multiple.rb +11 -0
- data/db/migrate/20260102121232_add_metadata_to_page_versions.rb +9 -0
- data/db/migrate/20260115164704_add_publication_timestamps_to_alchemy_elements.rb +30 -0
- data/db/migrate/20260115164705_add_index_to_element_publication_timestamps.rb +13 -0
- data/lib/alchemy/ability_helper.rb +1 -3
- data/lib/alchemy/auth_accessors.rb +51 -117
- data/lib/alchemy/configuration.rb +1 -0
- data/lib/alchemy/configurations/main.rb +63 -0
- data/lib/alchemy/controller_actions.rb +2 -3
- data/lib/alchemy/engine.rb +9 -12
- data/lib/alchemy/error_tracking/error_logger.rb +1 -1
- data/lib/alchemy/errors.rb +1 -1
- data/lib/alchemy/logger.rb +34 -4
- data/lib/alchemy/name_conversions.rb +0 -6
- data/lib/alchemy/seeder.rb +2 -2
- data/lib/alchemy/tasks/usage.rb +4 -4
- data/lib/alchemy/test_support/factories/page_version_factory.rb +3 -0
- data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +30 -0
- data/lib/alchemy/test_support/shared_ingredient_editor_examples.rb +26 -6
- data/lib/alchemy/test_support/shared_publishable_examples.rb +114 -0
- data/lib/alchemy/upgrader/eight_one.rb +56 -0
- data/lib/alchemy/upgrader.rb +9 -1
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy.rb +1 -4
- data/lib/alchemy_cms.rb +0 -1
- data/lib/generators/alchemy/elements/templates/view.html.erb +3 -3
- data/lib/generators/alchemy/ingredient/ingredient_generator.rb +6 -8
- data/lib/generators/alchemy/ingredient/templates/editor_component.rb.tt +22 -0
- data/lib/generators/alchemy/page_layouts/templates/layout.html.erb +1 -1
- data/lib/generators/alchemy/site_layouts/templates/layout.html.erb +1 -1
- data/lib/tasks/alchemy/upgrade.rake +21 -7
- data/vendor/javascript/shoelace.min.js +713 -31
- data/vendor/javascript/tinymce.min.js +1 -1
- metadata +104 -84
- data/app/decorators/alchemy/element_editor.rb +0 -90
- data/app/helpers/alchemy/admin/pictures_helper.rb +0 -14
- data/app/javascript/alchemy_admin/file_editors.js +0 -28
- data/app/javascript/alchemy_admin/image_loader.js +0 -54
- data/app/javascript/alchemy_admin/page_sorter.js +0 -71
- data/app/javascript/alchemy_admin/sitemap.js +0 -154
- data/app/javascript/alchemy_admin/templates/page_folder.hbs +0 -3
- data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +0 -4
- data/app/views/alchemy/admin/pages/_page.html.erb +0 -163
- data/app/views/alchemy/admin/pages/_sitemap.html.erb +0 -30
- data/app/views/alchemy/admin/pages/flush.js.erb +0 -2
- data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +0 -5
- data/app/views/alchemy/admin/pictures/index.js.erb +0 -2
- data/app/views/alchemy/ingredients/_audio_editor.html.erb +0 -5
- data/app/views/alchemy/ingredients/_boolean_editor.html.erb +0 -11
- data/app/views/alchemy/ingredients/_datetime_editor.html.erb +0 -20
- data/app/views/alchemy/ingredients/_file_editor.html.erb +0 -52
- data/app/views/alchemy/ingredients/_headline_editor.html.erb +0 -44
- data/app/views/alchemy/ingredients/_html_editor.html.erb +0 -8
- data/app/views/alchemy/ingredients/_link_editor.html.erb +0 -30
- data/app/views/alchemy/ingredients/_node_editor.html.erb +0 -13
- data/app/views/alchemy/ingredients/_number_editor.html.erb +0 -24
- data/app/views/alchemy/ingredients/_page_editor.html.erb +0 -13
- data/app/views/alchemy/ingredients/_picture_editor.html.erb +0 -59
- data/app/views/alchemy/ingredients/_richtext_editor.html.erb +0 -15
- data/app/views/alchemy/ingredients/_select_editor.html.erb +0 -31
- data/app/views/alchemy/ingredients/_text_editor.html.erb +0 -29
- data/app/views/alchemy/ingredients/_video_editor.html.erb +0 -5
- data/lib/generators/alchemy/ingredient/templates/editor.html.erb +0 -14
- /data/{lib → app/models}/alchemy/permissions.rb +0 -0
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
<% opts = {
|
|
2
|
-
partial: "alchemy/admin/elements/element",
|
|
3
|
-
locals: {
|
|
4
|
-
element: Alchemy::ElementEditor.new(@element),
|
|
5
|
-
created: true
|
|
6
|
-
}
|
|
7
|
-
} %>
|
|
8
|
-
|
|
9
1
|
<% if @element.fixed? %>
|
|
10
2
|
<% target = "fixed_element_#{@element.id}" %>
|
|
11
3
|
<%= turbo_stream.append "fixed-elements",
|
|
@@ -22,15 +14,23 @@
|
|
|
22
14
|
<% end %>
|
|
23
15
|
|
|
24
16
|
<% if @insert_at_top %>
|
|
25
|
-
<%= turbo_stream.prepend target
|
|
17
|
+
<%= turbo_stream.prepend target do %>
|
|
18
|
+
<%= render Alchemy::Admin::ElementEditor.new(element: @element, created: true) %>
|
|
19
|
+
<% end %>
|
|
26
20
|
<% else %>
|
|
27
|
-
<%= turbo_stream.append target
|
|
21
|
+
<%= turbo_stream.append target do %>
|
|
22
|
+
<%= render Alchemy::Admin::ElementEditor.new(element: @element, created: true) %>
|
|
23
|
+
<% end %>
|
|
28
24
|
<% end %>
|
|
29
25
|
|
|
30
26
|
<%= turbo_stream.replace "clipboard_button",
|
|
31
27
|
partial: "alchemy/admin/clipboard/button",
|
|
32
28
|
locals: {remarkable_type: "elements"} %>
|
|
33
29
|
|
|
30
|
+
<%= turbo_stream.replace "publish_page_button" do %>
|
|
31
|
+
<%= render Alchemy::Admin::PublishPageButton.new(page: @element.page) %>
|
|
32
|
+
<% end %>
|
|
33
|
+
|
|
34
34
|
<alchemy-growl>
|
|
35
35
|
<%= Alchemy.t(:successfully_added_element) %>
|
|
36
36
|
</alchemy-growl>
|
|
@@ -9,16 +9,26 @@
|
|
|
9
9
|
label: Alchemy.t("New Element"),
|
|
10
10
|
dialog_options: {
|
|
11
11
|
title: Alchemy.t("New Element"),
|
|
12
|
-
size: "
|
|
12
|
+
size: "380x125"
|
|
13
13
|
},
|
|
14
|
+
tooltip_placement: "bottom-start",
|
|
14
15
|
if_permitted_to: [:create, Alchemy::Element]
|
|
15
16
|
) %>
|
|
16
|
-
<%= render "alchemy/admin/clipboard/button", remarkable_type: "elements" %>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
<%= render "alchemy/admin/clipboard/button", remarkable_type: "elements", tooltip_placement: "bottom-start" %>
|
|
18
|
+
<div class="right">
|
|
19
|
+
<%= render Alchemy::Admin::ListFilter.new(
|
|
20
|
+
"alchemy-element-editor",
|
|
21
|
+
name_attribute: "filter-text",
|
|
22
|
+
placeholder: Alchemy.t("Filter elements"),
|
|
23
|
+
hotkey: "alt+f"
|
|
24
|
+
) %>
|
|
25
|
+
<div class="toolbar_spacer"></div>
|
|
26
|
+
<sl-tooltip content="<%= Alchemy.t("Collapse all elements") %>" placement="bottom-end">
|
|
27
|
+
<button id="collapse-all-elements-button" class="icon_button">
|
|
28
|
+
<alchemy-icon name="contract-up-down"></alchemy-icon>
|
|
29
|
+
</button>
|
|
30
|
+
</sl-tooltip>
|
|
31
|
+
</div>
|
|
22
32
|
</div>
|
|
23
33
|
<% if @page.element_definitions.any?(&:fixed) %>
|
|
24
34
|
<sl-tab-group id="fixed-elements">
|
|
@@ -28,24 +38,27 @@
|
|
|
28
38
|
<%= render partial: "fixed_element", collection: @fixed_elements, as: :element %>
|
|
29
39
|
<sl-tab-panel
|
|
30
40
|
name="main-content-elements"
|
|
31
|
-
class="sortable-elements scrollable-elements"
|
|
32
|
-
data-droppable-elements="<%= @page.element_definition_names.join(' ') %>"
|
|
33
|
-
data-element-name="main-content-elements"
|
|
34
|
-
id="main-content-elements"
|
|
35
41
|
style="--padding: 0"
|
|
36
42
|
>
|
|
37
|
-
|
|
43
|
+
<alchemy-sortable-elements
|
|
44
|
+
id="main-content-elements"
|
|
45
|
+
class="scrollable-elements"
|
|
46
|
+
data-droppable-elements="<%= @page.element_definition_names.join(' ') %>"
|
|
47
|
+
data-element-name="main-content-elements"
|
|
48
|
+
>
|
|
49
|
+
<%= render Alchemy::Admin::ElementEditor.with_collection(@elements) %>
|
|
50
|
+
</alchemy-sortable-elements>
|
|
38
51
|
</sl-tab-panel>
|
|
39
52
|
</sl-tab-group>
|
|
40
53
|
<% else %>
|
|
41
|
-
<
|
|
54
|
+
<alchemy-sortable-elements
|
|
42
55
|
id="main-content-elements"
|
|
43
|
-
class="
|
|
56
|
+
class="scrollable-elements"
|
|
44
57
|
data-droppable-elements="<%= @page.element_definition_names.join(' ') %>"
|
|
45
58
|
data-element-name="main-content-elements"
|
|
46
59
|
>
|
|
47
|
-
<%= render
|
|
48
|
-
</
|
|
60
|
+
<%= render Alchemy::Admin::ElementEditor.with_collection(@elements) %>
|
|
61
|
+
</alchemy-sortable-elements>
|
|
49
62
|
<% end %>
|
|
50
63
|
</alchemy-elements-window>
|
|
51
64
|
<% end %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%- if
|
|
1
|
+
<%- if clipboard_items.blank? -%>
|
|
2
2
|
<%= render 'form' %>
|
|
3
3
|
<%- else -%>
|
|
4
4
|
<sl-tab-group id="overlay_tabs">
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class="input select">
|
|
15
15
|
<label for="paste_from_clipboard" class="control-label"><%= Alchemy.t("Element") %></label>
|
|
16
16
|
<%= select_tag 'paste_from_clipboard',
|
|
17
|
-
clipboard_select_tag_options(
|
|
17
|
+
clipboard_select_tag_options(clipboard_items),
|
|
18
18
|
is: 'alchemy-select' %>
|
|
19
19
|
</div>
|
|
20
20
|
<%= f.submit Alchemy.t(:paste) %>
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
<alchemy-action name="updateAnchorIcon" params="<%= [@ingredient.id, @ingredient.dom_id.present?].to_json %>"></alchemy-action>
|
|
5
5
|
<% end %>
|
|
6
6
|
<% if @ingredient.type == "Alchemy::Ingredients::Picture" && @ingredient.css_class.present? %>
|
|
7
|
-
<%= turbo_stream.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
css_class: Alchemy::IngredientEditor.new(@ingredient).css_class
|
|
11
|
-
} %>
|
|
7
|
+
<%= turbo_stream.replace @ingredient do %>
|
|
8
|
+
<%= render Alchemy::Ingredients::PictureEditor.new(@ingredient) %>
|
|
9
|
+
<% end %>
|
|
12
10
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%= render_message do %>
|
|
2
2
|
<%= Alchemy.t("You are about to leave Alchemy") %>
|
|
3
3
|
<% end %>
|
|
4
|
-
<%= form_tag Alchemy.logout_path, method: Alchemy.logout_method do %>
|
|
4
|
+
<%= form_tag Alchemy.config.logout_path, method: Alchemy.config.logout_method do %>
|
|
5
5
|
<div class="buttons">
|
|
6
6
|
<%= link_to Alchemy.t("stay logged in"),
|
|
7
7
|
alchemy.root_path,
|
|
@@ -40,6 +40,25 @@
|
|
|
40
40
|
) %>
|
|
41
41
|
</sl-tooltip>
|
|
42
42
|
<% end %>
|
|
43
|
+
<% if can?(:copy, node) %>
|
|
44
|
+
<sl-tooltip content="<%= Alchemy.t(:copy_node) %>">
|
|
45
|
+
<%= link_to(
|
|
46
|
+
render_icon("file-copy"),
|
|
47
|
+
alchemy.insert_admin_clipboard_path(
|
|
48
|
+
remarkable_type: :nodes,
|
|
49
|
+
remarkable_id: node.id,
|
|
50
|
+
),
|
|
51
|
+
"data-turbo-method": :post,
|
|
52
|
+
class: "icon_button"
|
|
53
|
+
) %>
|
|
54
|
+
</sl-tooltip>
|
|
55
|
+
<% else %>
|
|
56
|
+
<div class="sitemap_tool disabled">
|
|
57
|
+
<sl-tooltip content="<%= Alchemy.t("Your user role does not allow you to copy this node") %>" class="like-hint-tooltip" placement="bottom-start">
|
|
58
|
+
<%= render_icon("file-copy") %>
|
|
59
|
+
</sl-tooltip>
|
|
60
|
+
</div>
|
|
61
|
+
<% end %>
|
|
43
62
|
<% if can?(:destroy, node) %>
|
|
44
63
|
<sl-tooltip content="<%= node.root? ? Alchemy.t(:delete_menu) : Alchemy.t(:delete_node) %>">
|
|
45
64
|
<%= link_to_confirm_dialog(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<%= render 'form', node: @node, button_label: Alchemy.t(:save) %>
|
|
1
|
+
<%= render 'form', node: @node, button_label: Alchemy.t(:save) %>
|
|
@@ -18,11 +18,13 @@
|
|
|
18
18
|
},
|
|
19
19
|
if_permitted_to: [:create, Alchemy::Node]
|
|
20
20
|
) if @root_nodes.any? %>
|
|
21
|
+
<div class="toolbar_spacer"></div>
|
|
22
|
+
<%= render "alchemy/admin/clipboard/button", remarkable_type: "nodes" %>
|
|
21
23
|
</div>
|
|
22
24
|
<% end %>
|
|
23
25
|
|
|
24
26
|
<div id="archive_all">
|
|
25
|
-
<h1 id="node_filter_result"
|
|
27
|
+
<h1 id="node_filter_result">Node filter display</h1>
|
|
26
28
|
<% if @root_nodes.any? %>
|
|
27
29
|
<% @root_nodes.each do |root_node| %>
|
|
28
30
|
<ul class="nodes_tree list">
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
<%- if clipboard_items.blank? -%>
|
|
2
|
+
<%= render 'form', node: @node, button_label: Alchemy.t(:create) %>
|
|
3
|
+
<%- else -%>
|
|
4
|
+
<sl-tab-group id="overlay_tabs">
|
|
5
|
+
<sl-tab slot="nav" panel="create_node_tab"><%= Alchemy.t('New node') %></sl-tab>
|
|
6
|
+
<sl-tab slot="nav" panel="paste_node_tab"><%= Alchemy.t('Paste from clipboard') %></sl-tab>
|
|
7
|
+
<sl-tab-panel name="create_node_tab">
|
|
8
|
+
<%= render 'form', node: @node, button_label: Alchemy.t(:create) %>
|
|
9
|
+
</sl-tab-panel>
|
|
10
|
+
<sl-tab-panel name="paste_node_tab">
|
|
11
|
+
<%= render 'alchemy/admin/partials/paste_from_clipboard_form', item: @node %>
|
|
12
|
+
</sl-tab-panel>
|
|
13
|
+
</sl-tab-group>
|
|
14
|
+
<%- end -%>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<div class="page_status_and_name" id="locked_page_<%= current_page.id %>">
|
|
2
2
|
<%= render 'alchemy/admin/pages/page_infos', page: current_page %>
|
|
3
|
-
<%= render 'alchemy/admin/pages/page_status',
|
|
3
|
+
<%= render 'alchemy/admin/pages/page_status',
|
|
4
|
+
published: local_assigns.fetch(:published, false),
|
|
5
|
+
page: current_page %>
|
|
4
6
|
</div>
|
|
@@ -19,9 +19,14 @@
|
|
|
19
19
|
|
|
20
20
|
<%= f.input :name, autofocus: true %>
|
|
21
21
|
<%= f.input :urlname, as: 'string', input_html: {value: @page.slug}, label: Alchemy::Page.human_attribute_name(:slug) %>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
|
|
23
|
+
<%= f.fields_for :draft_version, @page.draft_version do |v| %>
|
|
24
|
+
<alchemy-char-counter max-chars="60">
|
|
25
|
+
<%= v.input :title, input_html: {
|
|
26
|
+
disabled: @page.attribute_fixed?(:title)
|
|
27
|
+
} %>
|
|
28
|
+
</alchemy-char-counter>
|
|
29
|
+
<% end %>
|
|
25
30
|
|
|
26
31
|
<% if Alchemy.config.show_page_searchable_checkbox %>
|
|
27
32
|
<div class="input check_boxes">
|
|
@@ -40,13 +45,20 @@
|
|
|
40
45
|
</div>
|
|
41
46
|
</div>
|
|
42
47
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
<%= f.fields_for :draft_version, @page.draft_version do |v| %>
|
|
49
|
+
<alchemy-char-counter max-chars="160">
|
|
50
|
+
<%= v.input :meta_description, as: 'text', input_html: {
|
|
51
|
+
disabled: @page.attribute_fixed?(:meta_description)
|
|
52
|
+
} %>
|
|
53
|
+
</alchemy-char-counter>
|
|
46
54
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
55
|
+
<%= v.input :meta_keywords,
|
|
56
|
+
as: 'text',
|
|
57
|
+
hint: Alchemy.t('pages.update.comma_seperated'),
|
|
58
|
+
input_html: {
|
|
59
|
+
disabled: @page.attribute_fixed?(:meta_keywords)
|
|
60
|
+
} %>
|
|
61
|
+
<% end %>
|
|
50
62
|
|
|
51
63
|
<%= render Alchemy::Admin::TagsAutocomplete.new do %>
|
|
52
64
|
<%= f.input :tag_list, input_html: { value: f.object.tag_list.join(",") } %>
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
<alchemy-page-publication-fields>
|
|
2
|
+
<% checkbox = check_box_tag :page_public, nil, @page.public?, name: nil, disabled: @page.attribute_fixed?(:public_on) %>
|
|
2
3
|
|
|
3
|
-
<label class="checkbox">
|
|
4
|
-
<% if @page.attribute_fixed?(:public_on) || @page.attribute_fixed?(:public_until) %>
|
|
5
|
-
|
|
4
|
+
<label class="checkbox">
|
|
5
|
+
<% if @page.attribute_fixed?(:public_on) || @page.attribute_fixed?(:public_until) %>
|
|
6
|
+
<sl-tooltip class="like-hint-tooltip" content="<%= Alchemy.t(:attribute_fixed) %>" placement="bottom-start">
|
|
7
|
+
<%= checkbox %>
|
|
8
|
+
<%= Alchemy::Page.human_attribute_name :public %>
|
|
9
|
+
</sl-tooltip>
|
|
10
|
+
<% else %>
|
|
6
11
|
<%= checkbox %>
|
|
7
12
|
<%= Alchemy::Page.human_attribute_name :public %>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<%= checkbox %>
|
|
11
|
-
<%= Alchemy::Page.human_attribute_name :public %>
|
|
12
|
-
<% end %>
|
|
13
|
-
</label>
|
|
13
|
+
<% end %>
|
|
14
|
+
</label>
|
|
14
15
|
|
|
15
|
-
<%= content_tag :div, class: [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
] do %>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<% end %>
|
|
16
|
+
<%= content_tag :div, class: [
|
|
17
|
+
@page.public_on.present? || @page.public_until.present? ? nil : 'hidden',
|
|
18
|
+
'page-publication-date-fields',
|
|
19
|
+
'input-row'
|
|
20
|
+
] do %>
|
|
21
|
+
<div class="input-column">
|
|
22
|
+
<label><%= Alchemy.t(:from) %></label>
|
|
23
|
+
<%= alchemy_datepicker @page, :public_on, type: :datetime,
|
|
24
|
+
disabled: @page.attribute_fixed?(:public_on) %>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="input-column">
|
|
27
|
+
<label><%= Alchemy.t(:until) %></label>
|
|
28
|
+
<%= alchemy_datepicker @page, :public_until, type: :datetime,
|
|
29
|
+
disabled: @page.attribute_fixed?(:public_until) %>
|
|
30
|
+
</div>
|
|
31
|
+
<% end %>
|
|
32
|
+
</alchemy-page-publication-fields>
|
|
@@ -18,14 +18,11 @@
|
|
|
18
18
|
<% if can?(:flush, Alchemy::Page) %>
|
|
19
19
|
<div class="toolbar_button">
|
|
20
20
|
<sl-tooltip content="<%= Alchemy.t("Flush page cache") %>">
|
|
21
|
-
<%=
|
|
21
|
+
<%= button_to(
|
|
22
22
|
render_icon(:eraser),
|
|
23
23
|
alchemy.flush_admin_pages_path,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
class: "icon_button",
|
|
27
|
-
title: Alchemy.t("Flush page cache"),
|
|
28
|
-
"data-turbo-confirm": Alchemy.t(:confirm_to_flush_cache)
|
|
24
|
+
"turbo-method": :post,
|
|
25
|
+
class: "icon_button please_wait"
|
|
29
26
|
) %>
|
|
30
27
|
</sl-tooltip>
|
|
31
28
|
</div>
|
|
@@ -57,15 +57,6 @@
|
|
|
57
57
|
<% end %>
|
|
58
58
|
</sl-tooltip>
|
|
59
59
|
</div>
|
|
60
|
-
<div class="toolbar_button">
|
|
61
|
-
<%= content_tag "sl-tooltip", content: @page.language.public? ? Alchemy.t(:explain_publishing) : @page.editable_by?(current_alchemy_user) ? Alchemy.t(:publish_page_language_not_public) : Alchemy.t(:publish_page_not_allowed) do %>
|
|
62
|
-
<%= form_tag alchemy.publish_admin_page_path(@page), id: 'publish_page_form' do %>
|
|
63
|
-
<%= button_tag class: 'icon_button please_wait', disabled: cannot?(:publish, @page) do %>
|
|
64
|
-
<%= render_icon('upload-cloud-2') %>
|
|
65
|
-
<% end %>
|
|
66
|
-
<% end %>
|
|
67
|
-
<% end %>
|
|
68
|
-
</div>
|
|
69
60
|
<% unless @page.layoutpage? %>
|
|
70
61
|
<div class="toolbar_button">
|
|
71
62
|
<% if @page.public? %>
|
|
@@ -117,7 +108,10 @@
|
|
|
117
108
|
</sl-tooltip>
|
|
118
109
|
</div>
|
|
119
110
|
</div>
|
|
111
|
+
|
|
120
112
|
<div class="toolbar_buttons right">
|
|
113
|
+
<%= render Alchemy::Admin::PublishPageButton.new(page: @page) %>
|
|
114
|
+
<div class="toolbar_spacer"></div>
|
|
121
115
|
<div class="toolbar_button">
|
|
122
116
|
<sl-tooltip content="<%= Alchemy.t(:hide_elements) %>">
|
|
123
117
|
<%= link_to render_icon("menu-unfold"), nil, {
|
|
@@ -134,7 +128,8 @@
|
|
|
134
128
|
id="alchemy_preview_window"
|
|
135
129
|
name="alchemy_preview_window"
|
|
136
130
|
is="alchemy-preview-window"
|
|
137
|
-
frameborder="0"
|
|
131
|
+
frameborder="0"
|
|
132
|
+
title="<%= Alchemy.t("Page preview") %>">
|
|
138
133
|
</iframe>
|
|
139
134
|
|
|
140
135
|
<%= turbo_frame_tag "alchemy_elements_window", src: alchemy.admin_elements_path(page_version_id: @page_version.id) do %>
|
|
@@ -149,7 +144,6 @@
|
|
|
149
144
|
if (!not_dirty) Alchemy.pleaseWaitOverlay(false);
|
|
150
145
|
return not_dirty;
|
|
151
146
|
});
|
|
152
|
-
Alchemy.PagePublicationFields();
|
|
153
147
|
Alchemy.PageLeaveObserver();
|
|
154
148
|
});
|
|
155
149
|
|
|
@@ -24,9 +24,11 @@
|
|
|
24
24
|
<%= render "tag_list" if resource_has_tags %>
|
|
25
25
|
</div>
|
|
26
26
|
<% else %>
|
|
27
|
-
<% if @
|
|
28
|
-
<h2 id="page_filter_result"
|
|
29
|
-
<%=
|
|
27
|
+
<% if @root_page %>
|
|
28
|
+
<h2 id="page_filter_result">Page filter display</h2>
|
|
29
|
+
<%= turbo_frame_tag "alchemy_pages_tree", src: alchemy.tree_admin_pages_path do %>
|
|
30
|
+
<alchemy-spinner></alchemy-spinner>
|
|
31
|
+
<% end %>
|
|
30
32
|
<% elsif can?(:create, Alchemy::Page) %>
|
|
31
33
|
<%= render partial: "create_language_form" %>
|
|
32
34
|
<% else %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%- if
|
|
1
|
+
<%- if clipboard_items.blank? -%>
|
|
2
2
|
<%= render 'new_page_form' %>
|
|
3
3
|
<%- else -%>
|
|
4
4
|
<sl-tab-group id="overlay_tabs">
|
|
@@ -8,17 +8,7 @@
|
|
|
8
8
|
<%= render 'new_page_form' %>
|
|
9
9
|
</sl-tab-panel>
|
|
10
10
|
<sl-tab-panel name="paste_page_tab">
|
|
11
|
-
<%=
|
|
12
|
-
<%= f.hidden_field(:parent_id) %>
|
|
13
|
-
<div class="input select">
|
|
14
|
-
<label for="paste_from_clipboard" class="control-label"><%= Alchemy::Page.model_name.human %></label>
|
|
15
|
-
<%= select_tag 'paste_from_clipboard',
|
|
16
|
-
clipboard_select_tag_options(@clipboard_items),
|
|
17
|
-
is: 'alchemy-select' %>
|
|
18
|
-
</div>
|
|
19
|
-
<%= f.input :name %>
|
|
20
|
-
<%= f.submit Alchemy.t(:paste) %>
|
|
21
|
-
<% end %>
|
|
11
|
+
<%= render 'alchemy/admin/partials/paste_from_clipboard_form', item: @page %>
|
|
22
12
|
</sl-tab-panel>
|
|
23
13
|
</sl-tab-group>
|
|
24
14
|
<%- end -%>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<alchemy-growl>
|
|
2
|
+
<%= Alchemy.t(:page_published, name: @page.name) %>
|
|
3
|
+
</alchemy-growl>
|
|
4
|
+
<%= turbo_stream.replace "locked_page_#{@page.id}",
|
|
5
|
+
partial: "alchemy/admin/pages/current_page",
|
|
6
|
+
locals: {current_page: @page, published: true } %>
|
|
7
|
+
<%= turbo_stream.replace "publish_page_button" do %>
|
|
8
|
+
<%= render Alchemy::Admin::PublishPageButton.new(
|
|
9
|
+
page: @page,
|
|
10
|
+
published: true
|
|
11
|
+
) %>
|
|
12
|
+
<% end %>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<%= turbo_frame_tag "alchemy_pages_tree" do %>
|
|
2
|
+
<h4 id="sitemap_heading">
|
|
3
|
+
<span class="page_name"><%= Alchemy::Page.human_attribute_name(:name) %></span>
|
|
4
|
+
<span class="page_urlname"><%= Alchemy::Page.human_attribute_name(:urlname) %></span>
|
|
5
|
+
<span class="page_status"><%= Alchemy.t(:page_status) %></span>
|
|
6
|
+
</h4>
|
|
7
|
+
|
|
8
|
+
<alchemy-sitemap>
|
|
9
|
+
<ul id="sitemap" class="list">
|
|
10
|
+
<%= render Alchemy::Admin::PageNode.new(page: @root_page) %>
|
|
11
|
+
</ul>
|
|
12
|
+
</alchemy-sitemap>
|
|
13
|
+
<% end %>
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
<alchemy-growl><%= @notice %></alchemy-
|
|
1
|
+
<alchemy-growl><%= @notice %></alchemy-growl>
|
|
2
2
|
<alchemy-action name="closeCurrentDialog"></alchemy-action>
|
|
3
3
|
|
|
4
4
|
<% if @while_page_edit -%>
|
|
5
5
|
<%= turbo_stream.replace "locked_page_#{@page.id}" do %>
|
|
6
6
|
<%= render("alchemy/admin/pages/current_page", current_page: @page) %>
|
|
7
7
|
<% end %>
|
|
8
|
+
<%= turbo_stream.replace "publish_page_button" do %>
|
|
9
|
+
<%= render Alchemy::Admin::PublishPageButton.new(page: @page) %>
|
|
10
|
+
<% end %>
|
|
8
11
|
<alchemy-action name="reloadPreview"></alchemy-action>
|
|
9
12
|
<% else %>
|
|
10
13
|
<%= turbo_stream.replace "locked_page_#{@page.id}" do %>
|
|
@@ -13,27 +16,13 @@
|
|
|
13
16
|
|
|
14
17
|
<% if @view == "list" %>
|
|
15
18
|
<turbo-stream action="refresh"></turbo-stream>
|
|
16
|
-
<% elsif @page.parent_id != @old_parent_id -%>
|
|
17
|
-
<%= turbo_stream.append "sitemap" do %>
|
|
18
|
-
<script type="module">
|
|
19
|
-
Alchemy.currentSitemap.load(<%= @page.get_language_root.id %>);
|
|
20
|
-
</script>
|
|
21
|
-
<% end %>
|
|
22
19
|
<% else -%>
|
|
23
20
|
<% if @page.layoutpage %>
|
|
24
21
|
<%= turbo_stream.replace "page_#{@page.id}" do %>
|
|
25
22
|
<%= render("alchemy/admin/layoutpages/layoutpage", layoutpage: @page) %>
|
|
26
23
|
<% end %>
|
|
27
24
|
<% else %>
|
|
28
|
-
|
|
29
|
-
<script type="module">
|
|
30
|
-
const page = document.getElementById('page_<%= @page.id %>');
|
|
31
|
-
const page_html = "<%= j render('page', page: @page) %>".replace(/__ID__/g, "<%= @page.id %>");
|
|
32
|
-
const compiler = Handlebars.compile(page_html);
|
|
33
|
-
const tree = <%== @tree.to_json %>;
|
|
34
|
-
page.outerHTML = compiler(tree.pages[0]);
|
|
35
|
-
</script>
|
|
36
|
-
<% end %>
|
|
25
|
+
<turbo-stream action="refresh"></turbo-stream>
|
|
37
26
|
<% end %>
|
|
38
27
|
<% end -%>
|
|
39
28
|
<% end %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div id="flash_notices">
|
|
1
|
+
<div id="flash_notices" data-auto-dismiss-delay="5000">
|
|
2
2
|
<% flash.keys.each do |flash_type| %>
|
|
3
3
|
<% if flash[flash_type.to_sym].present? %>
|
|
4
4
|
<%= render Alchemy::Admin::Message.new(flash[flash_type.to_sym], type: flash_type, dismissable: true) %>
|
data/app/views/alchemy/admin/partials/{_remote_search_form.html.erb → _overlay_search_form.html.erb}
RENAMED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
size: @size
|
|
7
7
|
)) -%>
|
|
8
8
|
|
|
9
|
-
<%= search_form_for @query, url: url_for(action: 'index', size: @size),
|
|
9
|
+
<%= search_form_for @query, url: url_for(action: 'index', size: @size), html: {class: 'search_form', id: "resource_search"} do |f| %>
|
|
10
10
|
<%= hidden_field_tag :form_field_id, @form_field_id %>
|
|
11
11
|
<% Array(params[:only]).each do |only| %>
|
|
12
12
|
<%= hidden_field_tag("only[]", only, form: "resource_search", id: nil) %>
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
class: 'search_input_field',
|
|
24
24
|
id: nil %>
|
|
25
25
|
<%= link_to render_icon(:times, size: '1x'), clear_url,
|
|
26
|
-
remote: true,
|
|
27
26
|
class: 'search_field_clear',
|
|
28
27
|
title: Alchemy.t(:click_to_show_all),
|
|
29
28
|
style: search_filter_params.fetch(:q, {}).fetch(resource_handler.search_field_name, '').present? ? 'visibility: visible' : 'visibility: hidden' %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%= alchemy_form_for [:admin, item] do |f| %>
|
|
2
|
+
<%= f.hidden_field(:parent_id) %>
|
|
3
|
+
<%= f.hidden_field(:language_id) %>
|
|
4
|
+
<div class="input select">
|
|
5
|
+
<label for="paste_from_clipboard" class="control-label"><%= item.class.model_name.human %></label>
|
|
6
|
+
<%= select_tag 'paste_from_clipboard',
|
|
7
|
+
clipboard_select_tag_options(clipboard_items),
|
|
8
|
+
is: 'alchemy-select' %>
|
|
9
|
+
</div>
|
|
10
|
+
<%= f.input :name %>
|
|
11
|
+
<%= f.submit Alchemy.t(:paste) %>
|
|
12
|
+
<% end %>
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<%=
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
<%= turbo_frame_tag "archive_overlay" do %>
|
|
2
|
+
<div id="overlay_toolbar">
|
|
3
|
+
<%= render 'filter_and_size_bar' %>
|
|
4
|
+
<%= render 'alchemy/admin/partials/overlay_search_form' %>
|
|
5
|
+
</div>
|
|
6
|
+
<div id="assign_image_list" class="with_padding<%= search_filter_params[:tagged_with].present? ? ' filtered' : '' %>">
|
|
7
|
+
<%= render "library_sidebar" %>
|
|
8
|
+
<% if @pictures.empty? %>
|
|
9
|
+
<%= render_message do %>
|
|
10
|
+
<% if search_filter_params.empty? %>
|
|
11
|
+
<%= Alchemy.t(:no_images_in_archive) %>
|
|
12
|
+
<% else %>
|
|
13
|
+
<%= Alchemy.t(:no_search_results) %>
|
|
14
|
+
<% end %>
|
|
12
15
|
<% end %>
|
|
13
|
-
<%
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
locals: {size: @size} %>
|
|
16
|
+
<% else %>
|
|
17
|
+
<div id="overlay_picture_list" class="picture-size--<%= @size %>">
|
|
18
|
+
<%= render partial: 'picture_to_assign',
|
|
19
|
+
collection: @pictures,
|
|
20
|
+
locals: {size: @size} %>
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</div>
|
|
22
|
+
<%= render "alchemy/admin/resources/pagination", resources: @pictures, hide_per_page_select: true %>
|
|
23
|
+
</div>
|
|
24
|
+
<% end %>
|
|
25
|
+
</div>
|
|
26
|
+
<% end %>
|