|
|
@ -11,27 +11,14 @@ |
|
|
|
{{if .PullRequestCtx.Allowed}} |
|
|
|
{{if .PullRequestCtx.Allowed}} |
|
|
|
<div class="fitted item"> |
|
|
|
<div class="fitted item"> |
|
|
|
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{if .SignedUser.HasForkedRepo .BaseRepo.ID }}{{.SignedUser.Name}}:{{end}}{{.BranchName}}"> |
|
|
|
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{if .SignedUser.HasForkedRepo .BaseRepo.ID }}{{.SignedUser.Name}}:{{end}}{{.BranchName}}"> |
|
|
|
<button class="ui green small button"><i class="octicon octicon-git-compare"></i></button> |
|
|
|
<button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button> |
|
|
|
</a> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
{{template "repo/branch_dropdown" .}} |
|
|
|
{{template "repo/branch_dropdown" .}} |
|
|
|
<div class="fitted item"> |
|
|
|
{{ $n := len .TreeNames}} |
|
|
|
<span class="ui breadcrumb"> |
|
|
|
{{ $l := Subtract $n 1}} |
|
|
|
<a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 30}}</a> |
|
|
|
<div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div> |
|
|
|
{{ $n := len .TreeNames}} |
|
|
|
|
|
|
|
{{ $l := Subtract $n 1}} |
|
|
|
|
|
|
|
{{range $i, $v := .TreeNames}} |
|
|
|
|
|
|
|
<span class="divider"> / </span> |
|
|
|
|
|
|
|
{{if eq $i $l}} |
|
|
|
|
|
|
|
<span class="active section">{{EllipsisString $v 30}}</span> |
|
|
|
|
|
|
|
{{else}} |
|
|
|
|
|
|
|
{{ $p := index $.Paths $i}} |
|
|
|
|
|
|
|
<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span> |
|
|
|
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
{{end}} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="right fitted item"> |
|
|
|
<div class="right fitted item"> |
|
|
|
{{if .Repository.CanEnableEditor}} |
|
|
|
{{if .Repository.CanEnableEditor}} |
|
|
|
<div id="file-buttons" class="ui tiny blue buttons"> |
|
|
|
<div id="file-buttons" class="ui tiny blue buttons"> |
|
|
@ -48,9 +35,9 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} |
|
|
|
{{end}} |
|
|
|
|
|
|
|
|
|
|
|
<!-- Only show colne panel in repository home page --> |
|
|
|
<!-- Only show clone panel in repository home page --> |
|
|
|
{{if eq $n 0}} |
|
|
|
{{if eq $n 0}} |
|
|
|
<div class="ui action small input" id="clone-panel"> |
|
|
|
<div class="ui action tiny input" id="clone-panel"> |
|
|
|
{{if not $.DisableHTTP}} |
|
|
|
{{if not $.DisableHTTP}} |
|
|
|
<button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}"> |
|
|
|
<button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}"> |
|
|
|
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}} |
|
|
|
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}} |
|
|
|