PilznoProduction/app/admin/templates/administration.html

66 lines
2.3 KiB
HTML

{% extends 'base.html' %}
{% block title %}Administration{% endblock title %}
{% block stylesheet %}
<link rel="stylesheet" href="{{ url_for('admin.static', filename='administration.css') }}">
{% endblock stylesheet %}
{% block content %}
<main>
<div class="container my-4 px-5">
<h2 class="text-center">Users</h2>
<table class="table table-bordered table-striped">
<thead class="table-dark">
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
</tr>
</thead>
<tbody>
{% for user in users %}
<tr>
<td>{{user.id}}</td>
<td>{{user.first_name}}</td>
<td>{{user.last_name}}</td>
<td>{{user.email}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="container my-4 px-5">
<h2 class="text-center">Campaigns</h2>
<table class="table table-bordered table-striped">
<thead class="table-dark">
<tr>
<th>#</th>
<th>Title</th>
<th>Active</th>
<th>Change Active Status</th>
<th>Archive?</th>
</tr>
</thead>
<tbody>
{% for campaign in campaigns %}
<tr>
<td>{{campaign.id}}</td>
<td>{{campaign.title}}</td>
<td>{{campaign.active}}</td>
<td>
<label class="switch">
<input type="checkbox" id="{{campaign.id}}" class="change-activity-btn" {%if campaign.active%}checked{%endif%}>
<span class="slider round"></span>
</label>
</td>
<td><button id="{{campaign.id}}" class="archive-button btn btn-primary">Click to archive</button></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</main>
<script src="{{url_for('.static', filename='admin.js')}}"></script>
{% endblock content %}