2014-07-26 00:24:27 -04:00
|
|
|
{{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">
|
2014-08-09 13:29:51 -04:00
|
|
|
<div class="panel-header">
|
2014-11-12 06:48:50 -05:00
|
|
|
<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>
|
2014-07-26 00:24:27 -04:00
|
|
|
<strong>{{.i18n.Tr "settings.manage_ssh_keys"}}</strong>
|
2014-08-09 13:29:51 -04:00
|
|
|
</div>
|
|
|
|
<ul class="panel-body setting-list">
|
2014-07-26 00:24:27 -04:00
|
|
|
<li>{{.i18n.Tr "settings.ssh_desc"}}</li>
|
|
|
|
{{range .Keys}}
|
|
|
|
<li class="ssh clear">
|
2014-08-09 18:40:10 -04:00
|
|
|
<span class="active-icon left label label-{{if .HasRecentActivity}}green{{else}}gray{{end}} label-radius"></span>
|
2014-07-26 00:24:27 -04:00
|
|
|
<i class="mega-octicon octicon-key left"></i>
|
|
|
|
<div class="ssh-content left">
|
|
|
|
<p><strong>{{.Name}}</strong></p>
|
|
|
|
<p class="print">{{.Fingerprint}}</p>
|
2015-02-16 07:44:27 -05:00
|
|
|
<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>
|
2014-07-26 00:24:27 -04:00
|
|
|
</div>
|
2014-09-19 20:11:34 -04:00
|
|
|
<form action="{{AppSubUrl}}/user/settings/ssh" method="post">
|
2014-07-26 00:24:27 -04:00
|
|
|
{{$.CsrfTokenHtml}}
|
|
|
|
<input name="_method" type="hidden" value="DELETE">
|
2015-08-06 10:48:11 -04:00
|
|
|
<input name="id" type="hidden" value="{{.ID}}">
|
2014-11-12 06:48:50 -05:00
|
|
|
<button class="right ssh-btn btn btn-red btn-radius btn-small">{{$.i18n.Tr "settings.delete_key"}}</button>
|
2014-07-26 00:24:27 -04:00
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2014-11-10 05:30:07 -05:00
|
|
|
<p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p>
|
2014-07-26 00:24:27 -04:00
|
|
|
<br>
|
2014-11-12 06:48:50 -05:00
|
|
|
<form class="panel panel-radius form form-align form-settings-add hide" id="user-ssh-add-form" action="{{AppSubUrl}}/user/settings/ssh" method="post">
|
2014-07-26 00:24:27 -04:00
|
|
|
{{.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>
|
|
|
|
</div>
|
|
|
|
{{template "ng/base/footer" .}}
|