<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

  <xi:include href="${g.allura_templates}/master.html"/>

  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
    <title>
      $c.project.name / $c.app.config.options.mount_label / Commit
      <py:if test="commit is None">unknown</py:if>
      <py:if test="commit is not None">$commit.revision.number</py:if>
    </title>
    <link rel="stylesheet" type="text/css" media="screen, projection" href="${g.forge_static('css/forge/hilite.css')}" />
  </head>

  <body>
    <h1 py:if="commit is None" class="title">Commit not found</h1>
    <py:if test="commit is not None">
      <h1 class="title">Revision 
        <py:if test="commit is None">unknown</py:if>
        <py:if test="commit is not None">$commit.revision.number</py:if>
      </h1>
      <div class="content">
        <div class="row">
          <div class="column grid_12">
            <p py:if="commit is None">Unknown revision</p>
            <py:if test="commit is not None">
              ${c.revision_widget.display(value=commit)}
              <div style="position: relative; height:2.5em">
                <a py:if="prev" href="$prev"
                   class="btn" style="position:absolute; top:0; left:0">&larr; Prev</a>
                <div style="margin: 0 auto; width: 50px"><a href="${commit.tree().url()}" class="btn">Tree</a></div>
                <a py:if="next" href="$next"
                   class="btn" style="position:absolute; top:0; right:0">Next &rarr;</a>
              </div>
              <table>
                <tbody>
                  <tr py:for="kind, path in commit.diff_summarize()">
                    <td>$kind</td>
                    <td><a href="./tree/$path">$path</a></td>
                  </tr>
                </tbody>
              </table>
            </py:if>
          </div>
        </div>
      </div>
    </py:if>
  </body>
</html>
