contentdb/app/templates/admin/audit.html

78 lines
2.1 KiB
HTML
Raw Normal View History

2020-07-11 03:32:17 +02:00
{% extends "base.html" %}
{% block title %}
Audit Log
{% endblock %}
{% block content %}
<h1>Audit Log</h1>
2020-12-04 00:43:05 +01:00
{% from "macros/pagination.html" import render_pagination %}
{{ render_pagination(pagination, url_set_query) }}
2020-07-11 03:32:17 +02:00
<div class="list-group mt-3">
{% for entry in log %}
<a class="list-group-item list-group-item-action"
{% if entry.description %}
href="{{ url_for('admin.audit_view', id=entry.id) }}">
{% else %}
href="{{ entry.url }}">
{% endif %}
2020-07-11 03:32:17 +02:00
<div class="row {% if entry.severity == entry.severity.NORMAL %}text-muted{% endif %}">
<div class="col-sm-auto text-center" style="width: 50px;"
title="{{ _('Severity: %(sev)s.', sev=entry.severity.getTitle()) }}">
2020-07-11 03:32:17 +02:00
{% if entry.severity == entry.severity.MODERATION %}
<i class="fas fa-exclamation-triangle" style="color: yellow;"></i>
{% elif entry.severity == entry.severity.EDITOR %}
<i class="fas fa-users" style="color: #537eac;"></i>
2020-12-05 03:41:53 +01:00
{% elif entry.severity == entry.severity.USER %}
<i class="fas fa-user"></i>
2020-07-11 03:32:17 +02:00
{% endif %}
</div>
<div class="col-sm-2 text-muted">
<img
2020-12-05 02:51:50 +01:00
class="img-fluid user-photo img-thumbnail img-thumbnail-1"
2020-07-11 03:32:17 +02:00
style="max-height: 22px;"
src="{{ entry.causer.getProfilePicURL() }}" />
<span class="pl-2">{{ entry.causer.display_name }}</span>
</div>
<div class="col-sm">
{{ entry.title}}
{% if entry.description %}
<i class="fas fa-paperclip ml-3"></i>
{% endif %}
2020-07-11 03:32:17 +02:00
</div>
{% if entry.package %}
<div class="col-sm-auto text-muted">
<span class="pr-2">
{{ entry.package.title }}
</span>
<img
2020-12-05 02:51:50 +01:00
class="img-fluid"
2020-07-11 03:32:17 +02:00
style="max-height: 22px; max-width: 22px;"
src="{{ entry.package.getThumbnailURL(1) }}" />
</div>
{% endif %}
<div class="col-sm-auto text-muted">
{{ entry.created_at | datetime }}
</div>
</div>
</a>
{% else %}
<p class="list-group-item"><i>No audit log entires.</i></p>
{% endfor %}
</div>
2020-12-04 00:43:05 +01:00
{% from "macros/pagination.html" import render_pagination %}
{{ render_pagination(pagination, url_set_query) }}
2020-07-11 03:32:17 +02:00
{% endblock %}