* [gentoo-commits] proj/grumpy:master commit in: frontend/, frontend/templates/
@ 2016-12-04 7:10 Mart Raudsepp
0 siblings, 0 replies; only message in thread
From: Mart Raudsepp @ 2016-12-04 7:10 UTC (permalink / raw
To: gentoo-commits
commit: 40953ed104a9f49316360e261fa45bf7ff8ed57b
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 4 07:09:18 2016 +0000
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Dec 4 07:09:18 2016 +0000
URL: https://gitweb.gentoo.org/proj/grumpy.git/commit/?id=40953ed1
frontend: add a /setup/ page for listing existing projects and devs
Later we can convert this into a form to choose which projects/devs to follow;
hence the "setup" naming.
frontend/grumpy.py | 5 +++++
frontend/templates/setup.html | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/frontend/grumpy.py b/frontend/grumpy.py
index 007748e..ea18a98 100644
--- a/frontend/grumpy.py
+++ b/frontend/grumpy.py
@@ -1,5 +1,6 @@
from flask import render_template, request
from flask_classy import FlaskView
+from sqlalchemy.sql import collate
from backend.lib import models
@@ -10,3 +11,7 @@ class GrumpyView(FlaskView):
def index(self):
categories = models.Category.query.all()
return render_template("index.html", categories=categories)
+
+ def setup(self):
+ maintainers = models.Maintainer.query.order_by(collate(models.Maintainer.email, 'NOCASE')).all()
+ return render_template("setup.html", maintainers=maintainers)
diff --git a/frontend/templates/setup.html b/frontend/templates/setup.html
new file mode 100644
index 0000000..e167c22
--- /dev/null
+++ b/frontend/templates/setup.html
@@ -0,0 +1,40 @@
+{% extends "base.html" %}
+{% block content %}
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">
+ <span class="fa fa-fw fa-users"></span>Known projects
+ </h3>
+ </div>
+ <div class="table-responsive">
+ <table class="table table-striped">
+ {% for maintainer in maintainers if maintainer.is_project -%}
+ <tr>
+ <td class="text-nowrap">{{ maintainer.email }}</td>
+ <td>{{ maintainer.name }}</td>
+ </tr>
+ {%- endfor %}
+ </table>
+ </div>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h3 class="panel-title">
+ <span class="fa fa-fw fa-user"></span>Known developers
+ </h3>
+ </div>
+ <div class="table-responsive">
+ <table class="table table-striped">
+ {% for maintainer in maintainers if not maintainer.is_project -%}
+ <tr>
+ <td class="text-nowrap">{{ maintainer.email }}</td>
+ <td>{{ maintainer.name }}</td>
+ </tr>
+ {%- endfor %}
+ </table>
+ </div>
+</div>
+
+{% endblock %}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-04 7:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-04 7:10 [gentoo-commits] proj/grumpy:master commit in: frontend/, frontend/templates/ Mart Raudsepp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox