dev_conf.html
83 lines
| 3.0 KiB
| text/html
|
HtmlDjangoLexer
|
r13 | {% extends "base.html" %} | |
{% load bootstrap3 %} | |||
{% load static %} | |||
{% load main_tags %} | |||
|
r85 | {% block search-active %}active{% endblock %} | |
|
r13 | ||
{% block content-title %}{{title}}{% endblock %} | |||
{% block content-suptitle %}{{suptitle}}{% endblock %} | |||
{% block content %} | |||
|
r26 | ||
|
r79 | {% block menu-actions %} | |
|
r53 | <span class=" dropdown pull-right"> | |
|
r85 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-menu-hamburger gi-2x" aria-hidden="true"></span></a> | |
|
r53 | <ul class="dropdown-menu" role="menu"> | |
|
r55 | <li><a href="{{ dev_conf.get_absolute_url_edit }}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a></li> | |
|
r106 | <li><a href="{% url 'url_delete_dev_conf' dev_conf.id %}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete</a></li> | |
|
r55 | <li><a href="{{ dev_conf.get_absolute_url_import }}"><span class="glyphicon glyphicon-import" aria-hidden="true"></span> Import </a></li> | |
|
r79 | <li><a href="{{ dev_conf.get_absolute_url_export }}"><span class="glyphicon glyphicon-export" aria-hidden="true"></span> Export </a></li> | |
{% block extra-menu-actions %} | |||
{% endblock %} | |||
|
r53 | <li><a>----------------</a></li> | |
|
r55 | <li><a href="{{ dev_conf.get_absolute_url_status }}"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> Status</a></li> | |
|
r60 | {% if not no_play %} | |
|
r157 | {% if not only_stop %} | |
<li><a href="{{ dev_conf.get_absolute_url_start}}"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> Start</a></li> | |||
{% endif %} | |||
|
r55 | <li><a href="{{ dev_conf.get_absolute_url_stop }}"><span class="glyphicon glyphicon-stop" aria-hidden="true"></span> Stop</a></li> | |
|
r60 | {% endif %} | |
|
r55 | <li><a href="{{ dev_conf.get_absolute_url_write }}"><span class="glyphicon glyphicon-download" aria-hidden="true"></span> Write</a></li> | |
<li><a href="{{ dev_conf.get_absolute_url_read }}"><span class="glyphicon glyphicon-upload" aria-hidden="true"></span> Read</a></li> | |||
|
r53 | </ul> | |
</span> | |||
|
r79 | {% endblock %} | |
|
r13 | <table class="table table-bordered"> | |
|
r30 | <tr> | |
<th>Status</th> | |||
|
r175 | <td class="text-{{dev_conf.device.status_color}}"> {{dev_conf.device.get_status_display}} </td> | |
|
r30 | </tr> | |
{% for key in dev_conf_keys %} | |||
<tr> | |||
<th>{% get_verbose_field_name dev_conf key %}</th> | |||
<td>{{dev_conf|attr:key}}</td> | |||
</tr> | |||
{% endfor %} | |||
|
r13 | </table> | |
|
r26 | ||
|
r79 | {% block extra-content %} | |
{% endblock %} | |||
|
r13 | {% endblock %} | |
{% block sidebar%} | |||
{% include "sidebar_devices.html" %} | |||
{% endblock %} | |||
{% block extra-js%} | |||
<script type="text/javascript"> | |||
|
r15 | $("#bt_edit").click(function() { | |
|
r30 | document.location = "{{ dev_conf.get_absolute_url_edit }}"; | |
}); | |||
$("#bt_read").click(function() { | |||
document.location = "{{ dev_conf.get_absolute_url_read }}"; | |||
}); | |||
$("#bt_write").click(function() { | |||
document.location = "{{ dev_conf.get_absolute_url_write }}"; | |||
}); | |||
$("#bt_import").click(function() { | |||
document.location = "{{ dev_conf.get_absolute_url_import }}"; | |||
}); | |||
$("#bt_export").click(function() { | |||
document.location = "{{ dev_conf.get_absolute_url_export }}"; | |||
|
r13 | }); | |
</script> | |||
{% endblock %} |