template-list.html 1.78 KB
Newer Older
1 2 3
{% extends "dashboard/base.html" %}
{% load i18n %}
{% load render_table from django_tables2 %}
4 5 6

{% block title-page %}{% trans "Templates" %}{% endblock %}

7 8 9 10 11 12
{% block content %}

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
13
        <a href="{% url "dashboard.views.template-create" %}" class="pull-right btn btn-success btn-xs">
14
          <i class="icon-plus"></i> {% trans "new base vm" %}
15
        </a>
16
        <h3 class="no-margin"><i class="icon-puzzle-piece"></i> {% trans "Templates" %}</h3>
17 18
      </div>
      <div class="panel-body">
19 20 21 22 23 24 25 26 27 28
        {% render_table table %}
      </div>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-md-6">
    <div class="panel panel-default">
      <div class="panel-heading">
29
        {% if perms.vm.create_leases %}
30
        <a href="{% url "dashboard.views.lease-create" %}" class="pull-right btn btn-success btn-xs" style="margin-right: 10px;">
31
          <i class="icon-plus"></i> {% trans "new lease" %}
32
        </a>
33
        {% endif %}
34
        <h3 class="no-margin"><i class="icon-time"></i> {% trans "Leases" %}</h3>
35 36
      </div>
      <div class="panel-body">
37 38 39 40 41 42 43
        <div class="" style="max-width: 600px;">
          {% render_table lease_table %}
        </div>
      </div>
    </div>
  </div>

44
  {% comment %}
45 46 47 48 49 50 51 52 53 54
  <div class="col-md-6">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="no-margin"><i class="icon-desktop"></i> Placeholder</h3>
      </div>
      <div class="panel-body">
        ???
      </div>
    </div>
  </div>
55
  {% endcomment %}
56
</div>
57
{% endblock %}
58 59

{% block extra_js %}
60 61
  <script src="{{ STATIC_URL}}dashboard/template-list.js"></script>
  <script src="{{ STATIC_URL}}dashboard/js/stupidtable.min.js"></script>
62
{% endblock %}