From 69fc2f8d11f4d3285ccc33e5fde30c7d83547d43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 09:51:33 +0100 Subject: [PATCH 1/4] chore(deps): bump tornado from 6.4.1 to 6.4.2 in /docs (#290) Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.4.1 to 6.4.2. - [Changelog](https://github.com/tornadoweb/tornado/blob/v6.4.2/docs/releases.rst) - [Commits](https://github.com/tornadoweb/tornado/compare/v6.4.1...v6.4.2) --- updated-dependencies: - dependency-name: tornado dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 1e5785d8..f8a8a421 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -118,7 +118,7 @@ tabulate==0.9.0 # via docstrfmt toml==0.10.2 # via docstrfmt -tornado==6.4.1 +tornado==6.4.2 # via livereload typing-extensions==4.9.0 # via From c30c4901b868c19474e5941fde241a3d7cb9e79f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 09:52:23 +0100 Subject: [PATCH 2/4] ci: pre-commit autoupdate (#284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.17.0 → v3.19.0](https://github.com/asottile/pyupgrade/compare/v3.17.0...v3.19.0) - [github.com/adamchainz/django-upgrade: 1.21.0 → 1.22.1](https://github.com/adamchainz/django-upgrade/compare/1.21.0...1.22.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabian Braun --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3f5614e..e99f5e66 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,13 +9,13 @@ ci: repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.19.0 hooks: - id: pyupgrade args: ["--py310-plus"] - repo: https://github.com/adamchainz/django-upgrade - rev: '1.21.0' + rev: '1.22.1' hooks: - id: django-upgrade args: [--target-version, "4.0"] From 2702238c2a4eec3fea5aedc5c9b3d7fc6f5a7155 Mon Sep 17 00:00:00 2001 From: Vipul Narang <61502917+vipulnarang95@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:34:43 +0530 Subject: [PATCH 3/4] Added data-popup attr to a tag (#291) --- CHANGELOG.rst | 1 + .../static/djangocms_moderation/js/burger.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5dded14e..c5df6e12 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,7 @@ Changelog Unreleased ========== +fix: Add data-popup attr to a tag in burger menu item fix: Replace SortableAdminMixin by SortableAdminBase for WorkflowAdmin fix: Restore "In Collection" button in the toolbar diff --git a/djangocms_moderation/static/djangocms_moderation/js/burger.js b/djangocms_moderation/static/djangocms_moderation/js/burger.js index 3fbcdf9e..93efd262 100644 --- a/djangocms_moderation/static/djangocms_moderation/js/burger.js +++ b/djangocms_moderation/static/djangocms_moderation/js/burger.js @@ -147,6 +147,7 @@ let li_anchor = document.createElement('a'); const itemId = $(item).attr('id'); const itemTarget = $(item).attr('target'); + const itemDataPopup = $(item).attr('data-popup'); li_anchor.setAttribute('class', 'cms-actions-dropdown-menu-item-anchor'); li_anchor.setAttribute('href', $(item).attr('href')); @@ -158,6 +159,10 @@ if (itemTarget !== undefined) { li_anchor.setAttribute('target', itemTarget); } + // Copy the data-popup attribute if it is set + if (itemDataPopup !== undefined) { + li_anchor.setAttribute('data-popup', itemDataPopup); + } if ($(item).hasClass('cms-form-get-method')) { // Ensure the fake-form selector is propagated to the new anchor From a448e16da7e6fa8977d8a165b1cb67836c04521e Mon Sep 17 00:00:00 2001 From: "sourcery-ai[bot]" <58596630+sourcery-ai[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:48:26 +0100 Subject: [PATCH 4/4] Add 'Configuration' section to README for moderation app settings (#293) * Add 'Configuration' section to README for moderation app settings Documentation: - Add a new 'Configuration' section in the README to document various settings of the moderation application. Resolves #20 * Update README.rst * Update README.rst * Add defaults * Fix formatting * Fix typo --------- Co-authored-by: sourcery-ai[bot] Co-authored-by: Fabian Braun --- CHANGELOG.rst | 1 + README.rst | 67 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c5df6e12..1d7eabb0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,7 @@ Unreleased fix: Add data-popup attr to a tag in burger menu item fix: Replace SortableAdminMixin by SortableAdminBase for WorkflowAdmin fix: Restore "In Collection" button in the toolbar +fix: Update README.rst and add overview of settings 2.2.1 (2024-07-02) ================== diff --git a/README.rst b/README.rst index e2d425b2..93572458 100644 --- a/README.rst +++ b/README.rst @@ -23,8 +23,8 @@ Run:: Add the following to your project's ``INSTALLED_APPS``: - - ``'djangocms_moderation'`` - - ``'adminsortable2'`` +- ``'djangocms_moderation'`` +- ``'adminsortable2'`` Run:: @@ -32,6 +32,69 @@ Run:: to perform the application's database migrations. +Configuration +============= + +The following settings can be added to your project's settings file to configure django CMS Moderation's behavior: + +.. list-table:: + :header-rows: 1 + :widths: 50 50 + + * - Setting + - Description + * - ``CMS_MODERATION_DEFAULT_COMPLIANCE_NUMBER_BACKEND`` + - Default backend class for generating compliance numbers. + Default is ``djangocms_moderation.backends.uuid4_backend``. + * - ``CMS_MODERATION_COMPLIANCE_NUMBER_BACKENDS`` + - List of available compliance number backend classes. + By default, three backends are configured: ``uuid4_backend``, + ``sequential_number_backend``, and + ``sequential_number_with_identifier_prefix_backend``. + * - ``CMS_MODERATION_ENABLE_WORKFLOW_OVERRIDE`` + - Enable/disable workflow override functionality. Defaults to ``False``. + * - ``CMS_MODERATION_DEFAULT_CONFIRMATION_PAGE_TEMPLATE`` + - Default template for confirmation pages. Defaults to + ``djangocms_moderation/moderation_confirmation.html`` + * - ``CMS_MODERATION_CONFIRMATION_PAGE_TEMPLATES`` + - List of available confirmation page templates. Only includes the + default template by default. + * - ``CMS_MODERATION_COLLECTION_COMMENTS_ENABLED`` + - Enable/disable comments on collections. Defaults to ``True``. + * - ``CMS_MODERATION_REQUEST_COMMENTS_ENABLED`` + - Enable/disable comments on requests. Defaults to ``True``. + * - ``CMS_MODERATION_COLLECTION_NAME_LENGTH_LIMIT`` + - Maximum length for collection names. Defaults to ``24``. + * - ``EMAIL_NOTIFICATIONS_FAIL_SILENTLY`` + - Control email notification error handling. Defaults to ``False``. + +Example Configuration +--------------------- + +Add these settings to your project's settings file: + +.. code-block:: python + + # Custom compliance number backend + CMS_MODERATION_DEFAULT_COMPLIANCE_NUMBER_BACKEND = 'myapp.backends.CustomComplianceNumberBackend' + + # Enable workflow override + CMS_MODERATION_ENABLE_WORKFLOW_OVERRIDE = True + + # Custom confirmation template + CMS_MODERATION_DEFAULT_CONFIRMATION_PAGE_TEMPLATE = 'custom_confirmation.html' + + # Enable comments + CMS_MODERATION_COLLECTION_COMMENTS_ENABLED = True + CMS_MODERATION_REQUEST_COMMENTS_ENABLED = True + + # Set collection name length limit + CMS_MODERATION_COLLECTION_NAME_LENGTH_LIMIT = 100 + + # Control email notification errors + EMAIL_NOTIFICATIONS_FAIL_SILENTLY = False + +============= Documentation =============