{% extends g.theme.master %}

{% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}}  / {{title}}{% endblock %}

{% block header %}{{title}}{% endblock %}

{% block content %}
          <form method="get" action="diff">
            <div class="grid-19"><input type="submit" value="Compare revisions"/></div>
            <div style="clear:both"></div>
            <table>
              <thead>
                <tr>
                  <th>Version</th>
                  <th>V1</th>
                  <th>V2</th>
                  <th>&nbsp;</th>
                </tr>
              </thead>
              <tbody>
              {% for p in posts %}
                <tr>
                  <td>{{p.version}} by {{p.author.display_name|e}}</td>
                  <td><input name="v1" type="radio" value="{{p.version}}"/></td>
                  <td><input name="v2" type="radio" value="{{p.version}}"/></td>
                  <td>
                    <a href="./?version={{p.version}}" class="btn">View Revision</a>
                    {% if loop.index0 != 0 and h.has_access(p, 'edit')() %}
                    <a href="./revert?version={{p.version}}" class="btn">Revert to version {{p.version}}</a>
                    {% endif %}
                  </td>
                </tr>
              {% endfor %}
              </tbody>
            </table>
          </form>
{% endblock %}
