2016-09-07 16:40:59 +00:00
|
|
|
{% extends '_list_base.html' %}
|
|
|
|
{% load i18n %}
|
|
|
|
{% load common_tags %}
|
|
|
|
{% block content_left_head %}
|
|
|
|
<a href="{% url 'assets:admin-user-create' %}" class="btn btn-sm btn-primary "> {% trans "Create admin user" %} </a>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block table_head %}
|
|
|
|
<th class="text-center">{% trans 'ID' %}</th>
|
|
|
|
<th class="text-center"><a href="{% url 'assets:admin-user-list' %}?sort=name">{% trans 'Name' %}</a></th>
|
|
|
|
<th class="text-center"><a href="{% url 'assets:admin-user-list' %}?sort=username">{% trans 'Username' %}</a></th>
|
|
|
|
<th class="text-center">{% trans 'Asset num' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Lost connection' %}</th>
|
|
|
|
<th class="text-center">{% trans 'Comment' %}</th>
|
|
|
|
<th class="text-center"></th>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block table_body %}
|
|
|
|
{% for admin_user in admin_user_list %}
|
|
|
|
<tr class="gradeX">
|
|
|
|
<td class="text-center">{{ admin_user.id }}</td>
|
|
|
|
<td>
|
2016-09-08 12:39:06 +00:00
|
|
|
<a href="{% url 'assets:admin-user-detail' pk=admin_user.id %}">
|
2016-09-07 16:40:59 +00:00
|
|
|
{{ admin_user.name }}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="text-center">{{ admin_user.username }}</td>
|
|
|
|
<td class="text-center">{{ admin_user.assets.count }}</td>
|
|
|
|
<td class="text-center">{{ admin_user.assets.count }}</td>
|
|
|
|
<td class="text-center">{{ admin_user.comment|truncatewords:8 }}</td>
|
|
|
|
<td class="text-center">
|
|
|
|
<!-- Todo: Click script button will paste a url to clipboard like: curl http://url/admin_user_create.sh | bash -->
|
|
|
|
<a href="{% url 'assets:admin-user-update' pk=admin_user.id %}" class="btn btn-xs btn-primary">{% trans 'Script' %}</a>
|
|
|
|
<!-- Todo: Click refresh button will run a task to test admin user could connect asset or not immediately -->
|
|
|
|
<a href="{% url 'assets:admin-user-update' pk=admin_user.id %}" class="btn btn-xs btn-warning">{% trans 'Refresh' %}</a>
|
|
|
|
<a href="{% url 'assets:admin-user-update' pk=admin_user.id %}" class="btn btn-xs btn-info">{% trans 'Update' %}</a>
|
2016-09-14 07:19:27 +00:00
|
|
|
<a onclick="obj_del(this,'{{ admin_user.name }}','{% url 'assets:admin-user-delete' admin_user.id %}')" class="btn btn-xs btn-danger del">{% trans 'Delete' %}</a>
|
2016-09-07 16:40:59 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|