{% extends "box/base/entry.html" %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}

{% block content %}
<li class="entry {% if id == vm.id %}opened{% endif %}">
    {{block.super }}
</li>
{% endblock content %}

{% block summary %}
    {% include "box/vm/summary.html" %}
{% endblock summary %}

{% block details %}
<ul>
    <li class="name">
        {% trans "Hostname" %}:
        <span class="value">{{vm.name}}</span>
        <div class="clear"></div>
    </li>
    <li class="os-{{vm.template.os_type}}">
        {% trans "System" %}:
        <span class="value">{{vm.template.system}}</span>
        <div class="clear"></div>
    </li>
    <li class="template">
        {% trans "Type" %}:
        <span class="value">{{vm.share.type}}</span>
        <div class="clear"></div>
    </li>
    <li class="template">
        {% trans "Share" %}:
        <span class="value">{{vm.share.name}}</span>
        <div class="clear"></div>
    </li>
    <li class="template">
        {% trans "Template" %}:
        <span class="value">{{vm.template.name}}</span>
        <div class="clear"></div>
    </li>
    <li class="type">
        {% trans "Size" %}:
        <span class="value">
            {{vm.template.instance_type.name}}:
            <span class="cpu">{{vm.template.instance_type.CPU}}</span>
            <span class="memory">{{vm.template.instance_type.RAM}}</span>
            <span class="credit">{{vm.template.instance_type.credit}}</span>
        </span>
    </li>
    <li class="date">
        {% trans "Created at" %}:
        <span class="value">{{vm.created_at}}</span>
    </li>
    {% if vm.time_of_suspend %}
    <li class="date">
        {% trans "time of suspend"|capfirst %}:
        <span class="value"> <abbr title="{{vm.time_of_suspend}}">{{vm.time_of_suspend|timeuntil}}</abbr>
            <a href="#"  class="renew-vm-button renew-suspend-vm-button" data-id="{{ vm.id }}" title="{% trans "Renew suspend time" %}">
                <img src="/static/icons/control-double.png" alt="{% trans "Renew suspend time" %}" />
            </a>
        </span>
    </li>
    {% endif %}
        {% if vm.time_of_delete %}
    <li class="date">
        {% trans "time of delete"|capfirst %}:
        <span class="value"> <abbr title="{{vm.time_of_delete}}">{{vm.time_of_delete|timeuntil}}</abbr>
            <a href="#"  class="renew-vm-button renew-delete-vm-button" data-id="{{ vm.id }}" title="{% trans "Renew deletion time" %}">
                <img src="/static/icons/control-double.png" alt="{% trans "Renew deletion time" %}" />
            </a>
        </span>
    </li>
    {% endif %}
    <li>
        &nbsp;
        <span class="value">
            <a href="/vm/show/{{vm.id}}/" title="{{vm.name}}">{% trans "More details" %}</a>
        </span>
    </li>
</ul>
{% endblock details %}
