changeset 1126:211e5d99c842

Remove the location breadcrumbs, make the subitem menu patch a bit more clear.
author Sam Toyer <samATqxcvDOTnet>
date Sat, 03 Dec 2011 14:46:44 +1000
parents b185c8303215
children d8f41116f3e2
files MoinMoin/templates/show.html MoinMoin/themes/__init__.py
diffstat 2 files changed, 6 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/show.html	Sat Dec 03 11:49:32 2011 +1000
+++ b/MoinMoin/templates/show.html	Sat Dec 03 14:46:44 2011 +1000
@@ -41,24 +41,14 @@
     {% if subitems %}
         <div class="moin-subitem-navigation">
             <span class="list-header">
-                {% for segment_name, segment_path, exists in theme_supp.location_breadcrumbs(item_name) %}
-                    {% if not loop.last %}
-                        <a href="{{ url_for('frontend.show_item', item_name=segment_path) }}"
-                            {% if not exists %}class="moin-nonexistent"{% endif %}>
-                            {{ segment_name | shorten_item_name }}
-                        </a>
-                        <span class="sep">/</span>
-                    {% else %}
-                        {{ segment_name | shorten_item_name }}
-                        <span class="sep">/</span>
-                    {% endif %}
-                {% endfor %}
+                {{ item_name }}
+                <span class="sep">/</span>
             </span>
             <ul>
-                {% for item in subitems %}
+                {% for fullname, shortname, contenttype, has_children in subitems %}
                     <li>
-                        <a href="{{ url_for('frontend.show_item', item_name=item[0]) }}">{{ item[1] }}</a>
-                        {% if item[-1] %}<span class="sep">/</span>{% endif %}
+                        <a href="{{ url_for('frontend.show_item', item_name=fullname) }}">{{ shortname }}</a>
+                        {% if has_children %}<span class="sep">/</span>{% endif %}
                     </li>
                 {% endfor %}
             </ul>
--- a/MoinMoin/themes/__init__.py	Sat Dec 03 11:49:32 2011 +1000
+++ b/MoinMoin/themes/__init__.py	Sat Dec 03 14:46:44 2011 +1000
@@ -126,7 +126,7 @@
         item = Item.create(item_name)
         item_index = item.get_detailed_index(item.flat_index())
         # Sort items by whether or not they have children, then by name:
-        item_index.sort(key=itemgetter(-1, 0))
+        item_index = sorted(item_index, key=itemgetter(-1, 0))
         return item_index
 
     def userhome(self):