]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/people/ssh-keys/index.html
people: Show all available types of fingerprints
[ipfire.org.git] / src / templates / people / ssh-keys / index.html
1 {% extends "base.html" %}
2
3 {% block title %}{{ account }} - {{ _("SSH Keys") }}{% end block %}
4
5 {% block main %}
6 <h1>{{ _("SSH Keys") }}</h1>
7
8 <ul class="list-group mb-3">
9 {% for key in account.ssh_keys %}
10 <li class="list-group-item">
11 <h5 class="mb-1">
12 <a class="text-dark" href="/users/{{ account.uid }}/ssh-keys/{{ key.hash_md5() }}">
13 {{ key.comment or _("%s Key") % key.key_type.decode() }}
14 </a>
15 </h5>
16
17 {% for h in (key.hash_md5(), key.hash_sha256(), key.hash_sha512()) %}
18 <p class="text-monospace small text-truncate mb-0">{{ h }}</p>
19 {% end %}
20
21 {% if key.options %}
22 <p class="my-1">{{ _("Options") }}</p>
23
24 <ul class="mb-0">
25 {% for option, values in sorted(key.options.items()) %}
26 <li class="small">
27 <span class="text-monospace">{{ option }}</span>
28
29 {% if not values == [True] %}
30 = <span class="text-monospace">{{ "".join(values) }}</span>
31 {% end %}
32 </li>
33 {% end %}
34 </ul>
35 {% end %}
36
37 {% if account.can_be_managed_by(current_user) %}
38 <a class="btn btn-outline-danger btn-sm btn-block mt-2" href="/users/{{ account.uid }}/ssh-keys/{{ key.hash_md5() }}/delete">
39 {{ _("Delete") }}
40 </a>
41 {% end %}
42 </li>
43 {% end %}
44 </ul>
45
46 {% if account.can_be_managed_by(current_user) %}
47 <a class="btn btn-success btn-block" href="/users/{{ account.uid }}/ssh-keys/upload">
48 {{ _("Upload New SSH Key") }}
49 </a>
50 {% end %}
51 {% end block %}