Commits

Julian Brost committed 578b70f

Check the check_exists flag for every endpoint and removed duplicate 'frontend.rename_item' from a list. Fixes #108

Comments (0)

Files changed (2)

MoinMoin/config/default.py

         ('special.comments', L_('Comments'), L_('Switch showing comments on or off'), True, ),
         ('frontend.highlight_item', L_('Highlight'), L_('Show with Syntax-Highlighting'), True, ),
         ('frontend.show_item_meta', L_('Meta'), L_('Display Metadata'), True, ),
-        ('frontend.quicklink_item', None, L_('Create or remove a navigation link to this item'), True, ),
-        ('frontend.subscribe_item', None, L_('Switch notifications about item changes on or off'), True, ),
+        ('frontend.quicklink_item', None, L_('Create or remove a navigation link to this item'), False, ),
+        ('frontend.subscribe_item', None, L_('Switch notifications about item changes on or off'), False, ),
         ('frontend.rename_item', L_('Rename'), L_('Rename this item'), True, ),
         ('frontend.delete_item', L_('Delete'), L_('Delete this item'), True, ),
         ('frontend.destroy_item', L_('Destroy'), L_('Completely destroy this item'), True, ),

MoinMoin/templates/itemviews.html

 {% set exists = storage.has_item(item_name) %}
 <ul class="moin-itemviews">
     {% 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) and endpoint in [
+      {% if not check_exists or check_exists and exists %}
+        {% if endpoint in [
                'frontend.show_item', 'frontend.index',
                'frontend.highlight_item', 'frontend.show_item_meta', 'frontend.download_item',
                'frontend.history', 'frontend.backrefs', 'frontend.sitemap',
         {%- endif %}
 
 		{% if endpoint in [
-            'frontend.modify_item', 'frontend.rename_item', 'frontend.delete_item', 'frontend.rename_item'
+            'frontend.modify_item', 'frontend.rename_item', 'frontend.delete_item'
            ] and user.may.write(item_name) -%}
             <li>
             <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow"> {{ label }}</a>
                 {%- endif %}
             {%- endfor -%}
         {%- endif %}
+      {% endif %}
     {% endfor %}
 </ul>