master
Aevann1 2021-11-23 23:16:29 +02:00
parent 4cb242922e
commit 85e2c95ace
2 changed files with 5 additions and 10 deletions

View File

@ -7,7 +7,7 @@ from sqlalchemy import func
from os import path
import calendar
import matplotlib.pyplot as plt
from files.classes.mod_logs import ACTIONTYPES, ACTIONTYPES2
from files.classes.mod_logs import ACTIONTYPES2
site = environ.get("DOMAIN").strip()
site_name = environ.get("SITE_NAME").strip()
@ -195,11 +195,8 @@ def log(v):
actions=actions[:25]
admins = [x[0] for x in g.db.query(User.username).filter(User.admin_level > 1).all()]
if v and v.admin_level: types = ACTIONTYPES
else: types = ACTIONTYPES2
return render_template("log.html", v=v, admins=admins, types=types, admin=admin, type=kind, actions=actions, next_exists=next_exists, page=page)
return render_template("log.html", v=v, admins=admins, types=ACTIONTYPES2, admin=admin, type=kind, actions=actions, next_exists=next_exists, page=page)
@app.get("/log/<id>")
@auth_desired

View File

@ -65,11 +65,9 @@
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(0px, 31px, 0px);">
<a class="dropdown-item" href="/log{% if admin %}?admin={{admin}}{% endif %}"><i class="fas fa-broom mr-2"></i>All</a>
{% if types %}
{% for t, v in types.items() %}
<a class="dropdown-item" href="?{% if admin %}admin={{admin}}&{% endif %}kind={{t}}"><i class="fas {{v['icon']}} mr-2"></i>{{t}}</a>
{% endfor %}
{% endif %}
{% for t, v in types.items() %}
<a class="dropdown-item" href="?{% if admin %}admin={{admin}}&{% endif %}kind={{t}}"><i class="fas {{v['icon']}} mr-2"></i>{{t}}</a>
{% endfor %}
</div>
</div>
</div>