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,9 +19,15 @@
- else
%p
= s_("TagsPage|Can't find HEAD commit for this tag")
- if release && release.description.present?
.description.md.prepend-top-default
= markdown_field(release, :description)
- 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)
.row-fixed-content.controls.flex-row
= render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name]
......
---
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