[include "include/dir_header.ezt"]

<table cellspacing="1" cellpadding="2">
<thead>
<tr>
  <th class="vc_header[is sortby "file"]_sort[end]" colspan="2">
    <a href="[sortby_file_href]#dirlist">File
    [is sortby "file"]
      <img class="vc_sortarrow" alt="[is sortdir "down"](rev)[end]"
        width="13" height="13"
        src="[docroot]/images/[is sortdir "up"]up[else]down[end].png" />
    [end]
    </a>
  </th>
  <th class="vc_header[is sortby "rev"]_sort[end]">
    <a href="[sortby_rev_href]#dirlist">Last Change
    [is sortby "rev"]
      <img class="vc_sortarrow" alt="[is sortdir "down"](rev)[end]"
        width="13" height="13"
        src="[docroot]/images/[is sortdir "up"]up[else]down[end].png" />
    [end]
    </a>
  </th>
</tr>
</thead>

<tbody>
[if-any up_href]
  <tr class="vc_row_odd">
    <td>
      <a href="[up_href]">
      <img src="[docroot]/images/back_small.png" alt="" width="16" height="16"
      />&nbsp;Parent&nbsp;Directory</a>
    </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
 [end]
[for entries]
  <tr class="vc_row_[if-index entries even]even[else]odd[end]">
    <td>
    <a name="[entries.anchor]" href="[is entries.pathtype "dir"][entries.view_href][else][if-any entries.prefer_markup][entries.view_href][else][entries.download_href][end][end]" title="[is entries.pathtype "dir"]View Directory Contents[else][if-any entries.prefer_markup]View[else]Download[end] File Contents[end]">
       <img src="[docroot]/images/[is entries.pathtype "dir"]dir[else][is entries.state "dead"]broken[else]text[end][end].png" alt="" width="16" height="16" />
       [entries.name][is entries.pathtype "dir"]/[end]</a>
       [is entries.state "dead"](dead)[end]
    </td>

    [if-any entries.errors]
      <td colspan="2">[for entries.errors]<em>[entries.errors]</em>[end]</td>
    [else]
      <td style="width:1%; white-space: nowrap">

        [# Icon column. We might want to add more icons like a tarball
         # icon for directories or a diff to previous icon for files. ]

        [if-any entries.log_href]
        <a href="[entries.log_href]"><img
        src="[docroot]/images/log.png"
        alt="View Log" width="16" height="16" /></a>
        [end]

        [is entries.pathtype "dir"]
          [is roottype "cvs"]
            [# no point in showing icon when there's only one to choose from]
          [else]
            <a href="[entries.view_href]"><img
            src="[docroot]/images/list.png"
            alt="View Directory Listing" width="16" height="16" /></a>
          [end]
        [end]

        [is entries.pathtype "file"]
          [if-any entries.graph_href]
          <a href="[entries.graph_href]"
          title="View Revision Graph"><img
          src="[docroot]/images/cvsgraph_16x16.png"
          alt="View Revision Graph" width="16" height="16" />
          </a>
          [end]

          [if-any entries.view_href]
          <a href="[entries.view_href]"><img
          src="[docroot]/images/view.png"
          alt="View File" width="16" height="16" /></a>
          [end]

          [if-any entries.download_href]
          <a href="[entries.download_href]"><img
          src="[docroot]/images/download.png"
          alt="Download File" width="16" height="16" /></a>
          [end]

          [if-any entries.annotate_href]
          <a href="[entries.annotate_href]"><img
          src="[docroot]/images/annotate.png"
          alt="Annotate File" width="16" height="16" /></a>
          [end]
        [end]
      </td>
      <td>
        [if-any entries.rev]
          <strong>[if-any entries.revision_href]<a href="[entries.revision_href]">[entries.rev]</a>[else][entries.rev][end]</strong>
          ([entries.ago] ago)
          by <em>[entries.author]</em>:
          [entries.log]
          [is entries.pathtype "dir"][is roottype "cvs"]
            <em>(from [entries.log_file]/[entries.log_rev])</em>
          [end][end]
        [end]
      </td>
    [end]
  </tr>
[end]
</tbody>

</table>

[include "include/dir_footer.ezt"]
