diff options
author | Adam Strzelecki <ono@java.pl> | 2015-12-03 02:15:00 +0100 |
---|---|---|
committer | Adam Strzelecki <ono@java.pl> | 2015-12-03 02:16:18 +0100 |
commit | 2580e7b57e60011766cf58a6c7cce421e193a668 (patch) | |
tree | 53f7d3a009eabaad82897dca207da31c215f1e18 /templates/repo/header.tmpl | |
parent | b83cb36049e9edb6722dc2765c06a159fa7e2a19 (diff) | |
download | gitea-2580e7b57e60011766cf58a6c7cce421e193a668.tar.gz gitea-2580e7b57e60011766cf58a6c7cce421e193a668.zip |
UI: Always show menu on repo pages
Merges repo/sidebar.tmpl with repo/header.tmpl and makes every repo page use
middleware.RepoRef() necessary to display information on this menu.
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r-- | templates/repo/header.tmpl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 10455db516..d345c566b9 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -45,3 +45,37 @@ </div><!-- end grid --> </div><!-- end container --> {{end}} +{{if not .IsBareRepo}} +<div class="ui tabs container"> + <div class="ui tabular menu navbar"> + <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}"> + <i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}} + </a> + <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues"> + <i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if eq 0 .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span> + </a> + <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls"> + <i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if eq 0 .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span> + </a> + <a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}"> + <i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if eq 0 .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span> + </a> + <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases"> + <i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if eq 0 .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span> + </a> + <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki"> + <i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}} + </a> + {{if .IsRepositoryAdmin}} + <div class="right menu"> + <a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings"> + <i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}} + </a> + </div> + {{end}} + </div> +</div> +<div class="ui tabs divider"></div> +{{else}} +<div class="ui divider"></div> +{{end}} |