mirror of
https://github.com/minetest/contentdb.git
synced 2025-03-14 14:22:30 +01:00
Add audit log to editor todo
This commit is contained in:
@ -77,11 +77,16 @@ def view_editor():
|
||||
.filter(MetaPackage.dependencies.any(Dependency.depender.has(state=PackageState.APPROVED), optional=False)) \
|
||||
.order_by(db.asc(MetaPackage.name)).count()
|
||||
|
||||
audit_log = AuditLogEntry.query \
|
||||
.filter(AuditLogEntry.package.has()) \
|
||||
.order_by(db.desc(AuditLogEntry.created_at)) \
|
||||
.limit(10).all()
|
||||
|
||||
return render_template("todo/editor.html", current_tab="editor",
|
||||
packages=packages, wip_packages=wip_packages, releases=releases, screenshots=screenshots,
|
||||
canApproveNew=canApproveNew, canApproveRel=canApproveRel, canApproveScn=canApproveScn,
|
||||
license_needed=license_needed, total_packages=total_packages, total_to_tag=total_to_tag,
|
||||
unfulfilled_meta_packages=unfulfilled_meta_packages)
|
||||
unfulfilled_meta_packages=unfulfilled_meta_packages, audit_log=audit_log)
|
||||
|
||||
|
||||
@bp.route("/todo/topics/")
|
||||
|
@ -157,6 +157,18 @@
|
||||
{% endif %}
|
||||
|
||||
|
||||
<div class="mt-5"></div>
|
||||
{% if current_user.rank.atLeast(current_user.rank.MODERATOR) %}
|
||||
<a class="btn btn-secondary float-right" href="{{ url_for('admin.audit') }}">
|
||||
{{ _("View All") }}
|
||||
</a>
|
||||
{% endif %}
|
||||
<h2>{{ _("Recent Actions") }}</h2>
|
||||
|
||||
{% from "macros/audit_log.html" import render_audit_log %}
|
||||
{{ render_audit_log(audit_log, current_user) }}
|
||||
|
||||
|
||||
<h2 class="mt-5">{{ _("WIP") }}</h2>
|
||||
|
||||
{% if canApproveNew and (packages or wip_packages) %}
|
||||
|
Reference in New Issue
Block a user