alchemy_cms 7.4.10 → 8.0.0.b
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.
Potentially problematic release.
This version of alchemy_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +16 -5
- data/app/assets/builds/alchemy/admin/page-select.css +1 -1
- data/app/assets/builds/alchemy/admin/print.css +1 -1
- data/app/assets/builds/alchemy/admin.css +2 -2
- data/app/assets/builds/alchemy/dark-theme.css +1 -0
- data/app/assets/builds/alchemy/light-theme.css +1 -0
- data/app/assets/builds/alchemy/theme.css +1 -0
- data/app/assets/builds/alchemy/welcome.css +1 -1
- data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css +1 -1
- data/app/assets/builds/tinymce/skins/content/alchemy-dark/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css +1 -1
- data/app/assets/builds/tinymce/skins/ui/alchemy-dark/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy-dark/skin.min.css +1 -0
- data/app/assets/config/alchemy_manifest.js +0 -2
- data/app/assets/images/alchemy/element_icons/default.svg +1 -0
- data/app/assets/images/alchemy/icons-sprite.svg +1 -0
- data/app/components/alchemy/admin/element_select.rb +39 -0
- data/app/components/alchemy/admin/resource/applied_filter.rb +29 -0
- data/app/components/alchemy/admin/resource/checkbox_filter.rb +36 -0
- data/app/components/alchemy/admin/resource/datepicker_filter.rb +42 -0
- data/app/components/alchemy/admin/resource/select_filter.rb +43 -0
- data/app/components/alchemy/admin/toolbar_button.rb +5 -2
- data/app/components/alchemy/ingredients/number_view.rb +18 -0
- data/app/controllers/alchemy/admin/attachments_controller.rb +10 -15
- data/app/controllers/alchemy/admin/clipboard_controller.rb +2 -6
- data/app/controllers/alchemy/admin/elements_controller.rb +3 -1
- data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pages_controller.rb +15 -15
- data/app/controllers/alchemy/admin/pictures_controller.rb +27 -37
- data/app/controllers/alchemy/admin/resources_controller.rb +16 -106
- data/app/controllers/alchemy/attachments_controller.rb +43 -14
- data/app/controllers/alchemy/messages_controller.rb +1 -1
- data/app/controllers/alchemy/pages_controller.rb +26 -4
- data/app/controllers/concerns/alchemy/admin/resource_filter.rb +93 -0
- data/app/decorators/alchemy/element_editor.rb +5 -48
- data/app/decorators/alchemy/ingredient_editor.rb +3 -53
- data/app/helpers/alchemy/admin/attachments_helper.rb +5 -5
- data/app/helpers/alchemy/admin/base_helper.rb +14 -84
- data/app/helpers/alchemy/admin/pages_helper.rb +1 -1
- data/app/helpers/alchemy/base_helper.rb +0 -30
- data/app/helpers/alchemy/elements_block_helper.rb +0 -14
- data/app/helpers/alchemy/pages_helper.rb +1 -1
- data/{lib → app/helpers}/alchemy/resources_helper.rb +5 -45
- data/app/javascript/alchemy_admin/components/action.js +2 -0
- data/app/javascript/alchemy_admin/components/alchemy_html_element.js +3 -3
- data/app/javascript/alchemy_admin/components/auto_submit.js +20 -0
- data/app/javascript/alchemy_admin/components/datepicker.js +18 -7
- data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +8 -7
- data/app/javascript/alchemy_admin/components/element_editor.js +25 -15
- data/app/javascript/alchemy_admin/components/element_select.js +43 -0
- data/app/javascript/alchemy_admin/components/index.js +3 -0
- data/app/javascript/alchemy_admin/components/link_buttons.js +6 -2
- data/app/javascript/alchemy_admin/components/remote_select.js +9 -2
- data/app/javascript/alchemy_admin/components/tags_autocomplete.js +5 -1
- data/app/javascript/alchemy_admin/components/tinymce.js +93 -14
- data/app/javascript/alchemy_admin/components/update_check.js +42 -0
- data/app/javascript/alchemy_admin/components/uploader/file_upload.js +15 -8
- data/app/javascript/alchemy_admin/components/uploader/progress.js +12 -6
- data/app/javascript/alchemy_admin/components/uploader.js +4 -2
- data/app/javascript/alchemy_admin/confirm_dialog.js +27 -57
- data/app/javascript/alchemy_admin/dialog.js +1 -1
- data/app/javascript/alchemy_admin/dirty.js +3 -2
- data/app/javascript/alchemy_admin/file_editors.js +1 -1
- data/app/javascript/alchemy_admin/i18n.js +15 -16
- data/app/javascript/alchemy_admin/image_loader.js +4 -2
- data/app/javascript/alchemy_admin/initializer.js +1 -49
- data/app/javascript/alchemy_admin/picture_editors.js +7 -4
- data/app/javascript/alchemy_admin/picture_selector.js +4 -4
- data/app/javascript/alchemy_admin/utils/ajax.js +51 -44
- data/app/javascript/alchemy_admin.js +3 -8
- data/app/jobs/alchemy/delete_picture_job.rb +12 -0
- data/app/models/alchemy/admin/filters/base.rb +38 -0
- data/app/models/alchemy/admin/filters/checkbox.rb +24 -0
- data/app/models/alchemy/admin/filters/datepicker.rb +53 -0
- data/app/models/alchemy/admin/filters/select.rb +70 -0
- data/app/models/alchemy/admin/resource_name.rb +27 -0
- data/app/models/alchemy/attachment.rb +49 -44
- data/app/models/alchemy/base_record.rb +2 -0
- data/app/models/alchemy/element/definitions.rb +1 -1
- data/app/models/alchemy/element/element_ingredients.rb +6 -6
- data/app/models/alchemy/element/presenters.rb +3 -12
- data/app/models/alchemy/element.rb +10 -27
- data/app/models/alchemy/element_definition.rb +190 -0
- data/app/models/alchemy/ingredient.rb +10 -43
- data/app/models/alchemy/ingredient_definition.rb +134 -0
- data/app/models/alchemy/ingredient_validator.rb +7 -3
- data/app/models/alchemy/ingredients/number.rb +19 -0
- data/app/models/alchemy/language.rb +2 -21
- data/app/models/alchemy/message.rb +3 -7
- data/app/models/alchemy/node.rb +1 -1
- data/app/models/alchemy/page/{page_layouts.rb → definitions.rb} +12 -19
- data/app/models/alchemy/page/fixed_attributes.rb +1 -1
- data/app/models/alchemy/page/page_elements.rb +13 -14
- data/app/models/alchemy/page/page_naming.rb +3 -11
- data/app/models/alchemy/page/page_natures.rb +20 -15
- data/app/models/alchemy/page/page_scopes.rb +1 -1
- data/app/models/alchemy/page.rb +12 -39
- data/app/models/alchemy/page_definition.rb +115 -0
- data/app/models/alchemy/picture.rb +71 -99
- data/app/models/alchemy/picture_variant.rb +115 -5
- data/{lib → app/models}/alchemy/resource.rb +4 -18
- data/{lib → app/models}/alchemy/searchable_resource.rb +15 -0
- data/app/models/alchemy/site/layout.rb +5 -5
- data/app/models/alchemy/site.rb +1 -21
- data/app/models/alchemy/storage_adapter/active_storage/attachment_url.rb +41 -0
- data/app/models/alchemy/storage_adapter/active_storage/picture_url.rb +55 -0
- data/app/models/alchemy/storage_adapter/active_storage/preprocessor.rb +40 -0
- data/app/models/alchemy/storage_adapter/active_storage.rb +173 -0
- data/app/models/alchemy/{attachment/url.rb → storage_adapter/dragonfly/attachment_url.rb} +12 -12
- data/app/models/alchemy/storage_adapter/dragonfly/picture_url.rb +75 -0
- data/app/models/alchemy/{picture → storage_adapter/dragonfly}/preprocessor.rb +4 -4
- data/app/models/alchemy/storage_adapter/dragonfly.rb +205 -0
- data/app/models/alchemy/storage_adapter.rb +74 -0
- data/app/models/concerns/alchemy/picture_thumbnails.rb +19 -6
- data/app/models/concerns/alchemy/relatable_resource.rb +28 -0
- data/app/serializers/alchemy/element_serializer.rb +0 -1
- data/app/services/alchemy/dragonfly_to_image_processing.rb +100 -0
- data/app/stylesheets/alchemy/_custom-properties.scss +162 -0
- data/app/stylesheets/alchemy/_defaults.scss +3 -0
- data/app/stylesheets/alchemy/_extends.scss +69 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/_mixins.scss +40 -68
- data/app/stylesheets/alchemy/_themes.scss +540 -0
- data/app/stylesheets/alchemy/_variables.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/archive.scss +45 -42
- data/app/stylesheets/alchemy/admin/attachments.scss +17 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/base.scss +20 -15
- data/app/stylesheets/alchemy/admin/buttons.scss +135 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/clipboard.scss +2 -2
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dashboard.scss +13 -16
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dialogs.scss +33 -16
- data/app/stylesheets/alchemy/admin/element-select.scss +11 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/elements.scss +239 -133
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/errors.scss +5 -5
- data/app/stylesheets/alchemy/admin/filters.scss +57 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flatpickr.scss +54 -76
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/form_fields.scss +10 -11
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/forms.scss +28 -21
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/frame.scss +20 -18
- data/app/stylesheets/alchemy/admin/hints.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/icons.scss +1 -1
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/image_library.scss +21 -61
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/images.scss +1 -1
- data/app/stylesheets/alchemy/admin/labels.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/lists.scss +3 -3
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/navigation.scss +55 -59
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/node-select.scss +1 -10
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/nodes.scss +21 -18
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/notices.scss +20 -19
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/page-select.scss +18 -2
- data/app/stylesheets/alchemy/admin/pagination.scss +137 -0
- data/app/stylesheets/alchemy/admin/preview_window.scss +46 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/print.scss +1 -1
- data/app/stylesheets/alchemy/admin/resource_info.scss +148 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/search.scss +10 -7
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/selects.scss +85 -46
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/shoelace.scss +37 -68
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/sitemap.scss +39 -34
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/tables.scss +9 -7
- data/app/stylesheets/alchemy/admin/tags.scss +143 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/toolbar.scss +6 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/typography.scss +3 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/upload.scss +7 -5
- data/app/stylesheets/alchemy/admin.scss +44 -0
- data/app/stylesheets/alchemy/dark-theme.scss +5 -0
- data/app/stylesheets/alchemy/light-theme.scss +6 -0
- data/app/stylesheets/alchemy/theme.scss +13 -0
- data/app/stylesheets/alchemy/welcome.scss +75 -0
- data/app/stylesheets/tinymce/skins/content/alchemy/content.scss +69 -0
- data/app/{assets/stylesheets/tinymce/skins/content/alchemy → stylesheets/tinymce/skins/content/alchemy-dark}/content.scss +12 -12
- data/app/stylesheets/tinymce/skins/ui/alchemy/content.scss +1 -0
- data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/skin.scss +158 -176
- data/app/stylesheets/tinymce/skins/ui/alchemy-dark/content.scss +1 -0
- data/app/stylesheets/tinymce/skins/ui/alchemy-dark/skin.scss +3784 -0
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +22 -12
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/assign.js.erb +4 -3
- data/app/views/alchemy/admin/attachments/show.html.erb +55 -43
- data/app/views/alchemy/admin/{elements/_clipboard_button.html.erb → clipboard/_button.html.erb} +3 -5
- data/app/views/alchemy/admin/clipboard/_update_nested_element_button.turbo_stream.erb +11 -0
- data/app/views/alchemy/admin/clipboard/clear.turbo_stream.erb +4 -0
- data/app/views/alchemy/admin/clipboard/index.html.erb +15 -13
- data/app/views/alchemy/admin/clipboard/insert.turbo_stream.erb +18 -0
- data/app/views/alchemy/admin/clipboard/remove.turbo_stream.erb +9 -0
- data/app/views/alchemy/admin/crop.html.erb +1 -1
- data/app/views/alchemy/admin/dashboard/info.html.erb +17 -31
- data/app/views/alchemy/admin/elements/_element.html.erb +4 -8
- data/app/views/alchemy/admin/elements/_form.html.erb +9 -9
- data/app/views/alchemy/admin/elements/_header.html.erb +5 -1
- data/app/views/alchemy/admin/elements/_toolbar.html.erb +4 -6
- data/app/views/alchemy/admin/elements/create.turbo_stream.erb +2 -1
- data/app/views/alchemy/admin/elements/index.html.erb +2 -2
- data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +3 -16
- data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +0 -9
- data/app/views/alchemy/admin/languages/_form.html.erb +1 -1
- data/app/views/alchemy/admin/languages/_table.html.erb +1 -1
- data/app/views/alchemy/admin/languages/index.html.erb +5 -2
- data/app/views/alchemy/admin/layoutpages/index.html.erb +1 -12
- data/app/views/alchemy/admin/pages/_form.html.erb +2 -2
- data/app/views/alchemy/admin/pages/_page.html.erb +2 -3
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +1 -15
- data/app/views/alchemy/admin/pages/index.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +9 -12
- data/app/views/alchemy/admin/partials/_search_form.html.erb +4 -9
- data/app/views/alchemy/admin/pictures/_archive.html.erb +16 -29
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +3 -7
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_form.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_infos.html.erb +21 -52
- data/app/views/alchemy/admin/pictures/_library_sidebar.html.erb +7 -0
- data/app/views/alchemy/admin/pictures/_picture.html.erb +14 -20
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +20 -16
- data/app/views/alchemy/admin/pictures/_sorting_select.html.erb +13 -0
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +1 -6
- data/app/views/alchemy/admin/pictures/index.html.erb +5 -19
- data/app/views/alchemy/admin/pictures/show.html.erb +10 -5
- data/app/views/alchemy/admin/resources/_applied_filters.html.erb +8 -0
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +5 -25
- data/app/views/alchemy/admin/resources/_pagination.html.erb +6 -0
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +4 -2
- data/app/views/alchemy/admin/resources/_resource_table.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_resource_usage_info.html.erb +36 -0
- data/app/views/alchemy/admin/resources/_table_header.html.erb +1 -15
- data/app/views/alchemy/admin/sites/index.html.erb +5 -1
- data/app/views/alchemy/admin/styleguide/index.html.erb +118 -58
- data/app/views/alchemy/admin/tags/index.html.erb +1 -1
- data/app/views/alchemy/admin/tinymce/_setup.html.erb +7 -7
- data/app/{javascript/alchemy_admin/locales/en.js → views/alchemy/admin/translations/_en.js} +5 -2
- data/app/views/alchemy/admin/uploader/_button.html.erb +1 -1
- data/app/views/alchemy/admin/uploader/_setup.html.erb +4 -4
- data/app/views/alchemy/base/error_notice.html.erb +1 -1
- data/app/views/alchemy/ingredients/_number_editor.html.erb +24 -0
- data/app/views/alchemy/no_index.html.erb +31 -0
- data/app/views/alchemy/welcome.html.erb +12 -10
- data/app/views/kaminari/alchemy/_first_page.html.erb +5 -3
- data/app/views/kaminari/alchemy/_last_page.html.erb +5 -3
- data/app/views/kaminari/alchemy/_next_page.html.erb +5 -3
- data/app/views/kaminari/alchemy/_paginator.html.erb +18 -13
- data/app/views/kaminari/alchemy/_prev_page.html.erb +5 -3
- data/app/views/layouts/alchemy/admin.html.erb +25 -24
- data/config/alchemy/config.yml +3 -2
- data/config/initializers/dragonfly.rb +0 -1
- data/config/initializers/mime_types.rb +1 -0
- data/config/locales/alchemy.en.yml +57 -21
- data/config/routes.rb +0 -2
- data/db/migrate/20250905140323_add_created_at_index_to_pictures_and_attachments.rb +14 -0
- data/lib/alchemy/admin/preview_url.rb +4 -5
- data/lib/alchemy/cache_digests/template_tracker.rb +6 -9
- data/lib/alchemy/config_missing.rb +14 -0
- data/lib/alchemy/configuration/base_option.rb +24 -0
- data/lib/alchemy/configuration/boolean_option.rb +16 -0
- data/lib/alchemy/configuration/class_option.rb +15 -0
- data/lib/alchemy/configuration/class_set_option.rb +46 -0
- data/lib/alchemy/configuration/integer_list_option.rb +13 -0
- data/lib/alchemy/configuration/integer_option.rb +12 -0
- data/lib/alchemy/configuration/list_option.rb +22 -0
- data/lib/alchemy/configuration/regexp_option.rb +11 -0
- data/lib/alchemy/configuration/string_list_option.rb +13 -0
- data/lib/alchemy/configuration/string_option.rb +11 -0
- data/lib/alchemy/configuration.rb +115 -0
- data/lib/alchemy/configuration_methods.rb +3 -1
- data/lib/alchemy/configurations/default_language.rb +12 -0
- data/lib/alchemy/configurations/default_site.rb +10 -0
- data/lib/alchemy/configurations/format_matchers.rb +11 -0
- data/lib/alchemy/configurations/mailer.rb +16 -0
- data/lib/alchemy/configurations/main.rb +223 -0
- data/lib/alchemy/configurations/page_cache.rb +19 -0
- data/lib/alchemy/configurations/preview.rb +32 -0
- data/lib/alchemy/configurations/sitemap.rb +10 -0
- data/lib/alchemy/configurations/uploader.rb +34 -0
- data/lib/alchemy/engine.rb +81 -24
- data/lib/alchemy/hints.rb +3 -7
- data/lib/alchemy/install/tasks.rb +0 -12
- data/lib/alchemy/on_page_layout.rb +2 -2
- data/lib/alchemy/propshaft/tinymce_asset.rb +15 -0
- data/lib/alchemy/seeder.rb +2 -2
- data/lib/alchemy/tasks/tidy.rb +18 -0
- data/lib/alchemy/tasks/usage.rb +4 -4
- data/lib/alchemy/test_support/config_stubbing.rb +1 -7
- data/lib/alchemy/test_support/factories/attachment_factory.rb +13 -2
- data/lib/alchemy/test_support/factories/language_factory.rb +1 -1
- data/lib/alchemy/test_support/factories/page_factory.rb +2 -3
- data/lib/alchemy/test_support/factories/picture_factory.rb +31 -2
- data/lib/alchemy/test_support/factories/site_factory.rb +2 -2
- data/lib/alchemy/test_support/having_crop_action_examples.rb +2 -2
- data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +80 -26
- data/lib/alchemy/test_support/relatable_resource_examples.rb +58 -0
- data/lib/alchemy/test_support/shared_ingredient_examples.rb +5 -5
- data/lib/alchemy/tinymce.rb +0 -1
- data/lib/alchemy/upgrader/eight_zero.rb +14 -0
- data/lib/alchemy/upgrader.rb +33 -20
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy.rb +185 -172
- data/lib/alchemy_cms.rb +1 -7
- data/lib/generators/alchemy/ingredient/ingredient_generator.rb +0 -3
- data/lib/generators/alchemy/install/files/_article.html.erb +6 -4
- data/lib/generators/alchemy/install/files/alchemy.en.yml +22 -3
- data/lib/generators/alchemy/install/files/application.html.erb +5 -0
- data/lib/generators/alchemy/install/install_generator.rb +25 -23
- data/lib/generators/alchemy/install/templates/alchemy.rb.tt +200 -0
- data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +0 -1
- data/lib/generators/alchemy/install/templates/elements.yml.tt +3 -1
- data/lib/generators/alchemy/install/templates/menus.yml.tt +1 -1
- data/lib/generators/alchemy/install/templates/page_layouts.yml.tt +2 -2
- data/lib/generators/alchemy/page_layouts/page_layouts_generator.rb +2 -2
- data/lib/tasks/alchemy/assets.rake +14 -0
- data/lib/tasks/alchemy/tidy.rake +6 -0
- data/lib/tasks/alchemy/upgrade.rake +12 -47
- data/vendor/assets/stylesheets/tinymce/skins/content/dark/content.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/content/default/content.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/ui/oxide/skin.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/ui/oxide-dark/content.min.css +1 -0
- data/vendor/assets/stylesheets/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- data/vendor/javascript/clipboard.min.js +1 -1
- data/vendor/javascript/cropperjs.min.js +1 -1
- data/vendor/javascript/handlebars.min.js +3 -3
- data/vendor/javascript/jquery.min.js +1 -1
- data/vendor/javascript/select2.min.js +3 -3
- data/vendor/javascript/shoelace.min.js +92 -76
- data/vendor/javascript/sortable.min.js +2 -2
- data/vendor/javascript/tinymce.min.js +1 -1
- data/vendor/javascript/ungap-custom-elements.min.js +2 -2
- metadata +223 -208
- data/CHANGELOG.md +0 -2041
- data/CODE_OF_CONDUCT.md +0 -13
- data/CONTRIBUTING.md +0 -73
- data/Gemfile +0 -71
- data/Rakefile +0 -102
- data/SECURITY.md +0 -13
- data/alchemy_cms.gemspec +0 -88
- data/app/assets/builds/alchemy/admin/page-select.css.map +0 -1
- data/app/assets/builds/alchemy/admin/print.css.map +0 -1
- data/app/assets/builds/alchemy/admin.css.map +0 -1
- data/app/assets/builds/alchemy/custom-properties.css +0 -1
- data/app/assets/builds/alchemy/custom-properties.css.map +0 -1
- data/app/assets/builds/alchemy/welcome.css.map +0 -1
- data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css.map +0 -1
- data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css.map +0 -1
- data/app/assets/javascripts/alchemy/admin.js +0 -10
- data/app/assets/stylesheets/alchemy/_defaults.scss +0 -3
- data/app/assets/stylesheets/alchemy/_deprecated_variables.scss +0 -45
- data/app/assets/stylesheets/alchemy/_deprecation.scss +0 -17
- data/app/assets/stylesheets/alchemy/_extends.scss +0 -62
- data/app/assets/stylesheets/alchemy/_variables.scss +0 -201
- data/app/assets/stylesheets/alchemy/admin/attachments.scss +0 -40
- data/app/assets/stylesheets/alchemy/admin/buttons.scss +0 -123
- data/app/assets/stylesheets/alchemy/admin/hints.scss +0 -5
- data/app/assets/stylesheets/alchemy/admin/labels.scss +0 -3
- data/app/assets/stylesheets/alchemy/admin/pagination.scss +0 -92
- data/app/assets/stylesheets/alchemy/admin/preview_window.scss +0 -33
- data/app/assets/stylesheets/alchemy/admin/resource_info.scss +0 -42
- data/app/assets/stylesheets/alchemy/admin/tags.scss +0 -158
- data/app/assets/stylesheets/alchemy/admin.scss +0 -42
- data/app/assets/stylesheets/alchemy/custom-properties.css +0 -98
- data/app/assets/stylesheets/alchemy/welcome.scss +0 -57
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.css +0 -711
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.css +0 -705
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.min.css +0 -7
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.min.css +0 -7
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.css +0 -29
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.min.css +0 -7
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.css +0 -677
- data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.min.css +0 -7
- data/app/controllers/alchemy/elements_controller.rb +0 -32
- data/app/helpers/alchemy/admin/elements_helper.rb +0 -25
- data/app/models/alchemy/element/dom_id.rb +0 -31
- data/app/models/alchemy/picture/calculations.rb +0 -49
- data/app/models/alchemy/picture/transformations.rb +0 -115
- data/app/models/alchemy/picture/url.rb +0 -54
- data/app/views/alchemy/admin/attachments/destroy.js.erb +0 -1
- data/app/views/alchemy/admin/clipboard/clear.js.erb +0 -3
- data/app/views/alchemy/admin/clipboard/insert.js.erb +0 -29
- data/app/views/alchemy/admin/clipboard/remove.js.erb +0 -10
- data/app/views/alchemy/admin/resources/_filter.html.erb +0 -12
- data/app/views/alchemy/admin/resources/_resource.html.erb +0 -34
- data/app/views/alchemy/admin/resources/_table.html.erb +0 -29
- data/app/views/alchemy/elements/show.html.erb +0 -1
- data/app/views/alchemy/elements/show.js.erb +0 -1
- data/app/views/alchemy/ingredients/_audio_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_boolean_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_datetime_view.html.erb +0 -3
- data/app/views/alchemy/ingredients/_file_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_headline_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_html_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_link_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_node_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_page_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_picture_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_richtext_view.html.erb +0 -3
- data/app/views/alchemy/ingredients/_select_view.html.erb +0 -1
- data/app/views/alchemy/ingredients/_text_view.html.erb +0 -4
- data/app/views/alchemy/ingredients/_video_view.html.erb +0 -3
- data/babel.config.js +0 -12
- data/bin/importmap +0 -4
- data/bin/rails +0 -9
- data/bin/rspec +0 -3
- data/bin/setup +0 -30
- data/bin/start +0 -17
- data/bun.lockb +0 -0
- data/bundles/shoelace.js +0 -12
- data/bundles/tinymce.js +0 -22
- data/config/initializers/assets.rb +0 -4
- data/eslint.config.js +0 -17
- data/lib/alchemy/config.rb +0 -114
- data/lib/alchemy/element_definition.rb +0 -73
- data/lib/alchemy/page_layout.rb +0 -73
- data/lib/alchemy/resource_filter.rb +0 -40
- data/lib/alchemy/upgrader/seven_point_four.rb +0 -26
- data/lib/alchemy/upgrader/seven_point_three.rb +0 -52
- data/lib/alchemy/upgrader/tasks/.keep +0 -0
- data/lib/generators/alchemy/ingredient/templates/view.html.erb +0 -1
- data/lib/generators/alchemy/install/files/alchemy_admin.js +0 -1
- data/lib/generators/alchemy/install/files/all.js +0 -11
- data/lib/generators/alchemy/install/files/article.css +0 -25
- data/rollup.config.mjs +0 -108
- data/vendor/assets/images/remixicon.symbol.svg +0 -11
- /data/app/{assets/stylesheets → stylesheets}/alchemy/_fonts.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/attachment-select.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flash.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/list_filter.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/spinner.scss +0 -0
- /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/skintool.json +0 -0
- /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/fonts/tinymce-mobile.woff +0 -0
@@ -49,7 +49,7 @@
|
|
49
49
|
<% table.with_action(:download) do |attachment| %>
|
50
50
|
<sl-tooltip content="<%= Alchemy.t("download_file", filename: attachment.file_name) %>">
|
51
51
|
<%= link_to render_icon(:download),
|
52
|
-
alchemy.
|
52
|
+
alchemy.download_attachment_path(attachment),
|
53
53
|
target: "_blank",
|
54
54
|
class: "icon_button" %>
|
55
55
|
</sl-tooltip>
|
@@ -60,16 +60,26 @@
|
|
60
60
|
object: attachment,
|
61
61
|
file_attribute: 'file' %>
|
62
62
|
<% end %>
|
63
|
-
<% table.with_action(:destroy
|
64
|
-
|
65
|
-
Alchemy.t(:
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
63
|
+
<% table.with_action(:destroy) do |attachment| %>
|
64
|
+
<% if attachment.deletable? %>
|
65
|
+
<sl-tooltip content="<%= Alchemy.t(:delete_file) %>">
|
66
|
+
<%= link_to_confirm_dialog render_icon(:minus),
|
67
|
+
Alchemy.t(:confirm_to_delete_file),
|
68
|
+
alchemy.admin_attachment_path(
|
69
|
+
id: attachment,
|
70
|
+
q: search_filter_params[:q],
|
71
|
+
page: params[:page],
|
72
|
+
per_page: params[:per_page]
|
73
|
+
),
|
74
|
+
class: "icon_button" %>
|
75
|
+
</sl-tooltip>
|
76
|
+
<% else %>
|
77
|
+
<sl-tooltip content="<%= Alchemy.t(:in_use) %>">
|
78
|
+
<button class="icon_button disabled">
|
79
|
+
<%= render_icon(:minus) %>
|
80
|
+
</button>
|
81
|
+
</sl-tooltip>
|
82
|
+
<% end %>
|
73
83
|
<% end %>
|
74
84
|
<% table.with_action(:edit, Alchemy.t(:rename_file)) do |attachment| %>
|
75
85
|
<%= link_to_dialog render_icon(:edit),
|
@@ -82,5 +92,5 @@
|
|
82
92
|
<% end %>
|
83
93
|
<% end %>
|
84
94
|
|
85
|
-
<%=
|
95
|
+
<%= render "alchemy/admin/resources/pagination", resources: @attachments %>
|
86
96
|
<% end %>
|
@@ -18,5 +18,5 @@
|
|
18
18
|
</li>
|
19
19
|
<%= render partial: 'file_to_assign', collection: @attachments %>
|
20
20
|
</ul>
|
21
|
-
<%=
|
21
|
+
<%= render "alchemy/admin/resources/pagination", resources: @attachments, remote: true, hide_per_page_select: true %>
|
22
22
|
<% end %>
|
@@ -5,10 +5,11 @@
|
|
5
5
|
$form_field.parent().find("> .file_name").text("<%= @attachment.name %>")
|
6
6
|
$form_field.parent().find("> .file_icon").html("<%= j render_icon(@attachment.icon_css_class) %>")
|
7
7
|
$form_field.parent().find("> .remove_file_link").removeClass("hidden")
|
8
|
-
Alchemy.closeCurrentDialog(
|
9
|
-
|
8
|
+
Alchemy.closeCurrentDialog(() => {
|
9
|
+
const field = $form_field[0]
|
10
|
+
const elementEditor = field.closest("alchemy-element-editor")
|
10
11
|
if (elementEditor) {
|
11
|
-
elementEditor.setDirty()
|
12
|
+
elementEditor.setDirty(field)
|
12
13
|
}
|
13
14
|
})
|
14
15
|
})()
|
@@ -1,45 +1,57 @@
|
|
1
|
-
<div class="
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
1
|
+
<div class="resource-details">
|
2
|
+
<aside>
|
3
|
+
<div class="resource_info">
|
4
|
+
<div class="value">
|
5
|
+
<label>
|
6
|
+
<%= render_icon @attachment.icon_css_class %>
|
7
|
+
</label>
|
8
|
+
<p><%= @attachment.file_name %></p>
|
9
|
+
</div>
|
10
|
+
<div class="value with-icon">
|
11
|
+
<label><%= Alchemy::Attachment.human_attribute_name(:url) %></label>
|
12
|
+
<p><%= @attachment.url %></p>
|
13
|
+
<alchemy-clipboard-button
|
14
|
+
content="<%= @attachment.url %>"
|
15
|
+
success-text="<%= Alchemy.t("Copied to clipboard") %>"
|
16
|
+
class="icon_button--right"
|
17
|
+
></alchemy-clipboard-button>
|
18
|
+
</div>
|
19
|
+
<div class="value with-icon">
|
20
|
+
<label><%= Alchemy::Attachment.human_attribute_name(:download_url) %></label>
|
21
|
+
<p><%= @attachment.url(download: true) %></p>
|
22
|
+
<alchemy-clipboard-button
|
23
|
+
content="<%= @attachment.url(download: true) %>"
|
24
|
+
success-text="<%= Alchemy.t("Copied to clipboard") %>"
|
25
|
+
class="icon_button--right"
|
26
|
+
></alchemy-clipboard-button>
|
27
|
+
</div>
|
28
|
+
</div>
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
30
|
+
<hr>
|
31
|
+
|
32
|
+
<%= render "alchemy/admin/resources/resource_usage_info",
|
33
|
+
assignments: @assignments,
|
34
|
+
resource_name: :attachment %>
|
35
|
+
</aside>
|
36
|
+
|
37
|
+
<%# We need to use the `tag` helper for the div to be really empty for
|
38
|
+
the CSS `:empty` selector to work in order to hide this div if there is no preview %>
|
39
|
+
<%= tag.div(class: "resource-preview") do %>
|
40
|
+
<% case @attachment.file_mime_type %>
|
41
|
+
<% when *Alchemy::Filetypes::IMAGE_FILE_TYPES %>
|
42
|
+
<div class="attachment_preview_container">
|
43
|
+
<%= image_tag(@attachment.url) %>
|
44
|
+
</div>
|
45
|
+
<% when *Alchemy::Filetypes::AUDIO_FILE_TYPES %>
|
46
|
+
<div class="attachment_preview_container">
|
47
|
+
<%= audio_tag(@attachment.url, preload: "metadata", controls: true) %>
|
48
|
+
</div>
|
49
|
+
<% when *Alchemy::Filetypes::VIDEO_FILE_TYPES %>
|
50
|
+
<div class="attachment_preview_container">
|
51
|
+
<%= video_tag(@attachment.url, preload: "metadata", controls: true) %>
|
52
|
+
</div>
|
53
|
+
<% when "application/pdf" %>
|
54
|
+
<iframe src="<%= @attachment.url %>" frameborder="0"></iframe>
|
55
|
+
<% end %>
|
56
|
+
<% end %>
|
40
57
|
</div>
|
41
|
-
<% when "application/pdf" %>
|
42
|
-
<iframe src="<%= @attachment.url %>" frameborder=0 class="full-iframe">
|
43
|
-
Your browser does not support frames.
|
44
|
-
</iframe>
|
45
|
-
<% end %>
|
data/app/views/alchemy/admin/{elements/_clipboard_button.html.erb → clipboard/_button.html.erb}
RENAMED
@@ -1,14 +1,12 @@
|
|
1
1
|
<%= render Alchemy::Admin::ToolbarButton.new(
|
2
|
-
url: alchemy.admin_clipboard_path(remarkable_type:
|
2
|
+
url: alchemy.admin_clipboard_path(remarkable_type: remarkable_type),
|
3
3
|
label: Alchemy.t("Show clipboard"),
|
4
4
|
icon: :clipboard,
|
5
|
-
icon_style: clipboard_empty?(
|
5
|
+
icon_style: clipboard_empty?(remarkable_type) ? "line" : "fill",
|
6
6
|
dialog_options: {
|
7
7
|
title: Alchemy.t("Clipboard"),
|
8
8
|
size: "400x305"
|
9
9
|
},
|
10
|
-
|
11
|
-
id: "clipboard_button"
|
12
|
-
},
|
10
|
+
id: "clipboard_button",
|
13
11
|
if_permitted_to: [:index, :alchemy_admin_clipboard]
|
14
12
|
) %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%# Update add nested element forms for any elements that accept ONLY this as a nested element %>
|
2
|
+
<% if @item.class == Alchemy::Element %>
|
3
|
+
<%
|
4
|
+
@item.page.draft_version.elements.expanded.select do |element|
|
5
|
+
element.nestable_elements == [@item.name]
|
6
|
+
end.each do |element|
|
7
|
+
%>
|
8
|
+
<%= turbo_stream.replace_all ".add-nested-element[data-element-id='#{element.id}']",
|
9
|
+
partial: "alchemy/admin/elements/add_nested_element_form", locals: {element: element} %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
@@ -1,13 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
<%=
|
4
|
-
|
5
|
-
<%
|
6
|
-
|
7
|
-
<%=
|
8
|
-
|
1
|
+
<%= turbo_frame_tag :clipboard_items do %>
|
2
|
+
<% if @clipboard_items.blank? %>
|
3
|
+
<%= render_message do %>
|
4
|
+
<%= Alchemy.t('No items in your clipboard') %>
|
5
|
+
<% end %>
|
6
|
+
<% else %>
|
7
|
+
<%= render_message do %>
|
8
|
+
<%= Alchemy.t('Add items from clipboard via "Add Element" button') %>
|
9
|
+
<% end %>
|
9
10
|
|
10
|
-
<div id="clipboard_items">
|
11
11
|
<ul>
|
12
12
|
<% @clipboard_items.each do |item| %>
|
13
13
|
<% item_class = item.class.name.demodulize.underscore.pluralize %>
|
@@ -22,18 +22,20 @@
|
|
22
22
|
<sl-tooltip content="<%= Alchemy.t('Remove item from clipboard') %>">
|
23
23
|
<%= link_to render_icon(:close, size: '1x'),
|
24
24
|
alchemy.remove_admin_clipboard_path(remarkable_type: item_class, remarkable_id: item.id),
|
25
|
-
|
25
|
+
"data-turbo-method": :delete,
|
26
26
|
class: "icon_button small"
|
27
27
|
%>
|
28
28
|
</sl-tooltip>
|
29
29
|
</li>
|
30
30
|
<% end %>
|
31
31
|
</ul>
|
32
|
+
|
32
33
|
<p>
|
33
|
-
<%=
|
34
|
-
Alchemy.t('Do you really want to clear the clipboard?'),
|
34
|
+
<%= link_to Alchemy.t('clear clipboard'),
|
35
35
|
alchemy.clear_admin_clipboard_path(remarkable_type: params[:remarkable_type]),
|
36
|
+
"data-turbo-confirm": Alchemy.t('Do you really want to clear the clipboard?'),
|
37
|
+
"data-turbo-method": :delete,
|
36
38
|
class: 'button' %>
|
37
39
|
</p>
|
38
|
-
|
40
|
+
<% end %>
|
39
41
|
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if @item.class.name == 'Alchemy::Element' && params[:remove] -%>
|
2
|
+
<% if @item.fixed? -%>
|
3
|
+
<alchemy-action name="removeFixedElement" params="[<%= @item.id %>]" />
|
4
|
+
<% else -%>
|
5
|
+
<%= turbo_stream.remove "element_#{@item.id}" %>
|
6
|
+
<% end -%>
|
7
|
+
<alchemy-growl>
|
8
|
+
<%= Alchemy.t("item moved to clipboard", name: @item.display_name_with_preview_text) %>
|
9
|
+
</alchemy-growl>
|
10
|
+
<% else -%>
|
11
|
+
<alchemy-growl>
|
12
|
+
<%= Alchemy.t("item copied to clipboard", name: @item.class.name == "Alchemy::Element" ? @item.display_name_with_preview_text : @item.name) %>
|
13
|
+
</alchemy-growl>
|
14
|
+
<% end -%>
|
15
|
+
|
16
|
+
<%= turbo_stream.replace "clipboard_button", partial: "button" %>
|
17
|
+
|
18
|
+
<%= render "update_nested_element_button" %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<% if @clipboard.blank? %>
|
2
|
+
<%= render template: "alchemy/admin/clipboard/clear" %>
|
3
|
+
<% else %>
|
4
|
+
<%= turbo_stream.remove "clipboard_item_#{@item.id}" %>
|
5
|
+
<%= render "update_nested_element_button" %>
|
6
|
+
<alchemy-growl>
|
7
|
+
<%= Alchemy.t("item removed from clipboard", name: @item.class.to_s == "Element" ? @item.display_name_with_preview_text : @item.name) %>
|
8
|
+
</alchemy-growl>
|
9
|
+
<% end %>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
</div>
|
13
13
|
<form>
|
14
14
|
<%= button_tag Alchemy.t(:apply), type: 'submit' %>
|
15
|
-
<%= button_tag Alchemy.t('Reset Imagemask'), class: 'reset_mask', type: 'reset' %>
|
15
|
+
<%= button_tag Alchemy.t('Reset Imagemask'), class: 'reset_mask secondary', type: 'reset' %>
|
16
16
|
</form>
|
17
17
|
</div>
|
18
18
|
<% end %>
|
@@ -7,38 +7,24 @@
|
|
7
7
|
Ruby v<%= RUBY_VERSION %>, Rails v<%= Rails.version %>
|
8
8
|
</small>
|
9
9
|
</h2>
|
10
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
</
|
25
|
-
|
26
|
-
var el = $('#update_check');
|
27
|
-
var spinner = new Alchemy.Spinner('small')
|
28
|
-
spinner.spin(el[0])
|
29
|
-
$.get('<%= alchemy.update_check_path %>', function(data, textStatus, jqXHR) {
|
30
|
-
if (data == 'true') {
|
31
|
-
$('#update_available').removeClass("hidden")
|
32
|
-
} else {
|
33
|
-
$('#up_to_date').removeClass("hidden")
|
34
|
-
}
|
35
|
-
}).fail(function(jqXHR, textStatus, errorThrown) {
|
36
|
-
$('#error').removeClass("hidden")
|
37
|
-
}).always(function() {
|
38
|
-
spinner.stop()
|
39
|
-
})
|
40
|
-
</script>
|
10
|
+
|
11
|
+
<% if can?(:update_check, :alchemy_admin_dashboard) %>
|
12
|
+
<alchemy-update-check url="<%= alchemy.update_check_path %>">
|
13
|
+
<span class="update_available hidden">
|
14
|
+
<%= render_icon(:exclamation) %>
|
15
|
+
<%= Alchemy.t('Update available') %>
|
16
|
+
</span>
|
17
|
+
<span class="up_to_date hidden">
|
18
|
+
<%= render_icon(:check) %>
|
19
|
+
<%= Alchemy.t('Alchemy is up to date') %>
|
20
|
+
</span>
|
21
|
+
<span class="error hidden">
|
22
|
+
<%= render_icon(:exclamation) %>
|
23
|
+
<%= Alchemy.t('Update status unavailable') %>
|
24
|
+
</span>
|
25
|
+
</alchemy-update-check>
|
41
26
|
<% end %>
|
27
|
+
|
42
28
|
<%= render_message do %>
|
43
29
|
<p><%= Alchemy.t('Alchemy is open software and itself uses open software and free resources:') %></p>
|
44
30
|
<ul>
|
@@ -13,15 +13,11 @@
|
|
13
13
|
|
14
14
|
<%= render 'alchemy/admin/elements/toolbar', element: element %>
|
15
15
|
|
16
|
-
<%
|
17
|
-
<%= render_message(:hint, sanitize(element.hint)) %>
|
18
|
-
<% end %>
|
19
|
-
|
20
|
-
<% element.definition[:message].tap do |message| %>
|
16
|
+
<% element.definition.message.tap do |message| %>
|
21
17
|
<%= render_message(:info, sanitize(message)) if message %>
|
22
18
|
<% end %>
|
23
19
|
|
24
|
-
<% element.definition
|
20
|
+
<% element.definition.warning.tap do |warning| %>
|
25
21
|
<%= render_message(:warning, sanitize(warning)) if warning %>
|
26
22
|
<% end %>
|
27
23
|
|
@@ -37,10 +33,10 @@
|
|
37
33
|
<!-- Ingredients -->
|
38
34
|
<% if element.has_ingredients_defined? %>
|
39
35
|
<div class="element-ingredient-editors">
|
40
|
-
<%= render element.ingredients.select {
|
36
|
+
<%= render element.ingredients.select { !_1.definition.group }, element_form: f %>
|
41
37
|
|
42
38
|
<!-- Each ingredient group -->
|
43
|
-
<% element.ingredients.select {
|
39
|
+
<% element.ingredients.select { _1.definition.group }.group_by { _1.definition.group }.each do |group, ingredients| %>
|
44
40
|
<%= content_tag :details, class: "ingredient-group", id: "element_#{element.id}_ingredient_group_#{group.parameterize.underscore}", is: "alchemy-ingredient-group" do %>
|
45
41
|
<summary>
|
46
42
|
<%= element.translated_group group %>
|
@@ -6,15 +6,15 @@
|
|
6
6
|
<%= turbo_frame_tag @element do %>
|
7
7
|
<%= alchemy_form_for [:admin, @element], remote: false do |form| %>
|
8
8
|
<%= form.hidden_field :page_version_id %>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
<div class="input">
|
10
|
+
<%= form.label(:name, class: "control-label required") do %>
|
11
|
+
<%= Alchemy.t(:element_of_type) %><abbr>*</abbr>
|
12
|
+
<% end %>
|
13
|
+
<%= render Alchemy::Admin::ElementSelect.new(
|
14
|
+
@elements,
|
15
|
+
field_name: form.field_name(:name)
|
16
|
+
) %>
|
17
|
+
</div>
|
18
18
|
<%= form.hidden_field :parent_element_id, value: @parent_element.try(:id) %>
|
19
19
|
<%= form.submit Alchemy.t(:add) %>
|
20
20
|
<%- end -%>
|
@@ -5,11 +5,15 @@
|
|
5
5
|
<% elsif element.deprecated? %>
|
6
6
|
<%= hint_with_tooltip element.deprecation_notice %>
|
7
7
|
<% else %>
|
8
|
-
|
8
|
+
<span class="icon element">
|
9
|
+
<%= element.definition.icon_file %>
|
10
|
+
</span>
|
11
|
+
<%= render_icon(:draggable, style: false, fixed_width: false) %>
|
9
12
|
<% end %>
|
10
13
|
</span>
|
11
14
|
<span class="element-title">
|
12
15
|
<span class="preview_text_element_name"><%= element.display_name %></span>
|
16
|
+
<%= render_hint_for(element, size: "1x", fixed_width: false) %>
|
13
17
|
<span class="preview_text_quote">
|
14
18
|
<%= sanitize(element.preview_text.presence || ' ') %>
|
15
19
|
</span>
|
@@ -1,20 +1,18 @@
|
|
1
1
|
<% remarkable_type = "elements" %>
|
2
2
|
<div class="element-toolbar">
|
3
3
|
<sl-tooltip placement="top-start" content="<%= Alchemy.t(:copy_element) %>">
|
4
|
-
<%=
|
4
|
+
<%= button_to(
|
5
5
|
render_icon("file-copy"),
|
6
6
|
alchemy.insert_admin_clipboard_path(remarkable_type: remarkable_type, remarkable_id: element.id),
|
7
|
-
|
8
|
-
method: :post,
|
7
|
+
"data-turbo-method": :post,
|
9
8
|
class: "icon_button"
|
10
9
|
) %>
|
11
10
|
</sl-tooltip>
|
12
11
|
<sl-tooltip content="<%= Alchemy.t(:cut_element) %>">
|
13
|
-
<%=
|
12
|
+
<%= button_to(
|
14
13
|
render_icon("scissors-cut"),
|
15
14
|
alchemy.insert_admin_clipboard_path(remarkable_type: remarkable_type, remarkable_id: element.id, remove: true),
|
16
|
-
|
17
|
-
method: :post,
|
15
|
+
"data-turbo-method": :post,
|
18
16
|
class: "icon_button"
|
19
17
|
) %>
|
20
18
|
</sl-tooltip>
|
@@ -25,7 +25,8 @@
|
|
25
25
|
<% end %>
|
26
26
|
|
27
27
|
<%= turbo_stream.replace "clipboard_button",
|
28
|
-
partial: "alchemy/admin/
|
28
|
+
partial: "alchemy/admin/clipboard/button",
|
29
|
+
locals: {remarkable_type: "elements"} %>
|
29
30
|
|
30
31
|
<alchemy-growl>
|
31
32
|
<%= Alchemy.t(:successfully_added_element) %>
|
@@ -13,14 +13,14 @@
|
|
13
13
|
},
|
14
14
|
if_permitted_to: [:create, Alchemy::Element]
|
15
15
|
) %>
|
16
|
-
<%= render "alchemy/admin/
|
16
|
+
<%= render "alchemy/admin/clipboard/button", remarkable_type: "elements" %>
|
17
17
|
<sl-tooltip content="<%= Alchemy.t("Collapse all elements") %>" placement="top-end" class="right">
|
18
18
|
<button id="collapse-all-elements-button" class="icon_button">
|
19
19
|
<alchemy-icon name="contract-up-down"></alchemy-icon>
|
20
20
|
</button>
|
21
21
|
</sl-tooltip>
|
22
22
|
</div>
|
23
|
-
<% if @page.element_definitions.any?
|
23
|
+
<% if @page.element_definitions.any?(&:fixed) %>
|
24
24
|
<sl-tab-group id="fixed-elements">
|
25
25
|
<sl-tab slot="nav" panel="main-content-elements">
|
26
26
|
<%= Alchemy.t(:main_content) %>
|
@@ -1,18 +1,5 @@
|
|
1
|
-
<% css_classes = ingredient.settings[:css_classes] %>
|
2
|
-
|
3
1
|
<%= f.input :link_text %>
|
4
2
|
<%= f.input :title %>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
include_blank: Alchemy.t('None') %>
|
9
|
-
<%- else -%>
|
10
|
-
<% Alchemy::Deprecation.warn %(Float positioning in File ingredients is deprecated. If you rely on them, please use `css_classes` in your "#{ingredient.role}" settings instead.) %>
|
11
|
-
<%= f.input :css_class,
|
12
|
-
label: Alchemy.t(:position_in_text),
|
13
|
-
collection: [
|
14
|
-
[Alchemy.t(:above), "no_float"],
|
15
|
-
[Alchemy.t(:left), "left"],
|
16
|
-
[Alchemy.t(:right), "right"]
|
17
|
-
], include_blank: Alchemy.t('Layout default') %>
|
18
|
-
<%- end -%>
|
3
|
+
<%= f.input :css_class,
|
4
|
+
collection: ingredient.settings[:css_classes],
|
5
|
+
include_blank: Alchemy.t('None') %>
|
@@ -19,13 +19,4 @@
|
|
19
19
|
end
|
20
20
|
end %>
|
21
21
|
<%= f.input :css_class, collection: css_classes_collection, include_blank: false %>
|
22
|
-
<%- else -%>
|
23
|
-
<% Alchemy::Deprecation.warn %(Float positioning in Picture ingredients is deprecated. If you rely on them, please use `css_classes` in your "#{ingredient.role}" settings instead.) %>
|
24
|
-
<%= f.input :css_class,
|
25
|
-
label: Alchemy.t(:position_in_text),
|
26
|
-
collection: [
|
27
|
-
[Alchemy.t(:above), "no_float"],
|
28
|
-
[Alchemy.t(:left), "left"],
|
29
|
-
[Alchemy.t(:right), "right"]
|
30
|
-
], include_blank: Alchemy.t("Layout default") %>
|
31
22
|
<%- end -%>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<% end %>
|
13
13
|
<%= f.input :frontpage_name %>
|
14
14
|
<%= f.input :page_layout,
|
15
|
-
collection: Alchemy::
|
15
|
+
collection: Alchemy::PageDefinition.all,
|
16
16
|
label_method: ->(p) { Alchemy::Page.human_layout_name(p['name']) },
|
17
17
|
value_method: ->(p) { p['name'] },
|
18
18
|
input_html: {is: 'alchemy-select'} %>
|
@@ -31,12 +31,15 @@
|
|
31
31
|
<%== Alchemy.t('alchemy/language', scope: :no_resource_found) %>
|
32
32
|
<% end %>
|
33
33
|
<%= render 'form', language: Alchemy::Language.new(
|
34
|
-
|
34
|
+
name: Alchemy.config.default_language.name,
|
35
|
+
code: Alchemy.config.default_language.code,
|
36
|
+
page_layout: Alchemy.config.default_language.page_layout,
|
37
|
+
frontpage_name: Alchemy.config.default_language.frontpage_name,
|
35
38
|
site: Alchemy::Current.site,
|
36
39
|
default: true,
|
37
40
|
public: true
|
38
41
|
)
|
39
|
-
|
42
|
+
%>
|
40
43
|
</div>
|
41
44
|
<% end %>
|
42
45
|
</div>
|
@@ -15,18 +15,7 @@
|
|
15
15
|
tooltip_placement: "top-start",
|
16
16
|
if_permitted_to: [:create, Alchemy::Page]
|
17
17
|
) %>
|
18
|
-
<%= render
|
19
|
-
icon: clipboard_empty?('pages') ? 'clipboard' : 'paste',
|
20
|
-
url: alchemy.admin_clipboard_path(remarkable_type: 'pages'),
|
21
|
-
dialog_options: {
|
22
|
-
title: Alchemy.t('Clipboard'),
|
23
|
-
size: '380x270'
|
24
|
-
},
|
25
|
-
title: Alchemy.t('Show clipboard'),
|
26
|
-
link_options: {id: "clipboard_button"},
|
27
|
-
label: Alchemy.t('Show clipboard'),
|
28
|
-
if_permitted_to: [:create, Alchemy::Page]
|
29
|
-
) %>
|
18
|
+
<%= render "alchemy/admin/clipboard/button", remarkable_type: "pages" %>
|
30
19
|
</div>
|
31
20
|
<% end %>
|
32
21
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<div class="control_group">
|
12
12
|
<%= render 'alchemy/admin/pages/publication_fields' %>
|
13
13
|
<%= page_status_checkbox(@page, :restricted) %>
|
14
|
-
<% if
|
14
|
+
<% if Alchemy.config.sitemap.show_flag %>
|
15
15
|
<%= page_status_checkbox(@page, :sitemap) %>
|
16
16
|
<% end %>
|
17
17
|
</div>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<%= f.input :title %>
|
24
24
|
</alchemy-char-counter>
|
25
25
|
|
26
|
-
<% if Alchemy.
|
26
|
+
<% if Alchemy.config.show_page_searchable_checkbox %>
|
27
27
|
<div class="input check_boxes">
|
28
28
|
<label class="control-label"><%= Alchemy.t(:fulltext_search) %></label>
|
29
29
|
<div class="control_group">
|
@@ -98,14 +98,13 @@
|
|
98
98
|
{{/if}}
|
99
99
|
{{#if permissions.copy}}
|
100
100
|
<sl-tooltip content="<%= Alchemy.t(:copy_page) %>">
|
101
|
-
<%=
|
101
|
+
<%= button_to(
|
102
102
|
render_icon("file-copy"),
|
103
103
|
alchemy.insert_admin_clipboard_path(
|
104
104
|
remarkable_type: :pages,
|
105
105
|
remarkable_id: "__ID__",
|
106
106
|
),
|
107
|
-
|
108
|
-
method: :post,
|
107
|
+
"data-turbo-method": :post,
|
109
108
|
class: "icon_button"
|
110
109
|
) %>
|
111
110
|
</sl-tooltip>
|