Add sortable index instance label column

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-06-25 09:15:52 -04:00
parent 0c17ab3f8a
commit 34a5a54c8b
2 changed files with 7 additions and 2 deletions

View File

@@ -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,

View File

@@ -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)