1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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:
silverwind
2017-08-14 00:49:38 +02:00
committed by Andrey Nering
parent 29f3a6e492
commit fc29a405e8
5 changed files with 19 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
<div class="fitted item choose reference">
<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">
<i class="octicon octicon-git-branch"></i>
{{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:

View File

@@ -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}}