alchemy_cms 8.0.7 → 8.1.1
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 +215 -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 +16 -12
- 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/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 +31 -41
- 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/update_check.js +1 -1
- 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/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/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 +1 -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 +17 -9
- 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/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/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 -5
- 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 -2
- 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 +1 -1
- 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 +103 -83
- 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,8 +0,0 @@
|
|
|
1
|
-
<%= content_tag :div,
|
|
2
|
-
class: html_editor.css_classes,
|
|
3
|
-
data: html_editor.data_attributes do %>
|
|
4
|
-
<%= element_form.fields_for(:ingredients, html_editor.ingredient) do |f| %>
|
|
5
|
-
<%= ingredient_label(html_editor) %>
|
|
6
|
-
<%= f.text_area :value, id: html_editor.form_field_id %>
|
|
7
|
-
<% end %>
|
|
8
|
-
<% end %>
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<%= content_tag :div,
|
|
2
|
-
class: link_editor.css_classes,
|
|
3
|
-
data: link_editor.data_attributes do %>
|
|
4
|
-
<%= element_form.fields_for(:ingredients, link_editor.ingredient) do |f| %>
|
|
5
|
-
<%= ingredient_label(link_editor) %>
|
|
6
|
-
<div class="input-field">
|
|
7
|
-
<%= f.text_field :value,
|
|
8
|
-
class: "thin_border text_with_icon readonly",
|
|
9
|
-
id: link_editor.form_field_id,
|
|
10
|
-
"data-link-value": true,
|
|
11
|
-
minlength: link_editor.length_validation&.fetch(:minimum, nil),
|
|
12
|
-
maxlength: link_editor.length_validation&.fetch(:maximum, nil),
|
|
13
|
-
required: link_editor.presence_validation?,
|
|
14
|
-
pattern: link_editor.format_validation,
|
|
15
|
-
readonly: true,
|
|
16
|
-
tabindex: -1
|
|
17
|
-
%>
|
|
18
|
-
<%= f.hidden_field :link_title, "data-link-title": true, id: nil %>
|
|
19
|
-
<%= f.hidden_field :link_class_name, "data-link-class": true, id: nil %>
|
|
20
|
-
<%= f.hidden_field :link_target, "data-link-target": true, id: nil %>
|
|
21
|
-
<%= render "alchemy/ingredients/shared/link_tools", ingredient_editor: link_editor, wrapper_class: "ingredient_link_buttons" %>
|
|
22
|
-
</div>
|
|
23
|
-
<% end %>
|
|
24
|
-
<% end %>
|
|
25
|
-
|
|
26
|
-
<script>
|
|
27
|
-
$("#<%= link_editor.form_field_id %>").on("change", function() {
|
|
28
|
-
$("[data-ingredient-id='<%= link_editor.id %>'] input.text_with_icon").val($(this).val());
|
|
29
|
-
});
|
|
30
|
-
</script>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<%= content_tag :div,
|
|
2
|
-
class: node_editor.css_classes,
|
|
3
|
-
data: node_editor.data_attributes do %>
|
|
4
|
-
<%= element_form.fields_for(:ingredients, node_editor.ingredient) do |f| %>
|
|
5
|
-
<%= ingredient_label(node_editor, :node_id) %>
|
|
6
|
-
<%= render Alchemy::Admin::NodeSelect.new(node_editor.node, url: alchemy.api_nodes_path(language_id: node_editor.page&.language_id, include: :ancestors), query_params: node_editor.settings.fetch(:query_params, {})) do %>
|
|
7
|
-
<%= f.text_field :node_id,
|
|
8
|
-
value: node_editor.node&.id,
|
|
9
|
-
id: node_editor.form_field_id(:node_id),
|
|
10
|
-
class: 'alchemy_selectbox full_width' %>
|
|
11
|
-
<% end %>
|
|
12
|
-
<% end %>
|
|
13
|
-
<% end %>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<%= content_tag :div, class: [number_editor.css_classes], data: number_editor.data_attributes do %>
|
|
2
|
-
<%= element_form.fields_for(:ingredients, number_editor.ingredient) do |f| %>
|
|
3
|
-
<%= ingredient_label(number_editor) %>
|
|
4
|
-
<div class="input-field">
|
|
5
|
-
<%= f.text_field :value,
|
|
6
|
-
type: number_editor.settings[:input_type] || "number",
|
|
7
|
-
required: number_editor.presence_validation?,
|
|
8
|
-
step: number_editor.settings[:step],
|
|
9
|
-
min: number_editor.settings[:min],
|
|
10
|
-
max: number_editor.settings[:max],
|
|
11
|
-
id: number_editor.form_field_id,
|
|
12
|
-
oninput: number_editor.settings[:input_type] == "range" ? "this.nextElementSibling.value = this.value" : nil
|
|
13
|
-
%>
|
|
14
|
-
<% if number_editor.settings[:input_type] == "range" %>
|
|
15
|
-
<output><%= number_editor.value %></output>
|
|
16
|
-
<% end %>
|
|
17
|
-
<% if number_editor.settings[:unit] %>
|
|
18
|
-
<div class="input-addon right">
|
|
19
|
-
<%= number_editor.settings[:unit] %>
|
|
20
|
-
</div>
|
|
21
|
-
<% end %>
|
|
22
|
-
</div>
|
|
23
|
-
<% end %>
|
|
24
|
-
<% end %>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<%= content_tag :div,
|
|
2
|
-
class: page_editor.css_classes,
|
|
3
|
-
data: page_editor.data_attributes do %>
|
|
4
|
-
<%= element_form.fields_for(:ingredients, page_editor.ingredient) do |f| %>
|
|
5
|
-
<%= ingredient_label(page_editor, :page_id) %>
|
|
6
|
-
<%= render Alchemy::Admin::PageSelect.new(page_editor.page, allow_clear: true, query_params: page_editor.settings[:query_params]) do %>
|
|
7
|
-
<%= f.text_field :page_id,
|
|
8
|
-
value: page_editor.page&.id,
|
|
9
|
-
id: page_editor.form_field_id(:page_id),
|
|
10
|
-
class: 'full_width' %>
|
|
11
|
-
<% end %>
|
|
12
|
-
<% end %>
|
|
13
|
-
<% end %>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<% options = local_assigns.fetch(:options, {}) %>
|
|
2
|
-
|
|
3
|
-
<%= content_tag :div,
|
|
4
|
-
class: picture_editor.css_classes,
|
|
5
|
-
data: picture_editor.data_attributes do %>
|
|
6
|
-
<%= element_form.fields_for(:ingredients, picture_editor.ingredient) do |f| %>
|
|
7
|
-
<%= ingredient_label(picture_editor, :picture_id, for: nil) %>
|
|
8
|
-
<%= content_tag :div,
|
|
9
|
-
data: {
|
|
10
|
-
target_size: picture_editor.settings[:size] || [
|
|
11
|
-
picture_editor.image_file_width.to_i,
|
|
12
|
-
picture_editor.image_file_height.to_i
|
|
13
|
-
].join("x"),
|
|
14
|
-
image_cropper: picture_editor.thumbnail_url_options[:crop],
|
|
15
|
-
},
|
|
16
|
-
class: "picture_thumbnail" do %>
|
|
17
|
-
<a class="picture_tool delete">
|
|
18
|
-
<%= render_icon("close") %>
|
|
19
|
-
</a>
|
|
20
|
-
<div class="picture_image">
|
|
21
|
-
<div class="thumbnail_background">
|
|
22
|
-
<%- if picture_editor.picture -%>
|
|
23
|
-
<%= image_tag(
|
|
24
|
-
picture_editor.thumbnail_url,
|
|
25
|
-
alt: picture_editor.picture.name,
|
|
26
|
-
class: "img_paddingtop",
|
|
27
|
-
title: Alchemy.t(:image_name, name: picture_editor.picture.name),
|
|
28
|
-
) %>
|
|
29
|
-
<% else %>
|
|
30
|
-
<%= render_icon(:image, size: "xl") %>
|
|
31
|
-
<% end %>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<%- if picture_editor.css_class.present? -%>
|
|
35
|
-
<%= render "alchemy/ingredients/shared/picture_css_class", {
|
|
36
|
-
css_class: picture_editor.css_class
|
|
37
|
-
} %>
|
|
38
|
-
<%- end -%>
|
|
39
|
-
<div class="edit_images_bottom">
|
|
40
|
-
<%= render "alchemy/ingredients/shared/picture_tools", {
|
|
41
|
-
picture_editor: picture_editor
|
|
42
|
-
} %>
|
|
43
|
-
</div>
|
|
44
|
-
<% end %>
|
|
45
|
-
<%= f.hidden_field :picture_id, value: picture_editor.picture&.id,
|
|
46
|
-
id: picture_editor.form_field_id(:picture_id),
|
|
47
|
-
data: {
|
|
48
|
-
picture_id: true,
|
|
49
|
-
image_file_width: picture_editor.image_file_width,
|
|
50
|
-
image_file_height: picture_editor.image_file_height
|
|
51
|
-
} %>
|
|
52
|
-
<%= f.hidden_field :link, data: { link_value: true }, id: nil %>
|
|
53
|
-
<%= f.hidden_field :link_title, data: { link_title: true }, id: nil %>
|
|
54
|
-
<%= f.hidden_field :link_class_name, data: { link_class: true }, id: nil %>
|
|
55
|
-
<%= f.hidden_field :link_target, data: { link_target: true }, id: nil %>
|
|
56
|
-
<%= f.hidden_field :crop_from, data: { crop_from: true }, id: picture_editor.form_field_id(:crop_from) %>
|
|
57
|
-
<%= f.hidden_field :crop_size, data: { crop_size: true }, id: picture_editor.form_field_id(:crop_size) %>
|
|
58
|
-
<% end %>
|
|
59
|
-
<% end %>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<%= content_tag :div,
|
|
2
|
-
class: richtext_editor.css_classes,
|
|
3
|
-
data: richtext_editor.data_attributes do %>
|
|
4
|
-
<%= element_form.fields_for(:ingredients, richtext_editor.ingredient) do |f| %>
|
|
5
|
-
<%= ingredient_label(richtext_editor, :value) %>
|
|
6
|
-
|
|
7
|
-
<%- custom_tinymce_config = richtext_editor.custom_tinymce_config.inject({}) { |obj, (k, v)| obj[k.to_s.dasherize] = v.to_json; obj} %>
|
|
8
|
-
<%= content_tag("alchemy-tinymce", custom_tinymce_config) do %>
|
|
9
|
-
<%= f.text_area :value,
|
|
10
|
-
minlength: richtext_editor.length_validation&.fetch(:minimum, nil),
|
|
11
|
-
maxlength: richtext_editor.length_validation&.fetch(:maximum, nil),
|
|
12
|
-
id: richtext_editor.form_field_id(:value) %>
|
|
13
|
-
<% end %>
|
|
14
|
-
<% end %>
|
|
15
|
-
<% end %>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<% select_values = select_editor.settings[:select_values] %>
|
|
2
|
-
|
|
3
|
-
<%= content_tag :div,
|
|
4
|
-
class: [
|
|
5
|
-
select_editor.css_classes,
|
|
6
|
-
select_editor.settings[:display_inline] ? 'display_inline' : ''
|
|
7
|
-
], data: select_editor.data_attributes do %>
|
|
8
|
-
<%= element_form.fields_for(:ingredients, select_editor.ingredient) do |f| %>
|
|
9
|
-
<%= ingredient_label(select_editor) %>
|
|
10
|
-
|
|
11
|
-
<% if select_values.nil? %>
|
|
12
|
-
<%= warning(':select_values is nil',
|
|
13
|
-
"<strong>No select values given.</strong>
|
|
14
|
-
<br>Please provide <code>select_values</code> on the
|
|
15
|
-
ingredient definition <code>settings</code> in
|
|
16
|
-
<code>elements.yml</code>.") %>
|
|
17
|
-
<% else %>
|
|
18
|
-
<%
|
|
19
|
-
if select_values.is_a?(Hash)
|
|
20
|
-
options_tags = grouped_options_for_select(select_values, select_editor.value)
|
|
21
|
-
else
|
|
22
|
-
options_tags = options_for_select(select_values, select_editor.value)
|
|
23
|
-
end %>
|
|
24
|
-
<%= f.select :value, options_tags, {}, {
|
|
25
|
-
id: select_editor.form_field_id,
|
|
26
|
-
class: ["ingredient-editor-select"],
|
|
27
|
-
is: "alchemy-select"
|
|
28
|
-
} %>
|
|
29
|
-
<% end %>
|
|
30
|
-
<% end %>
|
|
31
|
-
<% end %>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<%= content_tag :div,
|
|
2
|
-
class: [
|
|
3
|
-
text_editor.css_classes,
|
|
4
|
-
text_editor.settings[:display_inline] ? "display_inline" : ""
|
|
5
|
-
], data: text_editor.data_attributes do %>
|
|
6
|
-
<%= element_form.fields_for(:ingredients, text_editor.ingredient) do |f| %>
|
|
7
|
-
<%= ingredient_label(text_editor) %>
|
|
8
|
-
<div class="input-field">
|
|
9
|
-
<%= f.text_field :value,
|
|
10
|
-
class: text_editor.settings[:linkable] ? "text_with_icon" : "",
|
|
11
|
-
id: text_editor.form_field_id,
|
|
12
|
-
minlength: text_editor.length_validation&.fetch(:minimum, nil),
|
|
13
|
-
maxlength: text_editor.length_validation&.fetch(:maximum, nil),
|
|
14
|
-
required: text_editor.presence_validation?,
|
|
15
|
-
pattern: text_editor.format_validation,
|
|
16
|
-
type: text_editor.settings[:input_type] || "text" %>
|
|
17
|
-
<% if text_editor.settings[:anchor] %>
|
|
18
|
-
<%= render "alchemy/ingredients/shared/anchor", ingredient_editor: text_editor %>
|
|
19
|
-
<% end %>
|
|
20
|
-
<% if text_editor.settings[:linkable] %>
|
|
21
|
-
<%= f.hidden_field :link, "data-link-value": true, id: nil %>
|
|
22
|
-
<%= f.hidden_field :link_title, "data-link-title": true, id: nil %>
|
|
23
|
-
<%= f.hidden_field :link_class_name, "data-link-class": true, id: nil %>
|
|
24
|
-
<%= f.hidden_field :link_target, "data-link-target": true, id: nil %>
|
|
25
|
-
<%= render "alchemy/ingredients/shared/link_tools", ingredient_editor: text_editor, wrapper_class: "ingredient_link_buttons" %>
|
|
26
|
-
<% end %>
|
|
27
|
-
</div>
|
|
28
|
-
<% end %>
|
|
29
|
-
<% end %>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<%%#
|
|
2
|
-
Available locals:
|
|
3
|
-
* <%= @ingredient_editor_local %> - An Alchemy::IngredientEditor instance
|
|
4
|
-
|
|
5
|
-
Please consult Alchemy::IngredientEditor.rb docs for further methods on the ingredient object
|
|
6
|
-
%>
|
|
7
|
-
<%%= content_tag :div,
|
|
8
|
-
class: <%= @ingredient_editor_local %>.css_classes,
|
|
9
|
-
data: <%= @ingredient_editor_local %>.data_attributes do %>
|
|
10
|
-
<%%= element_form.fields_for(:ingredients, <%= @ingredient_editor_local %>.ingredient) do |f| %>
|
|
11
|
-
<%%= ingredient_label(<%= @ingredient_editor_local %>) %>
|
|
12
|
-
<%%= f.text_field :value %>
|
|
13
|
-
<%% end %>
|
|
14
|
-
<%% end %>
|
|
File without changes
|