template-list.html 2.45 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 26 27 28 29 30 31 32 33 34 35
        <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 }}
                  <button type="submit" class="btn btn-primary input-tags"> 
                    <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 42 43 44 45
        {% render_table table %}
      </div>
    </div>
  </div>
</div>

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

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

{% block extra_js %}
77 78
  <script src="{{ STATIC_URL}}dashboard/template-list.js"></script>
  <script src="{{ STATIC_URL}}dashboard/js/stupidtable.min.js"></script>
79
{% endblock %}