Skip to content

Commit 2ec85e0

Browse files
Bwkolunny
authored andcommitted
Use the active branch for the code tab (#3776)
1 parent 251e1b6 commit 2ec85e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/repo/header.tmpl

Lines changed: 1 addition & 1 deletion
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)