changeset 1054:a974190eaeda namespaces

multiple names: fixed links on UI (use first name), render names separated by ' | '
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 02 Nov 2011 13:37:47 -0200
parents 6e4aa5f4436d
children ee71ed6e97c6
files MoinMoin/templates/global_history.html MoinMoin/templates/history.html
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/global_history.html	Wed Nov 02 13:09:58 2011 -0200
+++ b/MoinMoin/templates/global_history.html	Wed Nov 02 13:37:47 2011 -0200
@@ -30,13 +30,13 @@
                                 <span class="moin-history-{{ meta.action|lower }}"></span>
                             </td>
                             <td class="moin-history-links">
-                                <a href="{{ url_for('frontend.history', item_name=meta.name, bookmark=bookmark_time) }}">HIST</a>
+                                <a href="{{ url_for('frontend.history', item_name=meta.name[0], bookmark=bookmark_time) }}">HIST</a>
                                 {% if bookmark_time -%}
-                                    <a href="{{ url_for('frontend.diff', item_name=meta.name, bookmark=bookmark_time) }}">DIFF</a>
+                                    <a href="{{ url_for('frontend.diff', item_name=meta.name[0], bookmark=bookmark_time) }}">DIFF</a>
                                 {%- endif %}
                             </td>
                             <td class="moin-history-time">{{ meta.mtime|timeformat }}</td>
-                            <td class="moin-history-item"><a class="{{ meta.contenttype|contenttype_to_class }}" href="{{ url_for('frontend.show_item', item_name=meta.name) }}" title="{{ meta.contenttype }}">{{ meta.name }}</a></td>
+                            <td class="moin-history-item"><a class="{{ meta.contenttype|contenttype_to_class }}" href="{{ url_for('frontend.show_item', item_name=meta.name[0]) }}" title="{{ meta.contenttype }}">{{ meta.name|join(' | ') }}</a></td>
                         </tr>
                     {% endfor %}
                     </table>
--- a/MoinMoin/templates/history.html	Wed Nov 02 13:09:58 2011 -0200
+++ b/MoinMoin/templates/history.html	Wed Nov 02 13:37:47 2011 -0200
@@ -29,7 +29,7 @@
             </tr>
             {% for doc in history %}
             <tr>
-                <td class="moin-wordbreak">{{ doc.name }}</td>
+                <td class="moin-wordbreak">{{ doc.name|join(' | ') }}</td>
                 <td class="moin-integer">{{ doc.revid }}</td>
                 <td>{{ doc.mtime|datetimeformat }}</td>
                 <td class="moin-integer">{{ doc.size }}</td>
@@ -42,15 +42,15 @@
                 <td class="moin-wordbreak">{{ utils.editor_info(doc) }}</td>
                 <td class="moin-wordbreak">{{ doc.contenttype }}</td>
                 <td class="moin-wordbreak">{{ doc.comment }}</td>
-                <td><a href="{{ url_for('frontend.show_item', item_name=doc.name, rev=doc.revid) }}">{{ _('show') }}</a></td>
-                <td><a href="{{ url_for('frontend.show_item_meta', item_name=doc.name, rev=doc.revid) }}">{{ _('meta') }}</a></td>
-                <td><a href="{{ url_for('frontend.download_item', item_name=doc.name, rev=doc.revid) }}">{{ _('download') }}</a></td>
-                <td><a href="{{ url_for('frontend.highlight_item', item_name=doc.name, rev=doc.revid) }}">{{ _('highlight') }}</a></td>
+                <td><a href="{{ url_for('frontend.show_item', item_name=doc.name[0], rev=doc.revid) }}">{{ _('show') }}</a></td>
+                <td><a href="{{ url_for('frontend.show_item_meta', item_name=doc.name[0], rev=doc.revid) }}">{{ _('meta') }}</a></td>
+                <td><a href="{{ url_for('frontend.download_item', item_name=doc.name[0], rev=doc.revid) }}">{{ _('download') }}</a></td>
+                <td><a href="{{ url_for('frontend.highlight_item', item_name=doc.name[0], rev=doc.revid) }}">{{ _('highlight') }}</a></td>
                 {% if user.may.write(item_name) -%}
-                <td><a href="{{ url_for('frontend.revert_item', item_name=doc.name, rev=doc.revid) }}">{{ _('revert') }}</a></td>
+                <td><a href="{{ url_for('frontend.revert_item', item_name=doc.name[0], rev=doc.revid) }}">{{ _('revert') }}</a></td>
                 {%- endif %}
                 {% if user.may.destroy(item_name) -%}
-                <td><a href="{{ url_for('frontend.destroy_item', item_name=doc.name, rev=doc.revid) }}">{{ _('destroy') }}</a></td>
+                <td><a href="{{ url_for('frontend.destroy_item', item_name=doc.name[0], rev=doc.revid) }}">{{ _('destroy') }}</a></td>
                 {%- endif %}
             </tr>
             {% endfor %}