More tweaks to repo top panel (#2267)
* More tweaks to repo top panel * undo hiding of compare button on master * attempt to fix ci issue * another ci attempt
This commit is contained in:
parent
29f3a6e492
commit
fc29a405e8
|
@ -19,7 +19,7 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo, branch strin
|
||||||
|
|
||||||
// Click the little green button to create a pull
|
// Click the little green button to create a pull
|
||||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||||
link, exists := htmlDoc.doc.Find("button.ui.green.small.button").Parent().Attr("href")
|
link, exists := htmlDoc.doc.Find("button.ui.green.tiny.compact.button").Parent().Attr("href")
|
||||||
assert.True(t, exists, "The template has changed")
|
assert.True(t, exists, "The template has changed")
|
||||||
if branch != "master" {
|
if branch != "master" {
|
||||||
link = strings.Replace(link, ":master", ":"+branch, 1)
|
link = strings.Replace(link, ":master", ":"+branch, 1)
|
||||||
|
|
|
@ -1290,7 +1290,6 @@ footer .ui.language .menu {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
.repository #clone-panel {
|
.repository #clone-panel {
|
||||||
margin-top: -8px;
|
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
width: 350px;
|
width: 350px;
|
||||||
}
|
}
|
||||||
|
@ -1318,6 +1317,10 @@ footer .ui.language .menu {
|
||||||
.repository.file.list .choose.reference .header .icon {
|
.repository.file.list .choose.reference .header .icon {
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
}
|
}
|
||||||
|
.repository.file.list .repo-path .section,
|
||||||
|
.repository.file.list .repo-path .divider {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
.repository.file.list #file-buttons {
|
.repository.file.list #file-buttons {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#clone-panel {
|
#clone-panel {
|
||||||
margin-top: -8px;
|
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
width: 350px;
|
width: 350px;
|
||||||
|
|
||||||
|
@ -167,6 +166,13 @@
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.repo-path {
|
||||||
|
.section, .divider {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#file-buttons {
|
#file-buttons {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
.ui.button {
|
.ui.button {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="fitted item choose reference">
|
<div class="fitted item choose reference">
|
||||||
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
|
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
|
||||||
<div class="ui basic small button">
|
<div class="ui basic compact tiny button">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
<i class="octicon octicon-git-branch"></i>
|
<i class="octicon octicon-git-branch"></i>
|
||||||
{{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
|
{{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
|
||||||
|
|
|
@ -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}}
|
||||||
|
|
Loading…
Reference in a new issue