summaryrefslogtreecommitdiffstats
path: root/templates/repo/sub_menu.tmpl
diff options
context:
space:
mode:
authorMorlinest <morlinest@gmail.com>2017-11-02 01:30:19 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-11-02 08:30:19 +0800
commit122a66f6e079816201cf2406f58da9a3b2dea2df (patch)
tree9d57009c34560ce55e20af796dbac6513b61c72a /templates/repo/sub_menu.tmpl
parent85e99b6a6b381c1fd7087872cbc39938a5efcdd7 (diff)
downloadgitea-122a66f6e079816201cf2406f58da9a3b2dea2df.tar.gz
gitea-122a66f6e079816201cf2406f58da9a3b2dea2df.zip
Fix commits page url (#2823)
* Fix commits page url * Check all view types
Diffstat (limited to 'templates/repo/sub_menu.tmpl')
-rw-r--r--templates/repo/sub_menu.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl
index 03f6caa58f..e9f74209d6 100644
--- a/templates/repo/sub_menu.tmpl
+++ b/templates/repo/sub_menu.tmpl
@@ -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) }}