Skip to content

Commit daf70d3

Browse files
Bwkolafriks
authored andcommitted
Use the active branch for the code tab (#3720)
1 parent 1610296 commit daf70d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/header.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<div class="ui tabs container">
4949
<div class="ui tabular stackable menu navbar">
5050
{{if .Repository.UnitEnabled $.UnitTypeCode}}
51-
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
51+
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/branch/{{.BranchName}}{{end}}">
5252
<i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
5353
</a>
5454
{{end}}

0 commit comments

Comments
 (0)