]> git.lizzy.rs Git - cheatdb.git/blob - app/templates/admin/audit.html
Add title text to audit log severity icons
[cheatdb.git] / app / templates / admin / audit.html
1 {% extends "base.html" %}
2
3 {% block title %}
4 Audit Log
5 {% endblock %}
6
7 {% block content %}
8         <h1>Audit Log</h1>
9
10         <div class="list-group mt-3">
11                 {% for entry in log %}
12                         <a class="list-group-item list-group-item-action"
13                                 {% if entry.description %}
14                                         href="{{ url_for('admin.audit_view', id=entry.id) }}">
15                                 {% else %}
16                                         href="{{ entry.url }}">
17                                 {% endif %}
18
19                                 <div class="row {% if entry.severity == entry.severity.NORMAL %}text-muted{% endif %}">
20                                         <div class="col-sm-auto text-center" style="width: 50px;"
21                                                         title="{{ _('Severity: %(sev)s.', sev=entry.severity.getTitle()) }}">
22                                                 {% if entry.severity == entry.severity.MODERATION %}
23                                                         <i class="fas fa-exclamation-triangle" style="color: yellow;"></i>
24                                                 {% elif entry.severity == entry.severity.EDITOR %}
25                                                         <i class="fas fa-users" style="color: #537eac;"></i>
26                                                 {% endif %}
27                                         </div>
28
29                                         <div class="col-sm-2 text-muted">
30                                                 <img
31                                                         class="img-responsive user-photo img-thumbnail img-thumbnail-1"
32                                                         style="max-height: 22px;"
33                                                         src="{{ entry.causer.getProfilePicURL() }}" />
34
35                                                 <span class="pl-2">{{ entry.causer.display_name }}</span>
36                                         </div>
37
38                                         <div class="col-sm">
39                                                 {{ entry.title}}
40
41                                                 {% if entry.description %}
42                                                         <i class="fas fa-paperclip ml-3"></i>
43                                                 {% endif %}
44                                         </div>
45
46                                         {% if entry.package %}
47                                                 <div class="col-sm-auto text-muted">
48                                                         <span class="pr-2">
49                                                                 {{ entry.package.title }}
50                                                         </span>
51
52                                                         <img
53                                                                 class="img-responsive"
54                                                                 style="max-height: 22px; max-width: 22px;"
55                                                                 src="{{ entry.package.getThumbnailURL(1) }}" />
56                                                 </div>
57                                         {% endif %}
58
59
60                                         <div class="col-sm-auto text-muted">
61                                                 {{ entry.created_at | datetime }}
62                                         </div>
63                                 </div>
64                         </a>
65                 {% else %}
66                         <p class="list-group-item"><i>No audit log entires.</i></p>
67                 {% endfor %}
68         </div>
69 {% endblock %}