1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00

A release title should always be a link

This partially reverts c41b2c73ef: for the
sake of consistency, the title of a release should always be a link,
whether it's a tag-only release or not.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2024-03-04 08:25:07 +01:00
parent 19ff532d42
commit f9894f4c51
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@
<div class="ui twelve wide column detail"> <div class="ui twelve wide column detail">
<div class="gt-df gt-ac gt-sb gt-fw gt-mb-3"> <div class="gt-df gt-ac gt-sb gt-fw gt-mb-3">
<h4 class="release-list-title gt-word-break"> <h4 class="release-list-title gt-word-break">
{{if $.PageIsSingleTag}}{{$release.Title}}{{else}}<a href="{{$.RepoLink}}/releases/tag/{{$release.TagName | PathEscapeSegments}}">{{$release.Title}}</a>{{end}} <a href="{{$.RepoLink}}/releases/tag/{{$release.TagName | PathEscapeSegments}}">{{$release.Title}}</a>
{{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "gt-df"}} {{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "gt-df"}}
{{if $release.IsDraft}} {{if $release.IsDraft}}
<span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span> <span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span>

View file

@ -59,7 +59,7 @@ func TestTagViewWithoutRelease(t *testing.T) {
assert.False(t, releaseLink.HasClass("active")) assert.False(t, releaseLink.HasClass("active"))
// Test that the title is displayed // Test that the title is displayed
releaseTitle := strings.TrimSpace(htmlDoc.Find("h4.release-list-title").Text()) releaseTitle := strings.TrimSpace(htmlDoc.Find("h4.release-list-title > a").Text())
assert.Equal(t, "no-release", releaseTitle) assert.Equal(t, "no-release", releaseTitle)
// Test that there is no "Stable" link // Test that there is no "Stable" link