-
Notifications
You must be signed in to change notification settings - Fork 0
/
task_table.html
39 lines (39 loc) · 1.53 KB
/
task_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
<div class="table-container">
<table class="table is-striped sortable" id="task_table">
<thead>
<th> Task</th>
<th> Project</th>
<th> Tags</th>
<th> Due Date</th>
</thead>
<tbody>
{% for task in tasks %}
<tr>
<td>{{ task.description }}</td>
<td>{{ task.project }}</td>
<td>{% if task.tags %}
{% for tag in task.tags %}
{{ tag }},
{% endfor %}
{% endif %}
</td>
<td>{{ task.due }} or in moment format: {{ moment(task.due).format('LLL', refresh=True) }}</td>
<td>
<button class="button is-green" hx-trigger="click" hx-target="#add_task" hx-post="/modify_task?task_id={{ task.uuid }}">Modify</button>
</td>
<td>
{% if tab == "completed" %}
<button class="button is-blue" hx-trigger="click" hx-target="#task_table"
hx-post="/{{ tab }}?task_id={{ task.uuid }}"> Change Status to Incomplete
</button>
{% else %}
<button class="button is-blue" hx-trigger="click" hx-target="#task_table"
hx-post="/{{ tab }}?task_id={{ task.uuid }}"> Mark Completed
</button>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>