Add redirection after trashing a document

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-06-28 23:05:54 -04:00
parent 26fdaf867f
commit 8141748677
3 changed files with 6 additions and 0 deletions

View File

@@ -16,6 +16,8 @@
* Remove tag create event registration from the tag
instances. The tag create event is not applicable to
existing tags.
* Add proper redirection after moving a document to the
trash.
3.2.3 (2019-06-21)
==================

View File

@@ -30,6 +30,8 @@ Changes
- Remove tag create event registration from the tag
instances. The tag create event is not applicable to
existing tags.
- Add proper redirection after moving a document to the
trash.
Removals
--------

View File

@@ -10,6 +10,7 @@ from mayan.apps.acls.models import AccessControlList
from mayan.apps.common.generics import (
ConfirmView, MultipleObjectConfirmActionView
)
from mayan.apps.common.settings import setting_home_view
from ..icons import icon_document_list_deleted
from ..models import DeletedDocument, Document
@@ -33,6 +34,7 @@ class DocumentTrashView(MultipleObjectConfirmActionView):
model = Document
object_permission = permission_document_trash
pk_url_kwarg = 'pk'
post_action_redirect = reverse_lazy(viewname=setting_home_view.value)
success_message_singular = _(
'%(count)d document moved to the trash.'
)