From d394583729bec95294effc44585c1c27c1d99097 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 31 Jul 2019 01:54:51 -0400 Subject: [PATCH] Remove HTML title anchor on disabled pages Signed-off-by: Roberto Rosario --- mayan/apps/documents/apps.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mayan/apps/documents/apps.py b/mayan/apps/documents/apps.py index 020e2c7a04..ad9e6b2dee 100644 --- a/mayan/apps/documents/apps.py +++ b/mayan/apps/documents/apps.py @@ -102,6 +102,11 @@ from .widgets import ( ) +def is_document_page_enabled(context): + return context['object'].enabled + + + class DocumentsApp(MayanAppConfig): app_namespace = 'documents' app_url = 'documents' @@ -273,7 +278,8 @@ class DocumentsApp(MayanAppConfig): # DocumentPage SourceColumn( attribute='get_label', is_identifier=True, - is_object_absolute_url=True, source=DocumentPage + is_object_absolute_url=True, source=DocumentPage, + widget_condition=is_document_page_enabled ) SourceColumn( func=lambda context: document_page_thumbnail_widget.render(