Commit 68b8e517 by Dányi Bence

webui: template refactoring

parent 6aa6b977
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block summaryclass %}{% if id == vm.id %}selected-summary{% endif %} {% if vm.template.state == "NEW" %}unfinished{% endif %}{% endblock summaryclass %}
{% block summary %} {% block summary %}
{% include "box/summary-vm.html" %} {% include "box/summary-vm.html" %}
{% endblock summary %} {% endblock summary %}
......
<li class="entry {% block entryclass %}{% endblock entryclass %}"> <li class="entry {% block entryclass %}{% endblock entryclass %}">
<div class="summary {% block summaryclass %}{% endblock summaryclass %}"> {% block summary %}{% endblock summary %}
{% block summary %}{% endblock summary %}
</div>
<div class="details"> <div class="details">
<div class="details-container"> <div class="details-container">
{% block details %}{% endblock details %} {% block details %}{% endblock details %}
......
...@@ -2,10 +2,16 @@ ...@@ -2,10 +2,16 @@
{% load i18n %} {% load i18n %}
{% get_current_language as LANGUAGE_CODE %} {% get_current_language as LANGUAGE_CODE %}
{% block nameclass %}{% if vm.state == 'ACTIVE' %}vm-on{% else %}vm-off{% endif %}{% endblock nameclass %} {% block content %}
<div class="summary {% if id == vm.id %}selected-summary{% endif %} {% if vm.template.state == "NEW" %}unfinished{% endif %}">
{{ block.super }}
</div>
{% endblock content %}
{% block name %} {% block name %}
<div class="name {% if i.state == 'ACTIVE' %}vm-on{% else %}vm-off{% endif %}">
{{vm.name|truncatechars:20}} {{vm.name|truncatechars:20}}
</div>
{% endblock %} {% endblock %}
{% block status %} {% block status %}
......
<div class="name {% block nameclass %}{% endblock %}"> {% block content %}
{% block name %}{% endblock %} {% block name %}{% endblock %}
</div> <div class="status">
<div class="status"> {% block status %}{% endblock status %}
{% block status %}{% endblock status %} </div>
</div> <div class="actions">
<div class="actions"> {% block actions %}{% endblock actions %}
{% block actions %}{% endblock actions %} </div>
</div> <div class="clear"></div>
<div class="clear"></div> {% endblock content %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment