base.html 1.49 KB
Newer Older
1
{% load staticfiles %}
Skia's avatar
Skia committed
2
3
4
<!DOCTYPE html>
<html lang="fr">
<head>
5
    {% block head %}
Skia's avatar
Skia committed
6
    <title>{% block title %}Bienvenue sur le Sith de l'AE!{% endblock %}</title>
7
8
    <link rel="stylesheet" href="{% static 'core/style.css' %}">
    <script src="{% static 'core/script.js' %}"></script>
9
    <script src="http://code.jquery.com/jquery-2.2.0.min.js"></script>
10
    {% endblock %}
Skia's avatar
Skia committed
11
12
13
14
15
</head>

<body>
    <header>
        {% block header %}
Skia's avatar
Skia committed
16
        {% if user.is_authenticated %}Hello, {{ user.username }}!{% endif %}
Skia's avatar
Skia committed
17
        <ul>
18
            {% if not user.is_authenticated %}
Skia's avatar
Skia committed
19
            <li><a href="{% url 'core:register' %}">Register</a></li>
Skia's avatar
Skia committed
20
            <li><a href="{% url 'core:login' %}">Login</a></li>
21
            {% else %}
Skia's avatar
Skia committed
22
            <li><a href="{% url 'core:logout' %}">Logout</a></li>
23
24
25
26
27
            {% endif %}
        </ul>
        {% if user.is_authenticated %}
        <ul>
            <li><a href="{% url 'core:user_profile' user.id %}">Profile</a></li>
Skia's avatar
Skia committed
28
            <li><a href="{% url 'core:user_list' %}">Users</a></li>
Skia's avatar
Skia committed
29
            <li><a href="{% url 'core:page_list' %}">Pages</a></li>
Skia's avatar
Skia committed
30
        </ul>
31
        {% endif %}
Skia's avatar
Skia committed
32
33
34
35
        {% endblock %}
    </header>

    <div id="content">
Skia's avatar
Skia committed
36
37
38
        {% if error %}
            {{ error }}
        {% endif %}
Skia's avatar
Skia committed
39
40
41
42
43
44
45
46
        {% block content %}{% endblock %}
    </div>

    <footer>
        {% block footer %}
        Site réalisé par des gens biens
        {% endblock %}
    </footer>
Skia's avatar
Skia committed
47
48
49
50
51
    <!--
    {% block tests %}
        {{ tests }}
    {% endblock %}
    -->
Skia's avatar
Skia committed
52
53
</body>
</html>