1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-09-15 18:56:59 +00:00

feat(UI): fix links, add labels for releases on repo activity page

This commit is contained in:
Robert Wolff 2024-08-01 17:26:52 +02:00
parent 3d3ddd7704
commit 2795f5bc0e
3 changed files with 43 additions and 9 deletions

View file

@ -122,10 +122,18 @@
<div class="list">
{{range .Activity.PublishedReleases}}
<p class="desc">
<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 | RenderCodeBlock}}</a>
{{if .IsTag}}
<span class="ui yellow label">{{ctx.Locale.Tr "repo.activity.published_tag_label"}}</span>
{{else if .IsPrerelease}}
<span class="ui orange label">{{ctx.Locale.Tr "repo.activity.published_prerelease_label"}}</span>
{{else}}
<span class="ui green label">{{ctx.Locale.Tr "repo.activity.published_release_label"}}</span>
{{end}}
{{if .IsTag}}
<a href="{{$.RepoLink}}/src/{{.TagName | PathEscapeSegments}}">{{.TagName}}</a>
{{else}}
{{.TagName}}
<a class="title" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}">{{.Title | RenderEmoji $.Context | RenderCodeBlock}}</a>
{{end}}
{{TimeSinceUnix .CreatedUnix ctx.Locale}}
</p>