1. Thomas Waldmann
  2. moin-2.0

Commits

Ashutosh Singla  committed 50ff4ba

Added /+all view, Solving #22.

  • Participants
  • Parent commits 739b289
  • Branches default

Comments (0)

Files changed (3)

File MoinMoin/apps/frontend/views.py

View file
     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')

File MoinMoin/templates/all.html

View file
+{% 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 %}

File MoinMoin/templates/layout.html

View file
                     {% 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 %}