WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,9 @@ def handle_delete(self, action):
9999 registry = queryUtility (IRegistry )
100100 retention_period = registry ["recyclebin-controlpanel.retention_period" ]
101101
102- message = get_recycle_bin_message (title = title , retention_period = retention_period )
102+ message = get_recycle_bin_message (
103+ title = title , retention_period = retention_period
104+ )
103105 IStatusMessage (self .request ).add (message )
104106 else :
105107 IStatusMessage (self .request ).add (
Original file line number Diff line number Diff line change 11from AccessControl import Unauthorized
22from AccessControl .Permissions import delete_objects
33from plone .app .content .browser .contents import ContentsBaseAction
4- from plone .app .content .utils import get_recycle_bin_message
54from plone .app .content .interfaces import IStructureAction
5+ from plone .app .content .utils import get_recycle_bin_message
66from plone .base import PloneMessageFactory as _
77from plone .base .interfaces .recyclebin import IRecycleBin
88from plone .locking .interfaces import ILockable
Original file line number Diff line number Diff line change @@ -44,16 +44,16 @@ def json_dumps(data):
4444
4545def get_recycle_bin_message (title = None , retention_period = 0 ):
4646 """Generate appropriate message for recycled items based on retention period.
47-
47+
4848 Args:
4949 title: The title of the deleted item (optional, for single item messages)
5050 retention_period: Number of days to retain items (0 = indefinite)
51-
51+
5252 Returns:
5353 Translated message string
5454 """
5555 from plone .base import PloneMessageFactory as _
56-
56+
5757 if title :
5858 # Single item message
5959 if retention_period == 0 :
@@ -69,7 +69,9 @@ def get_recycle_bin_message(title=None, retention_period=0):
6969 else :
7070 # Multiple items message
7171 if retention_period == 0 :
72- return _ ("Successfully moved items to recycle bin. Items can be restored by administrators." )
72+ return _ (
73+ "Successfully moved items to recycle bin. Items can be restored by administrators."
74+ )
7375 else :
7476 return _ (
7577 "Successfully moved items to recycle bin. Items can be restored by administrators and will be permanently deleted after ${days} days." ,
You can’t perform that action at this time.
0 commit comments