alchemy_cms 7.4.6 → 8.0.0.a
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/CHANGELOG.md +86 -0
- data/Gemfile +13 -6
- data/README.md +13 -5
- data/alchemy_cms.gemspec +14 -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/custom-properties.css +1 -1
- 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/ui/alchemy/content.min.css +1 -0
- data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css +1 -1
- data/app/assets/config/alchemy_manifest.js +0 -2
- data/app/assets/images/alchemy/icons-sprite.svg +1 -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 +8 -15
- data/app/controllers/alchemy/admin/clipboard_controller.rb +2 -6
- data/app/controllers/alchemy/admin/elements_controller.rb +1 -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 +9 -5
- 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 +7 -2
- data/app/controllers/concerns/alchemy/admin/resource_filter.rb +92 -0
- data/app/decorators/alchemy/element_editor.rb +5 -48
- data/app/decorators/alchemy/ingredient_editor.rb +3 -53
- data/app/helpers/alchemy/admin/base_helper.rb +14 -84
- data/app/helpers/alchemy/admin/elements_helper.rb +4 -4
- 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/datepicker.js +10 -2
- data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +7 -7
- data/app/javascript/alchemy_admin/components/element_editor.js +1 -1
- data/app/javascript/alchemy_admin/components/index.js +1 -0
- data/app/javascript/alchemy_admin/components/remote_select.js +4 -1
- data/app/javascript/alchemy_admin/components/tags_autocomplete.js +5 -1
- data/app/javascript/alchemy_admin/components/tinymce.js +4 -2
- 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/dirty.js +3 -2
- data/app/javascript/alchemy_admin/i18n.js +15 -16
- data/app/javascript/alchemy_admin/initializer.js +1 -49
- data/app/javascript/alchemy_admin/utils/ajax.js +51 -44
- data/app/javascript/alchemy_admin.js +3 -8
- 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 +51 -34
- 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 +9 -27
- data/app/models/alchemy/element_definition.rb +160 -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 +0 -14
- 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_natures.rb +7 -7
- data/app/models/alchemy/page/page_scopes.rb +1 -1
- data/app/models/alchemy/page.rb +11 -33
- data/app/models/alchemy/page_definition.rb +115 -0
- data/app/models/alchemy/picture.rb +69 -79
- 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 +0 -15
- 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/{picture/url.rb → storage_adapter/dragonfly/picture_url.rb} +28 -12
- data/app/models/alchemy/{picture → storage_adapter/dragonfly}/preprocessor.rb +4 -4
- data/app/models/alchemy/storage_adapter/dragonfly.rb +183 -0
- data/app/models/alchemy/storage_adapter.rb +74 -0
- data/app/models/concerns/alchemy/picture_thumbnails.rb +19 -6
- data/app/serializers/alchemy/element_serializer.rb +0 -1
- data/app/services/alchemy/dragonfly_to_image_processing.rb +100 -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 +36 -49
- data/app/stylesheets/alchemy/_variables.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/archive.scss +20 -37
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/base.scss +16 -14
- data/app/stylesheets/alchemy/admin/buttons.scss +160 -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 +23 -16
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/elements.scss +150 -105
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/errors.scss +5 -5
- data/app/stylesheets/alchemy/admin/filters.scss +58 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flatpickr.scss +53 -60
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/form_fields.scss +21 -7
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/forms.scss +31 -19
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/frame.scss +20 -16
- data/app/stylesheets/alchemy/admin/hints.scss +5 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/icons.scss +10 -1
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/image_library.scss +10 -8
- 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 +61 -55
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/nodes.scss +21 -18
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/notices.scss +18 -18
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/page-select.scss +2 -2
- data/app/stylesheets/alchemy/admin/pagination.scss +144 -0
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/preview_window.scss +8 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/print.scss +1 -1
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/resource_info.scss +8 -5
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/search.scss +9 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/selects.scss +49 -37
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/shoelace.scss +5 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/sitemap.scss +38 -33
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/tables.scss +6 -4
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/tags.scss +6 -4
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/toolbar.scss +12 -6
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/typography.scss +2 -2
- data/app/{assets/stylesheets → stylesheets}/alchemy/admin/upload.scss +7 -5
- data/app/stylesheets/alchemy/admin.scss +44 -0
- data/app/stylesheets/alchemy/custom-properties.css +244 -0
- data/app/stylesheets/alchemy/welcome.scss +75 -0
- data/app/{assets/stylesheets → stylesheets}/tinymce/skins/content/alchemy/content.scss +8 -9
- data/app/stylesheets/tinymce/skins/ui/alchemy/content.scss +1 -0
- data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/skin.scss +133 -136
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +2 -2
- data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +1 -1
- 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/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 +1 -1
- data/app/views/alchemy/admin/elements/_header.html.erb +1 -0
- 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 +4 -7
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +2 -1
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/index.html.erb +2 -7
- data/app/views/alchemy/admin/resources/_applied_filters.html.erb +8 -0
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +11 -21
- 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/_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 +8 -0
- 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/redirect.js.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 +5 -9
- data/bun.lockb +0 -0
- data/bundles/remixicon.mjs +153 -0
- 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 +32 -14
- data/config/routes.rb +0 -2
- data/eslint.config.js +2 -1
- 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 +216 -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 +65 -17
- data/lib/alchemy/hints.rb +3 -7
- 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/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 +30 -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/shared_ingredient_examples.rb +5 -5
- data/lib/alchemy/upgrader/.keep +0 -0
- 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 +192 -170
- 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 +5 -14
- data/lib/generators/alchemy/install/templates/alchemy.rb.tt +196 -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/upgrade.rake +12 -47
- data/vendor/javascript/tinymce.min.js +1 -1
- data/vitest.config.js +21 -0
- metadata +181 -180
- 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.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/buttons.scss +0 -124
- 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.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/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/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/config/initializers/assets.rb +0 -4
- 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/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/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/attachments.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/node-select.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>
|
@@ -82,5 +82,5 @@
|
|
82
82
|
<% end %>
|
83
83
|
<% end %>
|
84
84
|
|
85
|
-
<%=
|
85
|
+
<%= render "alchemy/admin/resources/pagination", resources: @attachments %>
|
86
86
|
<% 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 %>
|
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 %>
|
@@ -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 %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
selected: (@elements.first if @elements.count == 1),
|
14
14
|
input_html: {is: 'alchemy-select', autofocus: true} %>
|
15
15
|
<% if @elements.count == 1 %>
|
16
|
-
<%= form.hidden_field :name, value: @elements.first
|
16
|
+
<%= form.hidden_field :name, value: @elements.first.name %>
|
17
17
|
<% end %>
|
18
18
|
<%= form.hidden_field :parent_element_id, value: @parent_element.try(:id) %>
|
19
19
|
<%= form.submit Alchemy.t(:add) %>
|
@@ -10,6 +10,7 @@
|
|
10
10
|
</span>
|
11
11
|
<span class="element-title">
|
12
12
|
<span class="preview_text_element_name"><%= element.display_name %></span>
|
13
|
+
<%= render_hint_for(element, size: "1x", fixed_width: false) %>
|
13
14
|
<span class="preview_text_quote">
|
14
15
|
<%= sanitize(element.preview_text.presence || ' ') %>
|
15
16
|
</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>
|
@@ -29,21 +29,7 @@
|
|
29
29
|
</sl-tooltip>
|
30
30
|
</div>
|
31
31
|
<% end %>
|
32
|
-
|
33
|
-
<sl-tooltip content="<%= Alchemy.t("Show clipboard") %>">
|
34
|
-
<%= link_to_dialog(
|
35
|
-
render_icon(:clipboard, style: clipboard_empty?("pages") ? "line" : "fill"),
|
36
|
-
alchemy.admin_clipboard_path(remarkable_type: "pages"),
|
37
|
-
{
|
38
|
-
title: Alchemy.t("Clipboard"),
|
39
|
-
size: "380x305"
|
40
|
-
},
|
41
|
-
class: "icon_button",
|
42
|
-
title: Alchemy.t("Show clipboard"),
|
43
|
-
id: "clipboard_button"
|
44
|
-
) %>
|
45
|
-
</sl-tooltip>
|
46
|
-
</div>
|
32
|
+
<%= render "alchemy/admin/clipboard/button", remarkable_type: "pages" %>
|
47
33
|
<div class="toolbar_spacer"></div>
|
48
34
|
<div class="toolbar_button">
|
49
35
|
<sl-tooltip content="<%= Alchemy.t("Hierarchical") %>">
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<%= render partial: "create_language_form" %>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<%=
|
20
|
+
<%= render "alchemy/admin/resources/pagination", resources: @pages %>
|
21
21
|
|
22
22
|
<div id="library_sidebar">
|
23
23
|
<%= render "filter_bar" if resource_has_filters %>
|
@@ -1,8 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<%- url ||= url_for({ action: 'index' }.merge(
|
2
|
+
q: search_filter_params[:q]&.except(resource_handler.search_field_name),
|
3
|
+
form_field_id: @form_field_id,
|
4
|
+
size: @size
|
5
|
+
)) -%>
|
6
|
+
|
7
|
+
<%= search_form_for @query, url: url_for(action: 'index', size: @size), remote: true, html: {class: 'search_form', id: "resource_search"} do |f| %>
|
6
8
|
<%= hidden_field_tag :form_field_id, @form_field_id %>
|
7
9
|
<div class="search_field">
|
8
10
|
<button type="submit">
|
@@ -12,15 +14,10 @@
|
|
12
14
|
placeholder: Alchemy.t(:search),
|
13
15
|
class: 'search_input_field',
|
14
16
|
id: nil %>
|
15
|
-
<%= link_to render_icon(:times, size: '1x'),
|
16
|
-
action: 'index',
|
17
|
-
form_field_id: @form_field_id,
|
18
|
-
size: @size,
|
19
|
-
overlay: true
|
20
|
-
}.merge(search_filter_params.except(:q))),
|
17
|
+
<%= link_to render_icon(:times, size: '1x'), url,
|
21
18
|
remote: true,
|
22
19
|
class: 'search_field_clear',
|
23
20
|
title: Alchemy.t(:click_to_show_all),
|
24
|
-
style: search_filter_params
|
21
|
+
style: search_filter_params.fetch(:q, {}).fetch(resource_handler.search_field_name, '').present? ? 'visibility: visible' : 'visibility: hidden' %>
|
25
22
|
</div>
|
26
23
|
<% end %>
|
@@ -1,6 +1,8 @@
|
|
1
|
-
<%- url ||= resource_url_proxy.url_for({ action: 'index' }.merge(
|
1
|
+
<%- url ||= resource_url_proxy.url_for({ action: 'index' }.merge(
|
2
|
+
q: search_filter_params[:q]&.except(resource_handler.search_field_name))
|
3
|
+
) -%>
|
2
4
|
|
3
|
-
<%= search_form_for @query, url:
|
5
|
+
<%= search_form_for @query, url: resource_url_proxy.url_for(action: "index"), id: "resource_search", class: 'search_form' do |f| %>
|
4
6
|
<div class="search_field">
|
5
7
|
<button type="submit">
|
6
8
|
<%= render_icon('search') %>
|
@@ -8,19 +10,12 @@
|
|
8
10
|
<%= f.search_field resource_handler.search_field_name,
|
9
11
|
class: 'search_input_field',
|
10
12
|
placeholder: Alchemy.t(:search) %>
|
11
|
-
<% local_assigns.fetch(:additional_query_fields, []).each do |field| %>
|
12
|
-
<%= f.hidden_field field, id: nil %>
|
13
|
-
<% end %>
|
14
13
|
<%= link_to render_icon(:times, size: '1x'), url,
|
15
14
|
class: 'search_field_clear',
|
16
15
|
id: 'search_field_clear',
|
17
16
|
title: Alchemy.t(:click_to_show_all),
|
18
17
|
style: search_filter_params.fetch(:q, {}).fetch(resource_handler.search_field_name, '').present? ? 'visibility: visible' : 'visibility: hidden' %>
|
19
18
|
|
20
|
-
<% search_filter_params.fetch(:filter, []).each do |filter_param| %>
|
21
|
-
<%= hidden_field_tag "filter[#{filter_param[0]}]", filter_param[1], id: nil %>
|
22
|
-
<% end %>
|
23
|
-
|
24
19
|
<% if search_filter_params.fetch(:tagged_with, nil) %>
|
25
20
|
<%= hidden_field_tag :tagged_with, search_filter_params.fetch(:tagged_with), id: nil %>
|
26
21
|
<% end %>
|
@@ -19,12 +19,9 @@
|
|
19
19
|
id: 'edit_multiple_pictures',
|
20
20
|
style: 'float: none'
|
21
21
|
) %>
|
22
|
-
<%= button_tag render_icon("delete-bin-2", size: '1x') + Alchemy.t("Delete"),
|
23
|
-
|
24
|
-
|
25
|
-
ok_label: Alchemy.t("Yes"),
|
26
|
-
cancel_label: Alchemy.t("No")
|
27
|
-
}.to_json, class: 'button with_icon' %>
|
22
|
+
<%= button_tag render_icon("delete-bin-2", size: '1x') + Alchemy.t("Delete"),
|
23
|
+
'data-turbo-confirm': Alchemy.t(:confirm_to_delete_images_from_server),
|
24
|
+
class: 'button with_icon' %>
|
28
25
|
<%= Alchemy.t(:or) %>
|
29
26
|
<%= link_to(
|
30
27
|
render_icon(:close) + Alchemy.t("Clear selection"),
|
@@ -53,4 +50,4 @@
|
|
53
50
|
<% end %>
|
54
51
|
<% end %>
|
55
52
|
|
56
|
-
<%=
|
53
|
+
<%= render "alchemy/admin/resources/pagination", resources: @pictures %>
|
@@ -21,7 +21,8 @@
|
|
21
21
|
<%= render partial: 'picture_to_assign',
|
22
22
|
collection: @pictures,
|
23
23
|
locals: {size: @size} %>
|
24
|
-
|
24
|
+
|
25
|
+
<%= render "alchemy/admin/resources/pagination", resources: @pictures, remote: true, hide_per_page_select: true %>
|
25
26
|
</div>
|
26
27
|
<% end %>
|
27
28
|
</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
file_attribute: 'image_file',
|
8
8
|
redirect_url: alchemy.admin_pictures_path(
|
9
9
|
size: @size,
|
10
|
-
|
10
|
+
q: { last_upload: true }
|
11
11
|
) %>
|
12
12
|
</div>
|
13
13
|
<div class="toolbar_spacer"></div>
|
@@ -74,13 +74,8 @@
|
|
74
74
|
<h2>
|
75
75
|
<%= @pictures.total_count %>
|
76
76
|
<%= Alchemy::Picture.model_name.human(count: @pictures.total_count) %>
|
77
|
-
<% if search_filter_params[:filter].present? %>
|
78
|
-
<%= Alchemy.t("filtered_by") %>
|
79
|
-
<% search_filter_params[:filter].each do |k, v| %>
|
80
|
-
<span class="applied-filter"><%= Alchemy.t("filters.picture.#{k}.values.#{v}") %></span>
|
81
|
-
<% end %>
|
82
|
-
<% end %>
|
83
77
|
</h2>
|
78
|
+
<%= render "alchemy/admin/resources/applied_filters" %>
|
84
79
|
</div>
|
85
80
|
<%= render 'archive' %>
|
86
81
|
</div>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% if applied_filters.present? %>
|
2
|
+
<div class="applied-filters">
|
3
|
+
<b><%= Alchemy.t("filtered_by") %></b>
|
4
|
+
<% applied_filters.each do |filter| %>
|
5
|
+
<%= render filter.applied_filter_component(search_filter_params:, resource_url_proxy:, query: @query) %>
|
6
|
+
<% end %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|