base.html 5.51 KB
Newer Older
lhark's avatar
lhark committed
1 2 3 4 5 6 7 8 9 10 11 12 13
{% load staticfiles %}

{# Load the tag library #}
{% load bootstrap3 %}

<!DOCTYPE html>
<html lang="fr">
    <head>
        {# Load CSS and JavaScript #}
        {% bootstrap_css %}
        <link rel="stylesheet" href="{% static "/static/css/base.css" %}">

        {% bootstrap_javascript %}
14
        <title>Re2o : {% block title %}Accueil{% endblock %}</title>
lhark's avatar
lhark committed
15 16 17
    </head>

    <body>
chirac's avatar
chirac committed
18 19 20 21 22 23 24 25 26 27 28 29 30
        <div id="wrap">
            <nav class="navbar navbar-inverse">
                <div class="container-fluid">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a class="navbar-brand" href="/">Re2o</a>
                    </div>
                    <div class="collapse navbar-collapse" id="myNavbar">
                        <ul class="nav navbar-nav">
31 32
                            <li><a href="{% url "users:mon-profil" %}">Mon profil</a></li>
                            {% if is_cableur %}
chirac's avatar
chirac committed
33 34 35 36 37
                            <li><a href="{% url "users:index" %}">Adhérents</a></li>
                            <li><a href="{% url "machines:index" %}">Machines</a></li>
                            <li><a href="{% url "cotisations:index" %}">Cotisations</a></li>
                            <li><a href="{% url "topologie:index" %}">Topologie</a></li>
                            <li><a href="#">Statistiques</a></li>
38
                            {% endif %}
chirac's avatar
chirac committed
39 40 41 42 43 44 45 46 47 48
                        </ul>
                        <div class="col-sm-3 col-md-3 navbar-right">
                            <form action="{% url "search:search"%}"  method="POST" class="navbar-form" role="search">
                                {% csrf_token %}
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="Search" name="search_field" id="search-term">
                                    <div class="input-group-btn">
                                        <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
                                        <a href="{% url "search:searchp" %}" class="btn btn-default" role="button"><i class="glyphicon glyphicon-plus"></i></a>
                                    </div>
lhark's avatar
lhark committed
49
                                </div>
chirac's avatar
chirac committed
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
                            </form>
                        </div>
                        <ul class="nav navbar-nav navbar-right">
                            <li>
                                {% if request.user.is_authenticated %}
                                <a href="{% url 'logout' %}">
                                    <span class="glyphicon glyphicon-log-out"></span> Logout
                                </a>
                                {% else %}
                                <a href="{% url 'login' %}">
                                    <span class="glyphicon glyphicon-log-in"></span> Login
                                </a>
                                {% endif %}
                            </li>
                        </ul>
lhark's avatar
lhark committed
65 66
                    </div>
                </div>
chirac's avatar
chirac committed
67
            </nav>
lhark's avatar
lhark committed
68

chirac's avatar
chirac committed
69 70 71 72 73 74 75 76 77 78 79 80
            <div id="main" class="container-fluid text-center">
                <div class="row content">
                    <div class="col-sm-2 sidenav">
                        {% block sidebar %}
                        <p><a href="#">Link</a></p>
                        <p><a href="#">Link</a></p>
                        <p><a href="#">Link</a></p>
                        {% endblock %}
                    </div>
                    <div class="col-sm-8 text-left">
                        {# Display django.contrib.messages as Bootstrap alerts #}
                        {% bootstrap_messages %}
lhark's avatar
lhark committed
81

chirac's avatar
chirac committed
82
                        <hr>
lhark's avatar
lhark committed
83

chirac's avatar
chirac committed
84
                        {% block content %}{% endblock %}
lhark's avatar
lhark committed
85
                    </div>
chirac's avatar
chirac committed
86 87
                    <div class="col-sm-2 sidenav">
                        <div class="well">
88 89 90 91 92 93 94 95 96 97
                            {% if user.is_authenticated %}
                            <li>{{ user.name }} {{ user.surname }}</li>
                            <li>Pseudo : {{ user.pseudo }}</li>
                            <li>Chambre : {{ user.room }}</li>
                            <li>Connexion : {% if user.actif == True %}<font color="green">Active</font>{% else %}<font color="red">Désactivée</font>{% endif %}</li>
                            <li>Fin d'adhésion : {% if user.end_adhesion != None %}<font color="green">{{ user.end_adhesion }}</font>{% else %}<font color="red">Non adhérent</font>{% endif %}</li>
                            <p><a href="{% url "users:mon-profil" %}">Voir mon profil</a></p>
                            {% else %}
                            <p>Vous n'êtes pas authentifié</p>
                            {% endif %}
chirac's avatar
chirac committed
98 99 100 101
                        </div>
                        <div class="well">
                            <p>ADS</p>
                        </div>
lhark's avatar
lhark committed
102 103 104 105 106
                    </div>
                </div>
            </div>
        </div>

chirac's avatar
chirac committed
107
        <footer class="navbar">
108
            <div class="containerfluid text-center">
chirac's avatar
chirac committed
109
                <p>Re2o 2016 - Goulven Kermarec, Gabriel Détraz, Augustin Lemesle</p>
110
            </div>
lhark's avatar
lhark committed
111 112 113 114 115 116
        </footer>


        {# Read the documentation for more information #}
    </body>
</html>