diff --git a/files/routes/static.py b/files/routes/static.py index 9570676a8..59d53596d 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -164,7 +164,7 @@ def log(v): actions=actions[:PAGE_SIZE] admins = [x[0] for x in g.db.query(User.username).filter(User.admin_level >= PERMS['ADMIN_MOP_VISIBLE']).order_by(User.username).all()] - 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=types, admin=admin, type=kind, actions=actions, next_exists=next_exists, page=page, single_user_url='admin') @app.get("/log/") @auth_required @@ -181,7 +181,7 @@ def log_item(id, v): if v and v.admin_level >= PERMS['USER_SHADOWBAN']: types = ACTIONTYPES else: types = ACTIONTYPES2 - return render_template("log.html", v=v, actions=[action], next_exists=False, page=1, action=action, admins=admins, types=types) + return render_template("log.html", v=v, actions=[action], next_exists=False, page=1, action=action, admins=admins, types=types, single_user_url='admin') @app.get("/directory") @auth_required diff --git a/files/routes/subs.py b/files/routes/subs.py index 11725a86d..b81de5c33 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -731,7 +731,7 @@ def hole_log(v, sub): mods = [x[0] for x in g.db.query(Mod.user_id).filter_by(sub=sub.name).all()] mods = [x[0] for x in g.db.query(User.username).filter(User.id.in_(mods)).order_by(User.username).all()] - return render_template("log.html", v=v, admins=mods, types=types, admin=mod, type=kind, actions=actions, next_exists=next_exists, page=page, sub=sub) + return render_template("log.html", v=v, admins=mods, types=types, admin=mod, type=kind, actions=actions, next_exists=next_exists, page=page, sub=sub, single_user_url='mod') @app.get("/h//log/") @auth_required @@ -750,4 +750,4 @@ def hole_log_item(id, v, sub): types = ACTIONTYPES - return render_template("log.html", v=v, actions=[action], next_exists=False, page=1, action=action, admins=mods, types=types, sub=sub) + return render_template("log.html", v=v, actions=[action], next_exists=False, page=1, action=action, admins=mods, types=types, sub=sub, single_user_url='mod') diff --git a/files/templates/log.html b/files/templates/log.html index 05efd3095..6a70adee7 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -22,12 +22,6 @@ {% endif %} -{% if sub %} - {% set single_user_url="mod" %} -{% else %} - {% set single_user_url="admin" %} -{% endif %} -