diff options
-rw-r--r-- | frontend/grumpy.py | 5 | ||||
-rw-r--r-- | frontend/templates/setup.html | 40 |
2 files changed, 45 insertions, 0 deletions
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 %} |