Commit 0b555727 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'nfriend-add-releases-to-tags' into 'master'

Add release links to tags on Tags page

See merge request gitlab-org/gitlab!16479
parents ee0d590f cfd0e39c
...@@ -123,7 +123,7 @@ ul.content-list { ...@@ -123,7 +123,7 @@ ul.content-list {
font-weight: $gl-font-weight-bold; font-weight: $gl-font-weight-bold;
} }
a { a:not(.default-link-color) {
color: $gl-text-color; color: $gl-text-color;
} }
......
...@@ -19,9 +19,15 @@ ...@@ -19,9 +19,15 @@
- else - else
%p %p
= s_("TagsPage|Can't find HEAD commit for this tag") = s_("TagsPage|Can't find HEAD commit for this tag")
- if release && release.description.present?
.description.md.prepend-top-default - if release
= markdown_field(release, :description) .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 .row-fixed-content.controls.flex-row
= render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name] = 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 "" ...@@ -13117,6 +13117,9 @@ msgstr ""
msgid "Related merge requests" msgid "Related merge requests"
msgstr "" msgstr ""
msgid "Release"
msgstr ""
msgid "Releases" msgid "Releases"
msgstr "" msgstr ""
......
...@@ -23,6 +23,11 @@ describe 'projects/tags/index' do ...@@ -23,6 +23,11 @@ describe 'projects/tags/index' do
expect(rendered).to have_button('Last updated') expect(rendered).to have_button('Last updated')
end 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 context 'when the most recent build for a tag has artifacts' do
let!(:build) { create(:ci_build, :success, :artifacts, pipeline: pipeline) } 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