summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2018-04-09 12:34:19 +0200
committerLauris BH <lauris@nix.lv>2018-04-09 13:34:19 +0300
commitdaf70d3a4e8e0120e6fb7a39c938c88d5e5ad47b (patch)
tree74b3bc5dec4042a8149303a537c4a191c8a495ba /templates
parent1610296f54c767c28090b32e7e361931b2ac03b5 (diff)
downloadgitea-daf70d3a4e8e0120e6fb7a39c938c88d5e5ad47b.tar.gz
gitea-daf70d3a4e8e0120e6fb7a39c938c88d5e5ad47b.zip
Use the active branch for the code tab (#3720)
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 db5b6c7f0c..95a7d499ec 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}}">
+ <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/branch/{{.BranchName}}{{end}}">
<i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
</a>
{{end}}