]> source.dussan.org Git - gitea.git/commitdiff
Fix commits page url (#2823)
authorMorlinest <morlinest@gmail.com>
Thu, 2 Nov 2017 00:30:19 +0000 (01:30 +0100)
committerLunny Xiao <xiaolunwen@gmail.com>
Thu, 2 Nov 2017 00:30:19 +0000 (08:30 +0800)
* Fix commits page url

* Check all view types

templates/repo/sub_menu.tmpl

index 03f6caa58f21ff36dda8a5fdb6888c161cbf89eb..e9f74209d67eaef6c56134a168cf96d20c361396 100644 (file)
@@ -2,7 +2,7 @@
        <div class="ui two horizontal center link list">
                {{if and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo)}}
                        <div class="item{{if .PageIsCommits}} active{{end}}">
-                               <a href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}"><i class="octicon octicon-history"></i> <b>{{.CommitsCount}}</b> {{.i18n.Tr "repo.commits"}}</a>
+                               <a href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{EscapePound .BranchName}}"><i class="octicon octicon-history"></i> <b>{{.CommitsCount}}</b> {{.i18n.Tr "repo.commits"}}</a>
                        </div>
                {{end}}
                {{if and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo) }}