Skip to content

Commit edfb57e

Browse files
authored
Render code block in activity tab (#28816)
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)
1 parent c08d263 commit edfb57e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

templates/repo/activity.tmpl

+7-7
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
<span class="ui green label">{{ctx.Locale.Tr "repo.activity.published_release_label"}}</span>
127127
{{.TagName}}
128128
{{if not .IsTag}}
129-
<a class="title" href="{{$.RepoLink}}/src/{{.TagName | PathEscapeSegments}}">{{.Title | RenderEmoji $.Context}}</a>
129+
<a class="title" href="{{$.RepoLink}}/src/{{.TagName | PathEscapeSegments}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a>
130130
{{end}}
131131
{{TimeSinceUnix .CreatedUnix ctx.Locale}}
132132
</p>
@@ -146,7 +146,7 @@
146146
{{range .Activity.MergedPRs}}
147147
<p class="desc">
148148
<span class="ui purple label">{{ctx.Locale.Tr "repo.activity.merged_prs_label"}}</span>
149-
#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context}}</a>
149+
#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context | RenderCodeBlock}}</a>
150150
{{TimeSinceUnix .MergedUnix ctx.Locale}}
151151
</p>
152152
{{end}}
@@ -165,7 +165,7 @@
165165
{{range .Activity.OpenedPRs}}
166166
<p class="desc">
167167
<span class="ui green label">{{ctx.Locale.Tr "repo.activity.opened_prs_label"}}</span>
168-
#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context}}</a>
168+
#{{.Index}} <a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Issue.Title | RenderEmoji $.Context | RenderCodeBlock}}</a>
169169
{{TimeSinceUnix .Issue.CreatedUnix ctx.Locale}}
170170
</p>
171171
{{end}}
@@ -184,7 +184,7 @@
184184
{{range .Activity.ClosedIssues}}
185185
<p class="desc">
186186
<span class="ui red label">{{ctx.Locale.Tr "repo.activity.closed_issue_label"}}</span>
187-
#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context}}</a>
187+
#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a>
188188
{{TimeSinceUnix .ClosedUnix ctx.Locale}}
189189
</p>
190190
{{end}}
@@ -203,7 +203,7 @@
203203
{{range .Activity.OpenedIssues}}
204204
<p class="desc">
205205
<span class="ui green label">{{ctx.Locale.Tr "repo.activity.new_issue_label"}}</span>
206-
#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context}}</a>
206+
#{{.Index}} <a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a>
207207
{{TimeSinceUnix .CreatedUnix ctx.Locale}}
208208
</p>
209209
{{end}}
@@ -221,9 +221,9 @@
221221
<span class="ui green label">{{ctx.Locale.Tr "repo.activity.unresolved_conv_label"}}</span>
222222
#{{.Index}}
223223
{{if .IsPull}}
224-
<a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Title | RenderEmoji $.Context}}</a>
224+
<a class="title" href="{{$.RepoLink}}/pulls/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a>
225225
{{else}}
226-
<a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context}}</a>
226+
<a class="title" href="{{$.RepoLink}}/issues/{{.Index}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a>
227227
{{end}}
228228
{{TimeSinceUnix .UpdatedUnix ctx.Locale}}
229229
</p>

0 commit comments

Comments
 (0)