8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-24 16:03:47 +00:00

Merge branch 'navbar' into 'master'

Passage à fontawesome

See merge request federez/re2o!96
This commit is contained in:
klafyvel 2018-03-08 08:20:39 +01:00
commit 26e87451a1
57 changed files with 277 additions and 245 deletions

View file

@ -1,3 +1,3 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
contributeurs = ['Gabriel Detraz', 'chirac', 'Maël Kervella', 'LEVY-FALK Hugo', 'Dalahro', 'lhark', 'root', 'Chirac', 'Hugo LEVY-FALK', 'guimoz', 'Mael Kervella', 'klafyvel', 'matthieu', 'Yoann Pietri', 'Simon Brélivet', 'chibrac', 'David Sinquin', 'Pierre Cadart', 'moamoak', 'Éloi Alain', 'FERNET Laouen', 'Hugo Levy-Falk', 'Yoann PIETRI', 'B', 'Daniel STAN', 'Eloi Alain', 'Guimoz', 'Hugo Hervieux', 'Joanne Steiner', 'Laouen Fernet', 'Lemesle', 'MICHELET matthieu', 'Nymous', 'Thibault de BOUTRAY', 'Tipunchetrhum', 'Éloi ALAIN'] contributeurs = ['Gabriel Detraz', 'chirac', 'Maël Kervella', 'LEVY-FALK Hugo', 'Dalahro', 'lhark', 'root', 'Hugo LEVY-FALK', 'Chirac', 'guimoz', 'Mael Kervella', 'klafyvel', 'matthieu', 'Yoann Pietri', 'Simon Brélivet', 'chibrac', 'David Sinquin', 'Pierre Cadart', 'moamoak', 'Éloi Alain', 'FERNET Laouen', 'Hugo Levy-Falk', 'Joanne Steiner', 'Matthieu Michelet', 'Yoann PIETRI', 'B', 'Daniel STAN', 'Eloi Alain', 'Guimoz', 'Hugo Hervieux', 'Laouen Fernet', 'Lemesle', 'MICHELET matthieu', 'Nymous', 'Thibault de BOUTRAY', 'Tipunchetrhum', 'Éloi ALAIN']

View file

@ -45,11 +45,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td class="text-right"> <td class="text-right">
{% can_edit article %} {% can_edit article %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'cotisations:edit-article' article.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'cotisations:edit-article' article.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'cotisations:history' 'article' article.id %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'cotisations:history' 'article' article.id %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
</td> </td>
</tr> </tr>

View file

@ -37,11 +37,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td class="text-right"> <td class="text-right">
{% can_edit banque %} {% can_edit banque %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'cotisations:edit-banque' banque.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'cotisations:edit-banque' banque.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'cotisations:history' 'banque' banque.id %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'cotisations:history' 'banque' banque.id %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
</td> </td>
</tr> </tr>

View file

@ -57,21 +57,21 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</button> </button>
<ul class="dropdown-menu" aria-labelledby="editionfacture"> <ul class="dropdown-menu" aria-labelledby="editionfacture">
{% can_edit facture %} {% can_edit facture %}
<li><a href="{% url 'cotisations:edit-facture' facture.id %}"><i class="glyphicon glyphicon-bitcoin"></i> Modifier</a></li> <li><a href="{% url 'cotisations:edit-facture' facture.id %}"><i class="fa fa-dollar-sign"></i> Modifier</a></li>
{% acl_else %} {% acl_else %}
<li>Facture controlée</li> <li>Facture controlée</li>
{% acl_end %} {% acl_end %}
{% can_delete facture %} {% can_delete facture %}
<li><a href="{% url 'cotisations:del-facture' facture.id %}"><i class="glyphicon glyphicon-trash"></i> Supprimer</a></li> <li><a href="{% url 'cotisations:del-facture' facture.id %}"><i class="fa fa-trash"></i> Supprimer</a></li>
{% acl_end %} {% acl_end %}
<li><a href="{% url 'cotisations:history' 'facture' facture.id %}"><i class="glyphicon glyphicon-time"></i> Historique</a></li> <li><a href="{% url 'cotisations:history' 'facture' facture.id %}"><i class="fa fa-history"></i> Historique</a></li>
</ul> </ul>
</div> </div>
</td> </td>
<td> <td>
{% if facture.valid %} {% if facture.valid %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:facture-pdf' facture.id %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:facture-pdf' facture.id %}">
<i class="glyphicon glyphicon-save"></i> <i class="fa fa-file-pdf"></i>
PDF PDF
</a> </a>
{% else %} {% else %}

View file

@ -37,11 +37,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td class="text-right"> <td class="text-right">
{% can_edit paiement %} {% can_edit paiement %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'cotisations:edit-paiement' paiement.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'cotisations:edit-paiement' paiement.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'cotisations:history' 'paiement' paiement.id %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'cotisations:history' 'paiement' paiement.id %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
</td> </td>
</tr> </tr>

View file

@ -56,7 +56,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% bootstrap_form_errors form %} {% bootstrap_form_errors form %}
<tr> <tr>
<td><a href="{% url "users:profil" form.instance.user.id%}" class="btn btn-primary btn-sm" role="button"><i class="glyphicon glyphicon-user"></i></a> <td><a href="{% url "users:profil" form.instance.user.id%}" class="btn btn-primary btn-sm" role="button"><i class="fa fa-user"></i></a>
</td> </td>
<td>{{ form.instance.user.name }}</td> <td>{{ form.instance.user.name }}</td>
<td>{{ form.instance.user.surname }}</td> <td>{{ form.instance.user.surname }}</td>

View file

@ -31,9 +31,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des types d'articles</h2> <h2>Liste des types d'articles</h2>
{% can_create Article %} {% can_create Article %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:add-article' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un type d'articles</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:add-article' %}"><i class="fa fa-cart-plus"></i> Ajouter un type d'articles</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-article' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs types d'articles</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-article' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types d'articles</a>
{% include "cotisations/aff_article.html" with article_list=article_list %} {% include "cotisations/aff_article.html" with article_list=article_list %}
<br /> <br />
<br /> <br />

View file

@ -31,9 +31,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des banques</h2> <h2>Liste des banques</h2>
{% can_create Banque %} {% can_create Banque %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:add-banque' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter une banque</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:add-banque' %}"><i class="fa fa-cart-plus"></i> Ajouter une banque</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-banque' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer une ou plusieurs banques</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-banque' %}"><i class="fa fa-trash"></i> Supprimer une ou plusieurs banques</a>
{% include "cotisations/aff_banque.html" with banque_list=banque_list %} {% include "cotisations/aff_banque.html" with banque_list=banque_list %}
<br /> <br />
<br /> <br />

View file

@ -31,9 +31,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des types de paiements</h2> <h2>Liste des types de paiements</h2>
{% can_create Paiement %} {% can_create Paiement %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:add-paiement' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un type de paiement</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:add-paiement' %}"><i class="fa fa-cart-plus"></i> Ajouter un type de paiement</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-paiement' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs types de paiements</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:del-paiement' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types de paiements</a>
{% include "cotisations/aff_paiement.html" with paiement_list=paiement_list %} {% include "cotisations/aff_paiement.html" with paiement_list=paiement_list %}
<br /> <br />
<br /> <br />

View file

@ -49,7 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
&nbsp; &nbsp;
<button class="btn btn-danger btn-sm" <button class="btn btn-danger btn-sm"
id="id_form-0-article-remove" type="button"> id="id_form-0-article-remove" type="button">
<span class="glyphicon glyphicon-remove"></span> <span class="fa fa-times"></span>
</button> </button>
</div> </div>
{% endfor %} {% endfor %}
@ -73,7 +73,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
&nbsp; &nbsp;
<button class="btn btn-danger btn-sm" <button class="btn btn-danger btn-sm"
id="id_form-__prefix__-article-remove" type="button"> id="id_form-__prefix__-article-remove" type="button">
<span class="glyphicon glyphicon-remove"></span> <span class="fa fa-times"></span>
</button>` </button>`
function add_article(){ function add_article(){

View file

@ -46,7 +46,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
&nbsp; &nbsp;
<button class="btn btn-danger btn-sm" <button class="btn btn-danger btn-sm"
id="id_form-0-article-remove" type="button"> id="id_form-0-article-remove" type="button">
<span class="glyphicon glyphicon-remove"></span> <span class="fa fa-times"></span>
</button> </button>
</div> </div>
{% endfor %} {% endfor %}
@ -70,7 +70,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
&nbsp; &nbsp;
<button class="btn btn-danger btn-sm" <button class="btn btn-danger btn-sm"
id="id_form-__prefix__-article-remove" type="button"> id="id_form-__prefix__-article-remove" type="button">
<span class="glyphicon glyphicon-remove"></span> <span class="fa fa-times"></span>
</button>` </button>`
function add_article(){ function add_article(){

View file

@ -28,35 +28,35 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block sidebar %} {% block sidebar %}
{% can_change Facture pdf %} {% can_change Facture pdf %}
<a class="list-group-item list-group-item-success" href="{% url "cotisations:new-facture-pdf" %}"> <a class="list-group-item list-group-item-success" href="{% url "cotisations:new-facture-pdf" %}">
<i class="glyphicon glyphicon-plus"></i> <i class="fa fa-plus"></i>
Créer une facture Créer une facture
</a> </a>
<a class="list-group-item list-group-item-warning" href="{% url "cotisations:control" %}"> <a class="list-group-item list-group-item-warning" href="{% url "cotisations:control" %}">
<i class="glyphicon glyphicon-eye-open"></i> <i class="fa fa-eye"></i>
Contrôler les factures Contrôler les factures
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Facture %} {% can_view_all Facture %}
<a class="list-group-item list-group-item-info" href="{% url "cotisations:index" %}"> <a class="list-group-item list-group-item-info" href="{% url "cotisations:index" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Factures Factures
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Article %} {% can_view_all Article %}
<a class="list-group-item list-group-item-info" href="{% url "cotisations:index-article" %}"> <a class="list-group-item list-group-item-info" href="{% url "cotisations:index-article" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Articles en vente Articles en vente
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Banque %} {% can_view_all Banque %}
<a class="list-group-item list-group-item-info" href="{% url "cotisations:index-banque" %}"> <a class="list-group-item list-group-item-info" href="{% url "cotisations:index-banque" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Banques Banques
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Paiement %} {% can_view_all Paiement %}
<a class="list-group-item list-group-item-info" href="{% url "cotisations:index-paiement" %}"> <a class="list-group-item list-group-item-info" href="{% url "cotisations:index-paiement" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Moyens de paiement Moyens de paiement
</a> </a>
{% acl_end %} {% acl_end %}

View file

@ -51,7 +51,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_edit_history %} {% can_edit_history %}
<td> <td>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}"> <a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}">
<i class="glyphicon glyphicon-remove"></i> <i class="fa fa-times"></i>
Annuler Annuler
</a> </a>
</td> </td>

View file

@ -54,7 +54,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_edit_history %} {% can_edit_history %}
<td> <td>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}"> <a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
<i class="glyphicon glyphicon-remove"></i> <i class="fa fa-times"></i>
Annuler Annuler
</a> </a>
</td> </td>
@ -77,7 +77,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_edit_history%} {% can_edit_history%}
<td> <td>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}"> <a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
<i class="glyphicon glyphicon-remove"></i> <i class="fa fa-times"></i>
Annuler Annuler
</a> </a>
</td> </td>
@ -96,7 +96,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_edit_history %} {% can_edit_history %}
<td> <td>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}"> <a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
<i class="glyphicon glyphicon-remove"></i> <i class="fa fa-times"></i>
Annuler Annuler
</a> </a>
</td> </td>
@ -115,7 +115,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_edit_history %} {% can_edit_history %}
<td> <td>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}"> <a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
<i class="glyphicon glyphicon-remove"></i> <i class="fa fa-times"></i>
Annuler Annuler
</a> </a>
</td> </td>
@ -134,7 +134,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_edit_history %} {% can_edit_history %}
<td> <td>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}"> <a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' v.rev_id %}">
<i class="glyphicon glyphicon-remove"></i> <i class="fa fa-times"></i>
Annuler Annuler
</a> </a>
</td> </td>

View file

@ -28,27 +28,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block sidebar %} {% block sidebar %}
{% can_view_app logs %} {% can_view_app logs %}
<a class="list-group-item list-group-item-info" href="{% url "logs:index" %}"> <a class="list-group-item list-group-item-info" href="{% url "logs:index" %}">
<i class="glyphicon glyphicon-stats"></i> <i class="fa fa-clipboard-list"></i>
Résumé Résumé
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-logs" %}"> <a class="list-group-item list-group-item-info" href="{% url "logs:stats-logs" %}">
<i class="glyphicon glyphicon-stats"></i> <i class="fa fa-calendar-alt"></i>
Évènements Évènements
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-general" %}"> <a class="list-group-item list-group-item-info" href="{% url "logs:stats-general" %}">
<i class="glyphicon glyphicon-stats"></i> <i class="fa fa-chart-area"></i>
Général Général
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-models" %}"> <a class="list-group-item list-group-item-info" href="{% url "logs:stats-models" %}">
<i class="glyphicon glyphicon-stats"></i> <i class="fa fa-database"></i>
Base de données Base de données
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-actions" %}"> <a class="list-group-item list-group-item-info" href="{% url "logs:stats-actions" %}">
<i class="glyphicon glyphicon-stats"></i> <i class="fa fa-plug"></i>
Actions de cablage Actions de cablage
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "logs:stats-users" %}"> <a class="list-group-item list-group-item-info" href="{% url "logs:stats-users" %}">
<i class="glyphicon glyphicon-stats"></i> <i class="fa fa-users"></i>
Utilisateurs Utilisateurs
</a> </a>
{% acl_end %} {% acl_end %}

View file

@ -46,9 +46,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% for machine in machines_list %} {% for machine in machines_list %}
<tr class="info"> <tr class="info">
<td colspan="4"> <td colspan="4">
<b>{{ machine.name|default:'<i>Pas de nom</i>' }}</b> <i class="glyphicon glyphicon-chevron-right"></i> <b>{{ machine.name|default:'<i>Pas de nom</i>' }}</b> <i class="fa-angle-right"></i>
<a href="{% url 'users:profil' userid=machine.user.id %}" title="Voir le profil"> <a href="{% url 'users:profil' userid=machine.user.id %}" title="Voir le profil">
<i class="glyphicon glyphicon-user"></i> {{ machine.user }} <i class="fa fa-user"></i> {{ machine.user }}
</a> </a>
</td> </td>
<td class="text-right"> <td class="text-right">
@ -92,7 +92,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td class="text-right"> <td class="text-right">
<div class="dropdown" style="width: 128px;"> <div class="dropdown" style="width: 128px;">
<button class="btn btn-primary btn-sm dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> <button class="btn btn-primary btn-sm dropdown-toggle" type="button" id="editioninterface" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<i class="glyphicon glyphicon-edit"></i> <span class="caret"></span> <i class="fa fa-edit"></i> <span class="caret"></span>
</button> </button>
{% include 'buttons/history.html' with href='machines:history' name='interface' id=interface.id %} {% include 'buttons/history.html' with href='machines:history' name='interface' id=interface.id %}
{% can_delete interface %} {% can_delete interface %}
@ -102,28 +102,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% can_edit interface %} {% can_edit interface %}
<li> <li>
<a href="{% url 'machines:edit-interface' interface.id %}"> <a href="{% url 'machines:edit-interface' interface.id %}">
<i class="glyphicon glyphicon-edit"></i> Editer <i class="fa fa-edit"></i> Editer
</a> </a>
</li> </li>
{% acl_end %} {% acl_end %}
{% can_create Domain interface.id %} {% can_create Domain interface.id %}
<li> <li>
<a href="{% url 'machines:index-alias' interface.id %}"> <a href="{% url 'machines:index-alias' interface.id %}">
<i class="glyphicon glyphicon-edit"></i> Gerer les alias <i class="fa fa-edit"></i> Gerer les alias
</a> </a>
</li> </li>
{% acl_end %} {% acl_end %}
{% can_create Ipv6List interface.id %} {% can_create Ipv6List interface.id %}
<li> <li>
<a href="{% url 'machines:index-ipv6' interface.id %}"> <a href="{% url 'machines:index-ipv6' interface.id %}">
<i class="glyphicon glyphicon-edit"></i> Gerer les ipv6 <i class="fa fa-edit"></i> Gerer les ipv6
</a> </a>
</li> </li>
{% acl_end %} {% acl_end %}
{% can_create OuverturePortList %} {% can_create OuverturePortList %}
<li> <li>
<a href="{% url 'machines:port-config' interface.id%}"> <a href="{% url 'machines:port-config' interface.id%}">
<i class="glyphicon glyphicon-edit"></i> Gerer la configuration des ports <i class="fa fa-edit"></i> Gerer la configuration des ports
</a> </a>
</li> </li>
{% acl_end %} {% acl_end %}
@ -158,7 +158,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;"> <li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;">
<a href="http://{{ al }}"> <a href="http://{{ al }}">
{{ al }} {{ al }}
<i class="glyphicon glyphicon-share-alt"></i> <i class="fa fa-share"></i>
</a> </a>
</li> </li>
{% endfor %} {% endfor %}

View file

@ -29,8 +29,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des alias de l'interface</h2> <h2>Liste des alias de l'interface</h2>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-alias' interface_id %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un alias</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-alias' interface_id %}"><i class="fa fa-plus"></i> Ajouter un alias</a>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-alias' interface_id %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs alias</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-alias' interface_id %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs alias</a>
{% include "machines/aff_alias.html" with alias_list=alias_list %} {% include "machines/aff_alias.html" with alias_list=alias_list %}
<br /> <br />
<br /> <br />

View file

@ -32,40 +32,40 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des extensions</h2> <h2>Liste des extensions</h2>
{% can_create Extension %} {% can_create Extension %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-extension' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter une extension</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-extension' %}"><i class="fa fa-plus"></i> Ajouter une extension</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-extension' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer une ou plusieurs extensions</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-extension' %}"><i class="fa fa-trash"></i> Supprimer une ou plusieurs extensions</a>
{% include "machines/aff_extension.html" with extension_list=extension_list %} {% include "machines/aff_extension.html" with extension_list=extension_list %}
<h2>Liste des enregistrements SOA</h2> <h2>Liste des enregistrements SOA</h2>
{% can_create SOA %} {% can_create SOA %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-soa' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un enregistrement SOA</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-soa' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement SOA</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-soa' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un enregistrement SOA</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-soa' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement SOA</a>
{% include "machines/aff_soa.html" with soa_list=soa_list %} {% include "machines/aff_soa.html" with soa_list=soa_list %}
<h2>Liste des enregistrements MX</h2> <h2>Liste des enregistrements MX</h2>
{% can_create Mx %} {% can_create Mx %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-mx' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un enregistrement MX</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-mx' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement MX</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-mx' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un enregistrement MX</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-mx' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement MX</a>
{% include "machines/aff_mx.html" with mx_list=mx_list %} {% include "machines/aff_mx.html" with mx_list=mx_list %}
<h2>Liste des enregistrements NS</h2> <h2>Liste des enregistrements NS</h2>
{% can_create Ns %} {% can_create Ns %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-ns' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un enregistrement NS</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-ns' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement NS</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-ns' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un enregistrement NS</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-ns' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement NS</a>
{% include "machines/aff_ns.html" with ns_list=ns_list %} {% include "machines/aff_ns.html" with ns_list=ns_list %}
<h2>Liste des enregistrements TXT</h2> <h2>Liste des enregistrements TXT</h2>
{% can_create Txt %} {% can_create Txt %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-txt' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un enregistrement TXT</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-txt' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement TXT</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-txt' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un enregistrement TXT</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-txt' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement TXT</a>
{% include "machines/aff_txt.html" with txt_list=txt_list %} {% include "machines/aff_txt.html" with txt_list=txt_list %}
<h2>Liste des enregistrements SRV</h2> <h2>Liste des enregistrements SRV</h2>
{% can_create Srv %} {% can_create Srv %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-srv' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un enregistrement SRV</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-srv' %}"><i class="fa fa-plus"></i> Ajouter un enregistrement SRV</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-srv' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un enregistrement SRV</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-srv' %}"><i class="fa fa-trash"></i> Supprimer un enregistrement SRV</a>
{% include "machines/aff_srv.html" with srv_list=srv_list %} {% include "machines/aff_srv.html" with srv_list=srv_list %}
<br /> <br />
<br /> <br />

View file

@ -32,9 +32,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des types d'ip</h2> <h2>Liste des types d'ip</h2>
{% can_create IpType %} {% can_create IpType %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-iptype' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un type d'ip</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-iptype' %}"><i class="fa fa-plus"></i> Ajouter un type d'ip</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-iptype' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs types d'ip</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-iptype' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types d'ip</a>
{% include "machines/aff_iptype.html" with iptype_list=iptype_list %} {% include "machines/aff_iptype.html" with iptype_list=iptype_list %}
<br /> <br />
<br /> <br />

View file

@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des ipv6 de l'interface</h2> <h2>Liste des ipv6 de l'interface</h2>
{% can_create Ipv6List interface_id %} {% can_create Ipv6List interface_id %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-ipv6list' interface_id %}"><i class="glyphicon glyphicon-plus"></i> Ajouter une ipv6</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-ipv6list' interface_id %}"><i class="fa fa-plus"></i> Ajouter une ipv6</a>
{% acl_end %} {% acl_end %}
{% include "machines/aff_ipv6.html" with ipv6_list=ipv6_list %} {% include "machines/aff_ipv6.html" with ipv6_list=ipv6_list %}
<br /> <br />

View file

@ -32,9 +32,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des types de machines</h2> <h2>Liste des types de machines</h2>
{% can_create MachineType %} {% can_create MachineType %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-machinetype' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un type de machine</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-machinetype' %}"><i class="fa fa-plus"></i> Ajouter un type de machine</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-machinetype' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs types de machines</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-machinetype' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types de machines</a>
{% include "machines/aff_machinetype.html" with machinetype_list=machinetype_list %} {% include "machines/aff_machinetype.html" with machinetype_list=machinetype_list %}
<br /> <br />
<br /> <br />

View file

@ -34,9 +34,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<h5>La correpondance nas-machinetype relie le type de nas à un type de machine. <h5>La correpondance nas-machinetype relie le type de nas à un type de machine.
Elle est utile pour l'autoenregistrement des macs par radius, et permet de choisir le type de machine à affecter aux machines en fonction du type de nas</h5> Elle est utile pour l'autoenregistrement des macs par radius, et permet de choisir le type de machine à affecter aux machines en fonction du type de nas</h5>
{% can_create Nas %} {% can_create Nas %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-nas' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un type de nas</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-nas' %}"><i class="fa fa-plus"></i> Ajouter un type de nas</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-nas' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs types nas</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-nas' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs types nas</a>
{% include "machines/aff_nas.html" with nas_list=nas_list %} {% include "machines/aff_nas.html" with nas_list=nas_list %}
<br /> <br />
<br /> <br />

View file

@ -9,7 +9,7 @@
{% block content %} {% block content %}
<h2>Liste des configurations de ports</h2> <h2>Liste des configurations de ports</h2>
{% can_create OuverturePortList %} {% can_create OuverturePortList %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-portlist' %}"><i class="glyphicon glyphicon-plus"></i>Ajouter une configuration</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-portlist' %}"><i class="fa fa-plus"></i>Ajouter une configuration</a>
{% acl_end %} {% acl_end %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>

View file

@ -31,9 +31,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des services</h2> <h2>Liste des services</h2>
{% can_create machines.Service %} {% can_create machines.Service %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-service' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un service</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-service' %}"><i class="fa fa-plus"></i> Ajouter un service</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-service' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs service</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-service' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs service</a>
{% include "machines/aff_service.html" with service_list=service_list %} {% include "machines/aff_service.html" with service_list=service_list %}
<h2>Etat des serveurs</h2> <h2>Etat des serveurs</h2>
{% include "machines/aff_servers.html" with servers_list=servers_list %} {% include "machines/aff_servers.html" with servers_list=servers_list %}

View file

@ -32,9 +32,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des vlans</h2> <h2>Liste des vlans</h2>
{% can_create Vlan %} {% can_create Vlan %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-vlan' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un vlan</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:add-vlan' %}"><i class="fa fa-plus"></i> Ajouter un vlan</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-vlan' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs vlan</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'machines:del-vlan' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs vlan</a>
{% include "machines/aff_vlan.html" with vlan_list=vlan_list %} {% include "machines/aff_vlan.html" with vlan_list=vlan_list %}
<br /> <br />
<br /> <br />

View file

@ -28,49 +28,49 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block sidebar %} {% block sidebar %}
{% can_view_all Machine %} {% can_view_all Machine %}
<a class="list-group-item list-group-item-info" href="{% url "machines:index" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Machines Machines
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all MachineType %} {% can_view_all MachineType %}
<a class="list-group-item list-group-item-info" href="{% url "machines:index-machinetype" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index-machinetype" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Types de machines Types de machines
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Extension %} {% can_view_all Extension %}
<a class="list-group-item list-group-item-info" href="{% url "machines:index-extension" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index-extension" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Extensions et zones Extensions et zones
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all IpType %} {% can_view_all IpType %}
<a class="list-group-item list-group-item-info" href="{% url "machines:index-iptype" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index-iptype" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Plages d'IP Plages d'IP
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Vlan %} {% can_view_all Vlan %}
<a class="list-group-item list-group-item-info" href="{% url "machines:index-vlan" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index-vlan" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Vlans Vlans
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Nas %} {% can_view_all Nas %}
<a class="list-group-item list-group-item-info" href="{% url "machines:index-nas" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index-nas" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Gestion des nas Gestion des nas
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all machines.Service %} {% can_view_all machines.Service %}
<a class="list-group-item list-group-item-info" href="{% url "machines:index-service" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index-service" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Services (dhcp, dns...) Services (dhcp, dns...)
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all OuverturePortList %} {% can_view_all OuverturePortList %}
<a class="list-group-item list-group-item-info" href="{% url "machines:index-portlist" %}"> <a class="list-group-item list-group-item-info" href="{% url "machines:index-portlist" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Ouverture de ports Ouverture de ports
</a> </a>
{% acl_end %} {% acl_end %}

View file

@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h4>Préférences utilisateur</h4> <h4>Préférences utilisateur</h4>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalUser' %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalUser' %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
Editer Editer
</a> </a>
<p> <p>
@ -72,7 +72,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
<h4>Préférences machines</h4> <h4>Préférences machines</h4>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalMachine' %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalMachine' %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
Editer Editer
</a> </a>
<p> <p>
@ -97,7 +97,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
<h4>Préférences topologie</h4> <h4>Préférences topologie</h4>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalTopologie' %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'OptionalTopologie' %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
Editer Editer
</a> </a>
<p> <p>
@ -118,7 +118,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
<h4>Préférences generales</h4> <h4>Préférences generales</h4>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'GeneralOption' %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'GeneralOption' %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
Editer Editer
</a> </a>
<p> <p>
@ -155,7 +155,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
<h4>Données de l'association</h4> <h4>Données de l'association</h4>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'AssoOption' %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'AssoOption' %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
Editer Editer
</a> </a>
<p> <p>
@ -192,7 +192,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
<h4>Messages personalisé dans les mails</h4> <h4>Messages personalisé dans les mails</h4>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'MailMessageOption' %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:edit-options' 'MailMessageOption' %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
Editer Editer
</a> </a>
<p> <p>
@ -209,9 +209,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
<h2>Liste des services page d'accueil</h2> <h2>Liste des services page d'accueil</h2>
{% can_create preferences.Service%} {% can_create preferences.Service%}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:add-service' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un service</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'preferences:add-service' %}"><i class="fa fa-plus"></i> Ajouter un service</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'preferences:del-services' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs service</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'preferences:del-services' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs service</a>
{% include "preferences/aff_service.html" with service_list=service_list %} {% include "preferences/aff_service.html" with service_list=service_list %}
<br /> <br />
<br /> <br />

View file

@ -33,7 +33,13 @@ from django.contrib import messages
from django.shortcuts import redirect from django.shortcuts import redirect
from django.urls import reverse from django.urls import reverse
import cotisations, logs, machines, preferences, search, topologie, users import cotisations
import logs
import machines
import preferences
import search
import topologie
import users
def can_create(model): def can_create(model):
@ -46,7 +52,8 @@ def can_create(model):
def wrapper(request, *args, **kwargs): def wrapper(request, *args, **kwargs):
can, msg = model.can_create(request.user, *args, **kwargs) can, msg = model.can_create(request.user, *args, **kwargs)
if not can: if not can:
messages.error(request, msg or "Vous ne pouvez pas accéder à ce menu") messages.error(
request, msg or "Vous ne pouvez pas accéder à ce menu")
return redirect(reverse('index')) return redirect(reverse('index'))
return view(request, *args, **kwargs) return view(request, *args, **kwargs)
return wrapper return wrapper
@ -71,7 +78,8 @@ def can_edit(model, *field_list):
)) ))
can, msg = instance.can_edit(request.user) can, msg = instance.can_edit(request.user)
if not can: if not can:
messages.error(request, msg or "Vous ne pouvez pas accéder à ce menu") messages.error(
request, msg or "Vous ne pouvez pas accéder à ce menu")
return redirect(reverse('users:profil', return redirect(reverse('users:profil',
kwargs={'userid': str(request.user.id)} kwargs={'userid': str(request.user.id)}
)) ))
@ -79,9 +87,11 @@ def can_edit(model, *field_list):
can_change = getattr(instance, 'can_change_' + field) can_change = getattr(instance, 'can_change_' + field)
can, msg = can_change(request.user, *args, **kwargs) can, msg = can_change(request.user, *args, **kwargs)
if not can: if not can:
messages.error(request, msg or "Vous ne pouvez pas accéder à ce menu") messages.error(
request, msg or "Vous ne pouvez pas accéder à ce menu")
return redirect(reverse('users:profil', return redirect(reverse('users:profil',
kwargs={'userid':str(request.user.id)} kwargs={'userid': str(
request.user.id)}
)) ))
return view(request, instance, *args, **kwargs) return view(request, instance, *args, **kwargs)
return wrapper return wrapper
@ -98,9 +108,11 @@ def can_change(model, *field_list):
can_change = getattr(model, 'can_change_' + field) can_change = getattr(model, 'can_change_' + field)
can, msg = can_change(request.user, *args, **kwargs) can, msg = can_change(request.user, *args, **kwargs)
if not can: if not can:
messages.error(request, msg or "Vous ne pouvez pas accéder à ce menu") messages.error(
request, msg or "Vous ne pouvez pas accéder à ce menu")
return redirect(reverse('users:profil', return redirect(reverse('users:profil',
kwargs={'userid':str(request.user.id)} kwargs={'userid': str(
request.user.id)}
)) ))
return view(request, *args, **kwargs) return view(request, *args, **kwargs)
return wrapper return wrapper
@ -125,7 +137,8 @@ def can_delete(model):
)) ))
can, msg = instance.can_delete(request.user) can, msg = instance.can_delete(request.user)
if not can: if not can:
messages.error(request, msg or "Vous ne pouvez pas accéder à ce menu") messages.error(
request, msg or "Vous ne pouvez pas accéder à ce menu")
return redirect(reverse('users:profil', return redirect(reverse('users:profil',
kwargs={'userid': str(request.user.id)} kwargs={'userid': str(request.user.id)}
)) ))
@ -174,7 +187,8 @@ def can_view(model):
)) ))
can, msg = instance.can_view(request.user) can, msg = instance.can_view(request.user)
if not can: if not can:
messages.error(request, msg or "Vous ne pouvez pas accéder à ce menu") messages.error(
request, msg or "Vous ne pouvez pas accéder à ce menu")
return redirect(reverse('users:profil', return redirect(reverse('users:profil',
kwargs={'userid': str(request.user.id)} kwargs={'userid': str(request.user.id)}
)) ))
@ -190,7 +204,8 @@ def can_view_all(model):
def wrapper(request, *args, **kwargs): def wrapper(request, *args, **kwargs):
can, msg = model.can_view_all(request.user) can, msg = model.can_view_all(request.user)
if not can: if not can:
messages.error(request, msg or "Vous ne pouvez pas accéder à ce menu") messages.error(
request, msg or "Vous ne pouvez pas accéder à ce menu")
return redirect(reverse('users:profil', return redirect(reverse('users:profil',
kwargs={'userid': str(request.user.id)} kwargs={'userid': str(request.user.id)}
)) ))
@ -203,6 +218,7 @@ def can_view_app(app_name):
"""Decorator to check if an user can view an application. """Decorator to check if an user can view an application.
""" """
assert app_name in sys.modules.keys() assert app_name in sys.modules.keys()
def decorator(view): def decorator(view):
def wrapper(request, *args, **kwargs): def wrapper(request, *args, **kwargs):
app = sys.modules[app_name] app = sys.modules[app_name]
@ -230,4 +246,3 @@ def can_edit_history(view):
kwargs={'userid': str(request.user.id)} kwargs={'userid': str(request.user.id)}
)) ))
return wrapper return wrapper

View file

@ -23,8 +23,6 @@
Write in a python file the list of all contributors sorted by number of commits. Write in a python file the list of all contributors sorted by number of commits.
This list is extracted from the FedeRez gitlab repository. This list is extracted from the FedeRez gitlab repository.
""" """
fous moi un truc adapté au dessus aussi
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand, CommandError
import os import os

View file

@ -180,13 +180,17 @@ def get_callback(tag_name, obj=None):
if tag_name == 'cannot_view_all': if tag_name == 'cannot_view_all':
return acl_fct(obj.can_view_all, True) return acl_fct(obj.can_view_all, True)
if tag_name == 'can_view_app': if tag_name == 'can_view_app':
return acl_fct(sys.modules[obj].can_view, False) return acl_fct(lambda x : (not any(not sys.modules[o].can_view(x) for o in obj), None), False)
if tag_name == 'cannot_view_app': if tag_name == 'cannot_view_app':
return acl_fct(sys.modules[obj].can_view, True) return acl_fct(lambda x : (not any(not sys.modules[o].can_view(x) for o in obj), None), True)
if tag_name == 'can_edit_history': if tag_name == 'can_edit_history':
return acl_fct(lambda user:(user.has_perm('admin.change_logentry'),None),False) return acl_fct(lambda user:(user.has_perm('admin.change_logentry'),None),False)
if tag_name == 'cannot_edit_history': if tag_name == 'cannot_edit_history':
return acl_fct(lambda user:(user.has_perm('admin.change_logentry'),None),True) return acl_fct(lambda user:(user.has_perm('admin.change_logentry'),None),True)
if tag_name == 'can_view_any_app':
return acl_fct(lambda x : (any(sys.modules[o].can_view(x) for o in obj), None), False)
if tag_name == 'cannot_view_any_app':
return acl_fct(lambda x : (any(sys.modules[o].can_view(x) for o in obj), None), True)
raise template.TemplateSyntaxError( raise template.TemplateSyntaxError(
"%r tag is not a valid can_xxx tag" % tag_name "%r tag is not a valid can_xxx tag" % tag_name
@ -228,21 +232,24 @@ def acl_history_filter(parser, token):
return AclNode(callback, oknodes, konodes) return AclNode(callback, oknodes, konodes)
@register.tag('can_view_any_app')
@register.tag('cannot_view_any_app')
@register.tag('can_view_app') @register.tag('can_view_app')
@register.tag('cannot_view_app') @register.tag('cannot_view_app')
def acl_app_filter(parser, token): def acl_app_filter(parser, token):
"""Templatetag for acl checking on applications.""" """Templatetag for acl checking on applications."""
try: try:
tag_name, app_name = token.split_contents() tag_name, *app_name = token.split_contents()
except ValueError: except ValueError:
raise template.TemplateSyntaxError( raise template.TemplateSyntaxError(
"%r tag require 1 argument : the application" "%r tag require 1 argument : an application"
% token.contents.split()[0] % token.contents.split()[0]
) )
if not app_name in sys.modules.keys(): for name in app_name:
if not name in sys.modules.keys():
raise template.TemplateSyntaxError( raise template.TemplateSyntaxError(
"%r is not a registered application for acl." "%r is not a registered application for acl."
% app_name % name
) )
callback = get_callback(tag_name, app_name) callback = get_callback(tag_name, app_name)

View file

@ -26,11 +26,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block sidebar %} {% block sidebar %}
<a class="list-group-item list-group-item-warning" href="{% url "search:search" %}"> <a class="list-group-item list-group-item-warning" href="{% url "search:search" %}">
<i class="glyphicon glyphicon-search"></i> <i class="fa fa-search"></i>
Recherche simple Recherche simple
</a> </a>
<a class="list-group-item list-group-item-warning" href="{% url "search:searchp" %}"> <a class="list-group-item list-group-item-warning" href="{% url "search:searchp" %}">
<i class="glyphicon glyphicon-zoom-in"></i> <i class="fa fa-search-plus"></i>
Recherche avancée Recherche avancée
</a> </a>
{% endblock %} {% endblock %}

View file

@ -36,6 +36,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<meta property="og:url" content="\\{{request.get_host}}" /> <meta property="og:url" content="\\{{request.get_host}}" />
<meta property="og:image" content="\\{{request.get_host}}/static/logo/re2o.png"/> <meta property="og:image" content="\\{{request.get_host}}/static/logo/re2o.png"/>
<meta property="og:description" content="Site de gestion de réseau supporté par FedeRez." /> <meta property="og:description" content="Site de gestion de réseau supporté par FedeRez." />
<script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script>
{# Load CSS and JavaScript #} {# Load CSS and JavaScript #}
{% bootstrap_css %} {% bootstrap_css %}
<link href="/static/css/typeaheadjs.css" rel="stylesheet"> <link href="/static/css/typeaheadjs.css" rel="stylesheet">
@ -68,22 +69,36 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</div> </div>
<div class="collapse navbar-collapse" id="myNavbar"> <div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a href="{% url "users:mon-profil" %}">Mon profil</a></li> {% if request.user.is_authenticated %}
<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>
{% endif %}
{% 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 %} {% can_view_app users %}
<li><a href="{% url 'users:index' %}"><i class="fa fa-users"></i> Gérer les adhérents</a></li>
<li><a href="{% url "users:index" %}">Adhérents</a></li>
{% acl_end %} {% acl_end %}
{% can_view_app machines %} {% can_view_app machines %}
<li><a href="{% url "machines:index" %}">Machines</a></li> <li><a href="{% url 'machines:index' %}"><i class="fa fa-desktop"></i> Gérer les machines</a></li>
{% acl_end %} {% acl_end %}
{% can_view_app cotisations %} {% can_view_app cotisations %}
<li><a href="{% url "cotisations:index" %}">Cotisations</a></li> <li><a href="{% url 'cotisations:index' %}"><i class="fa fa-dollar-sign"></i> Gérer les cotisations</a></li>
{% acl_end %}
</ul>
</li>
{% acl_end %} {% acl_end %}
{% can_view_app topologie %} {% can_view_app topologie %}
<li><a href="{% url "topologie:index" %}">Topologie</a></li> <li><a href="{% url "topologie:index" %}"><i class="fa fa-sitemap"></i> Topologie</a></li>
{% acl_end %} {% acl_end %}
{% can_view_app logs %} {% can_view_app logs %}
<li><a href="{% url "logs:index" %}">Statistiques</a></li> <li><a href="{% url "logs:index" %}"><i class="fa fa-chart-area"></i> Statistiques</a></li>
{% acl_end %} {% acl_end %}
</ul> </ul>
<div class="col-sm-3 col-md-3 navbar-right"> <div class="col-sm-3 col-md-3 navbar-right">
@ -91,30 +106,24 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="q" id="search-term" {% if search_term %}value="{{ search_term }}"{% endif %}> <input type="text" class="form-control" placeholder="Search" name="q" id="search-term" {% if search_term %}value="{{ search_term }}"{% endif %}>
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button> <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="glyphicon glyphicon-plus"></i></a> <a href="{% url "search:searchp" %}" class="btn btn-default" role="button"><i class="fa fa-plus"></i></a>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
{% if request.user.is_authenticated %} {% if not request.user.is_authenticated %}
<li>
<a href="{% url 'logout' %}">
<span class="glyphicon glyphicon-log-out"></span> Logout
</a>
</li>
{% else %}
{% if var_sa %} {% if var_sa %}
<li> <li>
<a href="{% url 'users:new-user' %}"> <a href="{% url 'users:new-user' %}">
<span class="glyphicon glyphicon-user"></span> Créer un compte <i class="fa fa-user-plus"></i> Créer un compte
</a> </a>
</li> </li>
{% endif %} {% endif %}
<li> <li>
<a href="{% url 'login' %}"> <a href="{% url 'login' %}">
<span class="glyphicon glyphicon-log-in"></span> Login <i class="fa fa-sign-in-alt"></i> Login
</a> </a>
</li> </li>
{% endif %} {% endif %}
@ -123,9 +132,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li>
<a href="{% url 'preferences:display-options' %}"> <a href="{% url 'preferences:display-options' %}">
<span class="glyphicon glyphicon-cog"></span> Preferences <i class="fa fa-cogs"></i> Preferences
</a> </a>
</li> </li>
<li>
<a href="{% url 'about' %}"><i class="fa fa-info-circle"></i> A propos</a>
</li>
</ul> </ul>
{% acl_end %} {% acl_end %}
</div> </div>
@ -186,7 +198,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
<div class="list-group"> <div class="list-group">
<a class="list-group-item list-group-item-info" role="button"href="{% url "users:mon-profil" %}"> <a class="list-group-item list-group-item-info" role="button"href="{% url "users:mon-profil" %}">
<i class="glyphicon glyphicon-user"></i> <i class="fa fa-user-circle"></i>
Voir mon profil Voir mon profil
</a> </a>
</div> </div>
@ -205,7 +217,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endfor %} {% endfor %}
{% if interfaces|length > 5 %} {% if interfaces|length > 5 %}
<a class="list-group-item list-group-item-info" role="button" href="{% url "users:mon-profil" %}"> <a class="list-group-item list-group-item-info" role="button" href="{% url "users:mon-profil" %}">
<i class="glyphicon glyphicon-plus"></i> <i class="fa fa-plus"></i>
Voir mes machines Voir mes machines
</a> </a>
{% endif %} {% endif %}

View file

@ -22,5 +22,5 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %} {% endcomment %}
<a class="btn btn-primary btn-sm" role="button" href="{% url href id %}" title="{{ desc|default:"Ajouter" }}"> <a class="btn btn-primary btn-sm" role="button" href="{% url href id %}" title="{{ desc|default:"Ajouter" }}">
<i class="glyphicon glyphicon-plus"></i> <i class="fa fa-plus"></i>
</a> </a>

View file

@ -22,5 +22,5 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %} {% endcomment %}
<a class="btn btn-primary btn-sm" role="button" title="{{ desc|default:"Éditer" }}" href="{% url href id %}"> <a class="btn btn-primary btn-sm" role="button" title="{{ desc|default:"Éditer" }}" href="{% url href id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-pencil-alt"></i>
</a> </a>

View file

@ -22,6 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %} {% endcomment %}
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url href name id %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url href name id %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>

View file

@ -31,18 +31,18 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% if prefix %} {% if prefix %}
{% with prefix|add:'_'|add:col as colname %} {% with prefix|add:'_'|add:col as colname %}
<a role="button" href="{% url_insert_param request.get_full_path col=colname order='asc' %}" title="{{ desc|default:"Tri croissant" }}"> <a role="button" href="{% url_insert_param request.get_full_path col=colname order='asc' %}" title="{{ desc|default:"Tri croissant" }}">
<span class="glyphicon glyphicon-triangle-top"></span> <span class="fa fa-caret-up"></span>
</a> </a>
<a role="button" href="{% url_insert_param request.get_full_path col=colname order='desc' %}" title="{{ desc|default:"Tri décroissant" }}"> <a role="button" href="{% url_insert_param request.get_full_path col=colname order='desc' %}" title="{{ desc|default:"Tri décroissant" }}">
<span class="glyphicon glyphicon-triangle-bottom"></span> <span class="fa fa-caret-down"></span>
</a> </a>
{% endwith %} {% endwith %}
{% else %} {% else %}
<a role="button" href="{% url_insert_param request.get_full_path col=col order='asc' %}" title="{{ desc|default:"Tri croissant" }}"> <a role="button" href="{% url_insert_param request.get_full_path col=col order='asc' %}" title="{{ desc|default:"Tri croissant" }}">
<span class="glyphicon glyphicon-triangle-top"></span> <span class="fa fa-caret-up"></span>
</a> </a>
<a role="button" href="{% url_insert_param request.get_full_path col=col order='desc' %}" title="{{ desc|default:"Tri décroissant" }}"> <a role="button" href="{% url_insert_param request.get_full_path col=col order='desc' %}" title="{{ desc|default:"Tri décroissant" }}">
<span class="glyphicon glyphicon-triangle-bottom"></span> <span class="fa fa-caret-down"></span>
</a> </a>
{% endif %} {% endif %}
</div> </div>

View file

@ -22,5 +22,5 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %} {% endcomment %}
<a class="btn btn-danger btn-sm" role="button" href="{% url href id %}" title="{{ desc|default:"Supprimer" }}"> <a class="btn btn-danger btn-sm" role="button" href="{% url href id %}" title="{{ desc|default:"Supprimer" }}">
<i class="glyphicon glyphicon-trash"></i> <i class="fa fa-trash"></i>
</a> </a>

View file

@ -42,16 +42,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{room.details}}</td> <td>{{room.details}}</td>
<td class="text-right"> <td class="text-right">
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'room' room.pk %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'room' room.pk %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
{% can_edit room %} {% can_edit room %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-room' room.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-room' room.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
{% can_delete room %} {% can_delete room %}
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-room' room.id %}"> <a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-room' room.id %}">
<i class="glyphicon glyphicon-trash"></i> <i class="fa fa-trash"></i>
</a> </a>
{% acl_end %} {% acl_end %}
</td> </td>

View file

@ -40,16 +40,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{constructor_switch}}</td> <td>{{constructor_switch}}</td>
<td class="text-right"> <td class="text-right">
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'constructor_switch' constructor_switch.pk %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'constructor_switch' constructor_switch.pk %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
{% can_edit constructor_switch %} {% can_edit constructor_switch %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-constructor-switch' constructor_switch.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-constructor-switch' constructor_switch.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
{% can_delete constructor_switch %} {% can_delete constructor_switch %}
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-constructor-switch' constructor_switch.id %}"> <a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-constructor-switch' constructor_switch.id %}">
<i class="glyphicon glyphicon-trash"></i> <i class="fa fa-trash"></i>
</a> </a>
{% acl_end %} {% acl_end %}
</td> </td>

View file

@ -42,16 +42,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{model_switch.constructor}}</td> <td>{{model_switch.constructor}}</td>
<td class="text-right"> <td class="text-right">
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'model_switch' model_switch.pk %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'model_switch' model_switch.pk %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
{% can_edit model_switch %} {% can_edit model_switch %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-model-switch' model_switch.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-model-switch' model_switch.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
{% can_delete model_switch %} {% can_delete model_switch %}
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-model-switch' model_switch.id %}"> <a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-model-switch' model_switch.id %}">
<i class="glyphicon glyphicon-trash"></i> <i class="fa fa-trash"></i>
</a> </a>
{% acl_end %} {% acl_end %}
</td> </td>

View file

@ -60,16 +60,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{ port.details }}</td> <td>{{ port.details }}</td>
<td class="text-right"> <td class="text-right">
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'port' port.pk %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'port' port.pk %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
{% can_edit port %} {% can_edit port %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-port' port.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-port' port.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
{% can_delete port %} {% can_delete port %}
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-port' port.pk %}"> <a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-port' port.pk %}">
<i class="glyphicon glyphicon-trash"></i> <i class="fa fa-trash"></i>
</a> </a>
{% acl_end %} {% acl_end %}
</td> </td>

View file

@ -46,16 +46,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% if forloop.first %} {% if forloop.first %}
<td rowspan="{{ stack.switch_set.all|length }}"> <td rowspan="{{ stack.switch_set.all|length }}">
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'stack' stack.pk %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'stack' stack.pk %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
{% can_edit stack %} {% can_edit stack %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-stack' stack.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-stack' stack.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
{% can_delete stack %} {% can_delete stack %}
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-stack' stack.pk %}"> <a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-stack' stack.pk %}">
<i class="glyphicon glyphicon-trash"></i> <i class="fa fa-trash"></i>
</a> </a>
{% acl_end %} {% acl_end %}
</td> </td>
@ -69,16 +69,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>Aucun</td> <td>Aucun</td>
<td> <td>
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'stack' stack.pk %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'stack' stack.pk %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
{% can_edit stack %} {% can_edit stack %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-stack' stack.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-stack' stack.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
{% can_delete stack %} {% can_delete stack %}
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-stack' stack.pk %}"> <a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-stack' stack.pk %}">
<i class="glyphicon glyphicon-trash"></i> <i class="fa fa-trash"></i>
</a> </a>
{% acl_end %} {% acl_end %}
</td> </td>

View file

@ -39,16 +39,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<td>{{stack.details}}</td> <td>{{stack.details}}</td>
<td class="text-right"> <td class="text-right">
<a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'stack' stack.pk %}"> <a class="btn btn-info btn-sm" role="button" title="Historique" href="{% url 'topologie:history' 'stack' stack.pk %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
</a> </a>
{% can_edit stack %} {% can_edit stack %}
<a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-stack' stack.id %}"> <a class="btn btn-primary btn-sm" role="button" title="Éditer" href="{% url 'topologie:edit-stack' stack.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
</a> </a>
{% acl_end %} {% acl_end %}
{% can_delete stack %} {% can_delete stack %}
<a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-stack' stack.pk %}"> <a class="btn btn-danger btn-sm" role="button" title="Supprimer" href="{% url 'topologie:del-stack' stack.pk %}">
<i class="glyphicon glyphicon-trash"></i> <i class="fa fa-trash"></i>
</a> </a>
{% acl_end %} {% acl_end %}
</td> </td>

View file

@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Switchs</h2> <h2>Switchs</h2>
{% can_create Switch %} {% can_create Switch %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-switch' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un switch</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-switch' %}"><i class="fa fa-plus"></i> Ajouter un switch</a>
<hr> <hr>
{% acl_end %} {% acl_end %}
{% include "topologie/aff_switch.html" with switch_list=switch_list %} {% include "topologie/aff_switch.html" with switch_list=switch_list %}

View file

@ -31,13 +31,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Modèles de switches</h2> <h2>Modèles de switches</h2>
{% can_create ModelSwitch %} {% can_create ModelSwitch %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-model-switch' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un modèle</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-model-switch' %}"><i class="fa fa-plus"></i> Ajouter un modèle</a>
<hr> <hr>
{% acl_end %} {% acl_end %}
{% include "topologie/aff_model_switch.html" with model_switch_list=model_switch_list %} {% include "topologie/aff_model_switch.html" with model_switch_list=model_switch_list %}
<h2>Constructeurs de switches</h2> <h2>Constructeurs de switches</h2>
{% can_create ConstructorSwitch %} {% can_create ConstructorSwitch %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-constructor-switch' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un constructeur</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-constructor-switch' %}"><i class="fa fa-plus"></i> Ajouter un constructeur</a>
<hr> <hr>
{% acl_end %} {% acl_end %}
{% include "topologie/aff_constructor_switch.html" with constructor_switch_list=constructor_switch_list %} {% include "topologie/aff_constructor_switch.html" with constructor_switch_list=constructor_switch_list %}

View file

@ -30,11 +30,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Switch {{ nom_switch }}</h2> <h2>Switch {{ nom_switch }}</h2>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:edit-switch' id_switch %}"><i class="glyphicon glyphicon-edit"></i> Editer</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:edit-switch' id_switch %}"><i class="fa fa-edit"></i> Editer</a>
{% can_create Port %} {% can_create Port %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-port' id_switch %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un port</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-port' id_switch %}"><i class="fa fa-plus"></i> Ajouter un port</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:create-ports' id_switch %}"><i class="glyphicon glyphicon-plus"></i> Ajouter des ports</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:create-ports' id_switch %}"><i class="fa fa-plus"></i> Ajouter des ports</a>
{% include "topologie/aff_port.html" with port_list=port_list %} {% include "topologie/aff_port.html" with port_list=port_list %}
<br /> <br />
<br /> <br />

View file

@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Chambres</h2> <h2>Chambres</h2>
{% can_create Room %} {% can_create Room %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-room' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter une chambre</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-room' %}"><i class="fa fa-plus"></i> Ajouter une chambre</a>
<hr> <hr>
{% acl_end %} {% acl_end %}
{% include "topologie/aff_chambres.html" with room_list=room_list %} {% include "topologie/aff_chambres.html" with room_list=room_list %}

View file

@ -31,7 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Stacks</h2> <h2>Stacks</h2>
{% can_create Stack %} {% can_create Stack %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-stack' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter une stack</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'topologie:new-stack' %}"><i class="fa fa-plus"></i> Ajouter une stack</a>
{% acl_end %} {% acl_end %}
{% include "topologie/aff_stacks.html" with stack_list=stack_list %} {% include "topologie/aff_stacks.html" with stack_list=stack_list %}
<br /> <br />

View file

@ -26,19 +26,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block sidebar %} {% block sidebar %}
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-room" %}"> <a class="list-group-item list-group-item-info" href="{% url "topologie:index-room" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Chambres Chambres
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "topologie:index" %}"> <a class="list-group-item list-group-item-info" href="{% url "topologie:index" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Switchs Switchs
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-stack" %}"> <a class="list-group-item list-group-item-info" href="{% url "topologie:index-stack" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Stacks Stacks
</a> </a>
<a class="list-group-item list-group-item-info" href="{% url "topologie:index-model-switch" %}"> <a class="list-group-item list-group-item-info" href="{% url "topologie:index-model-switch" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Modèles switches et constructeurs Modèles switches et constructeurs
</a> </a>
{% endblock %} {% endblock %}

View file

@ -52,7 +52,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<i class="text-danger">Désactivée</i> <i class="text-danger">Désactivée</i>
{% endif %} {% endif %}
</td> </td>
<td><a href="{% url "users:profil" club.id%}" class="btn btn-primary btn-sm" role="button"><i class="glyphicon glyphicon-user"></i></a> <td><a href="{% url "users:profil" club.id%}" class="btn btn-primary btn-sm" role="button"><i class="fa fa-user"></i></a>
</td> </td>
</tr> </tr>
{% acl_end %} {% acl_end %}

View file

@ -77,7 +77,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<li class="list-group-item col-xs-12 col-sm-6 col-md-4" style="border:none;"> <li class="list-group-item col-xs-12 col-sm-6 col-md-4" style="border:none;">
{{user}} {{user}}
<a role="button" href="{% url 'users:del-group' user.id listright.id %}" title="{{ desc|default:"Supprimer" }}"> <a role="button" href="{% url 'users:del-group' user.id listright.id %}" title="{{ desc|default:"Supprimer" }}">
<i class="glyphicon glyphicon-remove" style="color:red"></i> <i class="fa fa-times" style="color:red"></i>
</a> </a>
</li> </li>
{% endfor %} {% endfor %}

View file

@ -51,7 +51,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<i class="text-danger">Désactivée</i> <i class="text-danger">Désactivée</i>
{% endif %} {% endif %}
</td> </td>
<td><a href="{% url "users:profil" user.id%}" class="btn btn-primary btn-sm" role="button"><i class="glyphicon glyphicon-user"></i></a> <td><a href="{% url "users:profil" user.id%}" class="btn btn-primary btn-sm" role="button"><i class="fa fa-user"></i></a>
</td> </td>
</tr> </tr>
{% endfor %} {% endfor %}

View file

@ -31,9 +31,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% block content %} {% block content %}
<h2>Liste des droits</h2> <h2>Liste des droits</h2>
{% can_create ListRight %} {% can_create ListRight %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-listright' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un droit ou groupe</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-listright' %}"><i class="fa fa-plus"></i> Ajouter un droit ou groupe</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'users:del-listright' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs droits/groupes</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'users:del-listright' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs droits/groupes</a>
{% include "users/aff_listright.html" with listright_list=listright_list %} {% include "users/aff_listright.html" with listright_list=listright_list %}
<br /> <br />
<br /> <br />

View file

@ -32,9 +32,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<h2>Liste des Établissements</h2> <h2>Liste des Établissements</h2>
<h5>Ensemble des établissements d'enseignement ou d'activité des utilisateurs crées</h5> <h5>Ensemble des établissements d'enseignement ou d'activité des utilisateurs crées</h5>
{% can_create School %} {% can_create School %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-school' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un établissement</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-school' %}"><i class="fa fa-plus"></i> Ajouter un établissement</a>
{% acl_end %} {% acl_end %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'users:del-school' %}"><i class="glyphicon glyphicon-trash"></i> Supprimer un ou plusieurs établissements</a> <a class="btn btn-danger btn-sm" role="button" href="{% url 'users:del-school' %}"><i class="fa fa-trash"></i> Supprimer un ou plusieurs établissements</a>
{% include "users/aff_schools.html" with school_list=school_list %} {% include "users/aff_schools.html" with school_list=school_list %}
<br /> <br />
<br /> <br />

View file

@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<h5>Les service users LDAP sont des utilisateurs spéciaux qui disposent d'un accès uniquement sur le ldap pour effectuer des opération d'authentification. <h5>Les service users LDAP sont des utilisateurs spéciaux qui disposent d'un accès uniquement sur le ldap pour effectuer des opération d'authentification.
Il est recommandé de créer un service-user doté d'un login/mdp par service concerné</h5> Il est recommandé de créer un service-user doté d'un login/mdp par service concerné</h5>
{% can_create ServiceUser %} {% can_create ServiceUser %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:new-serviceuser' %}"><i class="glyphicon glyphicon-plus"></i> Ajouter un service user</a> <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:new-serviceuser' %}"><i class="fa fa-plus"></i> Ajouter un service user</a>
{% acl_end %} {% acl_end %}
{% include "users/aff_serviceusers.html" with serviceusers_list=serviceusers_list %} {% include "users/aff_serviceusers.html" with serviceusers_list=serviceusers_list %}
<br /> <br />

View file

@ -31,27 +31,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<h2>{{ users.class_name }} : {{ users.surname }} {{users.name}}</h2> <h2>{{ users.class_name }} : {{ users.surname }} {{users.name}}</h2>
<div> <div>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-info' users.id %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-info' users.id %}">
<i class="glyphicon glyphicon-edit"></i> <i class="fa fa-edit"></i>
Editer Editer
</a> </a>
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:password' users.id %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:password' users.id %}">
<i class="glyphicon glyphicon-lock"></i> <i class="fa fa-lock"></i>
Changer le mot de passe Changer le mot de passe
</a> </a>
{% can_change User state %} {% can_change User state %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:state' users.id %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:state' users.id %}">
<i class="glyphicon glyphicon-flash"></i> <i class="fa fa-id-badge"></i>
Changer le statut Changer le statut
</a> </a>
{% acl_end %} {% acl_end %}
{% can_change User groups %} {% can_change User groups %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:groups' users.id %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:groups' users.id %}">
<i class="glyphicon glyphicon-ok"></i> <i class="fa fa-check"></i>
Gérer les groupes Gérer les groupes
</a> </a>
{% acl_end %} {% acl_end %}
<a class="btn btn-info btn-sm" role="button" href="{% url 'users:history' 'user' users.id %}"> <a class="btn btn-info btn-sm" role="button" href="{% url 'users:history' 'user' users.id %}">
<i class="glyphicon glyphicon-time"></i> <i class="fa fa-history"></i>
Historique Historique
</a> </a>
</div> </div>
@ -146,7 +146,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<th>Solde</th> <th>Solde</th>
<td>{{ users.solde }} € <td>{{ users.solde }} €
<a class="btn btn-primary btn-sm" style='float:right' role="button" href="{% url 'cotisations:recharge' %}"> <a class="btn btn-primary btn-sm" style='float:right' role="button" href="{% url 'cotisations:recharge' %}">
<i class="glyphicon glyphicon-piggy-bank"></i> <i class="fa fa-euro-sign"></i>
Recharger Recharger
</a> </a>
</td> </td>
@ -159,7 +159,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</table> </table>
{% if users.is_class_club %} {% if users.is_class_club %}
<a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-club-admin-members' users.club.id %}"> <a class="btn btn-primary btn-sm" role="button" href="{% url 'users:edit-club-admin-members' users.club.id %}">
<i class="glyphicon glyphicon-lock"></i> <i class="fa fa-lock"></i>
Gérer admin et membres Gérer admin et membres
</a> </a>
<h3>Administrateurs du club</h3> <h3>Administrateurs du club</h3>
@ -199,7 +199,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% endif %} {% endif %}
<h2>Machines</h2> <h2>Machines</h2>
{% can_create Machine users.id %} {% can_create Machine users.id %}
<h4><a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-machine' users.id %}"><i class="glyphicon glyphicon-phone"></i> Ajouter une machine</a></h4> <h4><a class="btn btn-primary btn-sm" role="button" href="{% url 'machines:new-machine' users.id %}"><i class="fa fa-desktop"></i> Ajouter une machine</a></h4>
{% acl_end %} {% acl_end %}
{% if machines_list %} {% if machines_list %}
{% include "machines/aff_machines.html" with machines_list=machines_list %} {% include "machines/aff_machines.html" with machines_list=machines_list %}
@ -207,21 +207,21 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<p>Aucune machine</p> <p>Aucune machine</p>
{% endif %} {% endif %}
<h2>Cotisations</h2> <h2>Cotisations</h2>
<h4>{% can_create Facture %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Ajouter une cotisation</a> {% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Modifier le solde</a>{% endif%}{% acl_else %}{% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new_facture_solde' user.id %}"><i class="glyphicon glyphicon-piggy-bank"></i> Ajouter une cotisation par solde</a>{% endif %}{% acl_end %}</h4> <h4>{% can_create Facture %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}"><i class="fa fa-euro-sign"></i> Ajouter une cotisation</a> {% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:credit-solde' users.id %}"><i class="fa fa-euro-sign"></i> Modifier le solde</a>{% endif%}{% acl_else %}{% if user_solde %}<a class="btn btn-primary btn-sm" role="button" href="{% url 'cotisations:new_facture_solde' user.id %}"><i class="fa fa-euro-sign"></i> Ajouter une cotisation par solde</a>{% endif %}{% acl_end %}</h4>
{% if facture_list %} {% if facture_list %}
{% include "cotisations/aff_cotisations.html" with facture_list=facture_list %} {% include "cotisations/aff_cotisations.html" with facture_list=facture_list %}
{% else %} {% else %}
<p>Aucune facture</p> <p>Aucune facture</p>
{% endif %} {% endif %}
<h2>Bannissements</h2> <h2>Bannissements</h2>
{% can_create Ban %}<h4><a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-ban' users.id %}"><i class="glyphicon glyphicon-pushpin"></i> Ajouter un bannissement</a></h4>{% acl_end %} {% can_create Ban %}<h4><a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-ban' users.id %}"><i class="fa fa-ban"></i> Ajouter un bannissement</a></h4>{% acl_end %}
{% if ban_list %} {% if ban_list %}
{% include "users/aff_bans.html" with ban_list=ban_list %} {% include "users/aff_bans.html" with ban_list=ban_list %}
{% else %} {% else %}
<p>Aucun bannissement</p> <p>Aucun bannissement</p>
{% endif %} {% endif %}
<h2>Accès à titre gracieux :</h2> <h2>Accès à titre gracieux :</h2>
{% can_create Whitelist %}<h4><a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-whitelist' users.id %}"><i class="glyphicon glyphicon-flag"></i> Accorder un accès à titre gracieux</a></h4>{% acl_end %} {% can_create Whitelist %}<h4><a class="btn btn-primary btn-sm" role="button" href="{% url 'users:add-whitelist' users.id %}"><i class="fa fa-check-circle"></i> Accorder un accès à titre gracieux</a></h4>{% acl_end %}
{% if white_list %} {% if white_list %}
{% include "users/aff_whitelists.html" with white_list=white_list %} {% include "users/aff_whitelists.html" with white_list=white_list %}
{% else %} {% else %}

View file

@ -28,62 +28,62 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% if request.user.is_authenticated%} {% if request.user.is_authenticated%}
{% can_create Club %} {% can_create Club %}
<a class="list-group-item list-group-item-success" href="{% url "users:new-club" %}"> <a class="list-group-item list-group-item-success" href="{% url "users:new-club" %}">
<i class="glyphicon glyphicon-plus"></i> <i class="fa fa-plus"></i>
Créer un club/association Créer un club/association
</a> </a>
{% acl_end %} {% acl_end %}
{% can_create Adherent %} {% can_create Adherent %}
<a class="list-group-item list-group-item-success" href="{% url "users:new-user" %}"> <a class="list-group-item list-group-item-success" href="{% url "users:new-user" %}">
<i class="glyphicon glyphicon-plus"></i> <i class="fa fa-user-plus"></i>
Créer un adhérent Créer un adhérent
</a> </a>
{% acl_end %} {% acl_end %}
{% endif %} {% endif %}
{% can_view_all Club %} {% can_view_all Club %}
<a class="list-group-item list-group-item-info" href="{% url "users:index-clubs" %}"> <a class="list-group-item list-group-item-info" href="{% url "users:index-clubs" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Clubs et assos Clubs et assos
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Adherent %} {% can_view_all Adherent %}
<a class="list-group-item list-group-item-info" href="{% url "users:index" %}"> <a class="list-group-item list-group-item-info" href="{% url "users:index" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Adherents Adherents
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Ban %} {% can_view_all Ban %}
<a class="list-group-item list-group-item-info" href="{% url "users:index-ban" %}"> <a class="list-group-item list-group-item-info" href="{% url "users:index-ban" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Bannissements Bannissements
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all Whitelist %} {% can_view_all Whitelist %}
<a class="list-group-item list-group-item-info" href="{% url "users:index-white" %}"> <a class="list-group-item list-group-item-info" href="{% url "users:index-white" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Accès à titre gracieux Accès à titre gracieux
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all School %} {% can_view_all School %}
<a class="list-group-item list-group-item-info" href="{% url "users:index-school" %}"> <a class="list-group-item list-group-item-info" href="{% url "users:index-school" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Établissements Établissements
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all ListRight %} {% can_view_all ListRight %}
<a class="list-group-item list-group-item-info" href="{% url "users:index-listright" %}"> <a class="list-group-item list-group-item-info" href="{% url "users:index-listright" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Groupes de droits Groupes de droits
</a> </a>
{% acl_end %} {% acl_end %}
{% can_view_all ServiceUser %} {% can_view_all ServiceUser %}
<a class="list-group-item list-group-item-info" href="{% url "users:index-serviceusers" %}"> <a class="list-group-item list-group-item-info" href="{% url "users:index-serviceusers" %}">
<i class="glyphicon glyphicon-list"></i> <i class="fa fa-list-ul"></i>
Gérer les service users Gérer les service users
</a> </a>
{% acl_end %} {% acl_end %}
{% can_change User state %} {% can_change User state %}
<a class="list-group-item list-group-item-danger" href="{% url "users:mass-archive" %}"> <a class="list-group-item list-group-item-danger" href="{% url "users:mass-archive" %}">
<i class="glyphicon glyphicon-book"></i> <i class="fa fa-archive"></i>
Archiver en masse Archiver en masse
</a> </a>
{% acl_end %} {% acl_end %}