summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue
diff options
context:
space:
mode:
author6543 <m.huber@kithara.com>2023-06-23 14:12:39 +0200
committerGitHub <noreply@github.com>2023-06-23 12:12:39 +0000
commitb0215c40cdf9a3e46a45a3823b894998d1044cda (patch)
tree564ac8316c1cee99437879ba8594cbe786d04283 /templates/repo/issue
parenta954c93a68072042aa7dad717b6fa002c83a58fb (diff)
downloadgitea-b0215c40cdf9a3e46a45a3823b894998d1044cda.tar.gz
gitea-b0215c40cdf9a3e46a45a3823b894998d1044cda.zip
Store and use seconds for timeline time comments (#25392)
this will allow us to fully localize it later PS: we can not migrate back as the old value was a one-way conversion prepare for #25213 --- *Sponsored by Kithara Software GmbH*
Diffstat (limited to 'templates/repo/issue')
-rw-r--r--templates/repo/issue/view_content/comments.tmpl21
1 files changed, 18 insertions, 3 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 5f1f506b27..5dbd530fa5 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -263,7 +263,12 @@
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
<div class="detail">
{{svg "octicon-clock"}}
- <span class="text grey muted-links">{{.Content}}</span>
+ {{if .RenderedContent}}
+ {{/* compatibility with time comments made before v1.21 */}}
+ <span class="text grey muted-links">{{.RenderedContent}}</span>
+ {{else}}
+ <span class="text grey muted-links">{{.Content|Sec2Time}}</span>
+ {{end}}
</div>
</div>
{{else if eq .Type 14}}
@@ -277,7 +282,12 @@
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
<div class="detail">
{{svg "octicon-clock"}}
- <span class="text grey muted-links">{{.Content}}</span>
+ {{if .RenderedContent}}
+ {{/* compatibility with time comments made before v1.21 */}}
+ <span class="text grey muted-links">{{.RenderedContent}}</span>
+ {{else}}
+ <span class="text grey muted-links">{{.Content|Sec2Time}}</span>
+ {{end}}
</div>
</div>
{{else if eq .Type 15}}
@@ -676,7 +686,12 @@
</span>
<div class="detail">
{{svg "octicon-clock"}}
- <span class="text grey muted-links">{{.Content}}</span>
+ {{if .RenderedContent}}
+ {{/* compatibility with time comments made before v1.21 */}}
+ <span class="text grey muted-links">{{.RenderedContent}}</span>
+ {{else}}
+ <span class="text grey muted-links">- {{.Content|Sec2Time}}</span>
+ {{end}}
</div>
</div>
{{else if eq .Type 27}}