Gitlab CSE Unil

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

M. Chardon's avatar
M. Chardon committed
11
12
13
14
    {#    <link rel="stylesheet" type="text/css" media="all" href="{% static "css/adim.css" %}" />#}
    {#    <link rel="stylesheet" type="text/css" media="all" href="{% static "_src/less/adim.css" %}" />#}
    <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
15
16
17
    {% block page_head %}{% endblock %}
</head>

M. Chardon's avatar
M. Chardon committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<body class="{% if user.is_anonymous %}anonymous{% else %}authenticated{% endif %}
        {% block body_class %}{% endblock %}">{% block page_body %}
    {% block overlay %}{% endblock %}
    {% block main_header %}
        {% block main_navbar %}
            <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>
                        {% if adim_prod == false %}
                            <span style="color:red;font-weight: bold;font-size: large;">
                                <i class="fa fa-exclamation-triangle"></i> ENVIRONNEMENT DE TEST&nbsp;
                            </span>
                        {% endif %}
                    {% 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 %}
                        <div class="navbar-text navbar-separator ml-auto">&nbsp;</div>
                        <ul class="nav navbar-nav">
                            {% block navbar_right_content %}
                                {% if user.is_authenticated %}
                                    <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>
                                            {% endif %}
                                            <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-->
                            {% endblock navbar_right_content %}
                        </ul>
                    {% endblock navbar_content %}
                </div>
            </nav>
M. Chardon's avatar
M. Chardon committed
82

M. Chardon's avatar
M. Chardon committed
83
84
        {% endblock main_navbar %}
    {% endblock main_header %}
Julien Furrer's avatar
Julien Furrer committed
85
86


M. Chardon's avatar
M. Chardon committed
87
    {% block main_content %}{% endblock main_content %}
Julien Furrer's avatar
Julien Furrer committed
88

M. Chardon's avatar
M. Chardon committed
89
90
91
    {% block main_container %}
        <div class="container" id="main"></div>
    {% endblock %}
Julien Furrer's avatar
Julien Furrer committed
92

M. Chardon's avatar
M. Chardon committed
93
    {% block modals %}{% endblock %}
Julien Furrer's avatar
Julien Furrer committed
94

M. Chardon's avatar
M. Chardon committed
95
    {% block js_templates %}{% endblock %}
Julien Furrer's avatar
Julien Furrer committed
96

M. Chardon's avatar
M. Chardon committed
97
98
99
100
101
    {% block inline_script %}
        <script>
            window.LANG = '{{ LANGUAGE_CODE }}';
        </script>
    {% endblock %}
Julien Furrer's avatar
Julien Furrer committed
102

M. Chardon's avatar
M. Chardon committed
103
    {% block content_js %}{% endblock %}
Julien Furrer's avatar
Julien Furrer committed
104

M. Chardon's avatar
M. Chardon committed
105
    {% block post_js %}{% endblock %}
Julien Furrer's avatar
Julien Furrer committed
106

M. Chardon's avatar
M. Chardon committed
107
    {#{% block requirejs_bootstrap %}{% endblock %}#}
Julien Furrer's avatar
Julien Furrer committed
108
109
110
111

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