index-templates.html 1.87 KB
Newer Older
1
{% load i18n %}
2 3
<div class="panel panel-default">
  <div class="panel-heading">
4
    <span class="btn btn-default btn-xs infobtn pull-right" title="{% trans "List of VM templates that are available for you. You can create new ones from scratch or customize existing ones (preferred)." %}">
5 6
      <i class="icon-info-sign"></i>
    </span>
7
    <h3 class="no-margin"><i class="icon-puzzle-piece"></i> {% trans "Templates" %}
8 9
    </h3>
  </div>
10
  <div class="list-group" id="dashboard-template-list">
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
    <div id="dashboard-template-list">
      {% for t in templates %}
      <a href="{% url "dashboard.views.template-detail" pk=t.pk %}" class="list-group-item
        {% if forloop.last and nodes|length < 5 %} list-group-item-last{% endif %}">
        <span class="index-template-list-name">
          <i class="icon-{{ t.os_type }}"></i> {{ t.name }} 
        </span>
        <small class="text-muted index-template-list-system">{{ t.system }}</small>
        <div class="pull-right vm-create" data-template="{{ t.pk }}"><i title="{% trans "Start vm instance" %}" class="icon-play"></i></div>
        <div class="clearfix"></div>
      </a>
      {% empty %}
        <div class="alert alert-warning" style="margin: 10px;">
          <p>
            {% trans "You don't have any templates, however you can still start virtual machines and even save them as new templates!" %}
          </p>
        </div>
      {% endfor %}
    </div>
30 31
    <div href="#" class="list-group-item list-group-footer text-right">
      <p>
32 33 34
        <a href="{% url "dashboard.views.template-list" %}" class="btn btn-primary btn-xs">
          <i class="icon-chevron-sign-right"></i> {% trans "show all" %}
        </a>
35
        <a href="{% url "dashboard.views.template-choose" %}" class="btn btn-success btn-xs template-choose">
36 37
          <i class="icon-plus-sign"></i> {% trans "new" %}
        </a>
38 39 40 41
      </p>
    </div>
  </div>
</div>