##// END OF EJS Templates
Task #487: Vista Operation segun nuevo modelo....
Task #487: Vista Operation segun nuevo modelo. git-svn-id: http://jro-dev.igp.gob.pe/svn/jro_hard/radarsys/trunk/webapp@102 aa17d016-51d5-4e8b-934c-7b2bbb1bbe71

File last commit:

r81:ce9ea5687ea8
r81:ce9ea5687ea8
Show More
operation.html
146 lines | 4.2 KiB | text/html | HtmlDjangoLexer
{% extends "base.html" %}
{% load bootstrap3 %}
{% load static %}
{% load main_tags %}
{% block extra-head %}
<link href="{% static 'css/bootstrap-datetimepicker.min.css' %}" media="screen" rel="stylesheet">
{% endblock %}
{% block camp-active %}active{% endblock %}
{% block content-title %}{{title}}{% endblock %}
{% block content-suptitle %}{{suptitle}}{% endblock %}
{% block content %}
<!-- Not Empty-->
{% if details %}
<form class="form" method="post" action="">
{% csrf_token %}
{% bootstrap_form form layout='horizontal' size='medium' %}
<div style="clear: both;"></div>
<br>
<!-- For deep search -->
{% if search_button == True %}
<button id="button-1" type="button" class="btn btn-primary pull-right">{{button}}</button>
{% endif %}
<br>
<br>
</form>
<br>
<br>
{% endif %}
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" >
{% for location in locations %}
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingTwo">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" href="#collapseTwo-{{ location.id }}" aria-expanded="false" aria-controls="collapseTwo">
{{location.name}}: Experiment List
<span>
</span>
</a>
<button id="play-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px">
<span class="glyphicon glyphicon-play" aria-hidden="true"></span>
</button>
<button id="stop-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px">
<span class="glyphicon glyphicon-stop" aria-hidden="true"></span>
</button>
</h4>
</div>
<div id="collapseTwo-{{ location.id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo">
<div class="panel-body">
<table class="table table-hover">
<tr>
<th>#</th>
{% for header in experiment_keys %}
<th>{{ header|title }}</th>
{% endfor%}
</tr>
{% for item in experiments %}
{% if location.name in item.location.name %}
<tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}" >
<td>{{ forloop.counter }}</td>
{% for key in experiment_keys %}
{% if 'status' in key %}
<td></td>
{% else %}
<td>{{ item|value:key }}</td>
{% endif %}
{% endfor %}
</tr>
{% endif %}
{% endfor %}
</table>
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
{% block extra-js%}
<script type="text/javascript">
//for (i = 0; i < locations.length; i++) {
// text += cars[i] + "<br>";
//}
//------For PLAY Button-------
{% for location in locations %}
$("#play-{{ location.id }}").click(function() {
//alert("Play-{{location}}");
var id_loc = {{location.id}}
//document.location =
});
{% endfor %}
//--------For STOP Button-------
{% for location in locations %}
$("#stop-{{ location.id }}").click(function() {
alert("Stop-{{location}}");
// document.location = "{% url 'url_operation' campaign.id %}";
});
{% endfor %}
$(".clickable-row").click(function() {
document.location = $(this).data("href");
});
{% if search_button == True %}
$(document).ready(function() {
$("#id_campaign").change(function() {
var id_camp = document.getElementById("id_campaign").value;
//alert(id_camp);
document.location = "{% url 'url_operation'%}"+String(id_camp);
});
});
{% else %}
$(document).ready(function() {
$("#id_campaign").change(function() {
var id_camp = document.getElementById("id_campaign").value;
//alert(id_camp);
document.location = "{% url 'url_operation_search'%}"+String(id_camp);
});
});
{% endif %}
$("#button-1").click(function() {
document.location = "{% url 'url_operation_search' %}";
});
</script>
{% endblock %}