Spaces:
Sleeping
Sleeping
| {% extends "admin_layout.html" %} | |
| {% block title %}Uploaded Files{% endblock %} | |
| {% block page_title %}Uploaded Files{% endblock %} | |
| {% block content %} | |
| <div class="table-responsive"> | |
| <table class="table table-striped table-sm"> | |
| <thead> | |
| <tr> | |
| <th scope="col">#</th> | |
| <th scope="col">Filename</th> | |
| <th scope="col">Size</th> | |
| <th scope="col">Last Modified</th> | |
| <th scope="col">Download</th> | |
| <th scope="col">Actions</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| {% if files %} | |
| {% for file in files %} | |
| <tr> | |
| <td>{{ loop.index }}</td> | |
| <td>{{ file.name }}</td> | |
| <td>{{ file.size_human }}</td> | |
| <td>{{ file.modified_at }}</td> | |
| <td><a href="{{ url_for('download_file', filename=file.name) }}" target="_blank" class="btn btn-sm btn-outline-primary" title="Download {{file.name}}"><i class="bi bi-download"></i> Link</a></td> | |
| <td> | |
| <form method="post" action="{{ url_for('admin_delete_file', filename=file.name) }}" style="display:inline;" onsubmit="return confirm('Are you sure you want to delete {{ file.name }}? This action cannot be undone.');"> | |
| <button type="submit" class="btn btn-danger btn-sm"> | |
| <i class="bi bi-trash-fill"></i> Delete | |
| </button> | |
| </form> | |
| </td> | |
| </tr> | |
| {% endfor %} | |
| {% else %} | |
| <tr> | |
| <td colspan="6" class="text-center">No files uploaded yet.</td> | |
| </tr> | |
| {% endif %} | |
| </tbody> | |
| </table> | |
| </div> | |
| {% endblock %} |