{% load i18n %}
{% if not can_power %}

{% trans "Only the owners of this instance and administrators can change its power state." %}

{% else %}
{% if instance.status == 1 or instance.status == 2 %}

{% trans "This action sends an ACPI shutdown signal to the instance." %}

{% csrf_token %}

{% trans "This action forcibly powers off and start the instance and may cause data corruption." %}

{% csrf_token %}

{% trans "This action forcibly powers off the instance and may cause data corruption." %}

{% csrf_token %}
{% if request.user.is_superuser %}

{% trans "This action suspends the instance." %}

{% csrf_token %}
{% endif %} {% endif %} {% if instance.status == 3 %} {% if request.user.is_superuser %}

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

{% csrf_token %}

{% trans "This action forcibly powers off the instance and may cause data corruption." %}

{% csrf_token %}
{% else %}

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

{% csrf_token %}
{% endif %} {% endif %} {% if instance.status == 4 or instance.status == 6 or instance.status == 7 %} {# shutting down, crashed or suspended by the guest: a forced power off ends it, then it can be started #}

{% trans "This action forcibly powers off the instance and may cause data corruption." %}

{% csrf_token %}
{% endif %} {% if instance.status == 5 %}

{% trans "Click on Power On button to start this instance." %}

{% csrf_token %} {% if instance.is_template %}

{% trans "Template instance cannot be started." %}

{% else %} {% endif %}
{% endif %}
{% endif %}