Fix code tab link when viewing tags (#3908) (#4263)

Signed-off-by: Ambrose Chua <ambrose@chua.family>
This commit is contained in:
Clément Lafont 2018-06-17 15:28:03 +02:00 committed by David Schneiderbauer
parent 00ad4745ba
commit 8b2df7310b
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@
<div class="ui tabs container"> <div class="ui tabs container">
<div class="ui tabular stackable menu navbar"> <div class="ui tabular stackable menu navbar">
{{if .Repository.UnitEnabled $.UnitTypeCode}} {{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"}} <i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
</a> </a>
{{end}} {{end}}