Commit 68b8e517 by Dányi Bence

webui: template refactoring

parent 6aa6b977
......@@ -2,8 +2,6 @@
{% load i18n %}
{% 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 %}
{% include "box/summary-vm.html" %}
{% endblock summary %}
......
<li class="entry {% block entryclass %}{% endblock entryclass %}">
<div class="summary {% block summaryclass %}{% endblock summaryclass %}">
{% block summary %}{% endblock summary %}
</div>
<div class="details">
<div class="details-container">
{% block details %}{% endblock details %}
......
......@@ -2,10 +2,16 @@
{% load i18n %}
{% 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 %}
<div class="name {% if i.state == 'ACTIVE' %}vm-on{% else %}vm-off{% endif %}">
{{vm.name|truncatechars:20}}
</div>
{% endblock %}
{% block status %}
......
<div class="name {% block nameclass %}{% endblock %}">
{% block content %}
{% block name %}{% endblock %}
</div>
<div class="status">
<div class="status">
{% block status %}{% endblock status %}
</div>
<div class="actions">
</div>
<div class="actions">
{% block actions %}{% endblock actions %}
</div>
<div class="clear"></div>
</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