]> git.lizzy.rs Git - cheatdb.git/blob - app/templates/admin/audit.html
1ac793b5e8474d457d76a56c9f9ce42306f7eb93
[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                                                 {% if entry.severity == entry.severity.MODERATION %}
22                                                         <i class="fas fa-exclamation-triangle" style="color: yellow;"></i>
23                                                 {% elif entry.severity == entry.severity.EDITOR %}
24                                                         <i class="fas fa-users" style="color: #537eac;"></i>
25                                                 {% endif %}
26                                         </div>
27
28                                         <div class="col-sm-2 text-muted">
29                                                 <img
30                                                         class="img-responsive user-photo img-thumbnail img-thumbnail-1"
31                                                         style="max-height: 22px;"
32                                                         src="{{ entry.causer.getProfilePicURL() }}" />
33
34                                                 <span class="pl-2">{{ entry.causer.display_name }}</span>
35                                         </div>
36
37                                         <div class="col-sm">
38                                                 {{ entry.title}}
39
40                                                 {% if entry.description %}
41                                                         <i class="fas fa-paperclip ml-3"></i>
42                                                 {% endif %}
43                                         </div>
44
45                                         {% if entry.package %}
46                                                 <div class="col-sm-auto text-muted">
47                                                         <span class="pr-2">
48                                                                 {{ entry.package.title }}
49                                                         </span>
50
51                                                         <img
52                                                                 class="img-responsive"
53                                                                 style="max-height: 22px; max-width: 22px;"
54                                                                 src="{{ entry.package.getThumbnailURL(1) }}" />
55                                                 </div>
56                                         {% endif %}
57
58
59                                         <div class="col-sm-auto text-muted">
60                                                 {{ entry.created_at | datetime }}
61                                         </div>
62                                 </div>
63                         </a>
64                 {% else %}
65                         <p class="list-group-item"><i>No audit log entires.</i></p>
66                 {% endfor %}
67         </div>
68 {% endblock %}