35 lines
1.3 KiB
HTML
35 lines
1.3 KiB
HTML
{% load staticfiles %}
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
|
|
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
|
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
|
|
<script type="text/javascript" src="{% static 'js/script.js' %}"></script>
|
|
<title>Tasks</title>
|
|
</head>
|
|
<body>
|
|
<p>To Do List:
|
|
<a class="plus_btn" href="{% url 'create_task' %}">+</a></p>
|
|
{% regroup tasks by date|date:"d-m-y" as task_list %}
|
|
{% for date in task_list %}
|
|
<p>{{ date.grouper }}</p>
|
|
{% for t in date.list %}
|
|
{% if t.if_done %}
|
|
<form class ="task-item" style="text-decoration: line-through">
|
|
<input type="checkbox" name="done" checked>
|
|
{% else %}
|
|
<form class ="task-item" style="text-decoration: none;">
|
|
<input type="checkbox" name="done">
|
|
{% endif %}
|
|
{% csrf_token %}
|
|
<input type="hidden" name='id' value="{{ t.id }}">
|
|
{{ t.title }} <span class="time">{{ t.date|date:"H:i" }}</span><a href="javascript:void(0)" class="hover delete"><i class="fa fa-trash"></i></a>
|
|
</form>
|
|
{% endfor %}
|
|
<hr>
|
|
{% endfor %}
|
|
</html>
|