changeset 2271:8db46c3b7760

Added fqname support to refs view.
author Ashutosh Singla <ashu1461@gmail.com>
date Sat, 14 Sep 2013 01:05:40 +0530
parents ff7194d0a709
children b1c0a532235d
files MoinMoin/apps/frontend/views.py MoinMoin/templates/refs.html
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sat Sep 14 00:58:52 2013 +0530
+++ b/MoinMoin/apps/frontend/views.py	Sat Sep 14 01:05:40 2013 +0530
@@ -910,7 +910,8 @@
     backrefs = _backrefs(item_name)
     return render_template('refs.html',
                            item_name=item_name,
-                           refs=refs,
+                           fqname=split_fqname(item_name),
+                           refs=split_fqname_list(refs),
                            backrefs=backrefs
     )
 
--- a/MoinMoin/templates/refs.html	Sat Sep 14 00:58:52 2013 +0530
+++ b/MoinMoin/templates/refs.html	Sat Sep 14 01:05:40 2013 +0530
@@ -2,14 +2,16 @@
 {% block content %}
 <h1>{{ _('Outgoing Item References') }}</h1>
 <ul>
-    {% for item_name in refs|sort %}
-    <li><a href="{{ url_for('frontend.show_item', item_name=item_name) }}">{{ item_name }}</a></li>
+    {% for fq_name in refs|sort(attribute='value') %}
+    <li><a class="moin-fqname" href="{{ url_for('frontend.show_item', item_name=fq_name) }}" data-fqname="{{fq_name}}">{{ fq_name.value }}</a></li>
+
     {% endfor %}
 </ul>
 <h1>{{ _('Incoming Item References') }}</h1>
 <ul>
-    {% for item_name in backrefs|sort %}
-    <li><a href="{{ url_for('frontend.show_item', item_name=item_name) }}">{{ item_name }}</a></li>
+    {% for fq_name in backrefs|sort(attribute='value') %}
+    <li><a class="moin-fqname" href="{{ url_for('frontend.show_item', item_name=fq_name) }}" data-fqname="{{fq_name}}">{{ fq_name.value }}</a></li>
+
     {% endfor %}
 </ul>
 {% endblock %}