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 >
{% 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" >
2024-02-27 20:44:35 +01:00
< a class = "dropdown-item{% if not perms.config.add_stream %} disabled{% endif %}" href = "{% url 'config:stream_list' %}" > {% trans "navbar_configuration_streams" %}< / a >
< a class = "dropdown-item{% if not perms.config.add_restream %} disabled{% endif %}" href = "{% url 'config:restream_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 >
2024-02-25 15:01:00 +01:00
< form method = "post" action = "{% url 'logout' %}?next={% url 'index' %}" > {% csrf_token %}< button type = "submit" class = "dropdown-item" > {% trans "navbar_account_logout" %}< / button > < / form >
2020-05-01 21:40:43 +02:00
< / 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" >
2024-02-25 23:19:01 +01:00
{% if user.is_authenticated %}
{% block 'sidenav' %}
< div class = "row" >
< div class = "col-md-2 col-sm-4 border-right" >
< nav >
< ul class = "nav nav-pills flex-column" >
< li class = "nav-item" >
< a class = "nav-link{% if not perms.rtmp.add_stream %} disabled{% endif %}{% if section == " stream " % } active { % endif % } " href = "{% url 'rtmp:stream_list' %}" > {% fa5_icon 'dot-circle' %} {% trans "navbar_configuration_stream" %}< / a >
< / li >
< li class = "nav-item" >
< a class = "nav-link{% if not perms.restream.add_restreamconfig %} disabled{% endif %}" href = "{% url 'restream:restreamconfig_list' %}" > {% fa5_icon 'expand-arrows-alt' %} {% trans "navbar_configuration_restream" %}< / a >
< / li >
< li class = "nav-item" >
< a class = "nav-link disabled" href = "{% url 'rtmp:stream_list' %}" > {% fa5_icon 'compress-arrows-alt' %} {% trans "navbar_configuration_pull" %}< / a >
< / li >
< li class = "nav-item" >
< a class = "nav-link disabled" href = "{% url 'rtmp:stream_list' %}" > {% fa5_icon 'broadcast-tower' %} {% trans "navbar_configuration_publish" %}< / a >
< / li >
< li class = "nav-item" >
< a class = "nav-link disabled" href = "{% url 'rtmp:stream_list' %}" > {% fa5_icon 'hdd' %} {% trans "navbar_configuration_record" %}< / a >
< / li >
< li class = "nav-item" >
< a class = "nav-link disabled" href = "{% url 'rtmp:stream_list' %}" > {% fa5_icon 'random' %} {% trans "navbar_configuration_switch" %}< / a >
< / li >
< / ul >
< / nav >
< / div >
< div class = "col" >
{% endblock %}
{% endif %}
{% block 'content' %}
{% endblock %}
{% if user.is_authenticated %}
< / div >
< / div >
{% endif %}
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 >