96 lines
3.9 KiB
HTML
96 lines
3.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Server Admin Dashboard - {{ guild_name }}</title>
|
|
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
|
|
<style>
|
|
.table-container {
|
|
max-height: 400px; /* Begrenzte Höhe für die Tabellen */
|
|
overflow-y: auto;
|
|
}
|
|
h2 {
|
|
color: #343a40;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
{% include 'navigation.html' %}
|
|
<div class="container mt-5">
|
|
<h2 class="text-center">Server Admin Dashboard for {{ guild_name }}</h2>
|
|
<p class="text-center text-muted">Manage server-specific settings for server <strong>{{ guild_id }}</strong>.</p>
|
|
|
|
<!-- User Management Section -->
|
|
<div class="mt-5">
|
|
<h4>User Management</h4>
|
|
<div class="table-container">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Discord ID</th>
|
|
<th>Points</th>
|
|
<th>Level</th>
|
|
<th>Role</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for user in users %}
|
|
<tr>
|
|
<td>{{ user.user_id }}</td>
|
|
<td>{{ user.points }}</td>
|
|
<td>{{ user.level }}</td>
|
|
<td>{{ user.permission }}</td>
|
|
<td>
|
|
<a href="{{ url_for('edit_user', guild_id=guild_id, user_id=user.user_id) }}" class="btn btn-primary btn-sm">Edit</a>
|
|
<a href="{{ url_for('ban_user', guild_id=guild_id, user_id=user.user_id) }}" class="btn btn-danger btn-sm">Ban</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Giveaway Management Section -->
|
|
<div class="mt-5">
|
|
<h4>Giveaway Management</h4>
|
|
<div class="table-container">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Platform</th>
|
|
<th>Winner ID</th>
|
|
<th>Status</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for giveaway in giveaways %}
|
|
<tr>
|
|
<td>{{ giveaway.name }}</td>
|
|
<td>{{ giveaway.platform }}</td>
|
|
<td>{{ giveaway.winner_dc_id }}</td>
|
|
<td>
|
|
{% if giveaway.aktiv %}
|
|
<span class="badge badge-success">Redeemed</span>
|
|
{% else %}
|
|
<span class="badge badge-warning">Not Redeemed</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<a href="{{ url_for('edit_giveaway', guild_id=guild_id, uuid=giveaway.uuid) }}" class="btn btn-primary btn-sm">Edit</a>
|
|
<a href="{{ url_for('delete_giveaway', guild_id=guild_id, uuid=giveaway.uuid) }}" class="btn btn-danger btn-sm">Delete</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|