8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 09:26:27 +00:00
re2o/templates/base.html

121 lines
6 KiB
HTML
Raw Normal View History

2016-06-30 23:46:14 +00:00
{% 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 %}
2016-07-19 18:52:39 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1">
2016-07-20 10:18:37 +00:00
<title>{{ site_name }} : {% block title %}Accueil{% endblock %}</title>
2016-06-30 23:46:14 +00:00
</head>
<body>
2016-07-09 15:16:44 +00:00
<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>
2016-07-20 10:18:37 +00:00
<a class="navbar-brand" href="/">{{ site_name }}</a>
2016-07-09 15:16:44 +00:00
</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 %}
2016-07-09 15:16:44 +00:00
<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>
2016-10-31 16:27:27 +00:00
<li><a href="{% url "logs:index" %}">Statistiques</a></li>
{% endif %}
2016-07-09 15:16:44 +00:00
</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>
2016-06-30 23:46:14 +00:00
</div>
2016-07-09 15:16:44 +00:00
</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>
2016-06-30 23:46:14 +00:00
</div>
</div>
2016-07-09 15:16:44 +00:00
</nav>
2016-06-30 23:46:14 +00:00
2016-07-09 15:16:44 +00:00
<div id="main" class="container-fluid text-center">
<div class="row content">
<div class="col-sm-2 sidenav">
{% block sidebar %}
{% endblock %}
</div>
<div class="col-sm-8 text-left">
{# Display django.contrib.messages as Bootstrap alerts #}
{% bootstrap_messages %}
2016-06-30 23:46:14 +00:00
2016-07-09 15:16:44 +00:00
<hr>
2016-06-30 23:46:14 +00:00
2016-07-09 15:16:44 +00:00
{% block content %}{% endblock %}
2016-06-30 23:46:14 +00:00
</div>
2016-07-09 15:16:44 +00:00
<div class="col-sm-2 sidenav">
<div class="well">
2016-07-10 02:14:47 +00:00
{% if request_user.is_authenticated %}
<li>{{ request_user.name }} {{ request_user.surname }}</li>
<li>Pseudo : {{ request_user.pseudo }}</li>
<li>Chambre : {{ request_user.room }}</li>
2016-07-11 21:19:01 +00:00
<li>Connexion : {% if request_user.has_access == True %}<font color="green">Active</font>{% else %}<font color="red">Désactivée</font>{% endif %}</li>
2016-07-10 02:23:42 +00:00
<li>Fin d'adhésion : {% if request_user.end_adhesion != None %}<font color="green">{{ request_user.end_adhesion }}</font>{% else %}<font color="red">Non adhérent</font>{% endif %}</li>
2016-07-19 09:10:32 +00:00
<p><a class="btn btn-success btn-sm" role="button"href="{% url "users:mon-profil" %}">Voir mon profil</a></p>
{% else %}
<p>Vous n'êtes pas authentifié</p>
{% endif %}
2016-07-09 15:16:44 +00:00
</div>
2016-07-10 16:29:40 +00:00
{% if request_user.is_authenticated %}
2016-07-09 15:16:44 +00:00
<div class="well">
2016-07-10 16:29:40 +00:00
{{ interfaces|length }} machines actives
{% for interface in interfaces|slice:":5" %}
<li>{{interface.dns}}</li>
{% endfor %}
2016-07-19 09:10:32 +00:00
<p><a class="btn btn-warning btn-sm" role="button" href="{% url "users:mon-profil" %}">Voir mes machines</a></p>
2016-07-09 15:16:44 +00:00
</div>
2016-07-10 16:29:40 +00:00
{% endif %}
2016-06-30 23:46:14 +00:00
</div>
</div>
</div>
</div>
2016-07-09 15:16:44 +00:00
<footer class="navbar">
<div class="containerfluid text-center">
2016-07-09 15:16:44 +00:00
<p>Re2o 2016 - Goulven Kermarec, Gabriel Détraz, Augustin Lemesle</p>
</div>
2016-06-30 23:46:14 +00:00
</footer>
{# Read the documentation for more information #}
</body>
</html>