updated to video upload
This commit is contained in:
@@ -3,13 +3,26 @@
|
||||
<head>
|
||||
<title>Manage Group</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style>
|
||||
body.dark-mode {
|
||||
background-color: #121212;
|
||||
color: #ffffff;
|
||||
}
|
||||
.card.dark-mode {
|
||||
background-color: #1e1e1e;
|
||||
color: #ffffff;
|
||||
}
|
||||
.dark-mode label, .dark-mode th, .dark-mode td {
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body class="{{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="container py-5">
|
||||
<h1 class="text-center mb-4">Manage Group: {{ group.name }}</h1>
|
||||
|
||||
<!-- Add Players to Group Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h2>Add Players to Group</h2>
|
||||
</div>
|
||||
@@ -29,17 +42,17 @@
|
||||
</div>
|
||||
|
||||
<!-- Players in Group Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
<div class="card-header bg-secondary text-white">
|
||||
<h2>Players in Group</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="list-group">
|
||||
{% for player in group.players %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>{{ player.username }} ({{ player.ip }})</div>
|
||||
<li class="list-group-item {{ 'dark-mode' if theme == 'dark' else '' }}">
|
||||
{{ player.username }} ({{ player.ip }})
|
||||
<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>
|
||||
<button type="submit" class="btn btn-danger btn-sm float-end">Remove</button>
|
||||
</form>
|
||||
</li>
|
||||
{% endfor %}
|
||||
@@ -47,57 +60,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Upload Content Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-success text-white">
|
||||
<h2>Upload Content for Group</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ url_for('upload_content_to_group', group_id=group.id) }}" method="post" enctype="multipart/form-data">
|
||||
<div class="mb-3">
|
||||
<label for="files" class="form-label">Select Images</label>
|
||||
<input type="file" class="form-control" id="files" name="files" multiple required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="duration" class="form-label">Display Duration (seconds)</label>
|
||||
<input type="number" class="form-control" id="duration" name="duration" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Upload</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Manage Group Content Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-warning text-dark">
|
||||
<h2>Manage Group Content</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="list-group">
|
||||
{% for content in group.content %}
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>{{ content.file_name }} - {{ content.duration }} seconds</div>
|
||||
<div>
|
||||
<!-- Edit Duration Form -->
|
||||
<form action="{{ url_for('edit_group_content', content_id=content.id) }}" method="post" class="d-inline">
|
||||
<input type="number" name="duration" value="{{ content.duration }}" class="form-control d-inline-block" style="width: 80px;" required>
|
||||
<button type="submit" class="btn btn-sm btn-warning">Edit</button>
|
||||
</form>
|
||||
<!-- Delete Content Form -->
|
||||
<form action="{{ url_for('delete_group_content', content_id=content.id) }}" method="post" class="d-inline">
|
||||
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Are you sure you want to delete this content?');">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{{ url_for('group_fullscreen', group_id=group.id) }}" class="btn btn-primary mt-3">Full Screen</a>
|
||||
</div>
|
||||
<!-- Replace Upload Content Card with Button -->
|
||||
{% if current_user.role == 'admin' %}
|
||||
<div class="text-center mb-4">
|
||||
<a href="{{ url_for('upload_content', target_type='group', target_id=group.id, return_url=request.url) }}" class="btn btn-primary">Upload Content</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
|
||||
</div>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user