changeset 2323:3831fd0c8fa0

adds site actions to localpanel
author sharky93 <rishabhr123@gmail.com>
date Sat, 13 Jul 2013 02:43:58 +0530
parents 9093480c2020
children a3c2a9f3a009
files MoinMoin/themes/basic/templates/show.html
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/templates/show.html	Sat Jul 13 02:33:41 2013 +0530
+++ b/MoinMoin/themes/basic/templates/show.html	Sat Jul 13 02:43:58 2013 +0530
@@ -129,11 +129,40 @@
     {% endfor %}
 {% endblock %}
 
+{% block site_actions %}
+    <li class="nav-header">Site Actions</li>
+    {%- for endpoint, label, title, check_exists in cfg.item_views if not endpoint in cfg.endpoints_excluded %}
+        {%- if not check_exists or check_exists and exists %}
+
+            {%- if endpoint == 'frontend.index' %}
+                <li>
+                    <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
+                    <span class="icon-list-alt"></span>
+                        {{ label }}
+                    </a>
+                </li>
+            {%- endif %}
+
+            {%- if endpoint == 'frontend.sitemap' %}
+                <li>
+                    <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
+                    <span class="icon-map-marker"></span>
+                        {{ label }}
+                    </a>
+                </li>
+            {%- endif %}
+
+        {% endif %}
+    {% endfor %}
+{% endblock %}
+
 {% block local_panel %}
         
         <!-- user, site, item actions -->
         {{ self.user_actions() }}
 
+        {{ self.site_actions() }}
+
         {% if rev %}
         <li class="nav-header">Metadata</li>
                 <li>{{ _("Revision:") }} {{rev.revid | shorten_id}}</li>