1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-01-12 08:25:18 +00:00

Fix layout

This commit is contained in:
Retspen 2015-03-06 15:06:29 +02:00
parent 573a09fd4d
commit cd4ac13e36
4 changed files with 67 additions and 26 deletions

View file

@ -1,5 +1,40 @@
{% load i18n %}
{% if request.user.is_superuser %} {% if request.user.is_superuser %}
<button type="button" class="btn btn-success pull-right"> <a href="#AddInstance" type="button" class="btn btn-success pull-right" data-toggle="modal">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
</a>
<!-- Modal pool -->
<div class="modal fade" id="AddInstance" tabindex="-1" role="dialog" aria-labelledby="AddNetPoolLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">{% trans "Chose computes for new instance" %}</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<label class="col-sm-4 control-label">{% trans "Compute" %}</label>
<div class="col-sm-6">
<select class="form-control" id="compute_select">
{% for compute in computes %}
<option value="{{ compute.id }}">{{ compute.name }}</option>
{% endfor %}
</select>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">
{% trans "Close" %}
</button> </button>
<button type="submit" class="btn btn-primary" name="chose" onclick='goto_compute()'>
{% trans "Chose" %}
</button>
</div>
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
</div> <!-- /.modal -->
{% endif %} {% endif %}

View file

@ -189,10 +189,16 @@
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% block javascript %} {% block script %}
<script type="application/javascript"> <script>
function open_console(uuid) { function open_console(uuid) {
window.open("/{% url 'console' %}/?token=" + uuid, "", "width=850,height=485"); window.open("{% url 'console' %}?token=" + uuid, "", "width=850,height=485");
}
</script>
<script>
function goto_compute() {
var compute = $("#compute_select").val();
window.location = "/create/" + compute + "/";
} }
</script> </script>
{% endblock %} {% endblock %}