review/templates/index.html @ c4db1e4882dd

web: yet more styling. index is done for now.
author Steve Losh <steve@stevelosh.com>
date Sat, 12 Jun 2010 20:51:20 -0400
parents eaa63ba9a24e
children fcbf8d764330
{% extends "base.html" %}

{% block id %}index{% endblock %}
{% block title %}{% endblock %}
{% block header %}{% endblock %}

{% block content %}
    <h2>Changesets</h2>
    <table>
        {% for rcset in rcsets %}
            {% set rev = rcset.target[rcset.node] %}
            {% set node_short = utils['node_short'](rev.node()) %}
            <tr class="${ loop.parity }">
                <td class="node"><span class="rev">{{ rev.rev() }}</span><span class="sep">:</span><span class="hash">{{ node_short }}</span></td>
                <td class="desc">
                    <a href="/changeset/{{ node_short }}/">{{  rev.description().splitlines()[0] }}</a>
                </td>
                <td class="stats">
                    {% with %}
                        {% set comments = rcset.comments %}
                        {% set signoffs = utils['categorize_signoffs'](rcset.signoffs) %}

                        {% if comments %}
                        <span class="badge comments">{{ utils['len'](comments) }} comment{% if utils['len'](comments) > 1 %}s{% endif %}</span>
                        {% endif %}

                        {% if signoffs['yes'] %}
                            <span class="badge signoffs yes">{{ signoffs['yes'] }} yes</span>
                        {% endif %}
                        {% if signoffs['neutral'] %}
                            <span class="badge signoffs neutral">{{ signoffs['neutral'] }} neutral</span>
                        {% endif %}
                        {% if signoffs['no'] %}
                            <span class="badge signoffs no">{{ signoffs['no'] }} no</span>
                        {% endif %}
                    {% endwith %}
                </td>
            </tr>
        {% endfor %}
    </table>
{% endblock %}