mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-19 07:53:14 +00:00
reverse group and user in GUI
This commit is contained in:
@@ -176,58 +176,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="padding: 10px;">
|
<div style="padding: 10px;">
|
||||||
<div class="ui-widget">
|
|
||||||
<select id="user-list" name="" tabindex="-1" aria-hidden="true"
|
|
||||||
class="">
|
|
||||||
<option value="">Select an user</option>
|
|
||||||
{% for user in listUsers %}
|
|
||||||
<option value="{{ user.id }}">{{ user.username }}</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
User
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
View
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Edit
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
Delete
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody id="user-permission-list">
|
|
||||||
{% for permission in permissions %}
|
|
||||||
{% if permission.userType == 'user' %}
|
|
||||||
<tr data-user-id="{{ permission.userId }}" data-mask="{{ permission.mask }}">
|
|
||||||
<td>
|
|
||||||
{{ permission.username }}
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input class="user-view" type="checkbox" {% if (permission.mask b-and 1) != 0 %} checked {% endif %}/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input class="user-edit" type="checkbox" {% if (permission.mask b-and 4) != 0 %} checked {% endif %}/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<input class="user-delete" type="checkbox" {% if (permission.mask b-and 8) != 0 %} checked {% endif %}/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<div class="ui-widget">
|
<div class="ui-widget">
|
||||||
<select id="group-list" name="" tabindex="-1" aria-hidden="true"
|
<select id="group-list" name="" tabindex="-1" aria-hidden="true"
|
||||||
class="">
|
class="">
|
||||||
@@ -276,6 +227,59 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<div class="ui-widget">
|
||||||
|
<select id="user-list" name="" tabindex="-1" aria-hidden="true"
|
||||||
|
class="">
|
||||||
|
<option value="">Select an user</option>
|
||||||
|
{% for user in listUsers %}
|
||||||
|
<option value="{{ user.id }}">{{ user.username }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
User
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
View
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Edit
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
Delete
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="user-permission-list">
|
||||||
|
{% for permission in permissions %}
|
||||||
|
{% if permission.userType == 'user' %}
|
||||||
|
<tr data-user-id="{{ permission.userId }}" data-mask="{{ permission.mask }}">
|
||||||
|
<td>
|
||||||
|
{{ permission.username }}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input class="user-view" type="checkbox" {% if (permission.mask b-and 1) != 0 %} checked {% endif %}/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input class="user-edit" type="checkbox" {% if (permission.mask b-and 4) != 0 %} checked {% endif %}/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input class="user-delete" type="checkbox" {% if (permission.mask b-and 8) != 0 %} checked {% endif %}/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user