]> source.dussan.org Git - gitea.git/commitdiff
Make commits tab active when on diff page
authorchriswatt <info@chriswatt.org>
Sun, 7 Feb 2016 20:11:25 +0000 (20:11 +0000)
committerchriswatt <info@chriswatt.org>
Sun, 7 Feb 2016 20:11:25 +0000 (20:11 +0000)
templates/repo/header.tmpl

index 3a1f9cc16bfb4d2c74f7f0e3ece58107fc566960..cab0fb53d4cf7ef92eba972f47ee41ca79b73d21 100644 (file)
@@ -61,7 +61,7 @@
                                        <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
                                </a>
                        {{end}}
-                       <a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
+                       <a class="{{if (or (.PageIsCommits) (.PageIsDiff))}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
                                <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
                        </a>
                        <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">