From 2824ae2128a8d6488b77c5a7534cc874da3c3165 Mon Sep 17 00:00:00 2001 From: metiftikci Date: Mon, 2 Dec 2024 16:34:16 +0300 Subject: [PATCH] fix: show tag name on branch/tag selector if repo shown from tag ref (#32689) --- templates/repo/commits.tmpl | 4 ++-- templates/repo/home.tmpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/repo/commits.tmpl b/templates/repo/commits.tmpl index e79f3d7751..7065bf33f4 100644 --- a/templates/repo/commits.tmpl +++ b/templates/repo/commits.tmpl @@ -9,8 +9,8 @@ {{$branchDropdownCurrentRefType := "branch"}} {{$branchDropdownCurrentRefShortName := .BranchName}} {{if .IsViewTag}} - {{$branchDropdownCurrentRefType := "tag"}} - {{$branchDropdownCurrentRefShortName := .TagName}} + {{$branchDropdownCurrentRefType = "tag"}} + {{$branchDropdownCurrentRefShortName = .TagName}} {{end}} {{template "repo/branch_dropdown" dict "Repository" .Repository diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index c2f1be782a..1e77cd4919 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -50,8 +50,8 @@ {{$branchDropdownCurrentRefType := "branch"}} {{$branchDropdownCurrentRefShortName := .BranchName}} {{if .IsViewTag}} - {{$branchDropdownCurrentRefType := "tag"}} - {{$branchDropdownCurrentRefShortName := .TagName}} + {{$branchDropdownCurrentRefType = "tag"}} + {{$branchDropdownCurrentRefShortName = .TagName}} {{end}} {{template "repo/branch_dropdown" dict "Repository" .Repository