From 63471e2e9b26db036e072f6b8568b712f85b8ba6 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Tue, 12 Nov 2024 20:10:40 -0800 Subject: [PATCH] Show GIFs properly on add/edit forum post page --- pkg/controller/forum/forum.go | 2 +- web/templates/forum/new_post.html | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/controller/forum/forum.go b/pkg/controller/forum/forum.go index 41b88dd..9941990 100644 --- a/pkg/controller/forum/forum.go +++ b/pkg/controller/forum/forum.go @@ -55,7 +55,7 @@ func Forum() http.HandlerFunc { var pager = &models.Pagination{ Page: 1, PerPage: config.PageSizeThreadList, - Sort: "updated_at desc", + Sort: "threads.updated_at desc", } pager.ParsePage(r) diff --git a/web/templates/forum/new_post.html b/web/templates/forum/new_post.html index 7fffb8c..6f8db42 100644 --- a/web/templates/forum/new_post.html +++ b/web/templates/forum/new_post.html @@ -203,7 +203,13 @@ + {{if and .CommentPhoto (HasSuffix .CommentPhoto.Filename ".mp4")}} + + {{else}} + {{end}} {{end}}