summaryrefslogtreecommitdiffstats
path: root/templates/repo/sub_menu.tmpl
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2017-10-26 02:49:16 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-10-26 08:49:16 +0800
commit3ab580c8d6b8a2c063d848f8e3002347c9e5cebb (patch)
tree3f66f793be25db1ca8baac8d5333e39bfdd4f7e1 /templates/repo/sub_menu.tmpl
parente86a0bf3feab82c1b3439806245083dffb2f37c9 (diff)
downloadgitea-3ab580c8d6b8a2c063d848f8e3002347c9e5cebb.tar.gz
gitea-3ab580c8d6b8a2c063d848f8e3002347c9e5cebb.zip
Add branch overiew page (#2108)
* Add branch overiew page * fix changed method name on sub menu * remove unused code
Diffstat (limited to 'templates/repo/sub_menu.tmpl')
-rw-r--r--templates/repo/sub_menu.tmpl14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl
new file mode 100644
index 0000000000..03f6caa58f
--- /dev/null
+++ b/templates/repo/sub_menu.tmpl
@@ -0,0 +1,14 @@
+<div class="ui segment sub-menu">
+ <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>
+ </div>
+ {{end}}
+ {{if and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo) }}
+ <div class="item{{if .PageIsBranches}} active{{end}}">
+ <a href="{{.RepoLink}}/branches/"><i class="octicon octicon-git-branch"></i> <b>{{.BrancheCount}}</b> {{.i18n.Tr "repo.branches"}}</a>
+ </div>
+ {{end}}
+ </div>
+</div>