mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-08 22:17:34 +01:00
Add unfulfilled dependencies todo page
This commit is contained in:
parent
193e4e39b1
commit
f6ff5cba82
@ -67,11 +67,17 @@ def view():
|
||||
total_packages = Package.query.filter_by(approved=True, soft_deleted=False).count()
|
||||
total_to_tag = Package.query.filter_by(approved=True, soft_deleted=False, tags=None).count()
|
||||
|
||||
unfulfilled_meta_packages = MetaPackage.query \
|
||||
.filter(~ MetaPackage.packages.any(approved=True, soft_deleted=False)) \
|
||||
.filter(MetaPackage.dependencies.any(optional=False)) \
|
||||
.order_by(db.asc(MetaPackage.name)).count()
|
||||
|
||||
return render_template("todo/list.html", title="Reports and Work Queue",
|
||||
packages=packages, releases=releases, screenshots=screenshots,
|
||||
canApproveNew=canApproveNew, canApproveRel=canApproveRel, canApproveScn=canApproveScn,
|
||||
topics_to_add=topics_to_add, total_topics=total_topics, \
|
||||
total_packages=total_packages, total_to_tag=total_to_tag)
|
||||
total_packages=total_packages, total_to_tag=total_to_tag, \
|
||||
unfulfilled_meta_packages=unfulfilled_meta_packages)
|
||||
|
||||
|
||||
@bp.route("/todo/topics/")
|
||||
@ -116,3 +122,13 @@ def tags():
|
||||
tags = Tag.query.order_by(db.asc(Tag.title)).all()
|
||||
|
||||
return render_template("todo/tags.html", packages=query.all(), tags=tags)
|
||||
|
||||
|
||||
@bp.route("/todo/metapackages/")
|
||||
def metapackages():
|
||||
mpackages = MetaPackage.query \
|
||||
.filter(~ MetaPackage.packages.any(approved=True, soft_deleted=False)) \
|
||||
.filter(MetaPackage.dependencies.any(optional=False)) \
|
||||
.order_by(db.asc(MetaPackage.name)).all()
|
||||
|
||||
return render_template("todo/metapackages.html", mpackages=mpackages)
|
||||
|
@ -115,6 +115,20 @@
|
||||
<a class="btn btn-primary" href="{{ url_for('todo.tags') }}">View Tags</a>
|
||||
|
||||
|
||||
{% if unfulfilled_meta_packages %}
|
||||
<h2 class="mt-5">
|
||||
<span class="fas fa-exclamation-triangle pr-2" style="color: orange;"></span>
|
||||
{{ unfulfilled_meta_packages }} Unfulfilled Dependencies
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
Meta packages that have hard dependers, but are not fulfilled.
|
||||
</p>
|
||||
|
||||
<a class="btn btn-primary" href="{{ url_for('todo.metapackages') }}">View</a>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<h2 class="mt-5">Unadded Topic List</h2>
|
||||
|
||||
{% if total_topics > 0 %}
|
||||
|
24
app/templates/todo/metapackages.html
Normal file
24
app/templates/todo/metapackages.html
Normal file
@ -0,0 +1,24 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
Unfulfilled Meta Packages
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Unfulfilled Meta Packages</h1>
|
||||
|
||||
<p>
|
||||
Meta packages that have hard dependers, but are not fulfilled.
|
||||
</p>
|
||||
|
||||
<div class="list-group">
|
||||
{% for meta in mpackages %}
|
||||
<a class="list-group-item list-group-item-action"
|
||||
href="{{ url_for('metapackages.view', name=meta.name) }}">
|
||||
{{ meta.name }}
|
||||
</a>
|
||||
{% else %}
|
||||
<li><i>No meta packages found.</i></li>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user