aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend/grumpy.py10
-rw-r--r--frontend/templates/maintainer.html25
2 files changed, 35 insertions, 0 deletions
diff --git a/frontend/grumpy.py b/frontend/grumpy.py
index 972bbf9..3c4a62e 100644
--- a/frontend/grumpy.py
+++ b/frontend/grumpy.py
@@ -32,6 +32,16 @@ class GrumpyView(FlaskView):
else:
abort(404)
+ @route('/maintainer/<email>', methods=['GET'])
+ def maintainer(self, email):
+ maintainer = models.Maintainer.query.filter_by(email=email).first()
+ packages = models.Package.query.filter(models.Package.maintainers.contains(maintainer))
+
+ if maintainer:
+ return render_template('maintainer.html', maintainer=maintainer, packages=packages)
+ else:
+ abort(404)
+
@route('/maintainers', methods=['GET'])
def maintainers(self):
people = models.Maintainer.query.filter_by(is_project=False).order_by('email asc')
diff --git a/frontend/templates/maintainer.html b/frontend/templates/maintainer.html
new file mode 100644
index 0000000..0423937
--- /dev/null
+++ b/frontend/templates/maintainer.html
@@ -0,0 +1,25 @@
+{% extends "base.html" %}
+{% block content %}
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">
+ <span class="fa fa-fw fa-user"></span>{{ maintainer.email }}
+ </h3>
+ </div>
+ <div class="table-responsive">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Package</th>
+ </tr>
+ </thead>
+ {% for package in packages -%}
+ <tr>
+ <td class="text-nowrap"><a href="/package/{{ package.category.name }}/{{ package.name }}">{{ package.category.name}}/{{ package.name }}</a></td>
+ </tr>
+ {%- endfor %}
+ </table>
+ </div>
+</div>
+{% endblock %}