{% extends "base.html" %}

{% block content %}
<h1>Uploaded XML Files</h1>
<ul>
    {% for file in files %}
    <li>
        {{ file }}
        <a href="{{ url_for('download_xml', filename=file) }}">Download</a>
        <a href="{{ url_for('edit_xml', filename=file) }}">Edit</a>
        <form action="{{ url_for('delete_xml', filename=file) }}" method="post" style="display:inline;">
            <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
            <button type="submit">Delete</button>
        </form>
    </li>
    {% endfor %}
</ul>
<a href="{{ url_for('upload_xml') }}">Upload new file</a>
{% endblock %}