aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2017-07-30 01:18:23 +1000
committerMichael Palimaka <kensington@gentoo.org>2017-07-30 01:28:04 +1000
commit88d96cc6bafbed6cdd63b077821e2b1cbfb7df58 (patch)
tree0578c4070b677fd47f48008f691a3890f1885529
parentfrontend: add package page (diff)
downloadgrumpy-88d96cc6bafbed6cdd63b077821e2b1cbfb7df58.tar.gz
grumpy-88d96cc6bafbed6cdd63b077821e2b1cbfb7df58.tar.bz2
grumpy-88d96cc6bafbed6cdd63b077821e2b1cbfb7df58.zip
frontend: add maintainer listing
-rw-r--r--frontend/grumpy.py6
-rw-r--r--frontend/templates/maintainers.html53
2 files changed, 59 insertions, 0 deletions
diff --git a/frontend/grumpy.py b/frontend/grumpy.py
index 5c0193c..972bbf9 100644
--- a/frontend/grumpy.py
+++ b/frontend/grumpy.py
@@ -32,6 +32,12 @@ class GrumpyView(FlaskView):
else:
abort(404)
+ @route('/maintainers', methods=['GET'])
+ def maintainers(self):
+ people = models.Maintainer.query.filter_by(is_project=False).order_by('email asc')
+ projects = models.Maintainer.query.filter_by(is_project=True).order_by('email asc')
+ return render_template('maintainers.html', people=people, projects=projects)
+
@route('/package/<categoryname>/<packagename>', methods=['GET'])
def package(self, categoryname, packagename):
category = models.Category.query.filter_by(name=categoryname).first()
diff --git a/frontend/templates/maintainers.html b/frontend/templates/maintainers.html
new file mode 100644
index 0000000..d24a239
--- /dev/null
+++ b/frontend/templates/maintainers.html
@@ -0,0 +1,53 @@
+{% extends "base.html" %}
+{% block content %}
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">
+ <span class="fa fa-fw fa-cubes"></span>Maintainers
+ </h3>
+ </div>
+ <ul class="nav nav-tabs nav-justified" id="tabnav">
+ <li><a href="#people" data-toggle="tab"><strong>People</strong></a></li>
+ <li><a href="#projects" data-toggle="tab"><strong>Projects</strong></a></li>
+ </ul>
+ <div class="table-responsive">
+ <div class="tab-content">
+ <div class="tab-pane active" id="people">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Email</th>
+ <th>Name</th>
+ </tr>
+ </thead>
+ {% for person in people -%}
+ <tr>
+ <td class="text-nowrap"><a href="maintainer/{{ person.email }}">{{ person.email }}</a></td>
+ <td>{{ person.name }}</td>
+ </tr>
+ {%- endfor %}
+ </table>
+ </div>
+ <div class="tab-pane active" id="projects">
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Email</th>
+ <th>Name</th>
+ <th>Descriptions</th>
+ </tr>
+ </thead>
+ {% for project in projects -%}
+ <tr>
+ <td class="text-nowrap"><a href="maintainer/{{ project.email }}">{{ project.email }}</a></td>
+ <td>{{ project.name }}</td>
+ <td>{{ project.description }}</td>
+ </tr>
+ {%- endfor %}
+ </table>
+ </div>
+ </div>
+</div>
+
+{% endblock %}