aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2016-12-18 23:28:12 +0200
committerMart Raudsepp <leio@gentoo.org>2016-12-18 23:29:07 +0200
commitc0c323a6f79529fe475aa08364066e1f3e691647 (patch)
tree89d3113a6867cce835e91f0b8f9a74cf11919ead
parentmodels: Add preliminary model and fields for keyword and p.mask storage (diff)
downloadgrumpy-c0c323a6f79529fe475aa08364066e1f3e691647.tar.gz
grumpy-c0c323a6f79529fe475aa08364066e1f3e691647.tar.bz2
grumpy-c0c323a6f79529fe475aa08364066e1f3e691647.zip
frontend: List proxy maintainers in a separate table for /setup
Also display an empty cell instead of "None" when we don't have a name in the DB. Style the submit button a bit. Commit a manage.py TODO comment that's collecting dust.
-rw-r--r--frontend/templates/setup.html30
-rwxr-xr-xmanage.py2
2 files changed, 27 insertions, 5 deletions
diff --git a/frontend/templates/setup.html b/frontend/templates/setup.html
index de1cbc8..6ea857a 100644
--- a/frontend/templates/setup.html
+++ b/frontend/templates/setup.html
@@ -7,6 +7,26 @@
<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 item in form.maintainers if not mapping[item.data].is_project and mapping[item.data].email.endswith('@gentoo.org') -%}
+ {%- set maintainer = mapping[item.data] -%}
+ <tr>
+ <td>{{ item }}</td>
+ <td class="text-nowrap">{{ maintainer.email }}</td>
+ <td>{{ maintainer.name|default('', True) }}</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-users"></span>Known projects
</h3>
</div>
@@ -17,7 +37,7 @@
<tr>
<td>{{ item }}</td>
<td class="text-nowrap">{{ maintainer.email }}</td>
- <td>{{ maintainer.name }}</td>
+ <td>{{ maintainer.name|default('', True) }}</td>
</tr>
{%- endfor %}
</table>
@@ -27,24 +47,24 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
- <span class="fa fa-fw fa-user"></span>Known developers
+ <span class="fa fa-fw fa-user"></span>Known proxy maintainers
</h3>
</div>
<div class="table-responsive">
<table class="table table-striped">
- {% for item in form.maintainers if not mapping[item.data].is_project -%}
+ {% for item in form.maintainers if not mapping[item.data].is_project and not mapping[item.data].email.endswith('@gentoo.org') -%}
{%- set maintainer = mapping[item.data] -%}
<tr>
<td>{{ item }}</td>
<td class="text-nowrap">{{ maintainer.email }}</td>
- <td>{{ maintainer.name }}</td>
+ <td>{{ maintainer.name|default('', True) }}</td>
</tr>
{%- endfor %}
</table>
</div>
</div>
-<input type="submit" value="Save follows"/>
+<input type="submit" class="btn btn-default" value="Save follows"/>
</form>
diff --git a/manage.py b/manage.py
index a31b96c..8df47ee 100755
--- a/manage.py
+++ b/manage.py
@@ -6,6 +6,8 @@ from flask_script import Manager, Shell
from backend import app, db
from backend.lib import sync
+# TODO: Replace this with flask 0.11 "flask" CLI and the extra commands support via click therein - http://flask.pocoo.org/docs/0.11/cli/
+# TODO: This would then allow FLASK_DEBUG=1 automatically reloading the server on code changes when launched with "flask run"
manager = Manager(app)