changeset 2296:500d5d4b514a

Proper linking withing namespaces in tags view. Also fixed similar view.
author Ashutosh Singla <ashu1461@gmail.com>
date Mon, 23 Sep 2013 19:45:33 +0530
parents b12a05722ced
children a2de9d58adf3
files MoinMoin/apps/frontend/views.py MoinMoin/templates/global_tags.html
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Mon Sep 23 19:30:14 2013 +0530
+++ b/MoinMoin/apps/frontend/views.py	Mon Sep 23 19:45:33 2013 +0530
@@ -2008,6 +2008,7 @@
     return render_template('sitemap.html',
                            item_name=item_name,  # XXX no item
                            sitemap=sitemap,
+                           fqname=fq_name,
     )
 
 
@@ -2037,7 +2038,7 @@
             rev = item[CURRENT]
         except (AccessDenied, KeyError):
             return []
-        itemlinks = split_fqname_set(rev.meta.get(ITEMLINKS, []))
+        itemlinks = set(split_fqname_list(rev.meta.get(ITEMLINKS, [])))
         return [child for child in itemlinks if self.is_ok(child)]
 
     def is_ok(self, child):
--- a/MoinMoin/templates/global_tags.html	Mon Sep 23 19:30:14 2013 +0530
+++ b/MoinMoin/templates/global_tags.html	Mon Sep 23 19:45:33 2013 +0530
@@ -6,7 +6,7 @@
 {% if tags %}
 <ul class="moin-tags">
     {% for cls, tag in tags %}
-    <li class="{{ cls }}"><a href="{{ url_for('frontend.tagged_items', tag=tag) }}">{{ tag }}</a></li>
+    <li class="{{ cls }}"><a href="{{ url_for('frontend.tagged_items', tag=tag, namespace=fqname.namespace) }}">{{ tag }}</a></li>
     {% endfor %}
 </ul>
 {% endif %}