{% import 'jinja_master/lib.html' as lib with context %}
<table>
{% set ls = list(tree.ls()) %}
<thead>
<tr>
<th>File</th>
<th>Date</th>
<th>Author</th>
<th>Commit</th>
</tr>
</thead>
<tbody>
{% if tree._parent %}
<tr>
<td></td>
<td><a href="..">[Up one dir]</a></td>
<td></td>
<td></td>
<td></td>
</tr>
{% endif %}
{% if not ls %}
<tr><td colspan="5">— No files —</td></tr>
{% endif %}
{% for dirent in tree.ls() %}
<tr>
<td>
<a href="{{h.really_unicode(dirent.href)}}">
<b data-icon="{{dirent.kind == 'DIR' and 'o' or 'n'}}" class="ico {{dirent.kind == 'DIR' and 'folder' or 'table'}}"></b>
<span>{{h.really_unicode(dirent.name)}}</span>
</a>
</td>
<td>{{lib.abbr_date(dirent.last_commit.date)}}</td>
<td>
{% if dirent.last_commit.author_url %}
<a href="{{dirent.last_commit.author_url}}">{{lib.email_gravatar(dirent.last_commit.author_email, title=h.really_unicode(dirent.last_commit.author), size=16)}}</a>
<a href="{{dirent.last_commit.author_url}}">{{h.really_unicode(dirent.last_commit.author)}}</a>
{% else %}
{{lib.email_gravatar(dirent.last_commit.author_email, title=h.really_unicode(dirent.last_commit.author), size=16)}} {{h.really_unicode(dirent.last_commit.author)}}
{% endif %}
</td>
<td>
<a href="{{dirent.last_commit.href}}">
{{dirent.last_commit.shortlink}}
{{dirent.last_commit.summary}}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>