changeset 1870:e03714644b0f

fix for 289 orphans, mychanges, wanteds, tags/tagname incorrectly show item views panel/bar
author Roger Haase <crosseyedpenguin@yahoo.com>
date Sat, 08 Dec 2012 13:59:20 -0700
parents 4f3ea3becc76
children 0f45ee838a89
files MoinMoin/apps/frontend/views.py MoinMoin/templates/item_link_list.html MoinMoin/templates/link_list_item_panel.html MoinMoin/templates/link_list_no_item_panel.html
diffstat 4 files changed, 34 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sat Dec 08 12:46:14 2012 -0700
+++ b/MoinMoin/apps/frontend/views.py	Sat Dec 08 13:59:20 2012 -0700
@@ -787,7 +787,7 @@
     :returns: a page with all the items which link or transclude item_name
     """
     my_changes = _mychanges(flaskg.user.itemid)
-    return render_template('item_link_list.html',
+    return render_template('link_list_no_item_panel.html',
                            title_name=_(u'My Changes'),
                            headline=_(u'My Changes'),
                            item_names=my_changes
@@ -818,7 +818,7 @@
     :returns: a page with all the items which link or transclude item_name
     """
     refs_here = _backrefs(item_name)
-    return render_template('item_link_list.html',
+    return render_template('link_list_item_panel.html',
                            item_name=item_name,
                            headline=_(u"Items which refer to '%(item_name)s'", item_name=item_name),
                            item_names=refs_here
@@ -926,7 +926,7 @@
     referred = linked | transcluded
     wanteds = referred - existing
     title_name = _(u'Wanted Items')
-    return render_template('item_link_list.html',
+    return render_template('link_list_no_item_panel.html',
                            headline=_(u'Wanted Items'),
                            title_name=title_name,
                            item_names=wanteds)
@@ -942,7 +942,7 @@
     referred = linked | transcluded
     orphans = existing - referred
     title_name = _('Orphaned Items')
-    return render_template('item_link_list.html',
+    return render_template('link_list_no_item_panel.html',
                            title_name=title_name,
                            headline=_(u'Orphaned Items'),
                            item_names=orphans)
@@ -1663,7 +1663,7 @@
             rank = matches[name]
             if rank == wanted_rank:
                 item_names.append(name)
-    return render_template("item_link_list.html",
+    return render_template("link_list_item_panel.html",
                            headline=_("Items with similar names to '%(item_name)s'", item_name=item_name),
                            item_name=item_name, # XXX no item
                            item_names=item_names)
@@ -1888,7 +1888,7 @@
     query = And([Term(WIKINAME, app.cfg.interwikiname), Term(TAGS, tag), ])
     revs = flaskg.storage.search(query, sortedby=NAME_EXACT, limit=None)
     item_names = [rev.meta[NAME] for rev in revs]
-    return render_template("item_link_list.html",
+    return render_template("link_list_no_item_panel.html",
                            headline=_("Items tagged with %(tag)s", tag=tag),
                            item_name=tag,
                            item_names=item_names)
--- a/MoinMoin/templates/item_link_list.html	Sat Dec 08 12:46:14 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-{% extends theme("show.html") %}
-{% block content %}
-{% if headline %}
-<h1>{{ headline }}</h1>
-{% endif %}
-{% if item_names %}
-Total: {{ item_names|count }}
-<ul>
-    {% for item_name in item_names|sort %}
-    <li><a href="{{ url_for('frontend.show_item', item_name=item_name) }}">{{ item_name }}</a></li>
-    {% endfor %}
-</ul>
-{% endif %}
-{% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/templates/link_list_item_panel.html	Sat Dec 08 13:59:20 2012 -0700
@@ -0,0 +1,14 @@
+{% extends theme("show.html") %}
+{% block content %}
+{% if headline %}
+<h1>{{ headline }}</h1>
+{% endif %}
+{% if item_names %}
+Total: {{ item_names|count }}
+<ul>
+    {% for item_name in item_names|sort %}
+    <li><a href="{{ url_for('frontend.show_item', item_name=item_name) }}">{{ item_name }}</a></li>
+    {% endfor %}
+</ul>
+{% endif %}
+{% endblock %}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/templates/link_list_no_item_panel.html	Sat Dec 08 13:59:20 2012 -0700
@@ -0,0 +1,14 @@
+{% extends theme("layout.html") %}
+{% block content %}
+{% if headline %}
+<h1>{{ headline }}</h1>
+{% endif %}
+{% if item_names %}
+Total: {{ item_names|count }}
+<ul>
+    {% for item_name in item_names|sort %}
+    <li><a href="{{ url_for('frontend.show_item', item_name=item_name) }}">{{ item_name }}</a></li>
+    {% endfor %}
+</ul>
+{% endif %}
+{% endblock %}