2022-04-04 15:39:23 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
2022-04-05 15:17:34 +00:00
|
|
|
<meta charset="UTF-8">
|
2024-02-19 17:42:19 +00:00
|
|
|
<title>{{ p.page_title }} - {{ p.app_name }}</title>
|
2022-04-05 15:17:34 +00:00
|
|
|
|
|
|
|
<!-- Bootstrap core CSS -->
|
|
|
|
<link href="/assets/css/bootstrap.css" rel="stylesheet" crossorigin="anonymous"/>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="/assets/css/base_settings_page.css">
|
2022-04-04 15:39:23 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2022-04-05 15:17:34 +00:00
|
|
|
<div class="d-flex flex-column flex-shrink-0 p-3 bg-light" style="width: 280px;">
|
2022-04-04 15:39:23 +00:00
|
|
|
<a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none">
|
2024-02-19 17:42:19 +00:00
|
|
|
<span class="fs-4">{{ p.app_name }}</span>
|
2022-04-04 15:39:23 +00:00
|
|
|
</a>
|
2024-02-19 17:42:19 +00:00
|
|
|
{% if p.user.admin %}
|
|
|
|
<span>Version {{ p.version }}</span>
|
2022-07-22 13:11:30 +00:00
|
|
|
{% endif %}
|
2022-04-04 15:39:23 +00:00
|
|
|
<hr>
|
|
|
|
<ul class="nav nav-pills flex-column mb-auto">
|
2022-04-05 15:17:34 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<a href="/settings" class="nav-link link-dark">
|
|
|
|
Account details
|
|
|
|
</a>
|
|
|
|
</li>
|
2024-02-19 17:42:19 +00:00
|
|
|
{% if p.user.allow_local_login %}
|
2022-04-05 15:17:34 +00:00
|
|
|
<li>
|
|
|
|
<a href="/settings/change_password" class="nav-link link-dark">
|
|
|
|
Change password
|
|
|
|
</a>
|
|
|
|
</li>
|
2023-04-27 10:10:28 +00:00
|
|
|
{% endif %}
|
2022-04-18 17:23:43 +00:00
|
|
|
<li>
|
|
|
|
<a href="/settings/two_factors" class="nav-link link-dark">
|
|
|
|
Two-factor authentication
|
|
|
|
</a>
|
|
|
|
</li>
|
2022-04-05 15:17:34 +00:00
|
|
|
|
2024-02-19 17:42:19 +00:00
|
|
|
{% if p.user.admin %}
|
2022-04-06 16:08:57 +00:00
|
|
|
<hr/>
|
2022-04-05 15:17:34 +00:00
|
|
|
<li>
|
2022-04-06 15:18:06 +00:00
|
|
|
<a href="/admin/clients" class="nav-link link-dark">
|
|
|
|
Clients
|
2022-04-05 15:17:34 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2023-04-27 10:10:28 +00:00
|
|
|
<li>
|
|
|
|
<a href="/admin/providers" class="nav-link link-dark">
|
|
|
|
Providers
|
|
|
|
</a>
|
|
|
|
</li>
|
2022-04-05 15:17:34 +00:00
|
|
|
<li>
|
|
|
|
<a href="/admin/users" class="nav-link link-dark">
|
|
|
|
Users
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2022-04-04 15:39:23 +00:00
|
|
|
</ul>
|
|
|
|
<hr>
|
|
|
|
<div class="dropdown">
|
2022-04-05 15:17:34 +00:00
|
|
|
<a href="#" class="d-flex align-items-center link-dark text-decoration-none dropdown-toggle" id="dropdownUser"
|
|
|
|
data-bs-toggle="dropdown" aria-expanded="false">
|
|
|
|
<img src="/assets/img/account.png" alt="" width="32" height="32" class="rounded-circle me-2">
|
2024-02-19 17:42:19 +00:00
|
|
|
<strong>{{ p.user.username }}</strong>
|
2022-04-05 15:17:34 +00:00
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser">
|
|
|
|
<li><a class="dropdown-item" href="/logout">Sign out</a></li>
|
|
|
|
</ul>
|
2022-04-04 15:39:23 +00:00
|
|
|
</div>
|
2022-04-05 15:17:34 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="page_body" style="flex: 1">
|
2024-02-19 17:42:19 +00:00
|
|
|
{% if let Some(msg) = p.danger_message %}
|
2022-04-05 15:17:34 +00:00
|
|
|
<div class="alert alert-danger">{{ msg }}</div>
|
|
|
|
{% endif %}
|
2024-02-19 17:42:19 +00:00
|
|
|
{% if let Some(msg) = p.success_message %}
|
2022-04-05 15:17:34 +00:00
|
|
|
<div class="alert alert-success">{{ msg }}</div>
|
|
|
|
{% endif %}
|
2022-04-04 15:39:23 +00:00
|
|
|
|
2024-02-19 17:42:19 +00:00
|
|
|
<h2 class="bd-title mt-0" style="margin-bottom: 40px;">{{ p.page_title }}</h2>
|
2022-04-04 15:39:23 +00:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
TO_REPLACE
|
|
|
|
{% endblock content %}
|
2022-04-05 15:17:34 +00:00
|
|
|
</div>
|
2022-04-04 15:39:23 +00:00
|
|
|
|
|
|
|
<script src="/assets/js/bootstrap.bundle.min.js"></script>
|
2022-04-05 15:17:34 +00:00
|
|
|
<script>
|
|
|
|
document.querySelectorAll(".nav-link").forEach(el => {
|
|
|
|
if(el.href === location.href) el.classList.add("active");
|
|
|
|
else el.classList.remove("active")
|
|
|
|
})
|
2023-04-27 10:10:28 +00:00
|
|
|
|
2022-04-05 15:17:34 +00:00
|
|
|
</script>
|
2024-02-19 17:42:19 +00:00
|
|
|
{% if p.ip_location_api.is_some() %}
|
|
|
|
<script>const IP_LOCATION_API = "{{ p.ip_location_api.unwrap() }}"</script>
|
2022-11-12 16:01:45 +00:00
|
|
|
{% endif %}
|
|
|
|
<script src="/assets/js/ip_location_service.js"></script>
|
2022-04-04 15:39:23 +00:00
|
|
|
</body>
|
|
|
|
</html>
|