Skip to content

Commit

Permalink
fix: Restore "In Collection" button in the toolbar (#286)
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Yu <joshyu@foxmail.com>
  • Loading branch information
joshyu and Josh Yu authored Nov 6, 2024
1 parent 648ee88 commit 6589f66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog

Unreleased
==========
fix: Replace SortableAdminMixin by SortableAdminBase for WorkflowAdmin
fix: Restore "In Collection" button in the toolbar

2.2.1 (2024-07-02)
==================
Expand Down
2 changes: 1 addition & 1 deletion djangocms_moderation/cms_toolbars.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _add_moderation_buttons(self):
if not helpers.is_registered_for_moderation(self.toolbar.obj):
return

if self._is_versioned() and self.toolbar.edit_mode_active:
if self._is_versioned() and (self.toolbar.edit_mode_active or self.toolbar.preview_mode_active):
moderation_request = helpers.get_active_moderation_request(self.toolbar.obj)
if moderation_request:
title, url = helpers.get_moderation_button_title_and_url(
Expand Down

0 comments on commit 6589f66

Please sign in to comment.