2020-04-29 18:48:23 +02:00
{% load static %}
2020-04-29 21:09:04 +02:00
{% load i18n %}
2020-04-26 04:46:44 +02:00
{% load bootstrap4 %}
2020-05-01 21:40:43 +02:00
{% load fontawesome_5 %}
2020-04-26 04:46:44 +02:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "utf-8" / >
< meta http-equiv = "x-ua-compatible" content = "ie=edge" / >
2020-04-29 18:48:23 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1, shrink-to-fit=no" >
2020-04-26 04:46:44 +02:00
< title > {% block 'title' %}portier{% endblock %}< / title >
2020-05-01 21:40:43 +02:00
< link rel = "stylesheet" href = "{% static 'fonts/inter.css' %}" > < / link >
< link rel = "stylesheet" href = "{% static 'css/bootstrap.min.css' %}" > < / link >
< link rel = "stylesheet" href = "{% static 'css/font-awesome.min.css' %}" > < / link >
{% fontawesome_5_static %}
< script src = "{% static 'js/jquery.min.js' %}" > < / script >
< script src = "{% static 'js/bootstrap.bundle.min.js' %}" > < / script >
2020-04-26 04:46:44 +02:00
< / head >
< body >
2020-04-29 18:48:23 +02:00
< header >
< nav class = "navbar navbar-expand-md navbar-light bg-light mb-4 border boder-bottom-0" >
2020-05-02 00:10:36 +02:00
< div class = "container" >
2020-04-29 18:48:23 +02:00
< span class = "navbar-brand mb-0 h1" >
2020-04-29 21:09:04 +02:00
< a href = "{% url 'index' %}" > portier< / a >
2020-04-29 18:48:23 +02:00
< / 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" >
2020-05-01 21:40:43 +02:00
< a class = "nav-link dropdown-toggle" href = "#" id = "navbarStreamingDropdown" role = "button" data-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" >
{% trans "navbar_streaming" %}
2020-04-29 18:48:23 +02:00
< / a >
2020-05-01 21:40:43 +02:00
< 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 >
2020-04-29 18:48:23 +02:00
< / div >
< / li >
{% endif %}
{% if user.is_authenticated %}
2020-05-01 21:40:43 +02:00
< 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 >
< a class = "dropdown-item" href = "{% url 'logout' %}?next={% url 'index' %}" > {% trans "navbar_account_logout" %}< / a >
< / li >
2020-04-29 18:48:23 +02:00
{% else %}
2020-05-01 21:40:43 +02:00
< li class = "nav-item" >
2020-04-29 21:09:04 +02:00
< a class = "nav-link login" href = "{% url 'login' %}?next={% url 'index' %}" > {% trans "navbar_login" %}< / a >
2020-05-01 21:40:43 +02:00
< / li >
2020-04-29 18:48:23 +02:00
{% endif %}
2020-05-01 21:40:43 +02:00
< 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 >
2020-04-29 18:48:23 +02:00
< / li >
< / ul >
< / div >
2020-05-02 00:10:36 +02:00
< / div >
2020-04-29 18:48:23 +02:00
< / nav >
< / header >
< main class = "container" roles = "main" >
{% block 'content' %}
2020-04-26 04:46:44 +02:00
{% endblock %}
2020-04-29 18:48:23 +02:00
< / main >
< footer class = "text-muted" >
< div class = "container" >
2020-05-01 21:40:43 +02:00
2020-04-29 18:48:23 +02:00
< / div >
< / footer >
2020-04-26 04:46:44 +02:00
< / body >
< / html >