dev_conf.html
84 lines
| 3.1 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> | ||
|
r197 | <li><a href="{{ dev_conf.get_absolute_url_export }}"><span class="glyphicon glyphicon-export" aria-hidden="true"></span> Export </a></li> | ||
|
r79 | {% 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> | ||
|
r207 | {% if dev_conf.device.device_type.name != 'abs' %} | ||
|
r55 | <li><a href="{{ dev_conf.get_absolute_url_read }}"><span class="glyphicon glyphicon-upload" aria-hidden="true"></span> Read</a></li> | ||
|
r207 | {% endif %} | ||
|
r197 | </ul> | ||
|
r53 | </span> | ||
|
r79 | {% endblock %} | ||
|
r13 | <table class="table table-bordered"> | ||
|
r30 | <tr> | ||
<th>Status</th> | ||||
|
r216 | <td class="text-{{dev_conf.device.status_color}}"><strong> {% if dev_conf.device.device_type.name == 'abs' %} {{connected_modules}} {% else %} {{dev_conf.device.get_status_display}}{% endif %}</strong></td> | ||
|
r30 | </tr> | ||
|
r197 | |||
|
r30 | {% 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 %} | ||
|
r197 | |||
|
r13 | |||
{% block extra-js%} | ||||
<script type="text/javascript"> | ||||
|
r197 | |||
|
r15 | $("#bt_edit").click(function() { | ||
|
r30 | document.location = "{{ dev_conf.get_absolute_url_edit }}"; | ||
}); | ||||
|
r197 | |||
|
r30 | $("#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 | }); | ||
|
r197 | |||
|
r13 | </script> | ||
|
r197 | {% endblock %} | ||