Gitlab CSE Unil

base.html 3.65 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>
M. Chardon's avatar
M. Chardon committed
24
25
26
        {% if debug %}
            <span style="color:red;font-weight: bold;font-size: large;"><i class="fa fa-exclamation-triangle"></i> ENVIRONNEMENT DE TEST </span>
        {% endif %}
M. Chardon's avatar
M. Chardon committed
27
28
29
30
31
32
33
34
    {%  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 %}
          <ul class="nav navbar-nav ml-auto">
Julien Furrer's avatar
Julien Furrer committed
35
36
            {% block navbar_right_content %}
                {% if user.is_authenticated %}
M. Chardon's avatar
M. Chardon committed
37
38
39
40
41
42
43
44
45
46
            <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
47
                {% endif %}
M. Chardon's avatar
M. Chardon committed
48
49
50
51
52
53
54
55
56
57
58
59
60
                <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
61
            {% endblock navbar_right_content %}
M. Chardon's avatar
M. Chardon committed
62
63
          </ul>
          {%  endblock navbar_content %}
Julien Furrer's avatar
Julien Furrer committed
64
        </div>
M. Chardon's avatar
M. Chardon committed
65
66
    </nav>

Julien Furrer's avatar
Julien Furrer committed
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
    {% 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 %}

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

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

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