aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-23 11:53:15 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-23 11:53:15 +0100
commitd90333e0fd96eb05e96a9de94f515f60a5844f80 (patch)
treeb21fe09f382a02bad02a381a82accb70fedfb6e5
parent5351983b5f45505f8bcb5a639c179ec3bb2be689 (diff)
improved tables in org detail
-rw-r--r--ctrack/organisations/templates/organisations/organisation_detail.html54
-rw-r--r--ctrack/register/templates/register/singledatetimeevent_update_form.html2
2 files changed, 39 insertions, 17 deletions
diff --git a/ctrack/organisations/templates/organisations/organisation_detail.html b/ctrack/organisations/templates/organisations/organisation_detail.html
index 6e2c1c3..fbe630a 100644
--- a/ctrack/organisations/templates/organisations/organisation_detail.html
+++ b/ctrack/organisations/templates/organisations/organisation_detail.html
@@ -130,32 +130,33 @@
<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 class="d-flex">
+ <th scope="col" class="col-2">Type</th>
+ <th scope="col" class="col-1">Date</th>
+ <th scope="col" class="col-2">Description</th>
+ <th scope="col" class="col-2">Participants</th>
+ <th scope="col" class="col-4">Comments</th>
+ <th scope="col" class="col-1">Action</th>
</tr>
</thead>
<tbody>
{% for event in single_datetime_events %}
- <tr>
- <td>
+ <tr class="d-flex">
+ <td class="col-2">
{{ event.type_descriptor }}
{% if event.private %}
<span class="badge badge-warning float-right">PRIVATE</span>
{% endif %}
</td>
- <td>
+ <td class="col-1">
{% if event.date %}
{{ event.date|date:"j M Y G:H" }}
{% else %}
NA
{% endif %}
</td>
- <td>{{ event.short_description }}</td>
- <td>
+ <td class="col-2">{{ event.short_description }}</td>
+ <td class="col-2">
{% if event.participants %}
{% for person in event.participants.all %}
<a href="{% url "organisations:person-detail" person.id %}">{{ person }}</a> &nbsp;
@@ -164,7 +165,15 @@
NA
{% endif %}
</td>
- <td>{{ event.comments }}</td>
+ <td class="col-4">{{ event.comments }}<br>
+ {% if event.document_link %}
+ <a class="small" href="{{ event.document_link }}">Link</a>
+ {% endif %}
+ </td>
+ <td class="col-1"><a
+ href="{% url "register:event_update_simple_event_from_org" event.pk object.slug %}"
+ class="btn btn-outline-secondary btn-sm" role="button">Edit</a>
+ </td>
</tr>
{% endfor %}
</tbody>
@@ -200,22 +209,35 @@
<table class="table table-small table-bordered">
<thead>
<tr class="d-flex">
- <th scope="col" class="col-3">Created</th>
+ <th scope="col" class="col-2">Created</th>
+ <th scope="col" class="col-2">User</th>
<th scope="col" class="col-3">Description</th>
- <th scope="col" class="col-6">Comments</th>
+ <th scope="col" class="col-4">Comments</th>
+ <th scope="col" class="col-1">Action</th>
</tr>
</thead>
<tbody>
{% for event in notes %}
<tr class="d-flex">
- <td class="col-3">
+ <td class="col-2">
{{ event.created_date|date:"j M Y" }}
{% if event.private %}
<span class="badge badge-warning float-right">PRIVATE</span>
{% endif %}
</td>
+ {% if event.user.name %}
+ <td class="col-2">{{ event.user.name }}</td>
+ {% else %}
+ <td class="col-2">{{ event.user.username }}</td>
+ {% endif %}
<td class="col-3">{{ event.short_description }}</td>
- <td class="col-6">{{ event.comments }}</td>
+ <td class="col-4">{{ event.comments }}<br>
+ {% if event.document_link %}
+ <a class="small" href="{{ event.document_link }}">Link</a>
+ {% endif %}
+ </td>
+ <td class="col-1"><a href="#" class="btn btn-outline-secondary btn-sm" role="button">Edit</a>
+ </td>
</tr>
{% endfor %}
</tbody>
diff --git a/ctrack/register/templates/register/singledatetimeevent_update_form.html b/ctrack/register/templates/register/singledatetimeevent_update_form.html
index 646ea3b..006981b 100644
--- a/ctrack/register/templates/register/singledatetimeevent_update_form.html
+++ b/ctrack/register/templates/register/singledatetimeevent_update_form.html
@@ -4,7 +4,7 @@
{% load crispy_forms_tags %}
{% block form %}
- <h3 class="mt-2">Edit event {{ object }}</h3>
+ <h3 class="mt-2">Update event: {{ object.short_description }}</h3>
<p>Simple events are emails, phone calls, basic meetings, notes, deadlines, etc.
If you arrived at this page from an organisation's page, you are able to select
participants in the event from that organisation.</p>