{% load staticfiles %} {# Load the tag library #} {% load bootstrap3 %} <!DOCTYPE html> <html lang="fr"> <head> {# Load CSS and JavaScript #} {% bootstrap_css %} {% bootstrap_javascript %} <link rel="stylesheet" href="{% static "/static/css/base.css" %}"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>{{ site_name }} : {% block title %}Accueil{% endblock %}</title> </head> <body> <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="/">{{ site_name }}</a> </div> <div class="collapse navbar-collapse" id="myNavbar"> <ul class="nav navbar-nav"> <li><a href="{% url "users:mon-profil" %}">Mon profil</a></li> {% if is_cableur %} <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="{% url "logs:index" %}">Statistiques</a></li> {% endif %} </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> </div> </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> </div> </div> </nav> <div id="main" class="container-fluid text-center"> <div class="row content"> <div class="col-sm-2 sidenav"> <div class="panel panel-default"> <div class="text-left list-group"> {% block sidebar %} {% endblock %} </div> </div> </div> <div class="col-sm-8 text-left"> {# Display django.contrib.messages as Bootstrap alerts #} {% bootstrap_messages %} <hr> {% block content %}{% endblock %} </div> <div class="col-sm-2 sidenav"> <div class="panel panel-default"> {% if request_user.is_authenticated %} <div class="panel-heading"> <h4>{{ request_user.name }} {{ request_user.surname }}</h4> </div> <table class="table"> <tr> <th scope="row">Pseudo</th> <td class="text-right">{{ request_user.pseudo }}</td> </tr> <tr> <th scope="row">Chambre</th> <td class="text-right">{{ request_user.room }}</td> </tr> <tr> <th scope="row">Connexion</th> <td class="text-right"> {% if request_user.has_access %} <font color="green">Active</font> {% else %} <font color="red">Désactivée</font> {% endif %} </td> </tr> <tr> <th scope="row">Adhésion</th> <td class="text-right"> {% if request_user.end_adhesion != None %} <font color="green">{{ request_user.end_adhesion }}</font> {% else %} <font color="red">Non adhérent</font> {% endif %} </td> </tr> </table> <div class="list-group"> <a class="list-group-item list-group-item-info" role="button"href="{% url "users:mon-profil" %}"> <i class="glyphicon glyphicon-user"></i> Voir mon profil </a> </div> {% else %} <p>Vous n'êtes pas authentifié</p> {% endif %} </div> {% if request_user.is_authenticated %} <div class="panel panel-default"> <div class="panel-heading"> <h4>{{ interfaces|length }} machines actives</h4> </div> <ul class="list-group"> {% for interface in interfaces|slice:":5" %} <div class="list-group-item">{{interface.dns}}</div> {% endfor %} {% if interfaces|length > 5 %} <a class="list-group-item list-group-item-info" role="button" href="{% url "users:mon-profil" %}"> <i class="glyphicon glyphicon-plus"></i> Voir mes machines </a> {% endif %} </ul> </div> {% endif %} </div> </div> </div> </div> <footer class="navbar"> <div class="containerfluid text-center"> <p>Re2o 2016 - Gabriel Détraz, <a href="https://gitlab.rezometz.org/lhark">Goulven Kermarec</a>, Augustin Lemesle</p> </div> </footer> {# Read the documentation for more information #} </body> </html>