43 lines
1.0 KiB
HTML
43 lines
1.0 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block head %}
|
|
<title>Task Master</title>
|
|
{% endblock %}
|
|
|
|
|
|
{% block body %}
|
|
<div class="content">
|
|
<h1 style="text-align: center">Task Master</h1>
|
|
|
|
{% if tasks|length < 1 %}
|
|
<h4 style="text-align: center">There are no tasks. Create one below</h4>
|
|
|
|
{% else %}
|
|
|
|
<table>
|
|
<tr>
|
|
<th>Task</th>
|
|
<th>Added</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
{% for task in tasks %}
|
|
<tr>
|
|
<td>{{ task.content }}</td>
|
|
<td>{{ task.date_created.date() }}</td>
|
|
<td>
|
|
<a href="/delete/{{task.id}}">Delete</a>
|
|
<br>
|
|
<a href="/update/{{task.id}}">Update</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
|
|
<form action="/" method="POST">
|
|
<input type="text" name="content" id="content" placeholder="Task name">
|
|
<input type="submit" value="Add Task">
|
|
|
|
</form>
|
|
</div>
|
|
{% endblock %} |