Hide the title link of documents in the trash.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
- Remove the pending work chapter. This is now available in the Wiki:
|
||||
wiki.mayan-edms.com
|
||||
- Add support for hiding a links icon. Hide all object menu links' icons.
|
||||
- Hide the title link of documents in the trash.
|
||||
|
||||
3.0.1 (2018-07-08)
|
||||
=================
|
||||
|
||||
@@ -68,25 +68,6 @@ class DocumentListView(SingleObjectListView):
|
||||
return self.get_document_queryset().filter(is_stub=False)
|
||||
|
||||
|
||||
class DeletedDocumentListView(DocumentListView):
|
||||
object_permission = None
|
||||
|
||||
def get_document_queryset(self):
|
||||
return AccessControlList.objects.filter_by_access(
|
||||
permission_document_view, self.request.user,
|
||||
queryset=DeletedDocument.trash.all()
|
||||
)
|
||||
|
||||
def get_extra_context(self):
|
||||
context = super(DeletedDocumentListView, self).get_extra_context()
|
||||
context.update(
|
||||
{
|
||||
'title': _('Documents in trash'),
|
||||
}
|
||||
)
|
||||
return context
|
||||
|
||||
|
||||
class DeletedDocumentDeleteView(ConfirmView):
|
||||
extra_context = {
|
||||
'title': _('Delete the selected document?')
|
||||
@@ -125,6 +106,26 @@ class DeletedDocumentDeleteManyView(MultipleInstanceActionMixin, DeletedDocument
|
||||
success_message_plural = '%(count)d documents deleted.'
|
||||
|
||||
|
||||
class DeletedDocumentListView(DocumentListView):
|
||||
object_permission = None
|
||||
|
||||
def get_document_queryset(self):
|
||||
return AccessControlList.objects.filter_by_access(
|
||||
permission_document_view, self.request.user,
|
||||
queryset=DeletedDocument.trash.all()
|
||||
)
|
||||
|
||||
def get_extra_context(self):
|
||||
context = super(DeletedDocumentListView, self).get_extra_context()
|
||||
context.update(
|
||||
{
|
||||
'hide_link': True,
|
||||
'title': _('Documents in trash'),
|
||||
}
|
||||
)
|
||||
return context
|
||||
|
||||
|
||||
class DocumentDocumentTypeEditView(MultipleObjectFormActionView):
|
||||
form_class = DocumentTypeSelectForm
|
||||
model = Document
|
||||
|
||||
Reference in New Issue
Block a user