From 24119b91acf1b9aaa3503c629f1c78c75b5ed3ea Mon Sep 17 00:00:00 2001 From: "Victor \"multun\" Collod" Date: Sun, 10 Feb 2019 18:50:32 +0100 Subject: [PATCH] Prettier task edit UI --- todo/templates/todo/include/task_edit.html | 18 +-- todo/templates/todo/task_detail.html | 145 +++++++++++---------- 2 files changed, 89 insertions(+), 74 deletions(-) diff --git a/todo/templates/todo/include/task_edit.html b/todo/templates/todo/include/task_edit.html index cabee0c..3713958 100644 --- a/todo/templates/todo/include/task_edit.html +++ b/todo/templates/todo/include/task_edit.html @@ -3,8 +3,7 @@
{% csrf_token %} - -
+
- - - - Email notifications will only be sent if task is assigned to someone other than yourself. - +
+ + + + Email notifications will only be sent if task is assigned to someone other than yourself. + +
-
-

{{ task.title }}

- {% if task.note %} -

{{ task.note|safe|urlize|linebreaks }}

- {% endif %} +
+
+
+

{{ task.title }}

+ {% if task.note %} +
{{ task.note|safe|urlize|linebreaks }}
+ {% endif %} +
-
-
- - + - - {% csrf_token %} -
- -
- - -
- {% csrf_token %} -
- -
-
- -
- -
    +
    + {% csrf_token %} +
    + +
    +
    +
    + {% csrf_token %} +
    + +
    +
    +
  • Assigned to: {% if task.assigned_to %} {{ task.assigned_to.get_full_name }} {% else %} Anyone {% endif %} @@ -89,51 +86,67 @@ {{ task.task_list }}
  • -
  • -
    - {% csrf_token %} - {% for field in merge_form.visible_fields %} -

    - {{ field.errors }} - {{ field }} -

    - {% endfor %} - -
    -
-
+
{# Task edit / new task form #} {% include 'todo/include/task_edit.html' %} +
+
+
Merge task
+
+
+

Merging is a destructive operation. This task will not exist anymore, and comments will be moved to the target task.

+ {% csrf_token %} + {% for field in merge_form.visible_fields %} +

+ {{ field.errors }} + {{ field }} +

+ {% endfor %} + +
+
+
+
- -
Add comment
-
- {% csrf_token %} -
- -
- -
+
+
Add comment
+
+ {% csrf_token %} +
+ +
+ +
+
{% if comment_list %}
Comments on this task
{% for comment in comment_list %} -

- {{ comment.author_text }}, +

+
+
+ {% if comment.email_message_id %} + email + {% endif %} + {{ comment.author_text }} +
+ {{ comment.date|date:"F d Y P" }} -
-

- {{ comment.body|safe|urlize|linebreaks }} + +
+
+ {{ comment.body|safe|urlize|linebreaks }} +
+
{% endfor %} {% else %}
No comments (yet).
{% endif %}
- {% endblock %}