diff --git a/templates/repo/release_tag_header.tmpl b/templates/repo/release_tag_header.tmpl index 63d0689c50..75a115e31e 100644 --- a/templates/repo/release_tag_header.tmpl +++ b/templates/repo/release_tag_header.tmpl @@ -2,24 +2,23 @@ {{$canReadCode := $.Permission.CanRead $.UnitTypeCode}} {{if $canReadReleases}} -
-
- +
+ {{if .ShowReleaseSearch}} -
+ {{template "shared/search/combo" dict "Value" .Keyword}}
{{end}} -
+
{{if .EnableFeed}} - - {{svg "octicon-rss" 16}} {{ctx.Locale.Tr "rss_feed"}} + + {{svg "octicon-rss" 16}} + {{end}} {{if and (not .PageIsTagList) .CanCreateRelease}} diff --git a/tests/integration/release_test.go b/tests/integration/release_test.go index b5cccc65e8..f9ce3c81de 100644 --- a/tests/integration/release_test.go +++ b/tests/integration/release_test.go @@ -70,7 +70,7 @@ func checkLatestReleaseAndCount(t *testing.T, session *TestSession, repoURL, ver // Check release count in the counter on the Release/Tag switch, as well as that the tab is highlighted if count < 10 { // Only check values less than 10, should be enough attempts before this test cracks // 10 is the pagination limit, but the counter can have more than that - releaseTab := htmlDoc.doc.Find(".repository.releases .ui.compact.menu a.active.item[href$='/releases']") + releaseTab := htmlDoc.doc.Find(".repository.releases .switch a.active.item[href$='/releases']") assert.Contains(t, releaseTab.Text(), strconv.Itoa(count)+" release") // Could be "1 release" or "4 releases" } diff --git a/tests/integration/repo_tag_test.go b/tests/integration/repo_tag_test.go index 9be33ec8a8..4f72b58d12 100644 --- a/tests/integration/repo_tag_test.go +++ b/tests/integration/repo_tag_test.go @@ -41,11 +41,11 @@ func TestTagViewWithoutRelease(t *testing.T) { // Test that the tags sub-menu is active and has a counter htmlDoc := NewHTMLParser(t, resp.Body) - tagsTab := htmlDoc.Find(".small-menu-items .active.item[href$='/tags']") + tagsTab := htmlDoc.Find(".switch .active.item[href$='/tags']") assert.Contains(t, tagsTab.Text(), "4 tags") // Test that the release sub-menu isn't active - releaseLink := htmlDoc.Find(".small-menu-items .item[href$='/releases']") + releaseLink := htmlDoc.Find(".switch .item[href$='/releases']") assert.False(t, releaseLink.HasClass("active")) // Test that the title is displayed diff --git a/web_src/css/repo/release-tag.css b/web_src/css/repo/release-tag.css index 9860813e98..4a4158f4ba 100644 --- a/web_src/css/repo/release-tag.css +++ b/web_src/css/repo/release-tag.css @@ -110,6 +110,12 @@ .repository.new.release .field button { margin-bottom: 1em; } + .release-list-search { + order: 2 !important; + } + .release-list-buttons { + margin-left: auto; + } } .repository.new.release .field .attachment_edit {