template-list.html 2.5 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 14
        <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" %}
15
        </a>
16
        <h3 class="no-margin"><i class="fa fa-puzzle-piece"></i> {% trans "Templates" %}</h3>
17 18
      </div>
      <div class="panel-body">
19 20 21 22 23 24 25
        <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 }}
26
                  <button type="submit" class="btn btn-primary input-tags">
27 28 29 30 31 32 33 34 35
                    <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">
36 37 38 39 40 41
        {% render_table table %}
      </div>
    </div>
  </div>
</div>

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

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

{% block extra_js %}
80 81
  <script src="{{ STATIC_URL}}dashboard/template-list.js"></script>
  <script src="{{ STATIC_URL}}dashboard/js/stupidtable.min.js"></script>
82
{% endblock %}