2017-01-15 23:07:42 +00:00
|
|
|
{% comment %}
|
|
|
|
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
|
|
|
se veut agnostique au réseau considéré, de manière à être installable en
|
|
|
|
quelques clics.
|
|
|
|
|
|
|
|
Copyright © 2017 Goulven Kermarec
|
|
|
|
Copyright © 2017 Augustin Lemesle
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along
|
|
|
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
{% endcomment %}
|
|
|
|
|
2016-06-30 23:46:14 +00:00
|
|
|
{% load staticfiles %}
|
|
|
|
|
|
|
|
{# Load the tag library #}
|
|
|
|
{% load bootstrap3 %}
|
2017-12-28 15:00:37 +00:00
|
|
|
{% load acl %}
|
2018-01-14 22:47:44 +00:00
|
|
|
{% load self_adhesion %}
|
|
|
|
{% self_adhesion as var_sa %}
|
2016-06-30 23:46:14 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="fr">
|
2017-12-11 23:15:54 +00:00
|
|
|
<head prefix="og: http://ogp.me/ns#">
|
2017-12-09 02:16:31 +00:00
|
|
|
<meta property="og:title" content="Re2o" />
|
|
|
|
<meta property="og:type" content="website" />
|
2018-02-23 20:56:56 +00:00
|
|
|
<meta property="og:url" content="\\{{request.get_host}}" />
|
|
|
|
<meta property="og:image" content="\\{{request.get_host}}/static/logo/re2o.png"/>
|
2017-12-20 18:15:18 +00:00
|
|
|
<meta property="og:description" content="Site de gestion de réseau supporté par FedeRez." />
|
2018-03-06 15:38:47 +00:00
|
|
|
<script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script>
|
2016-06-30 23:46:14 +00:00
|
|
|
{# Load CSS and JavaScript #}
|
|
|
|
{% bootstrap_css %}
|
2017-10-05 20:51:06 +00:00
|
|
|
<link href="/static/css/typeaheadjs.css" rel="stylesheet">
|
2017-10-14 18:32:17 +00:00
|
|
|
<link href="/static/css/bootstrap-tokenfield.css" rel="stylesheet">
|
|
|
|
{% comment %}<link href="/static/css/jquery-ui.css" rel="stylesheet">{% endcomment %}
|
2016-06-30 23:46:14 +00:00
|
|
|
|
|
|
|
{% bootstrap_javascript %}
|
2017-10-10 18:28:21 +00:00
|
|
|
<script src="/static/js/typeahead/typeahead.js"></script>
|
|
|
|
<script src="/static/js/handlebars/handlebars.js"></script>
|
|
|
|
<script src="/static/js/konami/konami.js"></script>
|
|
|
|
<script src="/static/js/sapphire.js"> var s=Sapphire(); Konami(s.activate); </script>
|
2017-10-14 18:32:17 +00:00
|
|
|
<script src="/static/js/bootstrap-tokenfield/bootstrap-tokenfield.js"></script>
|
|
|
|
{% comment %}<script src="/static/js/jquery-ui.js"></script>{% endcomment %}
|
2016-12-14 02:35:34 +00:00
|
|
|
<link rel="stylesheet" href="{% static "/css/base.css" %}">
|
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">
|
2018-03-07 10:45:03 +00:00
|
|
|
{% if request.user.is_authenticated %}
|
2018-03-06 16:04:57 +00:00
|
|
|
<li class="dropdown">
|
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user-circle"></i> {{request.user.pseudo|slice:":15"}} <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a href="{% url "users:mon-profil" %}"><i class="fa fa-user"></i> Mon profil</a></li>
|
|
|
|
<li><a href="{% url 'logout' %}"><i class="fa fa-sign-out-alt"></i> Se déconnecter</a></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
2018-03-07 10:45:03 +00:00
|
|
|
{% endif %}
|
2018-03-06 15:38:47 +00:00
|
|
|
{% can_view_any_app users machines cotisations %}
|
|
|
|
<li class="dropdown">
|
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-users"></i> Adhérents<span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
{% can_view_app users %}
|
2018-03-07 10:45:03 +00:00
|
|
|
<li><a href="{% url 'users:index' %}"><i class="fa fa-users"></i> Gérer les adhérents</a></li>
|
2018-03-06 15:38:47 +00:00
|
|
|
{% acl_end %}
|
|
|
|
{% can_view_app machines %}
|
2018-03-07 10:45:03 +00:00
|
|
|
<li><a href="{% url 'machines:index' %}"><i class="fa fa-desktop"></i> Gérer les machines</a></li>
|
2018-03-06 15:38:47 +00:00
|
|
|
{% acl_end %}
|
|
|
|
{% can_view_app cotisations %}
|
2018-03-07 10:45:03 +00:00
|
|
|
<li><a href="{% url 'cotisations:index' %}"><i class="fa fa-dollar-sign"></i> Gérer les cotisations</a></li>
|
2018-03-06 15:38:47 +00:00
|
|
|
{% acl_end %}
|
|
|
|
</ul>
|
|
|
|
</li>
|
2017-12-28 15:00:37 +00:00
|
|
|
{% acl_end %}
|
|
|
|
{% can_view_app topologie %}
|
2018-03-06 15:38:47 +00:00
|
|
|
<li><a href="{% url "topologie:index" %}"><i class="fa fa-sitemap"></i> Topologie</a></li>
|
2017-12-28 15:00:37 +00:00
|
|
|
{% acl_end %}
|
|
|
|
{% can_view_app logs %}
|
2018-03-06 15:38:47 +00:00
|
|
|
<li><a href="{% url "logs:index" %}"><i class="fa fa-chart-area"></i> Statistiques</a></li>
|
2017-12-28 15:00:37 +00:00
|
|
|
{% acl_end %}
|
2016-07-09 15:16:44 +00:00
|
|
|
</ul>
|
|
|
|
<div class="col-sm-3 col-md-3 navbar-right">
|
2017-11-01 16:01:10 +00:00
|
|
|
<form action="{% url "search:search"%}" class="navbar-form" role="search">
|
2016-07-09 15:16:44 +00:00
|
|
|
<div class="input-group">
|
2017-11-02 00:35:22 +00:00
|
|
|
<input type="text" class="form-control" placeholder="Search" name="q" id="search-term" {% if search_term %}value="{{ search_term }}"{% endif %}>
|
2016-07-09 15:16:44 +00:00
|
|
|
<div class="input-group-btn">
|
2018-03-06 15:38:47 +00:00
|
|
|
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
|
|
|
|
<a href="{% url "search:searchp" %}" class="btn btn-default" role="button"><i class="fa fa-plus"></i></a>
|
2016-07-09 15:16:44 +00:00
|
|
|
</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">
|
2018-03-06 16:04:57 +00:00
|
|
|
{% if not request.user.is_authenticated %}
|
2018-01-14 22:47:44 +00:00
|
|
|
{% if var_sa %}
|
|
|
|
<li>
|
|
|
|
<a href="{% url 'users:new-user' %}">
|
2018-03-06 15:38:47 +00:00
|
|
|
<i class="fa fa-user-plus"></i> Créer un compte
|
2018-01-14 22:47:44 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
<li>
|
2016-07-09 15:16:44 +00:00
|
|
|
<a href="{% url 'login' %}">
|
2018-03-06 15:38:47 +00:00
|
|
|
<i class="fa fa-sign-in-alt"></i> Login
|
2016-07-09 15:16:44 +00:00
|
|
|
</a>
|
2018-01-14 22:47:44 +00:00
|
|
|
</li>
|
2016-07-09 15:16:44 +00:00
|
|
|
{% endif %}
|
2017-12-28 15:00:37 +00:00
|
|
|
</ul>
|
|
|
|
{% can_view_app preferences %}
|
2017-06-25 22:50:55 +00:00
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
|
|
<li>
|
|
|
|
<a href="{% url 'preferences:display-options' %}">
|
2018-03-06 15:38:47 +00:00
|
|
|
<i class="fa fa-cogs"></i> Preferences
|
2017-06-25 22:50:55 +00:00
|
|
|
</a>
|
2017-12-12 23:36:29 +00:00
|
|
|
</li>
|
2018-03-06 16:04:57 +00:00
|
|
|
<li>
|
|
|
|
<a href="{% url 'about' %}"><i class="fa fa-info-circle"></i> A propos</a>
|
|
|
|
</li>
|
2017-12-12 23:36:29 +00:00
|
|
|
</ul>
|
2017-12-28 15:00:37 +00:00
|
|
|
{% acl_end %}
|
2017-12-12 23:36:29 +00:00
|
|
|
</div>
|
2016-06-30 23:46:14 +00:00
|
|
|
</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">
|
2016-11-18 10:53:10 +00:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="text-left list-group">
|
|
|
|
{% block sidebar %}
|
|
|
|
{% endblock %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-07-09 15:16:44 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-sm-8 text-left">
|
|
|
|
{# Display django.contrib.messages as Bootstrap alerts #}
|
|
|
|
{% bootstrap_messages %}
|
|
|
|
<hr>
|
|
|
|
{% 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">
|
2016-11-18 06:13:39 +00:00
|
|
|
<div class="panel panel-default">
|
2016-07-10 02:14:47 +00:00
|
|
|
{% if request_user.is_authenticated %}
|
2016-11-18 06:13:39 +00:00
|
|
|
<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 %}
|
2017-12-19 01:58:11 +00:00
|
|
|
<i class="text-success">jusqu'au {{ request.user.end_access|date:"d b Y" }}</i>
|
2016-11-18 06:13:39 +00:00
|
|
|
{% else %}
|
2017-12-19 01:58:11 +00:00
|
|
|
<i class="text-danger">Désactivée</i>
|
2016-11-18 06:13:39 +00:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th scope="row">Adhésion</th>
|
|
|
|
<td class="text-right">
|
2017-10-30 19:29:29 +00:00
|
|
|
{% if request_user.is_adherent %}
|
2017-11-14 14:48:17 +00:00
|
|
|
<i class="text-success">jusqu'au {{ request_user.end_adhesion|date:"d b Y" }}</i>
|
2016-11-18 06:13:39 +00:00
|
|
|
{% else %}
|
2017-11-14 14:48:17 +00:00
|
|
|
<i class="text-danger">Non adhérent</i>
|
2016-11-18 06:13:39 +00:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<div class="list-group">
|
|
|
|
<a class="list-group-item list-group-item-info" role="button"href="{% url "users:mon-profil" %}">
|
2018-03-06 15:38:47 +00:00
|
|
|
<i class="fa fa-user-circle"></i>
|
2016-11-18 06:13:39 +00:00
|
|
|
Voir mon profil
|
|
|
|
</a>
|
|
|
|
</div>
|
2016-07-10 02:02:48 +00:00
|
|
|
{% 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-11-18 06:13:39 +00:00
|
|
|
<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" %}
|
2016-12-24 19:20:25 +00:00
|
|
|
<div class="list-group-item">{{interface}}</div>
|
2016-11-18 06:13:39 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% if interfaces|length > 5 %}
|
|
|
|
<a class="list-group-item list-group-item-info" role="button" href="{% url "users:mon-profil" %}">
|
2018-03-07 10:45:03 +00:00
|
|
|
<i class="fa fa-plus"></i>
|
2016-11-18 06:13:39 +00:00
|
|
|
Voir mes machines
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</ul>
|
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">
|
2016-07-01 01:26:24 +00:00
|
|
|
<div class="containerfluid text-center">
|
2018-02-23 20:56:56 +00:00
|
|
|
<p> <a href="\\{{request.get_host}}/about/">Re2o 2016-2018</a> - Gabriel Détraz, <a href="https://gitlab.rezometz.org/lhark">Goulven Kermarec</a>, Augustin Lemesle, Maël Kervella, Hugo Levy-Falk</p>
|
2016-07-01 01:26:24 +00:00
|
|
|
</div>
|
2016-06-30 23:46:14 +00:00
|
|
|
</footer>
|
|
|
|
{# Read the documentation for more information #}
|
|
|
|
</body>
|
|
|
|
</html>
|