From 198c10052481141e7ddd4ea1a01bbd8bdc120a3d Mon Sep 17 00:00:00 2001 From: catborise Date: Wed, 16 Jan 2019 09:43:58 +0300 Subject: [PATCH] Add title some buttons. Add trans. Remove redundant dom elements --- instances/templates/instance.html | 60 ++++++++++++------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/instances/templates/instance.html b/instances/templates/instance.html index 21d1531..29b8ccb 100644 --- a/instances/templates/instance.html +++ b/instances/templates/instance.html @@ -40,7 +40,7 @@ {% if user_quota_msg %} - {{ user_quota_msg|capfirst }} quota reached. + {{ user_quota_msg|capfirst }} {% trans "quota reached" %}. {% endif %}
@@ -187,23 +187,18 @@ {% endif %} {% endifequal %} {% ifequal status 3 %} - {% if request.user.is_superuser %} -
+
+
{% csrf_token %} + {% if request.user.is_superuser %}

{% trans "This action restore the instance after suspend." %}

- {% csrf_token %} - -
-
-
- {% else %} -
+ + {% else %}

{% trans "Administrator blocked your instance." %}

-
{% csrf_token %} - -
-
-
- {% endif %} + + {% endif %} +
+ +
{% endifequal %} {% ifequal status 5 %}
@@ -270,7 +265,6 @@
  • {% trans "Console - Full" %}
  • - {% else %} {% endifequal %} @@ -350,7 +344,7 @@
    {% if request.user.is_superuser or request.user.is_staff or userinstance.is_change %}
    {% csrf_token %} -

    {% trans "Logical host CPUs:" %} {{ vcpu_host }}

    +

    {% trans "Logical host CPUs" %} : {{ vcpu_host }}

    @@ -381,8 +375,7 @@
    @@ -392,7 +385,6 @@
    -
    + {% else %} - + {% endifequal %} {% else %}

    {% trans "**** Please shutdown instance to modify boot menu ****" %} @@ -647,10 +637,10 @@

    - +
    - +
    @@ -661,7 +651,6 @@ {% endifequal %}
    -
    {% if status == 5 %} {% csrf_token %} @@ -703,7 +692,7 @@ {% if media_iso and allow_admin_or_not_template %} {% if status == 5 %} - + {% endif %} {% else %} @@ -1505,8 +1494,6 @@ $(document).ready(function () { // Highlight pre-selected checkboxes if (checkbox.prop("checked")) checkbox.parent().addClass("multiselect-on"); - - // Highlight checkboxes that the user selects checkbox.click(function() { if (checkbox.prop("checked")) @@ -1550,7 +1537,6 @@ $(document).ready(function () { }); }); -