Commit cfd0e39c authored by Nathan Friend's avatar Nathan Friend

Add link to releases on Tags page

The commit adds a link to the associated release for each tag on the
Tags page (if the tag is associated with a release).
parent 7c6e27fa
......@@ -123,7 +123,7 @@ ul.content-list {
font-weight: $gl-font-weight-bold;
}
a {
a:not(.default-link-color) {
color: $gl-text-color;
}
......
......@@ -19,7 +19,13 @@
- else
%p
= s_("TagsPage|Can't find HEAD commit for this tag")
- if release && release.description.present?
- if release
.text-secondary
= icon('rocket')
= _("Release")
= link_to release.name, project_releases_path(@project, anchor: release.tag), class: 'default-link-color'
- if release.description.present?
.description.md.prepend-top-default
= markdown_field(release, :description)
......
---
title: Add links to associated releases on Tags page
merge_request: 16479
author:
type: added
......@@ -13117,6 +13117,9 @@ msgstr ""
msgid "Related merge requests"
msgstr ""
msgid "Release"
msgstr ""
msgid "Releases"
msgstr ""
......
......@@ -23,6 +23,11 @@ describe 'projects/tags/index' do
expect(rendered).to have_button('Last updated')
end
it 'renders links to the Releases page for tags associated with a release' do
render
expect(rendered).to have_link(release.name, href: project_releases_path(project, anchor: release.tag))
end
context 'when the most recent build for a tag has artifacts' do
let!(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment