diff --git a/app/templates/meta/list.html b/app/templates/meta/list.html
new file mode 100644
index 00000000..5fec732d
--- /dev/null
+++ b/app/templates/meta/list.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+
+{% block title %}
+Meta Packages
+{% endblock %}
+
+{% block content %}
+
+ {% for meta in mpackages %}
+ - {{ meta.name }} ({{ meta.packages | count }} packages)
+ {% else %}
+ - No meta packages found.
+ {% endfor %}
+
+{% endblock %}
diff --git a/app/templates/meta/view.html b/app/templates/meta/view.html
new file mode 100644
index 00000000..c5473b9d
--- /dev/null
+++ b/app/templates/meta/view.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}
+Packages providing '{{ mpackage.name }}''
+{% endblock %}
+
+{% block content %}
+ Packages providing '{{ mpackage.name }}''
+
+ {% from "macros/packagegridtile.html" import render_pkggrid %}
+ {{ render_pkggrid(mpackage.packages) }}
+{% endblock %}
diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html
index 1f6ada55..1623f1cd 100644
--- a/app/templates/packages/view.html
+++ b/app/templates/packages/view.html
@@ -69,7 +69,12 @@
| Provides |
- {{ package.provides | join(', ') }} |
+ {% for meta in package.provides %}
+ {{ meta.name }}
+ {%- if not loop.last %}
+ ,
+ {% endif %}
+ {% endfor %} |
| Author |
diff --git a/app/views/__init__.py b/app/views/__init__.py
index c584bb89..8fff788d 100644
--- a/app/views/__init__.py
+++ b/app/views/__init__.py
@@ -43,7 +43,7 @@ def home_page():
packages = query.order_by(db.desc(Package.created_at)).limit(15).all()
return render_template("index.html", packages=packages, count=count)
-from . import users, githublogin, packages, sass, tasks, admin, notifications, tagseditor
+from . import users, githublogin, packages, sass, tasks, admin, notifications, tagseditor, meta
@menu.register_menu(app, ".help", "Help", order=19, endpoint_arguments_constructor=lambda: { 'path': 'help' })
@app.route('//')
diff --git a/app/views/meta.py b/app/views/meta.py
new file mode 100644
index 00000000..fe1a05ae
--- /dev/null
+++ b/app/views/meta.py
@@ -0,0 +1,34 @@
+# Content DB
+# Copyright (C) 2018 rubenwardy
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+
+from flask import *
+from flask_user import *
+from app import app
+from app.models import *
+
+@app.route("/metapackages/")
+def meta_package_list_page():
+ mpackages = MetaPackage.query.order_by(db.desc(MetaPackage.name)).all()
+ return render_template("meta/list.html", mpackages=mpackages)
+
+@app.route("/metapackages//")
+def meta_package_page(name):
+ mpackage = MetaPackage.query.filter_by(name=name).first()
+ if mpackage is None:
+ abort(404)
+
+ return render_template("meta/view.html", mpackage=mpackage)