Gitlab CSE Unil

base.html 3.01 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
12
{#    <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/less/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
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{%  block overlay %}{% endblock %}
{% block main_header %}
    {%  block main_navbar %}
    <div class="navbar navbar-inverse navbar-static-top" id="main-navbar">
        <div class="container-fluid">

            <div class="navbar-header">
            {%  block navbar_brand %}
                <a class="navbar-brand" href="{% url "adim.app:home" %}">ADIM</a>
            {%  endblock %}
            </div>

            {%  block navbar_content %}
            <ul class="nav navbar-nav navbar-right">
            {% block navbar_right_content %}
                {% if user.is_authenticated %}
                <li>
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <span class="glyphicon glyphicon-user"></span>
                         <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu" role="menu">
Julien Furrer's avatar
Julien Furrer committed
39
                        <li class="dropdown-header"><span class="glyphicon glyphicon-user"></span> {{ user.username|default:user.email }}</li>
Julien Furrer's avatar
Julien Furrer committed
40
                        <li class="divider"></li>
Julien Furrer's avatar
Julien Furrer committed
41
42
43
                    {% if user.is_staff %}
                        <li><a href="{% url "admin:index" %}"><span class="glyphicon glyphicon-cog"></span> Administration</a></li>
                    {% endif %}
44
                        <li><a id="adim-logout-but" href="{% url "logout" %}"><span class="glyphicon glyphicon-log-out"></span> Déconnexion</a></li>
Julien Furrer's avatar
Julien Furrer committed
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
                    </ul>
                </li>
                {% endif %}
            {% endblock navbar_right_content %}
            </ul>
            {%  endblock navbar_content %}

        </div>
    </div>
    {% 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 %}

76
{% block post_js %}{% endblock %}
Julien Furrer's avatar
Julien Furrer committed
77

78
{#{% block requirejs_bootstrap %}{% endblock %}#}
Julien Furrer's avatar
Julien Furrer committed
79
80
81
82

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