Commit 2e0fcd96 by Kálmán Viktor

Merge branch 'issue-242' into 'master'

Show parent template in vm-detail and template-detail

Closes #242
parents 500cbf7b 3e89e4a6
......@@ -552,7 +552,8 @@ class TemplateForm(forms.ModelForm):
exclude = ('state', 'disks', )
widgets = {
'system': forms.TextInput,
'max_ram_size': forms.HiddenInput
'max_ram_size': forms.HiddenInput,
'parent': forms.Select(attrs={'disabled': ""}),
}
......
......@@ -23,6 +23,18 @@
{% csrf_token %}
{{ form.name|as_crispy_field }}
<a {% if form.parent.value %}
href="{% url "dashboard.views.template-detail" pk=form.parent.value %}"
{% else %}
disabled %}
{% endif %}
class="btn btn-default pull-right" style="margin-top: 24px;">
{% trans "Visit" %}
<i class="fa fa-arrow-circle-right"></i>
</a>
<div style="width: 80%;">
{{ form.parent|as_crispy_field }}
</div>
<fieldset class="resources-sliders">
<legend>{% trans "Resource configuration" %}</legend>
......
......@@ -90,6 +90,16 @@
</div>
</form>
</div><!-- id:vm-details-tags -->
<dl>
<dt>{% trans "Template" %}:</dt>
<dd>
{% if instance.template %}
{{ instance.template.name }}
{% else %}
-
{% endif %}
</dd>
</dl>
</div>
<div class="col-md-8">
{% if graphite_enabled %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment