[% PROCESS header %]
[% USE cgi = CGI %]

[% IF ! isdir OR at_head %]
<p>[% IF at_head %]<a href="[% script %]/[% repos %]/rss[% path | uri | html %]"><img src="[% base_uri %]/css/trac/feed-icon-16x16.png" width="16" height="16" alt="" align="absmiddle" /> [%|l%](rss)[%END%]</a>[% IF ! isdir %] | [%END%][% END %][% IF ! isdir %]<a href="[% script %]/[% repos %]/checkout[% path | uri | html %][% revstr %]">[%|l%](checkout)[%END%]</a>[% END %]</p>
[% END %]

<div class="title"><form action="[% cgi.self_url %]" method="get">
  [%|l%](show last)[%END%] <input name="limit" size=4 value="[% limit %]" /> [%|l%](changes)[%END%]</form>
</div>

[% IF ! isdir %]
<form action="[% script %]/[% repos %]/diff[% path | uri | html %]" method="get">
<input type="submit" value="[%|l%](diff selected revisions)[%END%]"/>
[% END %]
<table id="chglist" class="listing" summary="[%|l%](revision log)[%END%]">
  <thead>
    <tr>
[% IF ! isdir %]
      <th></th>
[% END %]
      <th class="date">[%|l%](date)[%END%]</th>
      <th class="rev">[%|l%](file)[%END%]</th>
      <th class="chgset">[%|l%](revision)[%END%]</th>
      <th class="author">[%|l%](author)[%END%]</th>
      [% IF ! isdir %]<th class="diff">[%|l%](diff)[%END%]</th>[% END %]
      <th class="summary">[%|l%](revision log)[%END%]</th>
    </tr>
  </thead>
  <tbody>
  [% FOREACH revs %]
  <tr class="[% loop.count % 2 ? "even" : "odd" %]">
[% IF ! isdir %]
    <td><input type="checkbox" name="revs" value="[% rev %]" /></td>
[% END %]
    <td class="date">[% date %]</td>
    <td class="rev">[% IF isdir %]
        <a href="[% script %]/[% repos %]/browse[% path | uri | html %]?rev=[% rev %]">[% rev %]</a>
      [% ELSE %]
        <a href="[% script %]/[% repos %]/view[% path | uri | html %]?rev=[% rev %]">[% rev %]</a>
      [% END %]</td>
    <td class="chgset"><a href="[% script %]/[% repos %]/revision/?rev=[% rev %]">[% rev %]</a></td>
    <td class="author">[% author || '(no author)' %]</td>
    [% IF ! isdir %]<td class="diff">[% UNLESS loop.count == loop.size %]
        [% prev = loop.count %]
        <a href="[% script %]/[% repos %]/diff[% path | uri | html %]?rev1=[% rev - 1 %];rev2=[% rev %]">HTML</a> | <a href="[% script %]/[% repos %]/diff[% path | uri | html %]?rev1=[% rev - 1 %];rev2=[% rev %];mime=text/plain">TEXT</a><br/>
      [% END %]</td>[% END %]
    <td class="summary">[% msg | log_msg %]

      [% FOREACH pk = paths %]
        [% IF pk.value.isdir %]
          [% IF pk.value.copyfrom %]
            Copied from <a href="[% script %]/[% repos %]/browse[% pk.value.copyfrom %]/?rev=[% pk.value.copyfromrev %]">[%|l(pk.value.copyfrom, pk.value.copyfromrev)%]%1:%2[%END%]</a><br />
          [% END %]
        [% ELSE %]
          [% IF pk.value.copyfrom %]
            Copied from <a href="[% script %]/[% repos %]/log[% pk.value.copyfrom %]?rev=[% pk.value.copyfromrev %]">[%|l(pk.value.copyfrom, pk.value.copyfromrev)%]%1:%2[%END%]</a><br />
          [% END %]
        [% END %]
      [% END %]
    </td>
  </tr>
  [% END %]
  </tbody>
</table>
[% IF ! isdir %]
</form>
[% END %]
[% PROCESS footer %]
