Gitlab CSE Unil

base.html 3.73 KB
Newer Older
Julien Furrer's avatar
Julien Furrer committed
1
2
3
4
5
{% load static i18n %}
<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="utf-8" />
Julien Furrer's avatar
Julien Furrer committed
6
    <meta name="viewport" content="width=device-width"/>
Julien Furrer's avatar
Julien Furrer committed
7
    <title>{% block page_title %}ADIM{% endblock %}{% if user.is_authenticated %} - {{ user.username }}{% endif %}</title>
Julien Furrer's avatar
Julien Furrer committed
8
    <link rel="stylesheet" type="text/css" media="all" href="{% static "css/libs.css" %}" />
9

Julien Furrer's avatar
Julien Furrer committed
10
{#    <link rel="stylesheet" type="text/css" media="all" href="{% static "css/adim.css" %}" />#}
11
{#    <link rel="stylesheet" type="text/css" media="all" href="{% static "_src/less/adim.css" %}" />#}
M. Chardon's avatar
M. Chardon committed
12
    <link rel="stylesheet" type="text/css" media="all" href="{% static PROD|yesno:"css/adim.css,_src/scss/adim.css" %}" />
Julien Furrer's avatar
Julien Furrer committed
13
14
15
    {% block page_head %}{% endblock %}
</head>

Julien Furrer's avatar
Julien Furrer committed
16
<body class="{% if user.is_anonymous %}anonymous{% else %}authenticated{% endif %} {% block body_class %}{% endblock %}">{% block page_body %}
Julien Furrer's avatar
Julien Furrer committed
17
18
19
{%  block overlay %}{% endblock %}
{% block main_header %}
    {%  block main_navbar %}
M. Chardon's avatar
M. Chardon committed
20
21
22
23
    <nav class="navbar navbar-expand-sm bg-dark navbar-dark" id="main-navbar">
        <div class="navbar-header">
    {%  block navbar_brand %}
        <a class="navbar-brand" href="{% url "adim.app:home" %}">ADIM</a>
24
        {% if adim_prod == false %}
25
            <span style="color:red;font-weight: bold;font-size: large;"><i class="fa fa-exclamation-triangle"></i> ENVIRONNEMENT DE TEST&nbsp;</span>
M. Chardon's avatar
M. Chardon committed
26
        {% endif %}
M. Chardon's avatar
M. Chardon committed
27
28
29
30
31
32
33
    {%  endblock %}
        </div>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="collapsibleNavbar">
        {%  block navbar_content %}
M. Chardon's avatar
M. Chardon committed
34
35
          <div class="navbar-text navbar-separator ml-auto">&nbsp;</div>
          <ul class="nav navbar-nav">
Julien Furrer's avatar
Julien Furrer committed
36
37
            {% block navbar_right_content %}
                {% if user.is_authenticated %}
M. Chardon's avatar
M. Chardon committed
38
39
40
41
42
43
44
45
46
47
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
                <span class="fa fa-user"></span>
                <span class="caret"></span>
              </a>
              <div class="dropdown-menu dropdown-menu-right">
                <h6 class="dropdown-header"><span class="fa fa-user"></span> {{ user.username|default:user.email }}</h6>
                <div class="dropdown-divider"></div>
                {% if user.is_staff %}
                    <a class="dropdown-item" href="{% url "admin:index" %}"><span class="fa fa-cog"></span> Administration</a>
Julien Furrer's avatar
Julien Furrer committed
48
                {% endif %}
M. Chardon's avatar
M. Chardon committed
49
50
51
52
53
54
55
56
57
58
59
60
61
                <a class="dropdown-item" id="adim-logout-but" href="{% url "logout" %}"><span class="fa fa-sign-out-alt "></span> Déconnexion</a>
              </div>
            </li>
                {% endif %}
            <!--li class="nav-item">
              <a class="nav-link" href="#">Link</a>
            </li>
            <li class="nav-item">
              <a class="nav-link" href="#">Link</a>
            </li>
            <li class="nav-item">
              <a class="nav-link disabled" href="#">Disabled</a>
            </li-->
Julien Furrer's avatar
Julien Furrer committed
62
            {% endblock navbar_right_content %}
M. Chardon's avatar
M. Chardon committed
63
64
          </ul>
          {%  endblock navbar_content %}
Julien Furrer's avatar
Julien Furrer committed
65
        </div>
M. Chardon's avatar
M. Chardon committed
66
67
    </nav>

Julien Furrer's avatar
Julien Furrer committed
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
    {% endblock main_navbar %}
{% endblock main_header %}


{% block main_content %}{% endblock main_content%}

{% block main_container %}
<div class="container" id="main"></div>
{% endblock %}

{% block modals %}{% endblock %}

{% block js_templates %}{% endblock %}

{% block inline_script %}
<script>
    window.LANG = '{{ LANGUAGE_CODE }}';
</script>
{%  endblock %}

{% block content_js %}{% endblock %}

90
{% block post_js %}{% endblock %}
Julien Furrer's avatar
Julien Furrer committed
91

92
{#{% block requirejs_bootstrap %}{% endblock %}#}
Julien Furrer's avatar
Julien Furrer committed
93
94
95
96

{% endblock page_body %}</body>
</html>