<fieldset><legend>
{% for dir in dir_links %}<a href="{{ dir.link }}" title="{{ dir.title }}">{{ dir.name }}</a>/{% endfor %}
</legend>

<p><a href="{{ change_basepath_link }}">{% trans 'change basepath' %}</a></p>

<table summary="Directory Listing" cellpadding="0" cellspacing="0">
<thead><tr>
    <th class="n">Name</th>
    <th class="s">Size</th>
    <th class="m">Last Modified</th>
    <th class="o">mode</th>
    <th class="u">uid</th>
    <th class="g">gid</th>
    <th class="t">Action</th>
</tr></thead>

{% for item in dir_list %}
<tr class="{% cycle 'row1' 'row2' %}">
    <td class="n">
      <a href="{{ item.link }}" title="{{ item.title }}">
        {% if item.is_dir %}/{{ item.name }}/{% else %}{{ item.name }}{% endif %}
      </a>
    </td>
    {% if item.is_dir %}
        <td class="s">
            {% if item.size %}
            <i>{{ item.size }} object{{ item.size|pluralize }}</i>
            {% endif %}
        </td>
    {% else %}
        <td class="s">{{ item.size|filesizeformat }}</td>
    {% endif %}
    <td class="m">{{ item.time|date:_("DATE_WITH_TIME_FULL") }}</td>
    <td class="o" title="octal mode: {{ item.mode|get_oct }}">{{ item.mode|chmod_symbol }}</td>
    <td class="u">{{ item.uid }}</td>
    <td class="g">{{ item.gid }}</td>
    <td class="t">
      {% if item.deletable %}
      <form  method="post" id="fld{{ forloop.counter0 }}" action="{{ post_url }}">
       <input type="hidden" name="item_name"  value="{{ item.name }}" />
       {% if item.is_dir %}
           <input type="hidden" name="action"  value="{{ ACTION_RMDIR }}" />
           <input type="submit" name="rmdir" value="delete"
                onclick="return confirm('Are you sure, to delete the directory [{{ item.name }}] ?')"
           />
       {% else %}
           <input type="hidden" name="action"  value="{{ ACTION_DELETEFILE }}" />
           <input type="submit" name="remove_file" value="delete"
                onclick="return confirm('Are you sure, to delete the file [{{ item.name }}] ?')"
           />
       {% endif %}
      </form>
      {% endif %}
      {% if not item.is_dir %}
      <a href="{{ edit_link }}{{ item.name }}"><button class="action_link">edit</button></a>
      {% endif %}
    </td>
</tr>
{% endfor%}

</tbody>
</table>

{% if writeable %}
    <fieldset class="actions"><legend>{% trans 'upload' %}</legend>
    <form method="post" action="{{ post_url }}" enctype="multipart/form-data">
        {% for field in ufile_form %}
            {% if not field.is_hidden %}
                {% if field.help_text %}<small>{{ field.help_text }}</small><br />{% endif %}
                {{ field.label_tag }}
            {% endif %}
            {{ field }}
            {% if not field.is_hidden %}
                {% if field.errors %}<p>{{ field.errors }}</p>{% endif %}
            {% endif %}
        {% endfor %}
        <input type="submit" name="submit" value="{% trans 'upload file' %}" />
    </form>
    </fieldset>
    <fieldset class="actions"><legend>{% trans 'mkdir' %}</legend>
    <form method="post" action="{{ post_url }}">
        {% for field in mkdir_form %}
            {% if not field.is_hidden %}
                {% if field.help_text %}<small>{{ field.help_text }}</small><br />{% endif %}
                {{ field.label_tag }}
            {% endif %}
            {{ field }}
            {% if not field.is_hidden %}
                {% if field.errors %}<p>{{ field.errors }}</p>{% endif %}
            {% endif %}
        {% endfor %}
        <input type="submit" name="submit" value="{% trans 'create dir' %}" />
    </form>
    </fieldset>
{% else %}
    <p><i>{% trans 'Current directory is not writeable.' %}</i></p>
{% endif %}
</fieldset>
<p>{% trans 'Display some' %} <a href="{{ userinfo_link }}">user information</a>.</p>