add group page
This commit is contained in:
@@ -62,13 +62,25 @@
|
||||
<!-- Groups Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-success text-white">
|
||||
<h2>Groups</h2>
|
||||
<h2>Player Groups</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="list-group">
|
||||
{% for group in groups %}
|
||||
<li class="list-group-item">
|
||||
<strong>{{ group.name }}</strong> ({{ group.players | length }} players)
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<strong>{{ group.name }}</strong> ({{ group.players | length }} players)
|
||||
<ul class="list-group mt-2">
|
||||
{% for player in group.players %}
|
||||
<li class="list-group-item">
|
||||
{{ player.username }} ({{ player.ip }})
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<a href="{{ url_for('manage_group', group_id=group.id) }}" class="btn btn-sm btn-secondary">Manage Group</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
56
templates/manage_group.html
Normal file
56
templates/manage_group.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Manage Group</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<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-header bg-primary text-white">
|
||||
<h2>Add Players to Group</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ url_for('add_player_to_group', group_id=group.id) }}" method="post">
|
||||
<div class="mb-3">
|
||||
<label for="player_id" class="form-label">Select Player</label>
|
||||
<select class="form-select" id="player_id" name="player_id" required>
|
||||
{% for player in available_players %}
|
||||
<option value="{{ player.id }}">{{ player.username }} ({{ player.ip }})</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Add Player</button>
|
||||
</form>
|
||||
</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>
|
||||
|
||||
<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>
|
||||
@@ -8,6 +8,20 @@
|
||||
<div class="container py-5">
|
||||
<h1 class="text-center mb-4">Player Schedule for {{ player.username }}</h1>
|
||||
|
||||
<!-- Group Membership Section -->
|
||||
<div class="mb-4">
|
||||
{% if player.groups %}
|
||||
<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>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<h4 class="text-center">Not a member of any group</h4>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Schedule Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header bg-primary text-white">
|
||||
|
||||
Reference in New Issue
Block a user