-
Notifications
You must be signed in to change notification settings - Fork 0
/
requests_table.html
79 lines (79 loc) · 2.14 KB
/
requests_table.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!-- The Dog Walker's requests table contains all of his incoming requested for him to approve or decline. Seperated to improve code readability -->
<table>
<tr>
<th>Day</th>
<th>Time</th>
<th>Dog</th>
<th>Size</th>
<th>Gender</th>
<th>Age</th>
<th>Friendly?</th>
<th>Vaccinated?</th>
<th>Owner</th>
<th>Phone</th>
<th>E-Mail</th>
<th></th>
<th></th>
<th></th>
</tr>
<!-- A new row in the table is added for every request the Dog Walker has received and hasn't answered yet -->
{% for request in requests %}
<tr>
<td>
{{ request.day }}
</td>
<td>
{{ request.part }}
</td>
<td>
{{ request.dog.name }}
</td>
<td>
{{ request.dog.size }}
</td>
<td>
{{ request.dog.gender }}
</td>
<td>
{{ request.dog.age }}
</td>
<td>
{% if request.dog.friendly == True %}
<span class="marked-true"> Yes </span>
{% elif request.dog.friendly == False %}
<span class="marked-false"> No </span>
{{ item }}
{% endif %}
</td>
<td>
{% if request.dog.vaccinated == True %}
<span class="marked-true"> Yes </span>
{% elif request.dog.vaccinated == False %}
<span class="marked-false"> No </span>
{{ item }}
{% endif %}
</td>
<td>
{{ request.dog.owner.name }}
</td>
<td>
{{ request.dog.owner.phone }}
</td>
<td>
{{ request.dog.owner.email }}
</td>
<td>
<!-- Accept Walk Request form & button -->
<a class="pick-btn" href="/walker/walks_and_requests/accept?id={{ request.id }}">
Accept
</a>
</td>
<td>
<!-- Decline Walk Request form & button -->
<a class="cancel-btn" href="/walk/cancel?id={{ request.id }}">
Decline
</a>
</td>
</tr>
{% endfor %}
</table>