{% comment %}
 Portions (c) 2014, Alexander Klimenko <alex@erix.ru>
 All rights reserved.

 Copyright (c) 2011, SmartFile <btimby@smartfile.com>
 All rights reserved.

 This file is part of DjangoDav.

 DjangoDav is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as published
 by the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 DjangoDav is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Affero General Public License for more details.

 You should have received a copy of the GNU Affero General Public License
 along with DjangoDav.  If not, see <http://www.gnu.org/licenses/>.
{% endcomment %}
<html>
<head></head>

<body>
<h1>Index of {{ resource.get_displaypath }}</h1>
<table>
<tr>
    <th>Name</th>
    <th>Created</th>
    <th>Last modified</th>
    <th>Size</th>
</tr>
<tr><th colspan="5"><hr></th></tr>
<tr>
    <td><a href="{{ base_url }}{% if not resource.get_escaped_path %}/{% endif %}{{ resource.get_parent.get_escaped_path }}">Parent Directory</a></td>
</tr>
{% for child in resource.get_children %}
<tr>
    <td><a href="{{ base_url }}{{ child.get_escaped_path }}">{{ child.displayname }}</a></td>
    <td align="right">{{ child.get_created|date:"d-M-Y H:i" }}</td>
    <td align="right">{{ child.get_modified|date:"d-M-Y H:i" }}</td>
    <td align="right">{{ child.getcontentlength|filesizeformat }}</td>
</tr>
{% endfor %}
<tr><th colspan="5"><hr></th></tr>
</table>
<p>DjangoDav - <a href="https://github.com/meteozond/djangodav/">https://github.com/meteozond/djangodav/</a></p>
</body>
</html>
