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 "ng/base/header" .}} |
||||
<div id="repo-wrapper"> |
||||
{{template "repo/header_old" .}} |
||||
<div class="container clear"> |
||||
{{template "repo/commits_table" .}} |
||||
</div> |
||||
{{template "base/head" .}} |
||||
<div class="repository commits"> |
||||
{{template "repo/header" .}} |
||||
<div class="ui container"> |
||||
{{template "repo/commits_table" .}} |
||||
</div> |
||||
</div> |
||||
{{template "ng/base/footer" .}} |
||||
{{template "base/footer" .}} |
||||
|
@ -1,48 +1,68 @@ |
||||
<div id="commits-list"> |
||||
<div class="panel panel-radius"> |
||||
<div class="panel-header"> |
||||
{{if not .IsDiffCompare}} |
||||
<form class="search pull-right" action="{{.RepoLink}}/commits/{{.BranchName}}/search" method="get" id="commits-search-form"> |
||||
<input class="ipt ipt-radius" type="search" name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" /> |
||||
<button class="btn btn-black btn-small btn-radius">{{.i18n.Tr "repo.commits.find"}}</button> |
||||
</form> |
||||
{{end}} |
||||
<h4>{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}}</h4> |
||||
</div> |
||||
<table class="panel-body table commit-list table-striped"> |
||||
<thead> |
||||
<tr> |
||||
<th class="author">{{.i18n.Tr "repo.commits.author"}}</th> |
||||
<th class="sha">SHA1</th> |
||||
<th class="message">{{.i18n.Tr "repo.commits.message"}}</th> |
||||
<th class="date">{{.i18n.Tr "repo.commits.date"}}</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{{ $username := .Username}} |
||||
{{ $reponame := .Reponame}} |
||||
{{$r := List .Commits}} |
||||
{{range $r}} |
||||
<tr> |
||||
<td class="author"> |
||||
{{if .User}} |
||||
<img class="avatar-20" src="{{.User.AvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> |
||||
{{else}} |
||||
<img class="avatar-20" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}} |
||||
{{end}} |
||||
</td> |
||||
<td class="sha"><a rel="nofollow" class="label label-green" href="{{AppSubUrl}}/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td> |
||||
<td class="message"><span class="text-truncate">{{RenderCommitMessage .Summary $.RepoLink}}</span></td> |
||||
<td class="date">{{TimeSince .Author.When $.Lang}}</td> |
||||
</tr> |
||||
{{end}} |
||||
</tbody> |
||||
</table> |
||||
</div> |
||||
{{if and (not .IsSearchPage) (not .IsDiffCompare)}} |
||||
<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> |
||||
<h4 class="ui top attached header"> |
||||
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} |
||||
{{if .PageIsCommits}} |
||||
<div class="ui right"> |
||||
<form action="{{.RepoLink}}/commits/{{.BranchName}}/search"> |
||||
<div class="ui tiny search input"> |
||||
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus> |
||||
</div> |
||||
<button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button> |
||||
</form> |
||||
</div> |
||||
{{else if .IsDiffCompare}} |
||||
<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> |
||||
{{end}} |
||||
</h4> |
||||
<div class="ui attached table segment"> |
||||
<table class="ui very basic striped commits table"> |
||||
<thead> |
||||
<tr> |
||||
<th>{{.i18n.Tr "repo.commits.author"}}</th> |
||||
<th>SHA1</th> |
||||
<th>{{.i18n.Tr "repo.commits.message"}}</th> |
||||
<th>{{.i18n.Tr "repo.commits.date"}}</th> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
{{ $username := .Username}} |
||||
{{ $reponame := .Reponame}} |
||||
{{ $r:= List .Commits}} |
||||
{{range $r}} |
||||
<tr> |
||||
<td class="author"> |
||||
{{if .User}} |
||||
<img class="ui avatar image" src="{{.User.AvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a> |
||||
{{else}} |
||||
<img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}} |
||||
{{end}} |
||||
</td> |
||||
<td class="sha"><a rel="nofollow" class="ui green sha label" href="{{AppSubUrl}}/{{$username}}/{{$reponame}}/commit/{{.Id}} ">{{SubStr .Id.String 0 10}} </a></td> |
||||
<td class="message"><span class="text truncate">{{RenderCommitMessage .Summary $.RepoLink}}</span></td> |
||||
<td class="date">{{TimeSince .Author.When $.Lang}}</td> |
||||
</tr> |
||||
{{end}} |
||||
</tbody> |
||||
</table> |
||||
</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 "ng/base/header" .}} |
||||
<div id="repo-wrapper"> |
||||
{{template "repo/header_old" .}} |
||||
<div class="container clear" id="diff-page"> |
||||
{{if .IsDiffCompare }} |
||||
<div class="panel panel-info panel-radius compare-head-box"> |
||||
<div class="panel-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> |
||||
<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> |
||||
<div class="panel-body compare"> |
||||
{{template "repo/commits_table" .}} |
||||
</div> |
||||
{{template "base/head" .}} |
||||
<div class="repository diff"> |
||||
{{template "repo/header" .}} |
||||
<div class="ui container"> |
||||
{{if .IsDiffCompare }} |
||||
{{template "repo/commits_table" .}} |
||||
{{else}} |
||||
<h4 class="ui top attached info header"> |
||||
{{RenderCommitMessage .Commit.Message $.RepoLink}} |
||||
<div class="ui right"> |
||||
<a class="ui blue tiny button" href="{{EscapePound .SourcePath}}"> |
||||
{{.i18n.Tr "repo.diff.browse_source"}} |
||||
</a> |
||||
</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> |
||||
{{else}} |
||||
<div class="panel panel-info panel-radius diff-head-box"> |
||||
<div class="panel-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> |
||||
<h4 class="commit-message">{{RenderCommitMessage .Commit.Message $.RepoLink}}</h4> |
||||
</div> |
||||
<div class="panel-body"> |
||||
<span class="pull-right"> |
||||
<ul class="list-unstyled"> |
||||
<li class="inline">{{.i18n.Tr "repo.diff.parent"}}</li> |
||||
{{range .Parents}} |
||||
<li class="inline"><a href="{{$.RepoLink}}/commit/{{.}}"><span class="label label-blue">{{ShortSha .}}</span></a></li> |
||||
{{end}} |
||||
<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> |
||||
{{end}} |
||||
|
||||
{{if .DiffNotAvailable}} |
||||
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4> |
||||
{{else}} |
||||
<div class="diff-detail-box diff-box"> |
||||
<div> |
||||
<i class="fa fa-retweet"></i> |
||||
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} |
||||
<div class="ui right"> |
||||
<a class="ui tiny basic black toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a> |
||||
</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}} |
||||
{{if .DiffNotAvailable}} |
||||
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4> |
||||
{{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> |
||||
</ol> |
||||
</div> |
||||
|
||||
<td class="lines-code"> |
||||
<pre>{{$line.Content}}</pre> |
||||
</td> |
||||
</tr> |
||||
{{end}} |
||||
{{end}} |
||||
</tbody> |
||||
</table> |
||||
{{end}} |
||||
</div> |
||||
{{range $i, $file := .Diff.Files}} |
||||
<div class="diff-file-box diff-box file-content" id="diff-{{.Index}}"> |
||||
<h4 class="ui top attached normal header"> |
||||
<div class="diff-counter count ui 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> |
||||
<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> |
||||
<br> |
||||
{{end}} |
||||
{{end}} |
||||
</div> |
||||
</div> |
||||
<br> |
||||
{{end}} |
||||
{{end}} |
||||
</div> |
||||
</div> |
||||
{{template "ng/base/footer" .}} |
||||
{{template "base/footer" .}} |
||||
|
@ -1,63 +1,92 @@ |
||||
{{template "ng/base/head" .}} |
||||
{{template "ng/base/header" .}} |
||||
<div id="setting-wrapper" class="main-wrapper"> |
||||
<div id="user-profile-setting" class="container clear"> |
||||
{{template "user/settings/nav" .}} |
||||
<div class="grid-4-5 left"> |
||||
<div class="setting-content"> |
||||
{{template "ng/base/alert" .}} |
||||
<div id="user-ssh-setting-content"> |
||||
<div id="user-ssh-panel" class="panel panel-radius"> |
||||
<div class="panel-header"> |
||||
<a class="show-form-btn" data-target-form="#user-ssh-add-form"> |
||||
<button class="btn btn-medium btn-black btn-radius right">{{.i18n.Tr "settings.add_key"}}</button> |
||||
</a> |
||||
<strong>{{.i18n.Tr "settings.manage_ssh_keys"}}</strong> |
||||
</div> |
||||
<ul class="panel-body setting-list"> |
||||
<li>{{.i18n.Tr "settings.ssh_desc"}}</li> |
||||
{{range .Keys}} |
||||
<li class="ssh clear"> |
||||
<span class="active-icon left label label-{{if .HasRecentActivity}}green{{else}}gray{{end}} label-radius"></span> |
||||
<i class="mega-octicon octicon-key left"></i> |
||||
<div class="ssh-content left"> |
||||
<p><strong>{{.Name}}</strong></p> |
||||
<p class="print">{{.Fingerprint}}</p> |
||||
<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> |
||||
<form action="{{AppSubUrl}}/user/settings/ssh" method="post"> |
||||
{{$.CsrfTokenHtml}} |
||||
<input name="_method" type="hidden" value="DELETE"> |
||||
<input name="id" type="hidden" value="{{.ID}}"> |
||||
<button class="right ssh-btn btn btn-red btn-radius btn-small">{{$.i18n.Tr "settings.delete_key"}}</button> |
||||
</form> |
||||
</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> |
||||
{{template "base/head" .}} |
||||
<div class="user settings"> |
||||
<div class="ui container"> |
||||
<div class="ui grid"> |
||||
{{template "user/settings/navbar" .}} |
||||
<div class="twelve wide column content"> |
||||
{{template "base/alert" .}} |
||||
<h4 class="ui top attached header"> |
||||
{{.i18n.Tr "settings.manage_ssh_keys"}} |
||||
<div class="ui right"> |
||||
<div class="ui blue tiny show-panel button" data-panel="#add-ssh-key-panel">{{.i18n.Tr "settings.add_key"}}</div> |
||||
</div> |
||||
</h4> |
||||
<div class="ui attached segment"> |
||||
<div class="ui key list"> |
||||
<div class="item"> |
||||
{{.i18n.Tr "settings.ssh_desc"}} |
||||
</div> |
||||
{{range .Keys}} |
||||
<div class="item ui grid"> |
||||
<div class="one wide column"> |
||||
<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> |
||||
<div class="one wide column"> |
||||
<i class="mega-octicon octicon-key left"></i> |
||||
</div> |
||||
<div class="eleven wide column"> |
||||
<strong>{{.Name}}</strong> |
||||
<div class="print meta"> |
||||
{{.Fingerprint}} |
||||
</div> |
||||
<div class="activity meta"> |
||||
<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> |
||||
</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> |
||||
{{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 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> |
||||
{{template "ng/base/footer" .}} |
||||
{{template "base/footer" .}} |
Loading…
Reference in new issue