added management options for media

This commit is contained in:
2025-01-21 17:04:59 +02:00
parent 7ef65cb44f
commit ef69b4fe65
6 changed files with 229 additions and 120 deletions

View File

@@ -14,7 +14,12 @@
<h4 class="text-center">Member of Group(s):</h4>
<ul class="list-group">
{% for group in player.groups %}
<li class="list-group-item">{{ group.name }}</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div>{{ group.name }}</div>
<form action="{{ url_for('remove_player_from_group', group_id=group.id, player_id=player.id) }}" method="post" class="d-inline">
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure you want to remove this player from the group?');">Remove</button>
</form>
</li>
{% endfor %}
</ul>
{% else %}
@@ -34,6 +39,7 @@
<div>
{{ item.file_name }} - {{ item.duration }} seconds
</div>
{% if not player.groups %}
<div>
<!-- Edit Duration Form -->
<form action="{{ url_for('edit_content', content_id=item.id) }}" method="post" class="d-inline">
@@ -45,6 +51,7 @@
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure you want to delete this resource?');">Delete</button>
</form>
</div>
{% endif %}
</li>
{% endfor %}
</ul>
@@ -52,6 +59,7 @@
</div>
<!-- Upload Section -->
{% if not player.groups %}
<div class="card mb-4">
<div class="card-header bg-success text-white">
<h2>Upload Content</h2>
@@ -70,8 +78,10 @@
</form>
</div>
</div>
{% endif %}
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
<a href="{{ url_for('player_fullscreen', player_id=player.id) }}" class="btn btn-primary">Full Screen</a>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>