<table>
    <tr>
        <td>Welcome: {{username}}</td>
        <td>
            <form action="/store/" method="POST">
                {% csrf_token %}
                <input type="submit" value="CopyKeys">
                <input type="hidden" name="auth" value="True">
            </form>
        </td> 
        <td>
        {% for k,v in quota.items %}
        {{ k }} : {{ v }}
        {% endfor %}
        </td> 
        <td></td>
    	<td>
            <form action="/store/" method="POST"
               target="uploader-popup" 
                onSubmit="window.open('/store/', 'uploader-popup', 'width=450,height=300,status=yes,resizable=yes,scrollbars=no,menubar=no,toolbar=no'">
                {% csrf_token %}
                <input type="submit" value="Upload">
                <input type="hidden" name="path" value="{{ path }}">
                <input type="hidden" name="ul" value="{{ path }}">
            </form>
        </td>
        <td>
            <form action="/store/" method="POST">
                {% csrf_token %}
                <input type="submit" value="New Folder">
                <input type="hidden" name="path" value="{{ path }}">
                <input type="text" name="new" value="Folder Name">
            </form>
        </td>
    </tr>
    <tr>
        <td>Név</td>
        <td>Típus</td> 
        <td>Méret (KB)</td> 
        <td>Utolsó modosítás</td>
    	<td>Műveletek</td>
    </tr>
    <tr>
        <td>{% if path != '/' %}
	    <form action="/store/" method="POST">{% csrf_token %}
	    	<input type="submit" value="{{ backpath }}">
		{% if backpath == '/'%}
	            <input type="hidden" name="path" value="/">
		{% else %}
	            <input type="hidden" name="path" value="{{ backpath }}/">
		{% endif %}
	    </form>
	    {% endif %}
	</td>
    </tr> 
    {% if file_list %} 
    {% for item in file_list %} 
    <tr> 
        <td> 
            {% if item.TYPE == 'D' %} 
            <form action="/store/" method="POST">{% csrf_token %}
		<input type="submit" value="{{ item.NAME }}">
		{% if item.NAME != '/' %}
		<input type="hidden" name="path" value="{{ path }}{{ item.NAME }}/">
		{% else %}
		    <input type="hidden" name="path" value="/">
		{% endif %}
            </form> 
            {% else %}
            {{ item.NAME }}
            {% endif %}

        </td>
        <td>{{ item.TYPE }}</td>
        <td>{{ item.SIZE }}</td>
        <td>{{ item.MTIME }}</td>
    	<td>
                <form action="/store/" method="POST">{% csrf_token %}
                <input type="submit" value="Download">
                <input type="hidden" name="path" value="{{ path }}">
                <input type="hidden" name="dl" value="{{ path }}{{ item.NAME }}">
                </form>
        </td>
        <td>
                 <form action="/store/" method="POST">{% csrf_token %}
                     <input type="submit" value="Remove">
                     <input type="hidden" name="path" value="{{ path }}">
                     <input type="hidden" name="rm" value="{{ path }}{{ item.NAME }}">
                </form>
	    </td>
    </tr>
    {% endfor %}
    {% endif %}
</table>

