Initial commit
This commit is contained in:
26
templates/admin/videos.html
Normal file
26
templates/admin/videos.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends 'admin/base.html' %}
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4 class="m-0">Videos</h4>
|
||||
<a class="btn btn-success" href="{{ url_for('admin.videos_upload') }}">Upload</a>
|
||||
</div>
|
||||
<table class="table table-striped table-sm">
|
||||
<thead><tr><th>ID</th><th>Filename</th><th>Duration</th><th>Uploaded</th><th>URL</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
{% for v in videos %}
|
||||
<tr>
|
||||
<td>{{ v.id }}</td>
|
||||
<td>{{ v.filename }}</td>
|
||||
<td>{{ ('%.3fs'|format(v.duration)) if v.duration else '' }}</td>
|
||||
<td>{{ v.uploaded_at }}</td>
|
||||
<td><a href="{{ url_for('main.media', filename=v.filename) }}" target="_blank">/media/{{ v.filename }}</a></td>
|
||||
<td class="text-end">
|
||||
<form method="post" action="{{ url_for('admin.videos_delete', video_id=v.id) }}" style="display:inline" onsubmit="return confirm('Delete video?');">
|
||||
<button class="btn btn-outline-danger btn-sm" type="submit">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user