2023-03-09 16:45:20 +00:00
|
|
|
{% import 'macro/flask.html' as flask %}
|
2021-07-29 09:50:13 +00:00
|
|
|
|
2020-08-17 09:53:30 +00:00
|
|
|
<!doctype html>
|
2023-01-18 17:00:32 +00:00
|
|
|
<html lang="{{ locale }}">
|
2021-12-20 22:57:27 +00:00
|
|
|
<head>
|
2023-03-16 18:30:30 +00:00
|
|
|
<title>{% block title -%}{% trans %}Authorization interface{% endtrans %}{%- endblock %} - {{ website_name|default("Canaille") }}</title>
|
2020-10-21 08:52:18 +00:00
|
|
|
|
2023-06-23 14:26:38 +00:00
|
|
|
{% if not is_boosted %}
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
2020-08-17 09:53:30 +00:00
|
|
|
|
2023-06-23 14:26:38 +00:00
|
|
|
<link href="/static/fomanticui/semantic.min.css" rel="stylesheet">
|
|
|
|
<link href="/static/fonts/lato.css" rel="stylesheet">
|
|
|
|
<link href="/static/css/base.css" rel="stylesheet">
|
|
|
|
{% if logo_url %}<link rel="icon" href="{{ favicon_url }}">{% endif %}
|
|
|
|
{% block style %}{% endblock %}
|
2020-08-17 09:53:30 +00:00
|
|
|
|
2023-06-23 14:26:38 +00:00
|
|
|
<!--[if lt IE 9]>
|
|
|
|
<script>window.html5 || document.write('<script src="/static/html5shiv/html5shiv.min.js"><\/script>')</script>
|
|
|
|
<script src="/static/js/respond.min.js"></script>
|
|
|
|
<![endif]-->
|
|
|
|
{% endif %}
|
2021-12-20 22:57:27 +00:00
|
|
|
</head>
|
2020-08-17 09:53:30 +00:00
|
|
|
|
2023-06-23 14:26:38 +00:00
|
|
|
<body hx-boost="true">
|
2021-12-20 22:57:27 +00:00
|
|
|
{% block menu %}
|
|
|
|
{% if user and menu %}
|
2023-03-15 16:27:32 +00:00
|
|
|
<div class="ui container menu-container">
|
|
|
|
<nav class="ui stackable labeled icon seven item {% if self.submenu() | trim %}top attached{% endif %} menu">
|
|
|
|
{% if logo_url %}
|
|
|
|
<a href="/" class="item logo">
|
2022-11-04 17:28:26 +00:00
|
|
|
<img class="ui img" src="{{ logo_url }}" alt="{{ website_name }}" />
|
2021-12-20 22:57:27 +00:00
|
|
|
</a>
|
2023-03-15 16:27:32 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if user.can_edit_self %}
|
|
|
|
<a class="item {% if menuitem == "profile" %}active{% endif %}"
|
2023-05-11 14:02:32 +00:00
|
|
|
href="{{ url_for('account.profile_edition', username=user.user_name[0]) }}">
|
2023-03-15 16:27:32 +00:00
|
|
|
<i class="id card icon"></i>
|
|
|
|
{% trans %}Profile{% endtrans %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if user.can_use_oidc %}
|
|
|
|
<a class="item {% if menuitem == "consents" %}active{% endif %}"
|
|
|
|
href="{{ url_for('oidc.consents.consents') }}">
|
|
|
|
<i class="handshake icon"></i>
|
|
|
|
{% trans %}Consents{% endtrans %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if user.can_manage_users %}
|
|
|
|
<a class="item {% if menuitem == "users" %}active{% endif %}"
|
|
|
|
href="{{ url_for('account.users') }}">
|
|
|
|
<i class="address book icon"></i>
|
|
|
|
{% trans %}Users{% endtrans %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if user.can_manage_groups %}
|
|
|
|
<a class="item {% if menuitem == "groups" %}active{% endif %}"
|
|
|
|
href="{{ url_for('groups.groups') }}">
|
|
|
|
<i class="users icon"></i>
|
|
|
|
{% trans %}Groups{% endtrans %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% if user.can_manage_oidc %}
|
|
|
|
<a class="item {% if menuitem == "admin" %}active{% endif %}" href="{{ url_for('admin.mail_index') }}">
|
|
|
|
<i class="settings icon"></i>
|
|
|
|
{% trans %}Admin{% endtrans %}
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
<a class="item" href="{{ url_for('account.logout') }}">
|
|
|
|
<i class="sign out alternate icon"></i>
|
|
|
|
{% trans %}Log out{% endtrans %}
|
2021-12-20 22:57:27 +00:00
|
|
|
</a>
|
2023-03-15 16:27:32 +00:00
|
|
|
</nav>
|
|
|
|
{% block submenu %}{% endblock %}
|
|
|
|
</div>
|
2020-11-01 10:33:56 +00:00
|
|
|
{% endif %}
|
2021-12-20 22:57:27 +00:00
|
|
|
{% endblock %}
|
2020-10-21 09:30:26 +00:00
|
|
|
|
2023-03-15 16:27:32 +00:00
|
|
|
|
2022-12-27 23:45:34 +00:00
|
|
|
{% block container %}
|
|
|
|
<div class="ui container">
|
2023-03-15 16:27:32 +00:00
|
|
|
<div class="ui content">
|
2022-12-27 23:45:34 +00:00
|
|
|
{{ flask.messages() }}
|
|
|
|
{% block content %}{% endblock %}
|
|
|
|
</div>
|
2021-12-20 22:57:27 +00:00
|
|
|
</div>
|
2022-12-27 23:45:34 +00:00
|
|
|
{% endblock %}
|
2020-11-13 09:45:01 +00:00
|
|
|
|
2021-12-20 22:57:27 +00:00
|
|
|
<footer>
|
2023-01-30 18:56:58 +00:00
|
|
|
<a href="{{ url_for('account.about') }}">{{ _("About Canaille") }}</a>
|
2021-12-20 22:57:27 +00:00
|
|
|
</footer>
|
2023-06-23 14:26:38 +00:00
|
|
|
{% if not is_boosted %}
|
|
|
|
<script src="/static/jquery/jquery.min.js"></script>
|
|
|
|
<script src="/static/fomanticui/semantic.min.js"></script>
|
|
|
|
{% if config.get("HTMX", true) %}
|
|
|
|
<script src="/static/htmx/htmx.min.js"></script>
|
|
|
|
<script>
|
|
|
|
htmx.config.requestClass = "loading"
|
|
|
|
</script>
|
|
|
|
{% endif %}
|
|
|
|
<script src="/static/js/base.js"></script>
|
|
|
|
{% endif %}
|
2021-12-20 22:57:27 +00:00
|
|
|
{% block script %}{% endblock %}
|
|
|
|
</body>
|
2020-08-17 09:53:30 +00:00
|
|
|
</html>
|