summaryrefslogtreecommitdiffstats
path: root/templates/repo/issue/view_content/comments.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/issue/view_content/comments.tmpl')
-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}}