review/templates/index.html @ fcbf8d764330

web: much more styling
author Steve Losh <steve@stevelosh.com>
date Sat, 12 Jun 2010 23:12:15 -0400
parents c4db1e4882dd
children ed09b19b1ba7
{% extends "base.html" %}

{% block id %}index{% endblock %}
{% block title %}{% 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>
                <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 %}