95 lines
4.7 KiB
HTML
95 lines
4.7 KiB
HTML
{% load static %}
|
|
{% load i18n %}
|
|
{% load bootstrap4 %}
|
|
{% load fontawesome_5 %}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
<title>{% block 'title' %}portier{% endblock %}</title>
|
|
<link rel="stylesheet" href="{% static 'fonts/inter.css' %}"></link>
|
|
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"></link>
|
|
{% fontawesome_5_static %}
|
|
<script src="{% static 'js/jquery.min.js' %}"></script>
|
|
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<header>
|
|
<nav class="navbar navbar-expand-md navbar-light bg-light mb-4 border boder-bottom-0">
|
|
<div class="container">
|
|
<span class="navbar-brand mb-0 h1">
|
|
<a href="{% url 'index' %}">portier</a>
|
|
</span>
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<ul class="navbar-nav mr-auto">
|
|
</ul>
|
|
<ul class="navbar-nav">
|
|
{% if user.is_authenticated %}
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarStreamingDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{% trans "navbar_streaming" %}
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarStreamingDropdown">
|
|
<a class="dropdown-item{% if not perms.rtmp.add_stream %} disabled{% endif %}" href="{% url 'rtmp:stream_list' %}">{% trans "navbar_configuration_streams" %}</a>
|
|
<a class="dropdown-item{% if not perms.restream.add_restreamconfig %} disabled{% endif %}" href="{% url 'restream:restreamconfig_list' %}">{% trans "navbar_configuration_restreams" %}</a>
|
|
</div>
|
|
</li>
|
|
{% endif %}
|
|
{% if user.is_authenticated %}
|
|
<li class="nav-item dropdown border-left">
|
|
<a class="nav-link dropdown-toggle" href="#" id="navbarAccountDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{% blocktrans with username=user.get_username %}hello_{{ username }}{% endblocktrans %}
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarAccountDropdown">
|
|
<a class="dropdown-item" href="{% url 'password_change' %}">{% trans "navbar_account_password_change" %}</a>
|
|
<form method="post" action="{% url 'logout' %}?next={% url 'index' %}">{% csrf_token %}<button type="submit" class="dropdown-item">{% trans "navbar_account_logout" %}</button></form>
|
|
</li>
|
|
{% else %}
|
|
<li class="nav-item">
|
|
<a class="nav-link login" href="{% url 'login' %}?next={% url 'index' %}">{% trans "navbar_login" %}</a>
|
|
</li>
|
|
{% endif %}
|
|
<li class="nav-item dropdown border-left">
|
|
<a class="nav-link dropdown-toggle" id="languageSelectDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{% fa5_icon 'language' %}
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="languageSelectDropdown">
|
|
{% get_current_language as LANGUAGE_CODE %}
|
|
{% get_available_languages as LANGUAGES %}
|
|
{% get_language_info_list for LANGUAGES as languages %}
|
|
{% for language in languages %}
|
|
<a class="dropdown-item{% if language.code == LANGUAGE_CODE %} font-weight-bold{% endif %}" onclick="$('#languageSelectInput').val('{{ language.code }}'); $('#languageSelectForm').submit()">{{ language.name_local}} ({{ language.code }})</a>
|
|
{% endfor %}
|
|
</div>
|
|
<form action="{% url 'set_language' %}" method="post" id="languageSelectForm">
|
|
{% csrf_token %}
|
|
<input name="next" type="hidden" value="{{ redirect_to }}">
|
|
<input name="language" type="hidden" value="" id="languageSelectInput">
|
|
</form>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
<main class="container" roles="main">
|
|
{% block 'content' %}
|
|
{% endblock %}
|
|
</main>
|
|
<footer class="text-muted">
|
|
<div class="container">
|
|
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|