mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-17 10:50:42 +01:00
46 lines
1.6 KiB
HTML
46 lines
1.6 KiB
HTML
@(account: model.Account, sshKeys: List[model.SshKey])(implicit context: app.Context)
|
|
@import context._
|
|
@import view.helpers._
|
|
@html.main("SSH Keys"){
|
|
<div class="row-fluid">
|
|
<div class="span3">
|
|
@menu("ssh", settings.ssh)
|
|
</div>
|
|
<div class="span9">
|
|
<div class="box">
|
|
<div class="box-header">SSH Keys</div>
|
|
<div class="box-content">
|
|
@if(sshKeys.isEmpty){
|
|
No keys
|
|
}
|
|
@sshKeys.zipWithIndex.map { case (key, i) =>
|
|
@if(i != 0){
|
|
<hr>
|
|
}
|
|
<strong>@key.title</strong> (@_root_.ssh.SshUtil.fingerPrint(key.publicKey).getOrElse("Key is invalid."))
|
|
<a href="@path/@account.userName/_ssh/delete/@key.sshKeyId" class="btn btn-mini btn-danger pull-right">Delete</a>
|
|
}
|
|
</div>
|
|
</div>
|
|
<form method="POST" action="@path/@account.userName/_ssh" validate="true">
|
|
<div class="box">
|
|
<div class="box-header">Add an SSH Key</div>
|
|
<div class="box-content">
|
|
<fieldset>
|
|
<label for="title" class="strong">Title</label>
|
|
<div><span id="error-title" class="error"></span></div>
|
|
<input type="text" name="title" id="title" style="width: 400px;"/>
|
|
</fieldset>
|
|
<fieldset>
|
|
<label for="publicKey" class="strong">Key</label>
|
|
<div><span id="error-publicKey" class="error"></span></div>
|
|
<textarea name="publicKey" id="publicKey" style="width: 600px; height: 250px;"></textarea>
|
|
</fieldset>
|
|
<input type="submit" class="btn btn-success" value="Add"/>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
}
|