diff options
author | Thedro Neely <thedroneely@gmail.com> | 2020-01-23 07:19:24 -0500 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2020-01-23 07:19:24 -0500 |
commit | 27948c4cc4c8b541317855b770183e681e4bc1fc (patch) | |
tree | 421c02d5a92fdcf3f26df8a1d45626397f3f5c9d /templates | |
parent | 7dffcb472f13018fd2628afd627d92790b1c164a (diff) | |
download | gitea-templates-27948c4cc4c8b541317855b770183e681e4bc1fc.tar.gz gitea-templates-27948c4cc4c8b541317855b770183e681e4bc1fc.tar.bz2 gitea-templates-27948c4cc4c8b541317855b770183e681e4bc1fc.zip |
templates/repo/header: Move commit and branch to header tab
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/header.tmpl | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 111609e..257fb29 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -47,15 +47,36 @@ </div> {{end}} </div><!-- end grid --> + + <div class="ui repo-description repo-description-custom"> + <div id="repo-desc"> + {{if .DescriptionHTML}}<span class="description has-emoji">{{.DescriptionHTML}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}} + <a class="link" href="{{.Website}}">{{.Website}}</a> + </div> + </div> + </div><!-- end container --> {{end}} <div class="ui tabs container"> {{if not .Repository.IsBeingCreated}} <div class="ui tabular stackable menu navbar"> {{if .Permission.CanRead $.UnitTypeCode}} - <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}"> + <a class="{{if (and .PageIsViewCode (not (or .PageIsCommits .PageIsBranches)))}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}"> <i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}} </a> + + <a class="{{if .PageIsCommits}}active{{end}} item" + href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{EscapePound .BranchName}}"> + {{.i18n.Tr "repo.commits"}} + <span class="ui small label">{{.CommitsCount}}</span> + </a> + + <a class="{{if .PageIsBranches}}active{{end}} item" + href="{{.RepoLink}}/branches/"> + {{.i18n.Tr "repo.branches"}} + <span class="ui small label">{{.BranchesCount}}</span> + </a> + {{end}} {{if .Permission.CanRead $.UnitTypeIssues}} |