From 165e85189fad078b40387ed5d86066521a5d023e Mon Sep 17 00:00:00 2001 From: Max Magorsch Date: Wed, 24 Jun 2020 21:54:41 +0000 Subject: Fix the computation of replies to a message Signed-off-by: Max Magorsch --- web/templates/message/show.tmpl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'web/templates/message') diff --git a/web/templates/message/show.tmpl b/web/templates/message/show.tmpl index 8accbde..b5888d3 100644 --- a/web/templates/message/show.tmpl +++ b/web/templates/message/show.tmpl @@ -42,7 +42,7 @@ {{if .Message.InReplyTo}} In Reply to: - {{.Message.InReplyTo.GetSubject}} by {{.Message.InReplyTo.GetAuthorName}} + {{.Message.InReplyTo.GetSubject}} by {{.Message.InReplyTo.GetAuthorName}} {{end}} @@ -72,16 +72,27 @@ {{end}} {{if .Replies}} +

Replies

+ - {{range .Replies}} + {{range $index, $reply := .Replies}} + + + + + + {{end}} + {{ if gt (len .Replies) 5}} + + + - - + {{end}} -- cgit v1.2.3-65-gdbad
Subject AuthorDate
{{.GetSubject}}{{formatAddr $reply.From}}{{$reply.Date.Format "2006-01-02 15:04:05"}}
{{.GetSubject}}{{formatAddr .From}}