index-templates.html 2.65 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" data-container="body" 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="template-list-view">
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 data-href="{% url "dashboard.views.vm-create" %}?template={{ t.pk }}" class="pull-right vm-create">
20 21 22
          <i data-container="body" title="{% trans "Start VM instance" %}" 
            class="fa fa-play"></i>
        </div>
23 24 25
        <div class="clearfix"></div>
      </a>
      {% empty %}
26 27 28 29 30 31
        <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>
32 33 34
        </div>
      {% endfor %}
    </div>
35
    <div class="list-group-item list-group-footer">
36
      <div class="row">
37
        <div class="col-xs-5 col-sm-6">
38 39
          <form action="{% url "dashboard.views.template-list" %}" method="GET" id="dashboard-template-search-form">
            <div class="input-group input-group-sm">
40
              <input name="s" type="text" class="form-control" placeholder="{% trans "Search..." %}" />
41 42 43 44 45 46
              <div class="input-group-btn">
                <button type="submit" class="btn btn-primary"><i class="fa fa-search"></i></button>
              </div>
            </div>
          </form>
        </div>
47
        <div class="col-xs-7 col-sm-6 text-right">
48 49 50 51 52 53 54
          <a href="{% url "dashboard.views.template-list" %}" class="btn btn-primary btn-xs">
            <i class="fa fa-chevron-circle-right"></i> {% trans "show all" %}
          </a>
          <a href="{% url "dashboard.views.template-choose" %}" class="btn btn-success btn-xs template-choose">
            <i class="fa fa-plus-circle"></i> {% trans "new" %}
          </a>
        </div>
55
      </div>
56 57 58
    </div>
  </div>
</div>