mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-25 15:31:37 +01:00
Split hard and soft dependers on meta package page
This commit is contained in:
parent
ab7d5a3feb
commit
193e4e39b1
@ -41,7 +41,15 @@ def view(name):
|
|||||||
.filter(MetaPackage.name==name) \
|
.filter(MetaPackage.name==name) \
|
||||||
.join(MetaPackage.dependencies) \
|
.join(MetaPackage.dependencies) \
|
||||||
.join(Dependency.depender) \
|
.join(Dependency.depender) \
|
||||||
.filter(Package.approved==True, Package.soft_deleted==False) \
|
.filter(Dependency.optional==False, Package.approved==True, Package.soft_deleted==False) \
|
||||||
|
.all()
|
||||||
|
|
||||||
|
optional_dependers = db.session.query(Package) \
|
||||||
|
.select_from(MetaPackage) \
|
||||||
|
.filter(MetaPackage.name==name) \
|
||||||
|
.join(MetaPackage.dependencies) \
|
||||||
|
.join(Dependency.depender) \
|
||||||
|
.filter(Dependency.optional==True, Package.approved==True, Package.soft_deleted==False) \
|
||||||
.all()
|
.all()
|
||||||
|
|
||||||
similar_topics = None
|
similar_topics = None
|
||||||
@ -51,5 +59,6 @@ def view(name):
|
|||||||
.order_by(db.asc(ForumTopic.name), db.asc(ForumTopic.title)) \
|
.order_by(db.asc(ForumTopic.name), db.asc(ForumTopic.title)) \
|
||||||
.all()
|
.all()
|
||||||
|
|
||||||
return render_template("metapackages/view.html", \
|
return render_template("metapackages/view.html", mpackage=mpackage, \
|
||||||
mpackage=mpackage, dependers=dependers, similar_topics=similar_topics)
|
dependers=dependers, optional_dependers=optional_dependers, \
|
||||||
|
similar_topics=similar_topics)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Meta Package "{{ mpackage.name }}"</h1>
|
<h1>Meta Package "{{ mpackage.name }}"</h1>
|
||||||
|
|
||||||
<h2>Provided by</h2>
|
<h2>Provided By</h2>
|
||||||
|
|
||||||
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
{% from "macros/packagegridtile.html" import render_pkggrid %}
|
||||||
{{ render_pkggrid(mpackage.packages.filter_by(approved=True, soft_deleted=False).all()) }}
|
{{ render_pkggrid(mpackage.packages.filter_by(approved=True, soft_deleted=False).all()) }}
|
||||||
@ -27,6 +27,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<h2>Required / Used by</h2>
|
<h2>Required By</h2>
|
||||||
{{ render_pkggrid(dependers) }}
|
{{ render_pkggrid(dependers) }}
|
||||||
|
|
||||||
|
<h2>Optionally Used By</h2>
|
||||||
|
{{ render_pkggrid(optional_dependers) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user