From 5d556592d48ebcd93493e782550f854a7833d781 Mon Sep 17 00:00:00 2001 From: "piotr.atyjaszyk" <piotrmk1@gmail.com> Date: Wed, 30 Nov 2016 11:18:23 +0100 Subject: [PATCH] added a forgotten index file --- smash/web/templates/eqdef/index.html | 79 ++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 smash/web/templates/eqdef/index.html diff --git a/smash/web/templates/eqdef/index.html b/smash/web/templates/eqdef/index.html new file mode 100644 index 00000000..8d80ba8a --- /dev/null +++ b/smash/web/templates/eqdef/index.html @@ -0,0 +1,79 @@ +{% extends "_base.html" %} +{% load static %} + +{% block styles %} +{{ block.super }} + <!-- DataTables --> + <link rel="stylesheet" href="{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.css' %}"> +{% endblock styles %} + +{% block page_title %}'eqdef'{% endblock page_title %} +{% block page_header %}Equipment definitions{% endblock page_header %} +{% block page_description %}{% endblock page_description %} + +{% block breadcrumb %} + <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li> + <li class="active">Equipment definitions</li> +{% endblock breadcrumb %} + +{% block maincontent %} + +<div> + <a class="btn btn-app"> + <i class="fa fa-plus"></i> Add new equipment type + </a> +</div> + +<div class="box-body"> + {% if equipment_list %} + <table id="table" class="table table-bordered table-striped"> + <thead> + <tr> + <th>No.</th> + <th>Name</th> + <th>Is fixed?</th> + <th>Edit</th> + <th>Delete</th> + </tr> + </thead> + <tbody> + {% for equip in equipment_list %} + <tr> + <td>{{ forloop.counter }}</td> + <td>{{ equip.name }}</td> + <td> + {% if equip.isFixed %}<button type="button" class="btn btn-block btn-danger">YES</button> + {% else %}<button type="button" class="btn btn-block btn-success">NO</button> + {% endif %} + </td> + <td><button type="button" class="btn btn-block btn-default">Edit</button></td> + <td><button type="button" class="btn btn-block btn-default">Delete</button></td> + </tr> + {% endfor %} + </tbody> + </table> + {% else %} + <p>No equipment found.</p> + {% endif %} +</div> +{% endblock maincontent %} + +{% block scripts %} + {{ block.super }} + + <script src="{% static 'AdminLTE/plugins/datatables/jquery.dataTables.min.js' %}"></script> + <script src="{% static 'AdminLTE/plugins/datatables/dataTables.bootstrap.min.js' %}"></script> + + <script> + $(function () { + $('#table').DataTable({ + "paging": true, + "lengthChange": false, + "searching": false, + "ordering": true, + "info": true, + "autoWidth": false + }); + }); + </script> +{% endblock scripts %} -- GitLab