From ba556c2272216cb70b2a3accf47b4e1ad6677993 Mon Sep 17 00:00:00 2001 From: Retspen Date: Fri, 15 May 2015 20:54:55 +0300 Subject: [PATCH] Fixed #3 --- create/views.py | 4 ++-- instances/templates/create_inst_block.html | 22 ++++++++++++++++------ instances/templates/instances.html | 3 +++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/create/views.py b/create/views.py index 877eb6f..5b03f8c 100644 --- a/create/views.py +++ b/create/views.py @@ -48,10 +48,10 @@ def create_instance(request, compute_id): if conn: if not storages: - msg = _("You haven't defined have any storage pools") + msg = _("You haven't defined any storage pools") error_messages.append(msg) if not networks: - msg = _("You haven't defined have any network pools") + msg = _("You haven't defined any network pools") error_messages.append(msg) if request.method == 'POST': diff --git a/instances/templates/create_inst_block.html b/instances/templates/create_inst_block.html index 63fcc35..36ec37d 100644 --- a/instances/templates/create_inst_block.html +++ b/instances/templates/create_inst_block.html @@ -18,9 +18,13 @@
@@ -30,9 +34,15 @@ - + {% if computes %} + + {% else %} + + {% endif %} diff --git a/instances/templates/instances.html b/instances/templates/instances.html index c707c35..3eceedb 100644 --- a/instances/templates/instances.html +++ b/instances/templates/instances.html @@ -9,6 +9,9 @@
+ {% if request.user.is_superuser %} + {% include 'create_inst_block.html' %} + {% endif %} {% if all_host_vms %} {% include 'create_inst_block.html' %}