operation.html
102 lines
| 3.0 KiB
| text/html
|
HtmlDjangoLexer
|
r50 | {% 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 %} | |||
<form class="form" method="post" action=""> | |||
{% csrf_token %} | |||
{% bootstrap_form form layout='horizontal' size='medium' %} | |||
<div style="clear: both;"></div> | |||
<br> | |||
<button type="submit" class="btn btn-primary pull-right">{{button}}</button> | |||
<br> | |||
<br> | |||
</form> | |||
<br> | |||
|
r53 | <br> | |
|
r50 | ||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" > | |||
|
r53 | {% for location in locations %} | |
|
r50 | ||
<div class="panel panel-default"> | |||
<div class="panel-heading" role="tab" id="headingTwo"> | |||
<h4 class="panel-title"> | |||
|
r53 | <a class="collapsed" role="button" data-toggle="collapse" href="#collapseTwo-{{ location.id }}" aria-expanded="false" aria-controls="collapseTwo"> | |
{{location.name}}: Experiment List | |||
|
r52 | <span> | |
</span> | |||
|
r50 | </a> | |
|
r52 | <button 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 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> | |||
|
r50 | </h4> | |
</div> | |||
|
r53 | <div id="collapseTwo-{{ location.name }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingTwo"> | |
|
r50 | <div class="panel-body"> | |
<table class="table table-hover"> | |||
<tr> | |||
|
r53 | <th>#</th> | |
|
r50 | {% for header in experiment_keys %} | |
<th>{{ header|title }}</th> | |||
{% endfor%} | |||
</tr> | |||
|
r53 | ||
|
r50 | {% for item in experiments %} | |
|
r53 | {% 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 %} | |||
<td>{{ item|value:key }}</td> | |||
{% endfor %} | |||
</tr> | |||
{% endif %} | |||
|
r50 | {% endfor %} | |
</table> | |||
</div> | |||
</div> | |||
</div> | |||
{% endfor %} | |||
</div> | |||
{% endblock %} | |||
{% block extra-js%} | |||
<script type="text/javascript"> | |||
//$("#bt_add").click(function() { | |||
//alert("sometext"); | |||
// document.location = "{% url 'url_operation' campaign.id %}"; | |||
//}); | |||
$(".clickable-row").click(function() { | |||
document.location = $(this).data("href"); | |||
}); | |||
$(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); | |||
}); | |||
}); | |||
</script> | |||
{% endblock %} |