2017-05-20 13:57:21 +02:00
|
|
|
{% extends "kfet/base_col_2.html" %}
|
2016-08-21 02:53:35 +02:00
|
|
|
|
|
|
|
{% block title %}Groupes de comptes{% endblock %}
|
2017-05-20 13:57:21 +02:00
|
|
|
{% block header-title %}Groupes de comptes{% endblock %}
|
2016-08-21 02:53:35 +02:00
|
|
|
|
2017-06-12 01:51:10 +02:00
|
|
|
{% block fixed %}
|
2016-08-21 02:53:35 +02:00
|
|
|
|
2017-06-12 01:51:10 +02:00
|
|
|
<div class="buttons">
|
|
|
|
<a class="btn btn-primary" href="{% url 'kfet.account.group.create' %}">
|
|
|
|
<span class="glyphicon glyphicon-plus"></span><span>Créer un groupe</span>
|
|
|
|
</a>
|
2017-05-20 13:57:21 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
2017-06-12 01:51:10 +02:00
|
|
|
{% block main %}
|
2017-05-20 13:57:21 +02:00
|
|
|
|
|
|
|
{% for group in groups %}
|
2017-06-12 01:51:10 +02:00
|
|
|
<section>
|
|
|
|
<div class="heading">
|
|
|
|
{{ group.name }}
|
|
|
|
<div class="buttons">
|
|
|
|
<a class="btn btn-default" href="{% url 'kfet.account.group.update' group.pk %}">
|
|
|
|
<span class="glyphicon glyphicon-cog"></span><span class="hidden-xs">Éditer</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
2016-08-21 02:53:35 +02:00
|
|
|
</div>
|
2017-06-12 01:51:10 +02:00
|
|
|
<div>
|
|
|
|
<h3>Comptes</h3>
|
|
|
|
<div class="sub-block column-sm-2 column-md-3">
|
|
|
|
<ul>
|
|
|
|
{% for user in group.user_set.all %}
|
|
|
|
<li>
|
|
|
|
<a href="{% url "kfet.account.update" user.profile.account_kfet.trigramme %}">
|
|
|
|
{{ user.profile.account_kfet }}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<h3>Permissions</h3>
|
|
|
|
<div class="column-sm-2 column-lg-3">
|
2017-05-20 13:57:21 +02:00
|
|
|
{% regroup group.permissions.all by content_type as grouped_perms %}
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
{% for perms_group in grouped_perms %}
|
2017-06-12 01:51:10 +02:00
|
|
|
<li class="unbreakable">
|
|
|
|
<b>{{ perms_group.grouper|title }}</b>
|
|
|
|
<ul>
|
|
|
|
{% for perm in perms_group.list %}
|
|
|
|
<li>{{ perm.name }}</li>
|
|
|
|
{% endfor %}
|
2017-05-20 13:57:21 +02:00
|
|
|
</ul>
|
2017-05-30 20:44:30 +02:00
|
|
|
</li>
|
2017-05-20 13:57:21 +02:00
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2016-08-21 02:53:35 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-06-12 01:51:10 +02:00
|
|
|
</section>
|
2017-05-20 13:57:21 +02:00
|
|
|
{% endfor %}
|
2016-08-21 02:53:35 +02:00
|
|
|
|
|
|
|
{% endblock %}
|