From 8b606f7c555c250f0d5ab8314aa95ce7efda07c7 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 6 Jun 2024 07:02:43 +0200 Subject: [PATCH] Fix Processes listing sorting bug. --- plomtask/http.py | 2 +- templates/condition.html | 8 ++++++++ templates/process.html | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/plomtask/http.py b/plomtask/http.py index 886efa2..773548f 100644 --- a/plomtask/http.py +++ b/plomtask/http.py @@ -280,7 +280,7 @@ class TaskHandler(BaseHTTPRequestHandler): processes.sort(key=lambda p: len(p.explicit_steps)) elif sort_by == '-steps': processes.sort(key=lambda p: len(p.explicit_steps), reverse=True) - if sort_by == 'owners': + elif sort_by == 'owners': processes.sort(key=lambda p: p.n_owners or 0) elif sort_by == '-owners': processes.sort(key=lambda p: p.n_owners or 0, reverse=True) diff --git a/templates/condition.html b/templates/condition.html index b20b5fe..8deb71c 100644 --- a/templates/condition.html +++ b/templates/condition.html @@ -3,6 +3,14 @@ +{% block css %} +input[name="title"] { + width: 100em; +} +{% endblock %} + + + {% block content %}

{% if is_new %}NEW {% endif %}condition

diff --git a/templates/process.html b/templates/process.html index 1be3daf..c765ca7 100644 --- a/templates/process.html +++ b/templates/process.html @@ -3,6 +3,14 @@ +{% block css %} +input[name="title"] { + width: 100em; +} +{% endblock %} + + + {% macro step_with_steps(step_id, step_node, indent) %} -- 2.30.2