changeset 2288:50ff4ba17f3e

Added /+all view, Solving #22.
author Ashutosh Singla <ashu1461@gmail.com>
date Sun, 22 Sep 2013 03:17:47 +0530
parents 739b289f8601
children dc0d79d43bd4
files MoinMoin/apps/frontend/views.py MoinMoin/templates/all.html MoinMoin/templates/layout.html
diffstat 3 files changed, 22 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sun Sep 22 02:42:23 2013 +0530
+++ b/MoinMoin/apps/frontend/views.py	Sun Sep 22 03:17:47 2013 +0530
@@ -131,6 +131,16 @@
     return app.send_static_file('logos/favicon.ico')
 
 
+@frontend.route('/+all')
+def global_views():
+    """
+    Provides a link to all the global views.
+    """
+    return render_template('all.html',
+                           title_name=_(u"Global Views."),
+                          )
+
+
 class LookupForm(Form):
     name = OptionalText.using(label='name')
     name_exact = OptionalText.using(label='name_exact')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/templates/all.html	Sun Sep 22 03:17:47 2013 +0530
@@ -0,0 +1,9 @@
+{% extends theme("layout.html") %}
+{% block content %}
+<h1>{{ _("Global Views.") }}</h1>
+<ul>
+    <li><a href="{{ url_for('frontend.global_history', namespace='all') }}">{{ _("History") }}</a></li>
+    <li><a href="{{ url_for('frontend.global_tags', namespace='all') }}">{{ _("Tags") }}</a></li>
+    <li><a href="{{ url_for('frontend.index', item_name='all') }}">{{ _("Index") }}</a></li>
+</ul>
+{% endblock %}
--- a/MoinMoin/templates/layout.html	Sun Sep 22 02:42:23 2013 +0530
+++ b/MoinMoin/templates/layout.html	Sun Sep 22 03:17:47 2013 +0530
@@ -82,8 +82,9 @@
                     {% if loop.first %}
                         <ul class="moin-bcs-subitems">
                             {% for namespace, root in theme_supp.get_namespaces(segment_name) -%}
-                            <li><a href="{{ url_for('frontend.show_item', item_name=root) }}">{{ namespace }}</a></li>
-                           {%- endfor %}
+                                <li><a href="{{ url_for('frontend.show_item', item_name=root) }}">{{ namespace }}</a></li>
+                            {%- endfor %}
+                                <li><a href="{{ url_for('frontend.global_views') }}">{{ "all" }}</a></li>
                         </ul></li>
                         </ul>
                     {% endif %}