changeset 485:3a3aea61aa1b

code for getting subitem flag in global_index function, replaced by the get_detailed_index() module
author Akash Sinha <akash2607@gmail.com>
date Sat, 09 Jul 2011 00:34:12 +0530
parents 19b257c0e102
children b6149c732926
files MoinMoin/apps/frontend/views.py
diffstat 1 files changed, 3 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sat Jul 09 00:11:02 2011 +0530
+++ b/MoinMoin/apps/frontend/views.py	Sat Jul 09 00:34:12 2011 +0530
@@ -504,20 +504,13 @@
     initials = [initial.upper() for initial in initials]
     initials = list(set(initials))
     initials.sort()
-    index_more_links = []
-    for fullname, relname, contenttype in index:
-        test_item = item.create(fullname)
-        item_index = test_item.flat_index()
-        hassubitem = False
-        if item_index:
-            hassubitem = True
-        index_more_links.append((fullname, relname, contenttype, hassubitem))
-    index_more_links.sort()
+    detailed_index = item.get_detailed_index(index)
+    detailed_index.sort()
 
     item_name = request.values.get('item_name', '') # actions menu puts it into qs
     return render_template('global_index.html',
                            item_name=item_name, # XXX no item
-                           index=index_more_links,
+                           index=detailed_index,
                            initials=initials,
                            startswith=startswith,
                           )