From 6b1360c4081885f9f38769fdce7cde2921534147 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Wed, 1 Mar 2017 13:05:34 +0100
Subject: [PATCH] change for list of approaching appointments

it contains subject name, type of appointment, date
---
 smash/web/templates/appointments/index.html | 22 ++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/smash/web/templates/appointments/index.html b/smash/web/templates/appointments/index.html
index 4d6116da..6883d66f 100644
--- a/smash/web/templates/appointments/index.html
+++ b/smash/web/templates/appointments/index.html
@@ -66,10 +66,9 @@
 			<table id="approaching_table" class="table table-bordered table-striped">
 				<thead>
 					<tr>
-						<th>Subject name</th>
-						<th>Full information</th>
+            <th>Subject</th>
+            <th>Type</th>
 						<th>Date</th>
-						<th>Time</th>
 						<th>Details</th>
 					</tr>
 				</thead>
@@ -78,13 +77,18 @@
       			{% for approach in approaching_list %}
   				<tr>
   					<td>
-  						{{ approach.visit.subject.first_name }} {{ approach.visit.subject.last_name }}
+              {% if approach.visit.subject.screening_number == "---" %}
+                N/A
+              {% else %}
+                {{ approach.visit.subject.first_name }} {{ approach.visit.subject.last_name }}
+              {% endif %}
   					</td>
-        			<td>
-        				<a href="{% url 'web.views.subject_details' approach.visit.subject.id %}" type="button" class="btn btn-block btn-default">Subject's details</a>
-        			</td>
-        			<td>{{ approach.datetime_when | date:"d-M-Y" }}</td>
-        			<td>{{ approach.datetime_when | time:"H:i" }}</td>
+            <td>
+              {% for type in approach.appointment_types.all %}
+                {{ type.code }},
+              {% endfor %}
+            </td>
+        			<td>{{ approach.datetime_when | date:"d-M-Y H:i" }}</td>
         			<td>
         				<a href="{% url 'web.views.appointment_details' approach.id %}" type="button" class="btn btn-block btn-default">Details</a>
         			</td>
-- 
GitLab