{% load i18n %} {% load vm_states %}
{% trans "Only the owners of this instance and administrators can change its power state." %}
{% else %} {# the actions the VM's state allows this user (states.allowed_actions): those that keep the guest's data, and those that cut the power #} {% vm_state instance.status as state %}{% trans "Power" %} ยท {{ state.0 }}
{% if "poweroff" in power_actions or "suspend" in power_actions or "resume" in power_actions or "poweron" in power_actions or "force_off" in power_actions or "powercycle" in power_actions %}{% trans "The VM is paused. An administrator can resume it." %}
{% elif instance.status == 5 and instance.is_template %}{% trans "A template is not started: clone it to make a VM." %}
{% else %}{% trans "There is no power action for the VM in this state." %}
{% endif %}