Commit 54cbad05 by Scott Duckworth

do not show last modified field if allow_edit=False

parent 63296701
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
<th>Key</th> <th>Key</th>
<th>Fingerprint</th> <th>Fingerprint</th>
<th>Created</th> <th>Created</th>
{% if allow_edit %}
<th>Last Modified</th> <th>Last Modified</th>
{% endif %}
<th>Last Used</th> <th>Last Used</th>
<th></th> <th></th>
</tr> </tr>
...@@ -21,12 +23,16 @@ ...@@ -21,12 +23,16 @@
<td>{{ userkey.name }}</td> <td>{{ userkey.name }}</td>
<td>{{ userkey.fingerprint }}</td> <td>{{ userkey.fingerprint }}</td>
<td>{{ userkey.created|default:"unknown" }}</td> <td>{{ userkey.created|default:"unknown" }}</td>
{% if allow_edit %}
<td>{{ userkey.last_modified|default:"unknown" }}</td> <td>{{ userkey.last_modified|default:"unknown" }}</td>
{% endif %}
<td>{{ userkey.last_used|default:"never" }}</td> <td>{{ userkey.last_used|default:"never" }}</td>
<td>
{% if allow_edit %} {% if allow_edit %}
<td><a href="{% url django_sshkey.views.userkey_edit userkey.pk %}">Edit</a></td> <a href="{% url django_sshkey.views.userkey_edit userkey.pk %}">Edit</a>
{% endif %} {% endif %}
<td><a href="{% url django_sshkey.views.userkey_delete userkey.pk %}">Delete</a></td> <a href="{% url django_sshkey.views.userkey_delete userkey.pk %}">Delete</a>
</td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment