changeset 154:877c264a766d

item_views: add support for titles
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Mar 2011 23:35:52 +0100
parents 12d0ff564156
children 5b8c72be936d
files MoinMoin/config/default.py MoinMoin/templates/itemviews.html
diffstat 2 files changed, 26 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/default.py	Sun Mar 20 23:09:05 2011 +0100
+++ b/MoinMoin/config/default.py	Sun Mar 20 23:35:52 2011 +0100
@@ -358,26 +358,26 @@
 
     ('item_views', [
         # (endpointname, label, check_item_exists
-        ('frontend.show_item', L_('Show'), False, ),
-        ('frontend.get_item', L_('Download'), True, ),
-        ('frontend.history', L_('History'), True, ),
+        ('frontend.show_item', L_('Show'), L_('Show'), False, ),
+        ('frontend.get_item', L_('Download'), L_('Download'), True, ),
+        ('frontend.history', L_('History'), L_('Revision History'), True, ),
         # note: when rendering a non-existing item, you'll be offered to
         # create it (in the content area), so we do not offer "Modify":
-        ('frontend.modify_item', L_('Modify'), True, ),
-        ('special.supplementation', None, False, ),
-        ('frontend.index', L_('Index'), False, ),
-        ('special.comments', None, True, ),
-        ('frontend.highlight_item', L_('Highlight'), True, ),
-        ('frontend.show_item_meta', L_('Meta'), True, ),
-        ('frontend.quicklink_item', None, True, ),
-        ('frontend.subscribe_item', None, True, ),
-        ('frontend.copy_item', L_('Copy'), True, ),
-        ('frontend.rename_item', L_('Rename'), True, ),
-        ('frontend.delete_item', L_('Delete'), True, ),
-        ('frontend.destroy_item', L_('Destroy'), True, ),
-        ('frontend.backrefs', L_('What refers here?'), False, ),
-        ('frontend.sitemap', L_('Local Site Map'), True, ),
-        ('frontend.similar_names', L_('Items with similar names'), False, ),
+        ('frontend.modify_item', L_('Modify'), L_('Edit or Upload'), True, ),
+        ('special.supplementation', None, None, False, ),
+        ('frontend.index', L_('Index'), L_('List sub-items'), False, ),
+        ('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.copy_item', L_('Copy'), L_('Create a copy of this item'), True, ),
+        ('frontend.rename_item', L_('Rename'), L_('Rename this item'), True, ),
+        ('frontend.delete_item', L_('Delete'), L_('Move this item to the trash'), True, ),
+        ('frontend.destroy_item', L_('Destroy'), L_('Completely destroy this item'), True, ),
+        ('frontend.backrefs', L_('Referrers'), L_('What refers here?'), False, ),
+        ('frontend.sitemap', L_('Site Map'), L_('Local Site Map of this item'), True, ),
+        ('frontend.similar_names', L_('Similar'), L_('Items with similar names'), False, ),
      ],
      'list of edit bar entries (list of tuples (endpoint, label))'),
     ('history_count', (100, 200), "number of revisions shown for info/history action (default_count_shown, max_count_shown)"),
--- a/MoinMoin/templates/itemviews.html	Sun Mar 20 23:09:05 2011 +0100
+++ b/MoinMoin/templates/itemviews.html	Sun Mar 20 23:35:52 2011 +0100
@@ -1,6 +1,6 @@
 {% set exists = storage.has_item(item_name) %}
 <ul class="moin-itemviews">
-    {% for endpoint, label, check_exists in cfg.item_views if not endpoint in cfg.endpoints_excluded %}
+    {% 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 [
                'frontend.show_item', 'frontend.index',
                'frontend.highlight_item', 'frontend.show_item_meta', 'frontend.get_item',
@@ -10,7 +10,7 @@
                'frontend.copy_item', 'frontend.rename_item', 'frontend.delete_item', 'frontend.destroy_item',
            ] -%}
             <li>
-            <a href="{{ url_for(endpoint, item_name=item_name) }}" rel="nofollow"> {{ label }}</a>
+            <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow"> {{ label }}</a>
             </li>
         {%- endif %}
 
@@ -19,36 +19,36 @@
             'admin.index',
            ] -%}
             <li>
-            <a href="{{ url_for(endpoint) }}" rel="nofollow"> {{ label }}</a>
+            <a href="{{ url_for(endpoint) }}" title="{{ title }}" rel="nofollow"> {{ label }}</a>
             </li>
         {%- endif %}
 
         {% if endpoint == 'frontend.quicklink_item' and user.valid -%}
             <li>
-                <a href="{{ url_for(endpoint, item_name=item_name) }}" rel="nofollow">
+            <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
                 {% if user.isQuickLinkedTo([item_name]) -%}
                     {{ _('Remove Link') }}
                 {% else -%}
                     {{ _('Add Link') }}
                 {%- endif %}
-                </a>
+            </a>
             </li>
         {%- endif %}
         {% if endpoint == 'frontend.subscribe_item' and user.valid -%}
             <li>
-                <a href="{{ url_for(endpoint, item_name=item_name) }}" rel="nofollow">
+            <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
                 {% if user.isSubscribedTo([item_name]) %}
                         {{ _('Unsubscribe') }}
                 {% else %}
                         {{ _('Subscribe') }}
                 {% endif %}
-                </a>
+            </a>
             </li>
         {%- endif %}
 
         {% if endpoint == 'special.comments' -%}
             <li class="toggleCommentsButton" style="display:none;">
-                <a href="#" onClick="toggleComments();return false;">{{ _('Comments') }}</a>
+            <a href="#" onClick="toggleComments();return false;" title="{{ title }}">{{ label }}</a>
             </li>
         {%- endif %}
         {% if endpoint == 'special.supplementation' -%}