This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/answer.git


The following commit(s) were added to refs/heads/test by this push:
     new bca8273f fix: edit_time display condition optimization
bca8273f is described below

commit bca8273fb5f426864daadda1f793587765c798ad
Author: shuai <[email protected]>
AuthorDate: Tue Sep 30 14:10:25 2025 +0800

    fix: edit_time display condition optimization
---
 ui/template/question-detail.html | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/ui/template/question-detail.html b/ui/template/question-detail.html
index 18cf4edd..d4b9e04c 100644
--- a/ui/template/question-detail.html
+++ b/ui/template/question-detail.html
@@ -48,10 +48,12 @@
                   datetime="{{timeFormatISO $.timezone .detail.CreateTime}}"
                   title="{{translatorTimeFormatLongDate $.language $.timezone 
.detail.CreateTime}}">{{translator $.language "ui.question_detail.created"}} 
{{translatorTimeFormat $.language $.timezone .detail.CreateTime}}
             </time>
-            <time class="me-3 link-secondary"
-                  datetime="{{timeFormatISO $.timezone .detail.EditTime}}"
-                  title="{{translatorTimeFormatLongDate $.language $.timezone 
.detail.EditTime}}">{{translator $.language "ui.question_detail.Edited"}} 
{{translatorTimeFormat $.language $.timezone .detail.EditTime}}
-            </time>
+            {{if gt .detail.EditTime 0}}
+              <time class="me-3 link-secondary"
+                    datetime="{{timeFormatISO $.timezone .detail.EditTime}}"
+                    title="{{translatorTimeFormatLongDate $.language 
$.timezone .detail.EditTime}}">{{translator $.language 
"ui.question_detail.Edited"}} {{translatorTimeFormat $.language $.timezone 
.detail.EditTime}}
+              </time>
+            {{end}}
             <div class="me-3">{{translator $.language 
"ui.question_detail.Views"}} {{.detail.ViewCount}}</div>
             <button type="button" class="p-0 btn-no-border btn btn-link 
btn-sm">{{translator $.language "ui.question_detail.Follow"}}</button>
           </div>

Reply via email to