devices.html
42 lines
| 904 B
| text/html
|
HtmlDjangoLexer
|
r13 | {% extends "base.html" %} | |
{% load bootstrap3 %} | |||
{% load static %} | |||
{% load main_tags %} | |||
{% block dev-active %}active{% endblock %} | |||
{% block content-title %}{{title}}{% endblock %} | |||
{% block content-suptitle %}{{suptitle}}{% endblock %} | |||
{% block content %} | |||
<table class="table table-hover"> | |||
<tr> | |||
<th>#</th> | |||
{% for key in device_keys %} | |||
<th>{{ key|title }}</th> | |||
{% endfor%} | |||
</tr> | |||
{% for device in devices %} | |||
<tr class="clickable-row" data-href="{% url 'url_device' device.id %}"> | |||
<td>{{ forloop.counter }}</td> | |||
{% for key in device_keys %} | |||
<td>{{ device|attr:key }}</td> | |||
{% endfor %} | |||
</tr> | |||
{% endfor %} | |||
</table> | |||
|
r85 | ||
|
r13 | {% endblock %} | |
{% block sidebar%} | |||
{% include "sidebar_devices.html" %} | |||
{% endblock %} | |||
{% block extra-js%} | |||
<script type="text/javascript"> | |||
$(".clickable-row").click(function() { | |||
document.location = $(this).data("href"); | |||
|
r85 | }); | |
|
r13 | ||
</script> | |||
{% endblock %} |