view MoinMoin/templates/mychanges.html @ 2771:5762664a2887

make /+mychanges work similar to local history, needs more work... like better styling (somehow the history style doesn't get active although i copied the html from there - is it the moved <form>? also, to make the diff buttons work, we need to get the parent revid.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 02 Sep 2014 19:58:40 +0200
children 239e3b34c6b4
line wrap: on
line source
{% extends theme("layout.html") %}
{% import "utils.html" as utils %}

{% block content %}
    {% set (history, next_offset, previous_offset) = my_changes_page %}
    {% if my_changes %}
        <div class='moin-offset-links'>
            {% if previous_offset >= 0 %}
                <a href="{{ url_for('frontend.mychanges', offset=previous_offset) }}" title="{{ _("Previous") }}">&laquo;</a>
            {% endif %}
            {% if next_offset %}
                <a href="{{ url_for('frontend.mychanges', offset=next_offset) }}" title="{{ _("Next") }}">&raquo;</a>
            {% endif %}
        <h1>{{ _('My Changes') }}</h1>
        <div class="moin-clr"></div>
        <div id="moin-page-history">
            <table class="zebra">
                        <th>{{ _("Item") }}</th>
                        <th>{{ _("Rev.") }}</th>
                        <th>{{ _("Timestamp") }}</th>
                        <th class="moin-integer">{{ _("Size") }}</th>
                        <th>{{ _("Diff") }}</th>
                        <th>{{ _("Content-Type") }}</th>
                        <th>{{ _("Comment") }}</th>
                    {% for doc in my_changes %}
                            <td class="moin-wordbreak">
                                {% for name in %}
                                    {% if not loop.first %}|{% endif %}
                                    <a href="{{ url_for_item(name, namespace=doc.fqname.namespace, endpoint='frontend.show_item') }}">{{ name }}</a>
                                {% endfor %}
                            <td>{{ doc.revid|shorten_id }}</td>
                            <td>{{ doc.mtime|datetimeformat }}</td>
                            <td class="moin-integer">{{ doc.size }}</td>
                                <div class="moin-hist-rev">
                                    <form action="{{ url_for('frontend.diff', item_name=doc.fqname) }}" method="GET">
                                        <input type="hidden" name="rev1" value="{{ doc.revid }}" />
                                        <input type="hidden" name="rev2" value="{{ doc.revid }}" />
                                        <input type="submit" class="btn btn-sm btn-primary" value="Diff" />
                            <td class="moin-wordbreak">{{ doc.contenttype }}</td>
                            <td class="moin-wordbreak">{{ doc.comment }}</td>
                    {% endfor %}
    {% endif %}
{% endblock %}