From 855f2c44de8a900766bdc1f80fb8d3b54e0871e9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 3 Apr 2019 19:40:07 -0700 Subject: editor-specific annotation view --- python/fatcat_web/routes.py | 12 ++++++-- python/fatcat_web/templates/base.html | 2 +- .../fatcat_web/templates/editor_annotations.html | 35 ++++++++++++++++++++++ python/fatcat_web/templates/editor_view.html | 1 + 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 python/fatcat_web/templates/editor_annotations.html diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index bce3c529..7b406ff5 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -357,8 +357,6 @@ def editgroup_create_annotation(ident): abort(ae.status) return redirect('/editgroup/{}'.format(ident)) -# XXX: editor's annotations - @app.route('/editgroup//accept', methods=['POST']) @login_required def editgroup_accept(ident): @@ -433,6 +431,16 @@ def editor_editgroups(ident): return render_template('editor_editgroups.html', editor=editor, editgroups=editgroups) +@app.route('/editor//annotations', methods=['GET']) +def editor_annotations(ident): + try: + editor = api.get_editor(ident) + annotations = api.get_editor_annotations(ident, limit=50) + except ApiException as ae: + abort(ae.status) + return render_template('editor_annotations.html', editor=editor, + annotations=annotations) + @app.route('/changelog', methods=['GET']) def changelog_view(): try: diff --git a/python/fatcat_web/templates/base.html b/python/fatcat_web/templates/base.html index fa5f8f7f..dda905e0 100644 --- a/python/fatcat_web/templates/base.html +++ b/python/fatcat_web/templates/base.html @@ -59,8 +59,8 @@