From 0f1e01084cfb9f0f70745b675e59717387485d9f Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 29 Sep 2012 01:16:45 -0400 Subject: [PATCH] Add missing display_small(), disable navigation links for index root nodes --- apps/document_indexing/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/document_indexing/views.py b/apps/document_indexing/views.py index d321d3ae10..2851d8a141 100644 --- a/apps/document_indexing/views.py +++ b/apps/document_indexing/views.py @@ -42,7 +42,7 @@ def index_setup_list(request): 'extra_columns': [ {'name': _(u'name'), 'attribute': 'name'}, {'name': _(u'title'), 'attribute': 'title'}, - {'name': _(u'enabled'), 'attribute': encapsulate(lambda x: two_state_template(x.enabled))}, + {'name': _(u'enabled'), 'attribute': encapsulate(lambda x: two_state_template(x.enabled).display_small())}, ] } @@ -166,8 +166,8 @@ def index_setup_view(request, index_pk): 'hide_object': True, 'extra_columns': [ {'name': _(u'level'), 'attribute': encapsulate(lambda x: node_level(x))}, - {'name': _(u'enabled'), 'attribute': encapsulate(lambda x: two_state_template(x.enabled))}, - {'name': _(u'has document links?'), 'attribute': encapsulate(lambda x: two_state_template(x.link_documents))}, + {'name': _(u'enabled'), 'attribute': encapsulate(lambda x: two_state_template(x.enabled).display_small())}, + {'name': _(u'has document links?'), 'attribute': encapsulate(lambda x: two_state_template(x.link_documents).display_small())}, ], } @@ -372,7 +372,8 @@ def index_instance_node_view(request, index_instance_node_pk): 'title': title, 'hide_links': True, 'hide_object': True, - 'object': index_instance + # Don't display navigation links for root nodes + 'object': None if index_instance.is_root_node() else index_instance, }, context_instance=RequestContext(request))