|
|
|
@ -11,27 +11,14 @@
|
|
|
|
|
{{if .PullRequestCtx.Allowed}}
|
|
|
|
|
<div class="fitted item">
|
|
|
|
|
<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>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
{{template "repo/branch_dropdown" .}}
|
|
|
|
|
<div class="fitted item">
|
|
|
|
|
<span class="ui breadcrumb">
|
|
|
|
|
<a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{EllipsisString .Repository.Name 30}}</a>
|
|
|
|
|
{{ $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>
|
|
|
|
|
{{ $n := len .TreeNames}}
|
|
|
|
|
{{ $l := Subtract $n 1}}
|
|
|
|
|
<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>
|
|
|
|
|
<div class="right fitted item">
|
|
|
|
|
{{if .Repository.CanEnableEditor}}
|
|
|
|
|
<div id="file-buttons" class="ui tiny blue buttons">
|
|
|
|
@ -48,9 +35,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
<!-- Only show colne panel in repository home page -->
|
|
|
|
|
<!-- Only show clone panel in repository home page -->
|
|
|
|
|
{{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}}
|
|
|
|
|
<button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
|
|
|
|
|
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
|
|
|
|
|