8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +00:00

Merge branch 'affichage_droits' into 'master'

Affichage plus lisible pour la suppression des droits

See merge request rezo/re2o!17
This commit is contained in:
Maël Kervella 2017-10-15 17:10:00 +02:00
commit 91f4198270

View file

@ -35,19 +35,28 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<form class="form" method="post"> <form class="form" method="post">
{% csrf_token %} {% csrf_token %}
<table class="table table-striped"> <table class="table table-striped">
<thead> <tbody>
<tr>
{% for key, values in userform.items %} {% for key, values in userform.items %}
<th>{{ key }}</th> <tr class="active">
{% endfor %} <td>
<a data-toggle="collapse" href="#collapseRight_{{key}}" aria-expanded="false" aria-controls="collapseRights_{{key}}">
<b>{{ key }}</b> ( {{values.rights|length }} users )
</a>
</td>
</tr> </tr>
</thead>
<tr> <tr>
{% for key, values in userform.items %} <td>
{% bootstrap_form_errors values %} <div class="collapse" id="collapseRight_{{key}}">
<th>{{ values.rights }}</th> <ul class="list-group" style="margin-bottom: 0px">
{% for user in values.rights %}
<li class="list-group-item col-xs-6 col-sm-4 col-md-3" style="border: none;">{{ user }}</li>
{% endfor %} {% endfor %}
</ul>
</div>
</td>
</tr> </tr>
{% endfor %}
</tbody>
</table> </table>
{% bootstrap_button "Modifier" button_type="submit" icon="star" %} {% bootstrap_button "Modifier" button_type="submit" icon="star" %}
</form> </form>