diff options
-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}} |