diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-02-28 17:07:51 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-02-28 17:08:30 -0800 |
commit | de6108bce532510057898040689349b8f4cd3846 (patch) | |
tree | 03d57c2d1abafd1e42722397b724de3d2df1b482 /python | |
parent | d126c74f1326449e5941c8bac4dbe724dc067ef8 (diff) | |
download | fatcat-de6108bce532510057898040689349b8f4cd3846.tar.gz fatcat-de6108bce532510057898040689349b8f4cd3846.zip |
band-aid editgroups/changelog views a bit
Commiting fixes from last week.
Diffstat (limited to 'python')
-rw-r--r-- | python/fatcat_web/routes.py | 2 | ||||
-rw-r--r-- | python/fatcat_web/templates/changelog_view.html | 4 | ||||
-rw-r--r-- | python/fatcat_web/templates/editgroup_view.html | 17 | ||||
-rw-r--r-- | python/fatcat_web/templates/entity_history.html | 14 |
4 files changed, 26 insertions, 11 deletions
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 @@ </h1> <br><b>Timestamp:</b> {{ entry.timestamp }} -<br><b>Editgroup:</b> <a href="/editgroup/{{editgroup.editgroup_id}}">{{ editgroup.editgroup_id }}</a> - +<br><b><a href="/editgroup/{{editgroup.editgroup_id}}">Editgroup</a></b> +<br> {% 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 @@ <div class="sub header"><code>editgroup {{ editgroup.editgroup_id }}</code></div></h1> {% endblock %} -{# TODO: <p>Editor: <a href="/editor/{{ editgroup.editor.username }}">{{ editgroup.editor.username }}</a> #} -<br><b>Editor:</b> <a href="/editor/{{editgroup.editor_id}}">{{ editgroup.editor_id }}</a> +<b>Editor:</b> <a href="/editor/{{editgroup.editor_id}}">{{ editgroup.editor.username }}</a> <br><b>Description:</b> {{ editgroup.description }} +<br><br> + +<div class="ui accordion"> +<div class="title"> + <i class="dropdown icon"></i>Work Edits ({{ editgroup.edits.works|count }}) +</div><div class="content"> + Some content +</div> +</div> <h3>Work Edits ({{ editgroup.edits.works|count }})</h3> <ul> @@ -51,4 +59,9 @@ {% endfor %} </ul> +<br> +<p><b>What is an editgroup?</b> +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 @@ </div> </h1> -<h3 class="ui header">Fatcat Metadata Edit History</h3> +<h3 class="ui header">Edit History</h3> + +This table only shows <i>merged</i> edits, not work-in-progress. <table class="ui table"> - <thead><tr><th>Changelog<br>Index - <th>Timestamp (UTC) + <thead><tr><th>Changelog <th>Editgroup - <th>Editor <th>Description <tbody> {% for entry in history %} <tr><td><a href="/changelog/{{ entry.changelog_entry.index }}">{{ entry.changelog_entry.index }}</a> - <td>{{ entry.changelog_entry.timestamp }} - <td><a href="/editgroup/{{ entry.editgroup.editgroup_id }}">{{ entry.editgroup.editgroup_id }}</a> - <td><a href="/editor/{{ entry.editgroup.editor_id }}">{{ entry.editgroup.editor_id }}</a> + <br>{{ entry.changelog_entry.timestamp.strftime("%Y-%m-%d %H:%M") }} + <td><a href="/editgroup/{{ entry.editgroup.editgroup_id }}">{{ entry.editgroup.editgroup_id[:8] }}...</a> by + <a href="/editor/{{ entry.editgroup.editor_id }}">editor_id</a> <td>{% if entry.editgroup.description != None %}{{ entry.editgroup.description }}{% endif %} {% endfor %} </table> |