Commit f558ded5 authored by ibuler's avatar ibuler

Plan delete some view

parent 324bb686
...@@ -9,34 +9,33 @@ ...@@ -9,34 +9,33 @@
<th class="text-center"> <th class="text-center">
<input type="checkbox" id="check_all" onclick="checkAll('check_all', 'checked')"> <input type="checkbox" id="check_all" onclick="checkAll('check_all', 'checked')">
</th> </th>
<th class="text-center"><a href="{% url 'users:user-list' %}?sort=name">{% trans 'Name' %}</a></th> <th class="text-center"><a href="{% url 'perms:user-permission-list' %}?sort=name">{% trans 'Name' %}</a></th>
<th class="text-center"><a href="{% url 'users:user-list' %}?sort=username">{% trans 'Username' %}</a></th> <th class="text-center"><a href="{% url 'perms:user-permission-list' %}?sort=username">{% trans 'Username' %}</a></th>
<th class="text-center">{% trans 'Role' %}</th> <th class="text-center">{% trans 'Asset count' %}</th>
<th class="text-center">{% trans 'Asset num' %}</th> <th class="text-center">{% trans 'Asset group count' %}</th>
<th class="text-center">{% trans 'Asset group' %}</th> <th class="text-center">{% trans 'System user count' %}</th>
<th class="text-center">{% trans 'System user' %}</th> <th class="text-center"><a href="{% url 'users:user-list' %}?sort=date_expired">{% trans 'Is expired' %}</a></th>
<th class="text-center"><a href="{% url 'users:user-list' %}?sort=date_expired">{% trans 'Active' %}</a></th>
<th class="text-center"></th> <th class="text-center"></th>
{% endblock %} {% endblock %}
{% block table_body %} {% block table_body %}
{% for user in user_list %} {% for permission in user_permission_list %}
<tr class="gradeX"> <tr class="gradeX">
<td class="text-center"> <td class="text-center">
<input type="checkbox" name="checked" value="{{ user.id }}"> <input type="checkbox" name="checked" value="{{ permission.id }}">
</td> </td>
<td class="text-center"> <td class="text-center">
<a href="{% url 'users:user-detail' pk=user.id %}"> <a href="">
{{ user.name }} {{ permission.user.name }}
</a> </a>
</td> </td>
<td class="text-center">{{ user.username }}</td> <td class="text-center">{{ permission.user.username }}</td>
<td class="text-center">{{ user.get_role_display }}</td> <td class="text-center">{{ permission.assets.count }}</td>
<th class="text-center">35/40</th> <td class="text-center">{{ permission.asset_groups.count }}</td>
<th class="text-center">20</th> <td class="text-center">{{ permission.system_users.count }}</td>
<th class="text-center">3</th> <td class="text-center">{{ permission.is_expired }}</td>
<td class="text-center"> <td class="text-center">
<a href="{% url 'perms:perm-user-asset-create' pk=user.id %}" class="btn btn-xs btn-info">{% trans 'Create perm' %}</a> <a href="{% url 'perms:user-asset-permission-create' pk=user.id %}" class="btn btn-xs btn-info">{% trans 'Create perm' %}</a>
<a href="{% url 'users:user-delete' pk=user.id %}" class="btn btn-xs btn-danger del {% if user.id == request.user.id or user.username == 'admin' %} disabled {% endif %}">{% trans 'Flush' %}</a> <a href="{% url 'users:user-delete' pk=user.id %}" class="btn btn-xs btn-danger del {% if user.id == request.user.id or user.username == 'admin' %} disabled {% endif %}">{% trans 'Flush' %}</a>
</td> </td>
</tr> </tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment