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

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

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

<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
14 15
        <a href="{% url "dashboard.views.template-choose" %}" class="pull-right btn btn-success btn-xs template-choose">
          <i class="fa fa-plus"></i> {% trans "new template" %}
16
        </a>
17
        <h3 class="no-margin"><i class="fa fa-puzzle-piece"></i> {% trans "Templates" %}</h3>
18 19
      </div>
      <div class="panel-body">
20 21 22 23 24 25 26
        <div class="row">
          <div class="col-md-offset-8 col-md-4" id="template-list-search">
            <form action="" method="GET">
              <div class="input-group">
                {{ search_form.s }}
                <div class="input-group-btn">
                  {{ search_form.stype }}
27
                  <button type="submit" class="btn btn-primary input-tags">
28 29 30 31 32 33 34 35 36
                    <i class="fa fa-search"></i>
                  </button>
                </div>
              </div><!-- .input-group -->
            </form>
          </div><!-- .col-md-4 #template-list-search -->
        </div>
      </div>
      <div class="panel-body">
37 38 39
        <div class="table-responsive">
          {% render_table table %}
        </div>
40 41 42 43 44
      </div>
    </div>
  </div>
</div>

45
{% if show_lease_table %}
46 47 48 49
<div class="row">
  <div class="col-md-6">
    <div class="panel panel-default">
      <div class="panel-heading">
50
        {% if perms.vm.create_leases %}
51 52
        <a href="{% url "dashboard.views.lease-create" %}"
          class="pull-right btn btn-success btn-xs" style="margin-right: 10px;">
53
          <i class="fa fa-plus"></i> {% trans "new lease" %}
54
        </a>
55
        {% endif %}
Kálmán Viktor committed
56
        <h3 class="no-margin"><i class="fa fa-clock-o"></i> {% trans "Leases" %}</h3>
57 58
      </div>
      <div class="panel-body">
59 60 61 62 63 64 65
        <div class="" style="max-width: 600px;">
          {% render_table lease_table %}
        </div>
      </div>
    </div>
  </div>

66
  {% comment %}
67 68 69
  <div class="col-md-6">
    <div class="panel panel-default">
      <div class="panel-heading">
70
        <h3 class="no-margin"><i class="fa fa-desktop"></i> Placeholder</h3>
71 72 73 74 75 76
      </div>
      <div class="panel-body">
        ???
      </div>
    </div>
  </div>
77
  {% endcomment %}
78
</div>
79
{% endif %}
80
{% endblock %}