changeset 2385:e9b7e3ab77db

fixes #27, no user-actions if there exist no user actions
author sharky93 <rishabhr123@gmail.com>
date Sat, 17 Aug 2013 04:17:37 +0530
parents c443cca70e67
children 96fbb30f3aba
files MoinMoin/themes/basic/templates/show.html
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/templates/show.html	Sat Aug 17 03:55:02 2013 +0530
+++ b/MoinMoin/themes/basic/templates/show.html	Sat Aug 17 04:17:37 2013 +0530
@@ -34,11 +34,15 @@
 {% endblock %}
 
 {% block user_actions %}
-    <div class="list-group-item">User Actions</div>
+    {% set user_actions_exist = false %}
     {%- 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 in user_actions and user.valid %}
+                {% if user_actions_exist == false %}
+                    <div class="list-group-item">User Actions</div>
+                    {% set user_actions_exist = true %}
+                {% endif %}
                 <a class="list-group-item" href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
                     <span class="icon-stack">
                         <i class={{icon[endpoint]}}></i>