summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAmbrose Chua <ambrose@chua.family>2018-05-07 13:08:35 +0800
committerBo-Yi Wu <appleboy.tw@gmail.com>2018-05-07 13:08:35 +0800
commit3a6f3c8c119927b4ed9ea814342f1b15bd29d93d (patch)
tree8c664e16ae668c669727522e17b557616a2a5f84 /templates
parent04889b7ae5b506cf8a074d2cd938326c739504e5 (diff)
downloadgitea-3a6f3c8c119927b4ed9ea814342f1b15bd29d93d.tar.gz
gitea-3a6f3c8c119927b4ed9ea814342f1b15bd29d93d.zip
Fix code tab link when viewing tags (#3908)
Signed-off-by: Ambrose Chua <ambrose@chua.family>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/header.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index f4c0d0d163..6d1d9edf8c 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -48,7 +48,7 @@
<div class="ui tabs container">
<div class="ui tabular stackable menu navbar">
{{if .Repository.UnitEnabled $.UnitTypeCode}}
- <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/branch/{{.BranchName}}{{end}}">
+ <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL}}{{end}}">
<i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
</a>
{{end}}