diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-22 08:09:39 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-22 08:10:29 +0100 |
commit | 4753d545dbe2cb879f27b3958cf1196fca5a1791 (patch) | |
tree | ba6fe37a1c98ac4927b8de381c9c2e0b603bbf1d | |
parent | b0cb4e453f060c174c14e896767c3cb89b1d6531 (diff) |
turned the Events list on org detail page into an Notes and Events table
-rw-r--r-- | ctrack/organisations/templates/organisations/organisation_detail.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ctrack/organisations/templates/organisations/organisation_detail.html b/ctrack/organisations/templates/organisations/organisation_detail.html index fef5892..f64d72e 100644 --- a/ctrack/organisations/templates/organisations/organisation_detail.html +++ b/ctrack/organisations/templates/organisations/organisation_detail.html @@ -81,6 +81,7 @@ </div> </div> +{# TODO - split off the notes#} <div class="col-md-12 mb-2"> <div class="row"> @@ -139,6 +140,47 @@ </div> <div> + <table class="table table-small table-bordered"> + <thead> + <tr> + <th scope="col">Type</th> + <th scope="col">Date</th> + <th scope="col">Description</th> + <th scope="col">Participants</th> + <th scope="col">Comments</th> + </tr> + </thead> + <tbody> + {% for event in single_datetime_events %} + <tr> + <td> + {{ event.type_descriptor }} + {% if event.private %} + <span class="badge badge-warning float-right">PRIVATE</span> + {% endif %} + </td> + <td> + {% if event.date %} + {{ event.date|date:"j M Y G:H" }} + {% else %} + NA + {% endif %} + </td> + <td>{{ event.short_description }}</td> + <td> + {% if event.participants %} + {% for person in event.participants.all %} + <a href="{% url "organisations:person-detail" person.id %}">{{ person }}</a> + {% endfor %} + {% else %} + NA + {% endif %} + </td> + <td>{{ event.comments }}</td> + </tr> + {% endfor %} + </tbody> + </table> {% for event in single_datetime_events %} <div class="card" style="width: 100%"> <div class="card-body"> |