From cddbb028bda7af346b1b0448b558473d3f2bf761 Mon Sep 17 00:00:00 2001 From: KKlochko Date: Fri, 14 Jul 2023 19:12:46 +0300 Subject: [PATCH] Update the table to a list of items and the header. --- CHANGELOG.org | 2 ++ templates/partials/task_item.html | 13 +++++++++++++ templates/tasks/index.html | 17 ++++------------- 3 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 templates/partials/task_item.html diff --git a/CHANGELOG.org b/CHANGELOG.org index a8ea501..359f321 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -9,4 +9,6 @@ Add the TailwindCSS. ** 0.2.3 <2023-07-14 Fri> Update the main container block. +** 0.2.4 <2023-07-14 Fri> + Update the table to a list of items and the header. diff --git a/templates/partials/task_item.html b/templates/partials/task_item.html new file mode 100644 index 0000000..5ff6d19 --- /dev/null +++ b/templates/partials/task_item.html @@ -0,0 +1,13 @@ +
+ {% if task.status == "TODO" %} +

+ {% elif task.status == "DOING" %} +

+ {% elif task.status == "DONE" or task.status == "CANCELED" %} +

+ {% endif %} + {{ task.status }} +

+

{{ task.name }}

+

{{ task.description | truncatewords:10 }}

+
diff --git a/templates/tasks/index.html b/templates/tasks/index.html index db2565a..793f9ed 100644 --- a/templates/tasks/index.html +++ b/templates/tasks/index.html @@ -2,20 +2,11 @@ {% load static %} {% block content %} -

Tasks

+

Tasks

- - - - - - +
{% for task in tasks %} -
- - - - + {% include "partials/task_item.html" %} {% endfor %} -
StatusNameDescription
{{ task.status }}{{ task.name }}{{ task.description | truncatewords:10 }}
+ {% endblock %}