This commit is contained in:
@@ -65,13 +65,29 @@
|
||||
<td>{{ item.inventory.get("user").username | display_name }}</td>
|
||||
</tr>
|
||||
|
||||
{% macro auditLine(timestamp, user) -%}
|
||||
{{ timestamp | timeago }}
|
||||
by
|
||||
{{ user | display_name }}
|
||||
{%- endmacro %}
|
||||
<tr>
|
||||
<td>Last audited</td>
|
||||
<td>
|
||||
{% if item.inventory.get("audit") %}
|
||||
{{ item.inventory.audit.timestamp | timeago }}
|
||||
by
|
||||
{{ item.inventory.audit.username | display_name }}
|
||||
{% if item.inventory.get("audit", {}).get("log") %}
|
||||
<details>
|
||||
<summary>
|
||||
{{ auditLine(item.inventory.audit.timestamp, item.inventory.audit.username) }}
|
||||
</summary>
|
||||
<ul class="browser-default">
|
||||
{% for audit in item.inventory.audit.log | reverse %}
|
||||
<li>{{ auditLine(audit.timestamp, audit.username) }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
{% else %}
|
||||
{{ auditLine(item.inventory.audit.timestamp, item.inventory.audit.username) }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Never
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user