aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-15 14:49:45 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-15 14:49:45 +0100
commit21767adcdfd3da07c23266ca9f6a02f24fa034f4 (patch)
treee3b2cd8544fa99012d7f84dcd595913c7be9db2b
parente5e0faad6869b84178a1993189ec0f3de19fa368 (diff)
more consistency work on tables
-rw-r--r--ctrack/caf/templates/caf/caf_list.html2
-rw-r--r--ctrack/organisations/templates/organisations/organisation_list.html4
-rw-r--r--ctrack/organisations/templates/organisations/person_list.html75
3 files changed, 42 insertions, 39 deletions
diff --git a/ctrack/caf/templates/caf/caf_list.html b/ctrack/caf/templates/caf/caf_list.html
index 4af537d..ef0088f 100644
--- a/ctrack/caf/templates/caf/caf_list.html
+++ b/ctrack/caf/templates/caf/caf_list.html
@@ -21,7 +21,7 @@
<div class="col-12 m-2">
<h3>All CAFs</h3>
<div class="row justify-content-center">
- <div class="col-md-12 my-2 py-2 bg-light">
+ <div class="col-md-12 my-2 py-2">
<table id="datatable" class="table table-bordered" style="width:100%">
<thead>
<tr>
diff --git a/ctrack/organisations/templates/organisations/organisation_list.html b/ctrack/organisations/templates/organisations/organisation_list.html
index cbd87dd..3844326 100644
--- a/ctrack/organisations/templates/organisations/organisation_list.html
+++ b/ctrack/organisations/templates/organisations/organisation_list.html
@@ -19,9 +19,9 @@
</script>
<div class="col-12 m-2">
- <h3>Organisations</h3> <span><a href="{% url "organisations:create" %}">[Create new...]</a></span></h4>
+ <h3>Organisations</h3> <span><a href="{% url "organisations:create" %}">[Create new...]</a></span></h3>
<div class="row justify-content-center">
- <div class="col-md-12 my-2 py-2 bg-light">
+ <div class="col-md-12 my-2 py-2">
<table id="datatable" class="table table-bordered" style="width: 100%">
<thead>
<tr>
diff --git a/ctrack/organisations/templates/organisations/person_list.html b/ctrack/organisations/templates/organisations/person_list.html
index 4c147c3..54861ea 100644
--- a/ctrack/organisations/templates/organisations/person_list.html
+++ b/ctrack/organisations/templates/organisations/person_list.html
@@ -1,44 +1,47 @@
{% extends "base.html" %}
+{% load static %}
-{% block title %}
- People
-{% endblock %}
+{% block title %} People {% endblock %}
{% block content %}
- <div class="container mt-3">
- <div class="row">
- <div class="col-md-12 pl-0 my-2">
- <div class="row">
- <div class="col-12">
- <h4>People <span class="float-right align-bottom"><a href="#"><button type="button" class="btn btn-primary">Create new...</button></a></span></h4>
- </div>
- </div>
- <div class="row">
- <div class="col-md-12 border bg-light my-2">
- <table class="table compact cell-border">
- <thead>
- <tr>
- <th>Person</th>
- <th>Organisation</th>
- <th>Phone Number</th>
- <th>Email</th>
- <th>Contact History</th>
- </tr>
- </thead>
- {% for p in object_list %}
- <tr>
- <td><a href="{% url "organisations:person-detail" p.pk %}">{{ p.first_name }} {{ p.last_name }}</a></td>
- <td><a href="{% url "organisations:detail" p.organisation.slug %}">{{ p.organisation.name }}</a></td>
- <td>{{ p.mobile }}</td>
- <td><a href="mailto:{{ p.email }}">{{ p.email }}</a></td>
- <td><a href="#">Contact History</td>
- </tr>
- {% endfor %}
- </table>
- </div>
- </div>
- </div>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
+ <script type="application/javascript">
+ $(document).ready(function () {
+ $('#datatable').DataTable({
+ ordering: true,
+ searching: true,
+ buttons: true,
+ dom: 'B<"clear">lfrtip',
+ paging: false,
+ });
+ });
+ </script>
+
+ <div class="col-12 m-2">
+ <h3>People</h3> <span><a href="#">[Create new...]</a></span>
+ <div class="row justify-content-center">
+ <div class="col-md-12 my-2">
+ <table id="datatable" class="table table-bordered">
+ <thead>
+ <tr>
+ <th>Person</th>
+ <th>Organisation</th>
+ <th>Phone Number</th>
+ <th>Email</th>
+ <th>Contact History</th>
+ </tr>
+ </thead>
+ {% for p in object_list %}
+ <tr>
+ <td><a href="{% url "organisations:person-detail" p.pk %}">{{ p.first_name }} {{ p.last_name }}</a></td>
+ <td><a href="{% url "organisations:detail" p.organisation.slug %}">{{ p.organisation.name }}</a></td>
+ <td>{{ p.mobile }}</td>
+ <td><a href="mailto:{{ p.email }}">{{ p.email }}</a></td>
+ <td><a href="#">Contact History</a></td>
+ </tr>
+ {% endfor %}
+ </table>
</div>
</div>