aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-11 15:19:56 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-11 15:19:56 -0800
commit1c1dd83603b0ed6d5ad1ff735ab179167c80358f (patch)
treeece57b9680a3e0fd69d1c150532f93ad7c4661ec
parent811f0a52779afdaa8e1f11a3781fc22fa3acc02c (diff)
downloadfatcat-1c1dd83603b0ed6d5ad1ff735ab179167c80358f.tar.gz
fatcat-1c1dd83603b0ed6d5ad1ff735ab179167c80358f.zip
start fixing webface for editgroup changes
-rw-r--r--python/fatcat_web/routes.py8
-rw-r--r--python/fatcat_web/templates/editor_editgroups.html14
-rw-r--r--python/tests/routes.py2
3 files changed, 11 insertions, 13 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 4a70eef1..701cf08b 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -313,15 +313,15 @@ def editor_view(ident):
abort(ae.status)
return render_template('editor_view.html', editor=entity)
-@app.route('/editor/<ident>/changelog', methods=['GET'])
+@app.route('/editor/<ident>/editgroups', methods=['GET'])
def editor_changelog(ident):
try:
editor = api.get_editor(ident)
- changelog_entries = api.get_editor_changelog(ident)
+ editgroups = api.get_editor_editgroups(ident, limit=50)
except ApiException as ae:
abort(ae.status)
- return render_template('editor_changelog.html', editor=editor,
- changelog_entries=changelog_entries)
+ return render_template('editor_editgroups.html', editor=editor,
+ editgroups=editgroups)
# Not implemented
#@app.route('/editor/<ident>/wip', methods=['GET'])
diff --git a/python/fatcat_web/templates/editor_editgroups.html b/python/fatcat_web/templates/editor_editgroups.html
index 785c19bd..cb9b2f56 100644
--- a/python/fatcat_web/templates/editor_editgroups.html
+++ b/python/fatcat_web/templates/editor_editgroups.html
@@ -11,18 +11,16 @@
<p>Changes accepted (aka, merged editgroups):
<table class="ui table">
- <thead><tr><th>Changelog<br>Index
- <th>Timestamp (UTC)
+ <thead><tr><th>Created (UTC)
<th>Editgroup
<th>Editor
<th>Description
<tbody>
- {% for entry in changelog_entries %}
- <tr><td><a href="/changelog/{{ entry.index }}">{{ entry.index }}</a>
- <td>{{ entry.timestamp }}
- <td><code><a href="/editgroup/{{ entry.editgroup_id }}">{{ entry.editgroup_id }}</a></code>
- <td><code><a href="/editor/{{ entry.editgroup.editor_id }}">{{ entry.editgroup.editor_id }}</a></code>
- <td>{% if entry.editgroup.description != None %}{{ entry.editgroup.description }}{% endif %}
+ {% for editgroup in editgroups %}
+ <tr><td>{{ editgroup.created }}
+ <td><code><a href="/editgroup/{{ editgroup.editgroup_id }}">{{ editgroup.editgroup_id }}</a></code>
+ <td><code><a href="/editor/{{ editgroup.editor_id }}">{{ editgroup.editor_id }}</a></code>
+ <td>{% if editgroup.description != None %}{{ editgroup.description }}{% endif %}
{% endfor %}
</table>
diff --git a/python/tests/routes.py b/python/tests/routes.py
index bca7cc0f..9a0b7d40 100644
--- a/python/tests/routes.py
+++ b/python/tests/routes.py
@@ -112,5 +112,5 @@ def test_all_views(app):
rv = app.get('/editor/aaaaaaaaaaaabkvkaaaaaaaaae')
assert rv.status_code == 200
- rv = app.get('/editor/aaaaaaaaaaaabkvkaaaaaaaaae/changelog')
+ rv = app.get('/editor/aaaaaaaaaaaabkvkaaaaaaaaae/editgroups')
assert rv.status_code == 200