changeset 148:972943980b7b

rename cfg attrs: edit_bar > item_views, actions_excluded > endpoints_excluded item_views is not just about editing, it has all sort of views related to the item (it currently has even some global stuff, but that shall change) we don't have "actions" any more (that's a kind of moin 1.9 plugin) and the exclude list now has endpoint names in it
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Mar 2011 20:06:33 +0100
parents c7e83ed2ee4b
children 601b8be0ced6
files MoinMoin/config/default.py MoinMoin/templates/editbar.html MoinMoin/templates/layout.html MoinMoin/templates/show.html
diffstat 4 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/default.py	Sun Mar 20 19:28:06 2011 +0100
+++ b/MoinMoin/config/default.py	Sun Mar 20 20:06:33 2011 +0100
@@ -307,7 +307,7 @@
     ('SecurityPolicy',
      None,
      "Class object hook for implementing security restrictions or relaxations"),
-    ('actions_excluded',
+    ('endpoints_excluded',
      [],
      "Exclude unwanted endpoints (list of strings)"),
 
@@ -354,7 +354,7 @@
     ('trail_size', 5,
      "Number of items in the trail of recently visited items"),
 
-    ('edit_bar', [
+    ('item_views', [
         # (endpointname, label, check_item_exists
         ('frontend.show_item', L_('Show'), False, ),
         ('frontend.highlight_item', L_('Highlight'), True, ),
--- a/MoinMoin/templates/editbar.html	Sun Mar 20 19:28:06 2011 +0100
+++ b/MoinMoin/templates/editbar.html	Sun Mar 20 20:06:33 2011 +0100
@@ -1,6 +1,6 @@
 {% set exists = storage.has_item(item_name) %}
 <ul class="moin-editbar">
-    {% for endpoint, label, check_exists in cfg.edit_bar if not endpoint in cfg.actions_excluded %}
+    {% for endpoint, label, 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 [
                'frontend.show_item', 'frontend.index',
                'frontend.highlight_item', 'frontend.show_item_meta', 'frontend.get_item',
--- a/MoinMoin/templates/layout.html	Sun Mar 20 19:28:06 2011 +0100
+++ b/MoinMoin/templates/layout.html	Sun Mar 20 20:06:33 2011 +0100
@@ -41,7 +41,7 @@
                 <a href="{{ wiki_href }}" {% if not exists %}class="moin-nonexistent"{% endif %} rel="nofollow" title="{{ title }}">
                     {{ aliasname }}
                 </a>
-                {% if 'frontend.usersettings' not in cfg.actions_excluded -%}
+                {% if 'frontend.usersettings' not in cfg.endpoints_excluded -%}
                     <span class="sep"> | </span>
                     <a href="{{ url_for('frontend.usersettings') }}" class="moin-usersettings" rel="nofollow">{{ _('Settings') }}</a>
                 {%- endif %}
--- a/MoinMoin/templates/show.html	Sun Mar 20 19:28:06 2011 +0100
+++ b/MoinMoin/templates/show.html	Sun Mar 20 20:06:33 2011 +0100
@@ -5,7 +5,7 @@
     {{ super() }}
     <link rel="alternate" title="{{ item_name }} changes" href="{{ url_for('feed.atom', item_name=item_name) }}" type="application/atom+xml" />
     {# universal edit button support #}
-    {%- if user.may.write(item_name) and 'frontend.modify_item' not in cfg.actions_excluded -%}
+    {%- if user.may.write(item_name) and 'frontend.modify_item' not in cfg.endpoints_excluded -%}
     <link rel="alternate" type="application/wiki" title="{{ _('Modify') }}" href="{{ url_for('frontend.modify_item', item_name=item_name) }}" />
     {%- endif %}
 {% endblock %}