From 34a5a54c8b4ed75bf89c82a4ffe73b702dad45a0 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 25 Jun 2019 09:15:52 -0400 Subject: [PATCH] Add sortable index instance label column Signed-off-by: Roberto Rosario --- mayan/apps/document_indexing/apps.py | 8 ++++++-- mayan/apps/document_indexing/views.py | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mayan/apps/document_indexing/apps.py b/mayan/apps/document_indexing/apps.py index 586b7246bd..ed121bc1c3 100644 --- a/mayan/apps/document_indexing/apps.py +++ b/mayan/apps/document_indexing/apps.py @@ -102,8 +102,12 @@ class DocumentIndexingApp(MayanAppConfig): ) SourceColumn( - attribute='label', is_identifier=True, is_sortable=True, - source=Index + attribute='label', exclude=(IndexInstance,), is_identifier=True, + is_sortable=True, source=Index + ) + SourceColumn( + attribute='label', is_object_absolute_url=True, is_identifier=True, + is_sortable=True, source=IndexInstance ) SourceColumn( attribute='slug', exclude=(IndexInstance,), is_sortable=True, diff --git a/mayan/apps/document_indexing/views.py b/mayan/apps/document_indexing/views.py index f57a72ebdd..384e45064f 100644 --- a/mayan/apps/document_indexing/views.py +++ b/mayan/apps/document_indexing/views.py @@ -309,6 +309,7 @@ class IndexListView(SingleObjectListView): def get_extra_context(self): return { 'hide_links': True, + 'hide_object': True, 'no_results_icon': icon_index, 'no_results_main_link': link_index_template_create.resolve( context=RequestContext(request=self.request)