view MoinMoin/templates/global_history.html @ 460:72dbe801338e

Grouping of global history results on item name basis and after that on the date basis done. Also added features like diff links and editor grouping.
author Akash Sinha <akash2607@gmail.com>
date Sat, 04 Jun 2011 03:24:49 +0530
parents f1f88b7b17fa
children 58a29a7fd016
line wrap: on
line source
{% extends theme("layout.html") %}
{% import "utils.html" as utils %}

{% block head %}
{{ super() }}
<link rel="alternate" title="Global changes" href="{{ url_for('feed.atom') }}" type="application/atom+xml" />
{% endblock %}

{% block content %}
<h1>{{ _("Global History") }}</h1>
    <div id="moin-global-history">
        {% for revs in history %}
            <div class="moin-history-container"> 
                {% set rev_date = revs[0] %}
                <h2 class="moin-history-container-header">{{ rev_date }}</h2>
                <div class="moin-history-container-body">
                    {% set revs = revs[1:] %}
                    <table>
                    {% for rev in revs %}
                     <tr>
                        {% set item_name = rev[0] %}
                        {% set timestamp = rev[1] %}
                        {% set action = rev[2] %}
                        {% set contenttype = rev[4] %}
                         <td class="moin-action moin-history-{{ rev[2]|lower }}" title="{{ rev[2] }}">&nbsp;</td>
                         <td class="moin-history-item"><a href="{{ url_for('frontend.show_item', item_name=rev[0]) }}">{{ rev[0] }}</a>
                         <td class="moin-history-time">{{ rev[1]|timeformat }}</td>
                         <td class="moin-wordbreak moin-history-contenttype">{{ rev[4] }}</td>
                         <td class="moin-history-links">
                             {% set revnos = rev[5] %}
                             {% for revno in revnos %}
                                 {% if revno - 1 > -1 %}
                                     <a href="{{ url_for('frontend.diff', item_name=rev[0],rev1=revno,rev2=revno-1) }}">{{ _("[%(revno)s]", revno=(revno-1)) }}</a>
                                 {% else %}
                                     <span>{{ _("None") }}</span>
                                 {% endif %}
                             {% endfor %}
                         </td>
                         <td class="moin-wordbreak moin-history-editorinfo">
                             {% set editors = rev[6] %}
                             {% for editor in editors %}
			         <span class="moin-history-editortext">
                                 {% set info = editor[0] %}
                                 {% set position = editor[1] %}
			         {% if "uri" in info %}
			             <a href="{{ info["uri"] }}" class="{{ info["css"] }}" title="{{ info["title"] }}">
			         {% elif "email" in info %}
			             <a href="mailto:{{ info["email"] }}" class="{{ info["css"] }}" title="{{ info["title"] }}">
			         {% else %}
			             <span class="{{ info["css"] }}" title="{{ info["title"] }}">
			         {% endif %}
			         {{ info["text"] }}
			         {% if ("uri" in info)  or ("email" in info) %}
			             </a>
			         {% else %}
			             </span>
			         {% endif %}
			         {{ _("%(position)s",position=position) }}
			         </span>
			     {% endfor %}
                         </td>
                         <td class="moin-wordbreak moin-history-comment">
                             {% set comments = rev[7] %}
                             {% for comment in comments %}
                                 <span>{{ comment }}</span>
			     {% endfor %}
                        </td>
                     </tr>
                    {% endfor %}
                    </table>
                </div>
            </div>
        {% endfor %}
    </div>
{% endblock %}