45 lines
1.4 KiB
Django/Jinja
45 lines
1.4 KiB
Django/Jinja
{% extends 'base.html.j2' %}
|
|
|
|
|
|
{% block content_header_icon %}{% endblock %}
|
|
|
|
{% block body %}
|
|
|
|
<input type="button" value="<< Back to settings" onclick="window.location='{% url 'Settings:Settings' %}';">
|
|
<input type="button" value="New Device Model" onclick="window.location='{% url 'Settings:_device_model_add' %}';">
|
|
<table class="data">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Manufacturer</th>
|
|
<th>Organization</th>
|
|
<th> </th>
|
|
</tr>
|
|
{% for item in list %}
|
|
<tr>
|
|
<td><a href="{% url 'Settings:_device_model_view' pk=item.id %}">{{ item.name }}</a></td>
|
|
<td>{{ item.manufacturer }}</td>
|
|
<td>{% if item.is_global %}Global{% else %}{{ item.organization }}{% endif %}</td>
|
|
<td><a href="{% url 'Settings:_device_model_delete' pk=item.id %}">Delete</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
<div class="pagination">
|
|
<span class="step-links">
|
|
{% if page_obj.has_previous %}
|
|
<a href="?page=1">« first</a>
|
|
<a href="?page={{ page_obj.previous_page_number }}">previous</a>
|
|
{% endif %}
|
|
|
|
<span class="current">
|
|
Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}.
|
|
</span>
|
|
|
|
{% if page_obj.has_next %}
|
|
<a href="?page={{ page_obj.next_page_number }}">next</a>
|
|
<a href="?page={{ page_obj.paginator.num_pages }}">last »</a>
|
|
{% endif %}
|
|
</span>
|
|
</div>
|
|
{% endblock %} |