index-templates.html 1.95 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
      <i class="fa fa-info-circle"></i>
6
    </span>
7
    <h3 class="no-margin"><i class="fa fa-puzzle-piece"></i> {% trans "Templates" %}
8 9
    </h3>
  </div>
10
  <div class="list-group" id="dashboard-template-list">
11 12 13
    <div id="dashboard-template-list">
      {% for t in templates %}
      <a href="{% url "dashboard.views.template-detail" pk=t.pk %}" class="list-group-item
14
        {% if forloop.last and templates|length < 5 %} list-group-item-last{% endif %}">
15
        <span class="index-template-list-name">
16
          <i class="fa fa-{{ t.os_type }}"></i> {{ t.name }}
17 18
        </span>
        <small class="text-muted index-template-list-system">{{ t.system }}</small>
19
        <div class="pull-right vm-create" data-template="{{ t.pk }}"><i title="{% trans "Start vm instance" %}" class="fa fa-play"></i></div>
20 21 22
        <div class="clearfix"></div>
      </a>
      {% empty %}
23 24 25 26 27 28
        <div class="list-group-item">
          <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>
29 30 31
        </div>
      {% endfor %}
    </div>
32 33
    <div href="#" class="list-group-item list-group-footer text-right">
      <p>
34
        <a href="{% url "dashboard.views.template-list" %}" class="btn btn-primary btn-xs">
35
          <i class="fa fa-chevron-circle-right"></i> {% trans "show all" %}
36
        </a>
37
        <a href="{% url "dashboard.views.template-choose" %}" class="btn btn-success btn-xs template-choose">
38
          <i class="fa fa-plus-circle"></i> {% trans "new" %}
39
        </a>
40 41 42 43
      </p>
    </div>
  </div>
</div>