From de6108bce532510057898040689349b8f4cd3846 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 28 Feb 2019 17:07:51 -0800 Subject: band-aid editgroups/changelog views a bit Commiting fixes from last week. --- python/fatcat_web/routes.py | 2 ++ python/fatcat_web/templates/changelog_view.html | 4 ++-- python/fatcat_web/templates/editgroup_view.html | 17 +++++++++++++++-- python/fatcat_web/templates/entity_history.html | 14 +++++++------- 4 files changed, 26 insertions(+), 11 deletions(-) (limited to 'python') diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index 1eeab279..ab23c847 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -340,6 +340,7 @@ def work_view(ident): def editgroup_view(ident): try: entity = api.get_editgroup(str(ident)) + entity.editor = api.get_editor(entity.editor_id) except ApiException as ae: abort(ae.status) return render_template('editgroup_view.html', editgroup=entity) @@ -374,6 +375,7 @@ def changelog_view(): def changelog_entry_view(index): try: entry = api.get_changelog_entry(int(index)) + entry.editgroup.editor = api.get_editor(entry.editgroup.editor_id) except ApiException as ae: abort(ae.status) return render_template('changelog_view.html', entry=entry, editgroup=entry.editgroup) diff --git a/python/fatcat_web/templates/changelog_view.html b/python/fatcat_web/templates/changelog_view.html index 3b856b29..1a758559 100644 --- a/python/fatcat_web/templates/changelog_view.html +++ b/python/fatcat_web/templates/changelog_view.html @@ -8,6 +8,6 @@
Timestamp: {{ entry.timestamp }} -
Editgroup: {{ editgroup.editgroup_id }} - +
Editgroup +
{% endblock %} diff --git a/python/fatcat_web/templates/editgroup_view.html b/python/fatcat_web/templates/editgroup_view.html index 1b7a81d7..2557b060 100644 --- a/python/fatcat_web/templates/editgroup_view.html +++ b/python/fatcat_web/templates/editgroup_view.html @@ -7,9 +7,17 @@
editgroup {{ editgroup.editgroup_id }}
{% endblock %} -{# TODO:

Editor: {{ editgroup.editor.username }} #} -
Editor: {{ editgroup.editor_id }} +Editor: {{ editgroup.editor.username }}
Description: {{ editgroup.description }} +

+ +

+
+ Work Edits ({{ editgroup.edits.works|count }}) +
+ Some content +
+

Work Edits ({{ editgroup.edits.works|count }})

+
+

What is an editgroup? +An editgroup is a set of entity edits, bundled together into a coherent, +reviewable bundle. + {% endblock %} diff --git a/python/fatcat_web/templates/entity_history.html b/python/fatcat_web/templates/entity_history.html index 57818179..102fb1b5 100644 --- a/python/fatcat_web/templates/entity_history.html +++ b/python/fatcat_web/templates/entity_history.html @@ -9,20 +9,20 @@ -

Fatcat Metadata Edit History

+

Edit History

+ +This table only shows merged edits, not work-in-progress. - {% for entry in history %}
Changelog
Index -
Timestamp (UTC) +
Changelog Editgroup - Editor Description
{{ entry.changelog_entry.index }} - {{ entry.changelog_entry.timestamp }} - {{ entry.editgroup.editgroup_id }} - {{ entry.editgroup.editor_id }} +
{{ entry.changelog_entry.timestamp.strftime("%Y-%m-%d %H:%M") }} +
{{ entry.editgroup.editgroup_id[:8] }}... by + editor_id {% if entry.editgroup.description != None %}{{ entry.editgroup.description }}{% endif %} {% endfor %}
-- cgit v1.2.3