From d897abb2588471ee0acf2b8d529a1cbdc279e275 Mon Sep 17 00:00:00 2001 From: FSMPI Admin-Team <admin@fsmpi.rwth-aachen.de> Date: Sat, 4 Mar 2017 01:01:04 +0100 Subject: [PATCH] Render state of todos on index page, since there are multiple 'open' states --- models/database.py | 7 ------- templates/index.html | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/models/database.py b/models/database.py index 1fdab1f..102a63d 100644 --- a/models/database.py +++ b/models/database.py @@ -535,13 +535,6 @@ class Todo(db.Model): ] return " ".join(parts) - def render_html_short(self): - parts = [ - "<strong>{}:</strong>".format(self.who), - self.description - ] - return " ".join(parts) - def render_latex(self, current_protocol=None): return r"\textbf{{{}}}: {}: {} -- {}".format( "Neuer Todo" if self.is_new(current_protocol) else "Todo", diff --git a/templates/index.html b/templates/index.html index 89d6c1e..f185605 100644 --- a/templates/index.html +++ b/templates/index.html @@ -26,7 +26,7 @@ <ul> {% if todos|length > 0 %} {% for todo in todos %} - <li>{{todo.render_html_short()|safe}}</li> + <li>{{todo.render_html()|safe}}</li> {% endfor %} {% else %} <li>Keine Todos</li> -- GitLab