@@ -37,10 +37,41 @@ | |||||
float: unset; | float: unset; | ||||
} | } | ||||
.message.clone-menu { | |||||
text-align: left; | |||||
} | |||||
kbd { | |||||
} | |||||
.clone-grid { | .clone-grid { | ||||
margin-top: 0.5em; | |||||
display: grid; | display: grid; | ||||
grid-template-columns: 0fr 1fr; | grid-template-columns: 0fr 1fr; | ||||
grid-column-gap: 1em; | grid-column-gap: 1em; | ||||
align-items: center; | align-items: center; | ||||
text-align: right; | text-align: right; | ||||
} | } | ||||
/* cancel some semantic-ui styles (maybe we should not be using this class..) */ | |||||
.ui.sub.header { | |||||
text-transform: unset; | |||||
vertical-align: baseline; | |||||
} | |||||
.ui.attached.header .right { | |||||
margin-top: unset; | |||||
} | |||||
#repo-files-table { | |||||
margin-top: 0; | |||||
border-top-left-radius: 0; | |||||
border-top-right-radius: 0; | |||||
} | |||||
.ui.top.attached.header { | |||||
margin-top: 2em; | |||||
margin-bottom: -1px; | |||||
background: #F9FAFB; | |||||
} | |||||
.ui.left.attached.button { | |||||
margin-right: 1px; | |||||
} |
@@ -1,3 +1,13 @@ | |||||
{{/* | |||||
{{if and .PullRequestCtx.Allowed .IsViewBranch}} | |||||
<div class=""> | |||||
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{.Repository.Owner.Name}}:{{.BranchName}}"> | |||||
<button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button> | |||||
</a> | |||||
</div> | |||||
{{end}} | |||||
*/}} | |||||
<div class="fitted item choose reference"> | <div class="fitted item choose reference"> | ||||
{{ $showCommitCount := and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo)}} | {{ $showCommitCount := and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo)}} | ||||
<div class="ui floating filter dropdown custom" data-can-create-branch="{{.CanCreateBranch}}" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}"> | <div class="ui floating filter dropdown custom" data-can-create-branch="{{.CanCreateBranch}}" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}"> | ||||
@@ -23,13 +23,12 @@ | |||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{ $n := len .TreeNames}} | |||||
{{ $l := Subtract $n 1}} | |||||
<div class="column right aligned"> | <div class="column right aligned"> | ||||
<div class="ui dropdown"> | <div class="ui dropdown"> | ||||
<button class="ui basic left attached labeled icon button"><i class="clone icon"></i>Clone</button> | <button class="ui basic left attached labeled icon button"><i class="clone icon"></i>Clone</button> | ||||
<div class="menu"> | <div class="menu"> | ||||
<div class="message"> | |||||
<div class="message clone-menu"> | |||||
Run: <kbd class="ui label">$ git clone <i>url</i></kbd> | |||||
<div class="clone-grid"> | <div class="clone-grid"> | ||||
{{if not $.DisableHTTP}} | {{if not $.DisableHTTP}} | ||||
<div> | <div> | ||||
@@ -67,25 +66,6 @@ | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}">{{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 id="file-buttons"> | |||||
{{if .Repository.CanEnableEditor}} | |||||
<div class="ui tiny blue buttons"> | |||||
{{if .CanAddFile}} | |||||
<a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button"> | |||||
{{.i18n.Tr "repo.editor.new_file"}} | |||||
</a> | |||||
{{end}} | |||||
{{if .CanUploadFile}} | |||||
<a href="{{.RepoLink}}/_upload/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button"> | |||||
{{.i18n.Tr "repo.editor.upload_file"}} | |||||
</a> | |||||
{{end}} | |||||
</div> | |||||
{{end}} | |||||
</div> | |||||
</div> | </div> | ||||
{{if .IsViewFile}} | {{if .IsViewFile}} | ||||
{{template "repo/view_file" .}} | {{template "repo/view_file" .}} | ||||
@@ -2,6 +2,8 @@ | |||||
<h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}"> | <h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}"> | ||||
<div class="ui stackable grid"> | <div class="ui stackable grid"> | ||||
<div class="ten wide column"> | <div class="ten wide column"> | ||||
{{ $l := Subtract (len .TreeNames) 1}} | |||||
<span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if ne $i $l}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span> | |||||
{{if .ReadmeExist}} | {{if .ReadmeExist}} | ||||
<i class="book icon ui left"></i> | <i class="book icon ui left"></i> | ||||
{{if .ReadmeInList}} | {{if .ReadmeInList}} | ||||
@@ -1,48 +1,38 @@ | |||||
<table id="repo-files-table" class="ui fixed single line table"> | |||||
<thead> | |||||
<tr class="commit-list"> | |||||
<th class="four wide"> | |||||
{{if .LatestCommitUser}} | |||||
<img class="ui avatar image img-12" src="{{.LatestCommitUser.RelAvatarLink}}" /> | |||||
{{if .LatestCommitUser.FullName}} | |||||
<a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{.LatestCommitUser.FullName}}</strong></a> | |||||
{{else}} | |||||
<a href="{{AppSubUrl}}/{{.LatestCommitUser.Name}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a> | |||||
{{end}} | |||||
{{else}} | |||||
{{if .LatestCommit.Author}} | |||||
<img class="ui avatar image img-12" src="{{AvatarLink .LatestCommit.Author.Email}}" /> | |||||
<strong>{{.LatestCommit.Author.Name}}</strong> | |||||
{{end}} | |||||
{{end}} | |||||
<a rel="nofollow" class="ui sha label {{if .LatestCommit.Signature}} isSigned {{if .LatestCommitVerification.Verified }} isVerified {{end}}{{end}}" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}"> | |||||
{{ShortSha .LatestCommit.ID.String}} | |||||
{{if .LatestCommit.Signature}} | |||||
<div class="ui detail icon button"> | |||||
{{if .LatestCommitVerification.Verified}} | |||||
<i title="{{.LatestCommitVerification.Reason}}" class="lock green icon"></i> | |||||
{{else}} | |||||
<i title="{{$.i18n.Tr .LatestCommitVerification.Reason}}" class="unlock icon"></i> | |||||
{{end}} | |||||
</div> | |||||
{{end}} | |||||
</a> | |||||
<span class="grey has-emoji">{{RenderCommitMessage .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}} | |||||
{{if IsMultilineCommitMessage .LatestCommit.Message}} | |||||
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button> | |||||
<pre class="commit-body" style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre> | |||||
{{end}} | |||||
{{template "repo/commit_status" .LatestCommitStatus}}</span> | |||||
</th> | |||||
<th class="nine wide"> | |||||
</th> | |||||
<th class="three wide text grey right age">{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}</th> | |||||
</tr> | |||||
</thead> | |||||
{{/* | |||||
{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}} | |||||
<td class="message collapsing has-emoji"> | |||||
{{RenderCommitMessageLink $commit.Summary $.RepoLink (print $.RepoLink "/commit/" $commit.ID) $.Repository.ComposeMetas}} | |||||
</td> | |||||
*/}} | |||||
<h4 class="ui top attached header"> | |||||
{{ $n := len .TreeNames}} | |||||
{{ $l := Subtract $n 1}} | |||||
<span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}">{{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 class="ui right sub header"> | |||||
Latest commit: | |||||
<a rel="nofollow" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}"> | |||||
<span class="grey has-emoji"> | |||||
{{RenderCommitMessage .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}} | |||||
{{if IsMultilineCommitMessage .LatestCommit.Message}} | |||||
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button> | |||||
<pre class="commit-body" style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre> | |||||
{{end}} | |||||
{{template "repo/commit_status" .LatestCommitStatus}} | |||||
</span> | |||||
</a> | |||||
<span style="margin-left: 1em;"> | |||||
{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}} | |||||
</span> | |||||
</div> | |||||
</h4> | |||||
<table id="repo-files-table" class="ui fixed single line attached table"> | |||||
<tbody> | <tbody> | ||||
{{if .HasParentPath}} | {{if .HasParentPath}} | ||||
<tr class="has-parent"> | <tr class="has-parent"> | ||||
<td colspan="3"><i class="octicon octicon-mail-reply"></i><a href="{{EscapePound .BranchLink}}{{.ParentPath}}">..</a></td> | |||||
<td colspan="2"><a href="{{EscapePound .BranchLink}}{{.ParentPath}}"><i class="octicon octicon-mail-reply"></i> ..</a></td> | |||||
</tr> | </tr> | ||||
{{end}} | {{end}} | ||||
{{range $item := .Files}} | {{range $item := .Files}} | ||||
@@ -78,9 +68,6 @@ | |||||
{{end}} | {{end}} | ||||
</td> | </td> | ||||
{{end}} | {{end}} | ||||
<td class="message collapsing has-emoji"> | |||||
{{RenderCommitMessageLink $commit.Summary $.RepoLink (print $.RepoLink "/commit/" $commit.ID) $.Repository.ComposeMetas}} | |||||
</td> | |||||
<td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td> | <td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td> | ||||
</tr> | </tr> | ||||
{{end}} | {{end}} | ||||
@@ -88,4 +75,4 @@ | |||||
</table> | </table> | ||||
{{if .ReadmeExist}} | {{if .ReadmeExist}} | ||||
{{template "repo/view_file" .}} | {{template "repo/view_file" .}} | ||||
{{end}} | |||||
{{end}} |