forked from gwuniversity/django-simplesshkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
userkey_list.html
36 lines (36 loc) · 940 Bytes
/
userkey_list.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<h1>My Keys</h1>
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
<p><a href="{% url "simplesshkey:userkey_add" %}">Add Key</a></p>
<table>
<tr>
<th>Key</th>
<th>Fingerprint</th>
<th>Created</th>
{% if allow_edit %}
<th>Last Modified</th>
{% endif %}
<th></th>
</tr>
{% for userkey in userkey_list %}
<tr>
<td>{{ userkey.name }}</td>
<td>{{ userkey.fingerprint }}</td>
<td>{{ userkey.created|default:"unknown" }}</td>
{% if allow_edit %}
<td>{{ userkey.last_modified|default:"unknown" }}</td>
{% endif %}
<td>
{% if allow_edit %}
<a href="{% url "simplesshkey:userkey_edit" userkey.pk %}">Edit</a>
{% endif %}
<a href="{% url "simplesshkey:userkey_delete" userkey.pk %}">Delete</a>
</td>
</tr>
{% endfor %}
</table>