From d5906071062cad77f9d672211fb76fffe783b6c7 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 17 Jan 2024 08:35:26 +0800 Subject: [PATCH] Render code block in activity tab (#28816) (#28818) Backport #28816 by @JakobDev This is a little bugfix. Inline code is usually rendered in issue titles, but it is missing in the activity tab. Before: ![Screenshot 2024-01-16 at 14-20-51 Test](https://github.com/go-gitea/gitea/assets/15185051/383370f3-0fb2-49de-81cc-014e5cf86727) After: ![grafik](https://github.com/go-gitea/gitea/assets/15185051/83eaf973-ce9a-44ce-beea-2db49fc8bd73) Co-authored-by: JakobDev --- templates/repo/activity.tmpl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/repo/activity.tmpl b/templates/repo/activity.tmpl index fe592c0000..3149f20670 100644 --- a/templates/repo/activity.tmpl +++ b/templates/repo/activity.tmpl @@ -126,7 +126,7 @@ {{ctx.Locale.Tr "repo.activity.published_release_label"}} {{.TagName}} {{if not .IsTag}} - {{.Title | RenderEmoji $.Context}} + {{.Title | RenderEmoji $.Context | RenderCodeBlock}} {{end}} {{TimeSinceUnix .CreatedUnix ctx.Locale}}

@@ -146,7 +146,7 @@ {{range .Activity.MergedPRs}}

{{ctx.Locale.Tr "repo.activity.merged_prs_label"}} - #{{.Index}} {{.Issue.Title | RenderEmoji $.Context}} + #{{.Index}} {{.Issue.Title | RenderEmoji $.Context | RenderCodeBlock}} {{TimeSinceUnix .MergedUnix ctx.Locale}}

{{end}} @@ -165,7 +165,7 @@ {{range .Activity.OpenedPRs}}

{{ctx.Locale.Tr "repo.activity.opened_prs_label"}} - #{{.Index}} {{.Issue.Title | RenderEmoji $.Context}} + #{{.Index}} {{.Issue.Title | RenderEmoji $.Context | RenderCodeBlock}} {{TimeSinceUnix .Issue.CreatedUnix ctx.Locale}}

{{end}} @@ -184,7 +184,7 @@ {{range .Activity.ClosedIssues}}

{{ctx.Locale.Tr "repo.activity.closed_issue_label"}} - #{{.Index}} {{.Title | RenderEmoji $.Context}} + #{{.Index}} {{.Title | RenderEmoji $.Context | RenderCodeBlock}} {{TimeSinceUnix .ClosedUnix ctx.Locale}}

{{end}} @@ -203,7 +203,7 @@ {{range .Activity.OpenedIssues}}

{{ctx.Locale.Tr "repo.activity.new_issue_label"}} - #{{.Index}} {{.Title | RenderEmoji $.Context}} + #{{.Index}} {{.Title | RenderEmoji $.Context | RenderCodeBlock}} {{TimeSinceUnix .CreatedUnix ctx.Locale}}

{{end}} @@ -221,9 +221,9 @@ {{ctx.Locale.Tr "repo.activity.unresolved_conv_label"}} #{{.Index}} {{if .IsPull}} - {{.Title | RenderEmoji $.Context}} + {{.Title | RenderEmoji $.Context | RenderCodeBlock}} {{else}} - {{.Title | RenderEmoji $.Context}} + {{.Title | RenderEmoji $.Context | RenderCodeBlock}} {{end}} {{TimeSinceUnix .UpdatedUnix ctx.Locale}}