From ee855d8b6748cc9c22a6dc4cb2bd5f1b7e44e346 Mon Sep 17 00:00:00 2001 From: TatriX Date: Mon, 16 Apr 2018 16:56:00 +0300 Subject: [PATCH] feat(templates): Add 'Last post by' to the list of threads --- src/render.rs | 2 ++ templates/index.html | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/render.rs b/src/render.rs index 95edb5749..91f4d3f3f 100644 --- a/src/render.rs +++ b/src/render.rs @@ -58,6 +58,7 @@ struct IndexThread { sticky: bool, posted: FormattedDate, author_name: String, + post_author: String, } impl Handler for Renderer { @@ -72,6 +73,7 @@ impl Handler for Renderer { sticky: thread.sticky, posted: thread.posted.into(), author_name: thread.thread_author, + post_author: thread.post_author, }) .collect(); diff --git a/templates/index.html b/templates/index.html index c8c72d9d2..024d0aef5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -31,7 +31,10 @@
{% if thread.sticky %}Sticky {% endif %}{{ thread.title | safe }}
{{ thread.posted }} -

Created by {{ thread.author_name }}

+
+

Created by {{ thread.author_name }}

+ Last post by {{ thread.post_author }} +
{%- endfor %}