modified: app.py
modified: templates/server_admin_dashboard.html
This commit is contained in:
@@ -3,91 +3,103 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Server Admin Dashboard - {{ guild_name }}</title>
|
||||
<title>Server Admin Dashboard</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 */
|
||||
.scrollable-table {
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
h2 {
|
||||
color: #343a40;
|
||||
.status-badge {
|
||||
font-size: 0.9rem;
|
||||
padding: 0.5em;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</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>
|
||||
<h1 class="text-center">Server Admin Dashboard for {{ guild_name }}</h1>
|
||||
<p class="text-center text-muted">Manage server-specific settings and data 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>
|
||||
<!-- Giveaway Management Section -->
|
||||
<div class="card mt-4">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Giveaway Management</h5>
|
||||
<p class="card-text">View and manage all active giveaways for this server.</p>
|
||||
<div class="table-responsive scrollable-table">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Platform</th>
|
||||
<th>Winner</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</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 status-badge">Redeemed</span>
|
||||
{% else %}
|
||||
<span class="badge badge-warning status-badge">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>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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>
|
||||
<!-- User Management Section -->
|
||||
<div class="card mt-4">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">User Management</h5>
|
||||
<p class="card-text">Manage server members' data, including points, bans, and permissions.</p>
|
||||
<div class="table-responsive scrollable-table">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User ID</th>
|
||||
<th>Points</th>
|
||||
<th>Level</th>
|
||||
<th>Banned</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in server_users %}
|
||||
<tr>
|
||||
<td>{{ user.user_id }}</td>
|
||||
<td>{{ user.points }}</td>
|
||||
<td>{{ user.level }}</td>
|
||||
<td>
|
||||
{% if user.ban %}
|
||||
<span class="badge badge-danger status-badge">Banned</span>
|
||||
{% else %}
|
||||
<span class="badge badge-success status-badge">Active</span>
|
||||
{% endif %}
|
||||
</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>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user