##// END OF EJS Templates
ui: make copy-path hidden for better UX.
ui: make copy-path hidden for better UX.

File last commit:

r4232:60646747 stable
r4379:2c80c495 stable
Show More
user_edit_ssh_keys.mako
90 lines | 3.7 KiB | application/x-mako | MakoHtmlLexer
/ rhodecode / templates / admin / users / user_edit_ssh_keys.mako
users/user-groups: added context of what we're editing....
r4232 <%namespace name="base" file="/base/base.mako"/>
users: added SSH key management for user admin pages
r1993 <div class="panel panel-default">
<div class="panel-heading">
users/user-groups: added context of what we're editing....
r4232 <h3 class="panel-title">
${base.gravatar_with_user(c.user.username, 16, tooltip=False, _class='pull-left')}
&nbsp;- ${_('SSH Keys')}
</h3>
users: added SSH key management for user admin pages
r1993 </div>
<div class="panel-body">
<div class="sshkeys_wrap">
<table class="rctable ssh_keys">
<tr>
<th>${_('Fingerprint')}</th>
<th>${_('Description')}</th>
ssh: improve logging, and make the UI show last accessed date for key.
r2973 <th>${_('Created on')}</th>
<th>${_('Accessed on')}</th>
users: added SSH key management for user admin pages
r1993 <th>${_('Action')}</th>
</tr>
%if c.user_ssh_keys:
%for ssh_key in c.user_ssh_keys:
<tr class="">
<td class="">
<code>${ssh_key.ssh_key_fingerprint}</code>
</td>
<td class="td-wrap">${ssh_key.description}</td>
<td class="td-tags">${h.format_date(ssh_key.created_on)}</td>
ssh: improve logging, and make the UI show last accessed date for key.
r2973 <td class="td-tags">${h.format_date(ssh_key.accessed_on)}</td>
users: added SSH key management for user admin pages
r1993
<td class="td-action">
forms: unified usage of h.secure_form. Make sure we ALWAYS pass in...
r2105 ${h.secure_form(h.route_path('edit_user_ssh_keys_delete', user_id=c.user.user_id), request=request)}
users: added SSH key management for user admin pages
r1993 ${h.hidden('del_ssh_key', ssh_key.ssh_key_id)}
<button class="btn btn-link btn-danger" type="submit"
onclick="return confirm('${_('Confirm to remove ssh key %s') % ssh_key.ssh_key_fingerprint}');">
${_('Delete')}
</button>
${h.end_form()}
</td>
</tr>
%endfor
%else:
<tr><td><div class="ip">${_('No additional ssh keys specified')}</div></td></tr>
%endif
</table>
</div>
<div class="user_ssh_keys">
forms: unified usage of h.secure_form. Make sure we ALWAYS pass in...
r2105 ${h.secure_form(h.route_path('edit_user_ssh_keys_add', user_id=c.user.user_id), request=request)}
users: added SSH key management for user admin pages
r1993 <div class="form form-vertical">
<!-- fields -->
<div class="fields">
<div class="field">
<div class="label">
<label for="new_email">${_('New ssh key')}:</label>
</div>
<div class="input">
${h.text('description', class_='medium', placeholder=_('Description'))}
Issue #5536 - ability to disable server-side SSH key generation...
r3478 % if c.ssh_key_generator_enabled:
<a href="${h.route_path('edit_user_ssh_keys_generate_keypair', user_id=c.user.user_id)}">${_('Generate random RSA key')}</a>
% endif
users: added SSH key management for user admin pages
r1993 </div>
</div>
<div class="field">
<div class="textarea text-area editor">
${h.textarea('key_data',c.default_key, size=30, placeholder=_("Public key, begins with 'ssh-rsa', 'ssh-dss', 'ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'"))}
</div>
</div>
<div class="buttons">
${h.submit('save',_('Add'),class_="btn")}
${h.reset('reset',_('Reset'),class_="btn")}
</div>
ssh: add few explanation text about two step addition of generated keys....
r2477 % if c.default_key:
${_('Click add to use this generate SSH key')}
% endif
users: added SSH key management for user admin pages
r1993 </div>
</div>
${h.end_form()}
</div>
</div>
</div>
<script>
$(document).ready(function(){
});
</script>