You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
3.4 KiB
81 lines
3.4 KiB
{% extends request.is_ajax|yesno:'bajax.html,base.html' %}
|
|
{% load i18n %}
|
|
{% block main %}
|
|
|
|
<ol class="breadcrumb">
|
|
<li><span class="glyphicon glyphicon-home"></span></li>
|
|
<li><a href="{% url 'devapp:group_list' %}">{% trans 'Groups' %}</a></li>
|
|
<li class="active">{% trans 'Devices' %}</li>
|
|
</ol>
|
|
|
|
{% include 'message_block.html' %}
|
|
|
|
<h3>{% trans 'Devices without group' %}</h3>
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<a href="{% url 'devapp:devices_null_group' %}?order_by=ip_address&dir={{ dir|default:"down" }}">
|
|
{% trans 'Ip address' %}
|
|
</a>
|
|
{% if order_by == 'ip_address' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th>
|
|
<a href="{% url 'devapp:devices_null_group' %}?order_by=comment&dir={{ dir|default:"down" }}">
|
|
{% trans 'Comment' %}
|
|
</a>
|
|
{% if order_by == 'comment' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th width="250">
|
|
<a href="{% url 'devapp:devices_null_group' %}?order_by=devtype&dir={{ dir|default:"down" }}">
|
|
{% trans 'Device type' %}
|
|
</a>
|
|
{% if order_by == 'devtype' %}<span class="glyphicon glyphicon-filter"></span>{% endif %}
|
|
</th>
|
|
<th width="100">Do</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for dev in devices %}
|
|
<tr>
|
|
<td><a href="{% url 'devapp:view' dev.user_group.pk|default:0 dev.id %}">{{ dev.ip_address }}</a></td>
|
|
<td>{{ dev.comment }}</td>
|
|
<td>{{ dev.get_devtype_display }}</td>
|
|
<td class="btn-group btn-group-sm">
|
|
{% if perms.devapp.delete_device %}
|
|
<a href="{% url 'devapp:del' dev.user_group.pk|default:0 dev.id %}" class="btn btn-danger btn-sm">
|
|
<span class="glyphicon glyphicon-remove"></span>
|
|
</a>
|
|
{% endif %}
|
|
{% if perms.devapp.change_device %}
|
|
<a href="{% url 'devapp:edit' dev.user_group.pk|default:0 dev.id %}" class="btn btn-default btn-sm">
|
|
<span class="glyphicon glyphicon-edit"></span>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="4">{% trans 'Devices does not found' %}. <a href="{% url 'devapp:add' 0 %}">{% trans 'Create' %}</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="4">
|
|
<a href="{% url 'devapp:add' 0 %}" class="btn btn-success btn-sm">
|
|
<span class="glyphicon glyphicon-plus"></span> {% trans 'Create' %}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
</table>
|
|
</div>
|
|
|
|
{% include 'toolbar_page.html' with pag=devices %}
|
|
|
|
{% endblock %}
|