diff options
author | Giteabot <teabot@gitea.io> | 2024-01-17 08:35:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-17 01:35:26 +0100 |
commit | d5906071062cad77f9d672211fb76fffe783b6c7 (patch) | |
tree | bd27c54020372f51122a8e037f7c06a9d7b875c7 /templates | |
parent | 4746291b0863eaf9c629c944bd48295ca2f69d2f (diff) | |
download | gitea-d5906071062cad77f9d672211fb76fffe783b6c7.tar.gz gitea-d5906071062cad77f9d672211fb76fffe783b6c7.zip |
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:

After:

Co-authored-by: JakobDev <jakobdev@gmx.de>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/activity.tmpl | 14 |
1 files 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 @@ <span class="ui green label">{{ctx.Locale.Tr "repo.activity.published_release_label"}}</span> {{.TagName}} {{if not .IsTag}} - <a class="title" href="{{$.RepoLink}}/src/{{.TagName | PathEscapeSegments}}">{{.Title | RenderEmoji $.Context}}</a> + <a class="title" href="{{$.RepoLink}}/src/{{.TagName | PathEscapeSegments}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> {{end}} {{TimeSinceUnix .CreatedUnix ctx.Locale}} </p> @@ -146,7 +146,7 @@ {{range .Activity.MergedPRs}} <p class="desc"> <span class="ui purple label">{{ctx.Locale.Tr "repo.activity.merged_prs_label"}}</span> - #{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context}}</a> + #{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> {{TimeSinceUnix .MergedUnix ctx.Locale}} </p> {{end}} @@ -165,7 +165,7 @@ {{range .Activity.OpenedPRs}} <p class="desc"> <span class="ui green label">{{ctx.Locale.Tr "repo.activity.opened_prs_label"}}</span> - #{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context}}</a> + #{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> {{TimeSinceUnix .Issue.CreatedUnix ctx.Locale}} </p> {{end}} @@ -184,7 +184,7 @@ {{range .Activity.ClosedIssues}} <p class="desc"> <span class="ui red label">{{ctx.Locale.Tr "repo.activity.closed_issue_label"}}</span> - #{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context}}</a> + #{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> {{TimeSinceUnix .ClosedUnix ctx.Locale}} </p> {{end}} @@ -203,7 +203,7 @@ {{range .Activity.OpenedIssues}} <p class="desc"> <span class="ui green label">{{ctx.Locale.Tr "repo.activity.new_issue_label"}}</span> - #{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context}}</a> + #{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> {{TimeSinceUnix .CreatedUnix ctx.Locale}} </p> {{end}} @@ -221,9 +221,9 @@ <span class="ui green label">{{ctx.Locale.Tr "repo.activity.unresolved_conv_label"}}</span> #{{.Index}} {{if .IsPull}} - <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Title | RenderEmoji $.Context}}</a> + <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> {{else}} - <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context}}</a> + <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a> {{end}} {{TimeSinceUnix .UpdatedUnix ctx.Locale}} </p> |