Files
Discord-ai-chatbot/templates/server_admin_dashboard.html
SimolZimol eca786a062 modified: app.py
modified:   templates/server_admin_dashboard.html
2024-10-29 11:28:11 +01:00

108 lines
4.6 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</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
.scrollable-table {
max-height: 400px;
overflow-y: auto;
}
.status-badge {
font-size: 0.9rem;
padding: 0.5em;
border-radius: 5px;
}
</style>
</head>
<body>
{% include 'navigation.html' %}
<div class="container mt-5">
<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>
<!-- 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>
<!-- 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>
</body>
</html>