commit
50cd67cd4b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,9 +1,8 @@ |
|||||||
{{template "ng/base/head" .}} |
{{template "base/head" .}} |
||||||
{{template "ng/base/header" .}} |
<div class="repository commits"> |
||||||
<div id="repo-wrapper"> |
{{template "repo/header" .}} |
||||||
{{template "repo/header_old" .}} |
<div class="ui container"> |
||||||
<div class="container clear"> |
{{template "repo/commits_table" .}} |
||||||
{{template "repo/commits_table" .}} |
</div> |
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
{{template "ng/base/footer" .}} |
{{template "base/footer" .}} |
||||||
|
@ -1,48 +1,68 @@ |
|||||||
<div id="commits-list"> |
<h4 class="ui top attached header"> |
||||||
<div class="panel panel-radius"> |
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} |
||||||
<div class="panel-header"> |
{{if .PageIsCommits}} |
||||||
{{if not .IsDiffCompare}} |
<div class="ui right"> |
||||||
<form class="search pull-right" action="{{.RepoLink}}/commits/{{.BranchName}}/search" method="get" id="commits-search-form"> |
<form action="{{.RepoLink}}/commits/{{.BranchName}}/search"> |
||||||
<input class="ipt ipt-radius" type="search" name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" /> |
<div class="ui tiny search input"> |
||||||
<button class="btn btn-black btn-small btn-radius">{{.i18n.Tr "repo.commits.find"}}</button> |
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus> |
||||||
</form> |
</div> |
||||||
{{end}} |
<button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button> |
||||||
<h4>{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}}</h4> |
</form> |
||||||
</div> |
</div> |
||||||
<table class="panel-body table commit-list table-striped"> |
{{else if .IsDiffCompare}} |
||||||
<thead> |
<a href="{{$.RepoLink}}/commit/{{.BeforeCommitId}}" class="ui green sha label">{{ShortSha .BeforeCommitId}}</a> ... <a href="{{$.RepoLink}}/commit/{{.AfterCommitId}}" class="ui green sha label">{{ShortSha .AfterCommitId}}</a> |
||||||
<tr> |
{{end}} |
||||||
<th class="author">{{.i18n.Tr "repo.commits.author"}}</th> |
</h4> |
||||||
<th class="sha">SHA1</th> |
<div class="ui attached table segment"> |
||||||
<th class="message">{{.i18n.Tr "repo.commits.message"}}</th> |
<table class="ui very basic striped commits table"> |
||||||
<th class="date">{{.i18n.Tr "repo.commits.date"}}</th> |
<thead> |
||||||
</tr> |
<tr> |
||||||
</thead> |
<th>{{.i18n.Tr "repo.commits.author"}}</th> |
||||||
<tbody> |
<th>SHA1</th> |
||||||
{{ $username := .Username}} |
<th>{{.i18n.Tr "repo.commits.message"}}</th> |
||||||
{{ $reponame := .Reponame}} |
<th>{{.i18n.Tr "repo.commits.date"}}</th> |
||||||
{{$r := List .Commits}} |
</tr> |
||||||
{{range $r}} |
</thead> |
||||||
<tr> |
<tbody> |
||||||
<td class="author"> |
{{ $username := .Username}} |
||||||
{{if .User}} |
{{ $reponame := .Reponame}} |
||||||
<img class="avatar-20" src="{{.User.AvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> |
{{ $r:= List .Commits}} |
||||||
{{else}} |
{{range $r}} |
||||||
<img class="avatar-20" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}} |
<tr> |
||||||
{{end}} |
<td class="author"> |
||||||
</td> |
{{if .User}} |
||||||
<td class="sha"><a rel="nofollow" class="label label-green" href="{{AppSubUrl}}/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td> |
<img class="ui avatar image" src="{{.User.AvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> |
||||||
<td class="message"><span class="text-truncate">{{RenderCommitMessage .Summary $.RepoLink}}</span></td> |
{{else}} |
||||||
<td class="date">{{TimeSince .Author.When $.Lang}}</td> |
<img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}} |
||||||
</tr> |
{{end}} |
||||||
{{end}} |
</td> |
||||||
</tbody> |
<td class="sha"><a rel="nofollow" class="ui green sha label" href="{{AppSubUrl}}/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td> |
||||||
</table> |
<td class="message"><span class="text truncate">{{RenderCommitMessage .Summary $.RepoLink}}</span></td> |
||||||
</div> |
<td class="date">{{TimeSince .Author.When $.Lang}}</td> |
||||||
{{if and (not .IsSearchPage) (not .IsDiffCompare)}} |
</tr> |
||||||
<ul class="pagination"> |
|
||||||
{{if .LastPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{.RepoLink}}/commits/{{.BranchName}}{{if .FileName}}/{{.FileName}}{{end}}?p={{.LastPageNum}}" rel="nofollow">« {{.i18n.Tr "repo.commits.newer"}}</a></li>{{end}} |
|
||||||
{{if .NextPageNum}}<li><a class="btn btn-medium btn-gray btn-radius" href="{{.RepoLink}}/commits/{{.BranchName}}{{if .FileName}}/{{.FileName}}{{end}}?p={{.NextPageNum}}" rel="nofollow">» {{.i18n.Tr "repo.commits.older"}}</a></li>{{end}} |
|
||||||
</ul> |
|
||||||
{{end}} |
{{end}} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
</div> |
</div> |
||||||
|
|
||||||
|
{{with .Page}} |
||||||
|
{{if gt .TotalPages 1}} |
||||||
|
<div class="center page buttons"> |
||||||
|
<div class="ui borderless pagination menu"> |
||||||
|
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}> |
||||||
|
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}} |
||||||
|
</a> |
||||||
|
{{range .Pages}} |
||||||
|
{{if eq .Num -1}} |
||||||
|
<a class="disabled item">...</a> |
||||||
|
{{else}} |
||||||
|
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Num}}"{{end}}>{{.Num}}</a> |
||||||
|
{{end}} |
||||||
|
{{end}} |
||||||
|
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Next}}"{{end}}> |
||||||
|
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i> |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
{{end}} |
||||||
|
{{end}} |
@ -1,134 +1,136 @@ |
|||||||
{{template "ng/base/head" .}} |
{{template "base/head" .}} |
||||||
{{template "ng/base/header" .}} |
<div class="repository diff"> |
||||||
<div id="repo-wrapper"> |
{{template "repo/header" .}} |
||||||
{{template "repo/header_old" .}} |
<div class="ui container"> |
||||||
<div class="container clear" id="diff-page"> |
{{if .IsDiffCompare }} |
||||||
{{if .IsDiffCompare }} |
{{template "repo/commits_table" .}} |
||||||
<div class="panel panel-info panel-radius compare-head-box"> |
{{else}} |
||||||
<div class="panel-header"> |
<h4 class="ui top attached info header"> |
||||||
<a class="pull-right btn btn-blue btn-header btn-medium btn-radius" rel="nofollow" href="{{EscapePound .SourcePath}}">{{.i18n.Tr "repo.diff.browse_source"}}</a> |
{{RenderCommitMessage .Commit.Message $.RepoLink}} |
||||||
<h4><a href="{{$.RepoLink}}/commit/{{.BeforeCommitId}}" class="label label-green">{{ShortSha .BeforeCommitId}}</a> ... <a href="{{$.RepoLink}}/commit/{{.AfterCommitId}}" class="label label-green">{{ShortSha .AfterCommitId}}</a></h4> |
<div class="ui right"> |
||||||
</div> |
<a class="ui blue tiny button" href="{{EscapePound .SourcePath}}"> |
||||||
<div class="panel-body compare"> |
{{.i18n.Tr "repo.diff.browse_source"}} |
||||||
{{template "repo/commits_table" .}} |
</a> |
||||||
</div> |
</div> |
||||||
|
</h4> |
||||||
|
<div class="ui attached info segment"> |
||||||
|
{{if .Author}} |
||||||
|
<img class="ui avatar image" src="{{.Author.AvatarLink}}" /> |
||||||
|
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> |
||||||
|
{{else}} |
||||||
|
<img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" /> |
||||||
|
<strong>{{.Commit.Author.Name}}</strong> |
||||||
|
{{end}} |
||||||
|
<span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span> |
||||||
|
<div class="ui right"> |
||||||
|
<div class="ui horizontal list"> |
||||||
|
<div class="item"> |
||||||
|
{{.i18n.Tr "repo.diff.parent"}} |
||||||
|
</div> |
||||||
|
<div class="item"> |
||||||
|
{{range .Parents}} |
||||||
|
<a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a> |
||||||
|
{{end}} |
||||||
|
</div> |
||||||
|
<div class="item">{{.i18n.Tr "repo.diff.commit"}}</div> |
||||||
|
<div class="item"><span class="ui blue sha label">{{ShortSha .CommitId}}</span></div> |
||||||
</div> |
</div> |
||||||
{{else}} |
</div> |
||||||
<div class="panel panel-info panel-radius diff-head-box"> |
</div> |
||||||
<div class="panel-header"> |
{{end}} |
||||||
<a class="pull-right btn btn-blue btn-header btn-medium btn-radius" rel="nofollow" href="{{EscapePound .SourcePath}}">{{.i18n.Tr "repo.diff.browse_source"}}</a> |
|
||||||
<h4 class="commit-message">{{RenderCommitMessage .Commit.Message $.RepoLink}}</h4> |
{{if .DiffNotAvailable}} |
||||||
</div> |
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4> |
||||||
<div class="panel-body"> |
{{else}} |
||||||
<span class="pull-right"> |
<div class="diff-detail-box diff-box"> |
||||||
<ul class="list-unstyled"> |
<div> |
||||||
<li class="inline">{{.i18n.Tr "repo.diff.parent"}}</li> |
<i class="fa fa-retweet"></i> |
||||||
{{range .Parents}} |
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} |
||||||
<li class="inline"><a href="{{$.RepoLink}}/commit/{{.}}"><span class="label label-blue">{{ShortSha .}}</span></a></li> |
<div class="ui right"> |
||||||
{{end}} |
<a class="ui tiny basic black toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a> |
||||||
<li class="inline">{{.i18n.Tr "repo.diff.commit"}} <span class="label label-blue">{{ShortSha .CommitId}}</span></li> |
|
||||||
</ul> |
|
||||||
</span> |
|
||||||
<p class="author"> |
|
||||||
{{if .Author}} |
|
||||||
<img class="avatar-30" src="{{.Author.AvatarLink}}" /> |
|
||||||
<a href="{{AppSubUrl}}/{{.Author.Name}}"><strong>{{.Commit.Author.Name}}</strong></a> |
|
||||||
{{else}} |
|
||||||
<img class="avatar-30" src="{{AvatarLink .Commit.Author.Email}}" /> |
|
||||||
<strong>{{.Commit.Author.Name}}</strong> |
|
||||||
{{end}} |
|
||||||
<span class="text-grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span> |
|
||||||
</p> |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
<ol class="detail-files hide" id="diff-files"> |
||||||
|
{{range .Diff.Files}} |
||||||
|
<li> |
||||||
|
<div class="diff-counter count pull-right"> |
||||||
|
{{if not .IsBin}} |
||||||
|
<span class="add" data-line="{{.Addition}}">{{.Addition}}</span> |
||||||
|
<span class="bar"> |
||||||
|
<span class="pull-left add"></span> |
||||||
|
<span class="pull-left del"></span> |
||||||
|
</span> |
||||||
|
<span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span> |
||||||
|
{{else}} |
||||||
|
<span>{{$.i18n.Tr "repo.diff.bin"}}</span> |
||||||
|
{{end}} |
||||||
|
</div> |
||||||
|
<!-- todo finish all file status, now modify, add, delete and rename --> |
||||||
|
<span class="status {{DiffTypeToStr .Type}} poping up" data-content="{{DiffTypeToStr .Type}}" data-variation="inverted tiny" data-position="right center"> </span> |
||||||
|
<a class="file" href="#diff-{{.Index}}">{{.Name}}</a> |
||||||
|
</li> |
||||||
{{end}} |
{{end}} |
||||||
{{if .DiffNotAvailable}} |
</ol> |
||||||
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4> |
</div> |
||||||
{{else}} |
|
||||||
<div class="diff-detail-box diff-box"> |
|
||||||
<a class="pull-right btn btn-gray btn-header btn-radius text-black" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a> |
|
||||||
<p class="showing"> |
|
||||||
<i class="fa fa-retweet"></i> |
|
||||||
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} |
|
||||||
</p> |
|
||||||
<ol class="detail-files collapse hide" id="diff-files"> |
|
||||||
{{range .Diff.Files}} |
|
||||||
<li> |
|
||||||
<div class="diff-counter count pull-right"> |
|
||||||
{{if not .IsBin}} |
|
||||||
<span class="add" data-line="{{.Addition}}">{{.Addition}}</span> |
|
||||||
<span class="bar"> |
|
||||||
<span class="pull-left add"></span> |
|
||||||
<span class="pull-left del"></span> |
|
||||||
</span> |
|
||||||
<span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span> |
|
||||||
{{else}} |
|
||||||
<span>{{$.i18n.Tr "repo.diff.bin"}}</span> |
|
||||||
{{end}} |
|
||||||
</div> |
|
||||||
<!-- todo finish all file status, now modify, add, delete and rename --> |
|
||||||
<span class="status {{DiffTypeToStr .Type}}" data-toggle="tooltip" data-placement="right" title="{{DiffTypeToStr .Type}}"> </span> |
|
||||||
<a class="file" href="#diff-{{.Index}}">{{.Name}}</a> |
|
||||||
</li> |
|
||||||
{{end}} |
|
||||||
</ol> |
|
||||||
</div> |
|
||||||
|
|
||||||
{{range $i, $file := .Diff.Files}} |
|
||||||
<div class="panel panel-radius diff-file-box diff-box file-content" id="diff-{{.Index}}"> |
|
||||||
<div class="panel-header"> |
|
||||||
<div class="diff-counter count pull-left"> |
|
||||||
{{if not $file.IsBin}} |
|
||||||
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span> |
|
||||||
<span class="bar"> |
|
||||||
<span class="pull-left add"></span> |
|
||||||
<span class="pull-left del"></span> |
|
||||||
</span> |
|
||||||
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span> |
|
||||||
{{else}} |
|
||||||
{{$.i18n.Tr "repo.diff.bin"}} |
|
||||||
{{end}} |
|
||||||
</div> |
|
||||||
{{if $file.IsDeleted}} |
|
||||||
<a class="btn btn-gray btn-header btn-radius text-black pull-right" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> |
|
||||||
{{else}} |
|
||||||
<a class="btn btn-gray btn-header btn-radius text-black pull-right" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> |
|
||||||
{{end}} |
|
||||||
<span class="file">{{$file.Name}}</span> |
|
||||||
</div> |
|
||||||
{{$isImage := (call $.IsImageFile $file.Name)}} |
|
||||||
<div class="panel-body file-body file-code code-view code-diff"> |
|
||||||
{{if $isImage}} |
|
||||||
<div class="text-center"> |
|
||||||
<img src="{{$.RawPath}}/{{EscapePound .Name}}"> |
|
||||||
</div> |
|
||||||
{{else}} |
|
||||||
<table> |
|
||||||
<tbody> |
|
||||||
{{range .Sections}} |
|
||||||
{{range $k, $line := .Lines}} |
|
||||||
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}"> |
|
||||||
<td class="lines-num lines-num-old"> |
|
||||||
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span> |
|
||||||
</td> |
|
||||||
<td class="lines-num lines-num-new"> |
|
||||||
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span> |
|
||||||
</td> |
|
||||||
|
|
||||||
<td class="lines-code"> |
{{range $i, $file := .Diff.Files}} |
||||||
<pre>{{$line.Content}}</pre> |
<div class="diff-file-box diff-box file-content" id="diff-{{.Index}}"> |
||||||
</td> |
<h4 class="ui top attached normal header"> |
||||||
</tr> |
<div class="diff-counter count ui left"> |
||||||
{{end}} |
{{if not $file.IsBin}} |
||||||
{{end}} |
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span> |
||||||
</tbody> |
<span class="bar"> |
||||||
</table> |
<span class="pull-left add"></span> |
||||||
{{end}} |
<span class="pull-left del"></span> |
||||||
</div> |
</span> |
||||||
|
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span> |
||||||
|
{{else}} |
||||||
|
{{$.i18n.Tr "repo.diff.bin"}} |
||||||
|
{{end}} |
||||||
|
</div> |
||||||
|
<span class="file">{{$file.Name}}</span> |
||||||
|
<div class="ui right"> |
||||||
|
{{if $file.IsDeleted}} |
||||||
|
<a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> |
||||||
|
{{else}} |
||||||
|
<a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> |
||||||
|
{{end}} |
||||||
|
</div> |
||||||
|
</h4> |
||||||
|
<div class="ui attached table segment"> |
||||||
|
{{$isImage := (call $.IsImageFile $file.Name)}} |
||||||
|
{{if $isImage}} |
||||||
|
<div class="center"> |
||||||
|
<img src="{{$.RawPath}}/{{EscapePound .Name}}"> |
||||||
|
</div> |
||||||
|
{{else}} |
||||||
|
<div class="file-body file-code code-view code-diff"> |
||||||
|
<table> |
||||||
|
<tbody> |
||||||
|
{{range .Sections}} |
||||||
|
{{range $k, $line := .Lines}} |
||||||
|
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}"> |
||||||
|
<td class="lines-num lines-num-old"> |
||||||
|
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span> |
||||||
|
</td> |
||||||
|
<td class="lines-num lines-num-new"> |
||||||
|
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span> |
||||||
|
</td> |
||||||
|
<td class="lines-code"> |
||||||
|
<pre>{{$line.Content}}</pre> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{{end}} |
||||||
|
{{end}} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
</div> |
</div> |
||||||
<br> |
|
||||||
{{end}} |
|
||||||
{{end}} |
{{end}} |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
|
<br> |
||||||
|
{{end}} |
||||||
|
{{end}} |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
{{template "ng/base/footer" .}} |
{{template "base/footer" .}} |
||||||
|
@ -1,63 +1,92 @@ |
|||||||
{{template "ng/base/head" .}} |
{{template "base/head" .}} |
||||||
{{template "ng/base/header" .}} |
<div class="user settings"> |
||||||
<div id="setting-wrapper" class="main-wrapper"> |
<div class="ui container"> |
||||||
<div id="user-profile-setting" class="container clear"> |
<div class="ui grid"> |
||||||
{{template "user/settings/nav" .}} |
{{template "user/settings/navbar" .}} |
||||||
<div class="grid-4-5 left"> |
<div class="twelve wide column content"> |
||||||
<div class="setting-content"> |
{{template "base/alert" .}} |
||||||
{{template "ng/base/alert" .}} |
<h4 class="ui top attached header"> |
||||||
<div id="user-ssh-setting-content"> |
{{.i18n.Tr "settings.manage_ssh_keys"}} |
||||||
<div id="user-ssh-panel" class="panel panel-radius"> |
<div class="ui right"> |
||||||
<div class="panel-header"> |
<div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div> |
||||||
<a class="show-form-btn" data-target-form="#user-ssh-add-form"> |
</div> |
||||||
<button class="btn btn-medium btn-black btn-radius right">{{.i18n.Tr "settings.add_key"}}</button> |
</h4> |
||||||
</a> |
<div class="ui attached segment"> |
||||||
<strong>{{.i18n.Tr "settings.manage_ssh_keys"}}</strong> |
<div class="ui key list"> |
||||||
</div> |
<div class="item"> |
||||||
<ul class="panel-body setting-list"> |
{{.i18n.Tr "settings.ssh_desc"}} |
||||||
<li>{{.i18n.Tr "settings.ssh_desc"}}</li> |
</div> |
||||||
{{range .Keys}} |
{{range .Keys}} |
||||||
<li class="ssh clear"> |
<div class="item ui grid"> |
||||||
<span class="active-icon left label label-{{if .HasRecentActivity}}green{{else}}gray{{end}} label-radius"></span> |
<div class="one wide column"> |
||||||
<i class="mega-octicon octicon-key left"></i> |
<i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i> |
||||||
<div class="ssh-content left"> |
</div> |
||||||
<p><strong>{{.Name}}</strong></p> |
<div class="one wide column"> |
||||||
<p class="print">{{.Fingerprint}}</p> |
<i class="mega-octicon octicon-key left"></i> |
||||||
<p class="activity"><i>{{$.i18n.Tr "settings.add_on"}} <span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i>{{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span title="{{DateFmtLong .Updated}}">{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i></p> |
</div> |
||||||
</div> |
<div class="eleven wide column"> |
||||||
<form action="{{AppSubUrl}}/user/settings/ssh" method="post"> |
<strong>{{.Name}}</strong> |
||||||
{{$.CsrfTokenHtml}} |
<div class="print meta"> |
||||||
<input name="_method" type="hidden" value="DELETE"> |
{{.Fingerprint}} |
||||||
<input name="id" type="hidden" value="{{.ID}}"> |
</div> |
||||||
<button class="right ssh-btn btn btn-red btn-radius btn-small">{{$.i18n.Tr "settings.delete_key"}}</button> |
<div class="activity meta"> |
||||||
</form> |
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i> |
||||||
</li> |
|
||||||
{{end}} |
|
||||||
</ul> |
|
||||||
</div> |
|
||||||
<p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p> |
|
||||||
<br> |
|
||||||
<form class="panel panel-radius form form-align form-settings-add hide" id="user-ssh-add-form" action="{{AppSubUrl}}/user/settings/ssh" method="post"> |
|
||||||
{{.CsrfTokenHtml}} |
|
||||||
<p class="panel-header"><strong>{{.i18n.Tr "settings.add_new_key"}}</strong></p> |
|
||||||
<div class="panel-body"> |
|
||||||
<p class="field"> |
|
||||||
<label class="req" for="ssh-title">{{.i18n.Tr "settings.key_name"}}</label> |
|
||||||
<input class="ipt ipt-radius" id="ssh-title" name="title" type="text" required /> |
|
||||||
</p> |
|
||||||
<p class="field clear"> |
|
||||||
<label class="left req" for="ssh-key">{{.i18n.Tr "settings.key_content"}}</label> |
|
||||||
<textarea class="ipt ipt-radius left" name="content" id="ssh-key" required></textarea> |
|
||||||
</p> |
|
||||||
<p class="field"> |
|
||||||
<label></label> |
|
||||||
<button class="btn btn-green btn-radius" id="ssh-add-btn">{{.i18n.Tr "settings.add_key"}}</button> |
|
||||||
</p> |
|
||||||
</div> |
|
||||||
</form> |
|
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
<div class="two wide column"> |
||||||
|
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"> |
||||||
|
{{$.i18n.Tr "settings.delete_key"}} |
||||||
|
</button> |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
|
{{end}} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<br> |
||||||
|
<p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p> |
||||||
|
<div {{if not .HasError}}class="hide"{{end}} id="add-ssh-key-panel"> |
||||||
|
<h4 class="ui top attached header"> |
||||||
|
{{.i18n.Tr "settings.add_new_key"}} |
||||||
|
</h4> |
||||||
|
<div class="ui attached segment"> |
||||||
|
<form class="ui form" action="{{.Link}}" method="post"> |
||||||
|
{{.CsrfTokenHtml}} |
||||||
|
<div class="field {{if .Err_Title}}error{{end}}"> |
||||||
|
<label for="title">{{.i18n.Tr "settings.key_name"}}</label> |
||||||
|
<input id="title" name="title" value="{{.title}}" autofocus required> |
||||||
|
</div> |
||||||
|
<div class="field {{if .Err_Content}}error{{end}}"> |
||||||
|
<label for="content">{{.i18n.Tr "settings.key_content"}}</label> |
||||||
|
<textarea id="content" name="content" required>{{.content}}</textarea> |
||||||
|
</div> |
||||||
|
<button class="ui green button"> |
||||||
|
{{.i18n.Tr "settings.add_key"}} |
||||||
|
</button> |
||||||
|
</form> |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="ui small basic delete modal"> |
||||||
|
<div class="ui icon header"> |
||||||
|
<i class="trash icon"></i> |
||||||
|
{{.i18n.Tr "settings.ssh_key_deletion"}} |
||||||
|
</div> |
||||||
|
<div class="content"> |
||||||
|
<p>{{.i18n.Tr "settings.ssh_key_deletion_desc"}}</p> |
||||||
|
</div> |
||||||
|
<div class="actions"> |
||||||
|
<div class="ui red basic inverted cancel button"> |
||||||
|
<i class="remove icon"></i> |
||||||
|
{{.i18n.Tr "modal.no"}} |
||||||
|
</div> |
||||||
|
<div class="ui green basic inverted ok button"> |
||||||
|
<i class="checkmark icon"></i> |
||||||
|
{{.i18n.Tr "modal.yes"}} |
||||||
</div> |
</div> |
||||||
|
</div> |
||||||
</div> |
</div> |
||||||
{{template "ng/base/footer" .}} |
{{template "base/footer" .}} |
Loading…
Reference in new issue