From d280b1b4fdc57bfd4c0c9cb56fd836d2ae80dbb5 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 26 Feb 2021 10:29:57 -0800 Subject: web: generic view improvements (entities, lists) --- python/fatcat_web/templates/changelog.html | 14 +++- .../fatcat_web/templates/editgroup_reviewable.html | 2 +- python/fatcat_web/templates/editgroup_view.html | 90 ++++++++++++++-------- .../fatcat_web/templates/editor_annotations.html | 12 +-- python/fatcat_web/templates/editor_editgroups.html | 12 +-- python/fatcat_web/templates/editor_view.html | 15 +++- python/fatcat_web/templates/entity_history.html | 10 ++- python/fatcat_web/templates/entity_macros.html | 24 +++--- .../fatcat_web/templates/entity_view_metadata.html | 3 + 9 files changed, 113 insertions(+), 69 deletions(-) (limited to 'python') diff --git a/python/fatcat_web/templates/changelog.html b/python/fatcat_web/templates/changelog.html index 8b899d38..322f3e3b 100644 --- a/python/fatcat_web/templates/changelog.html +++ b/python/fatcat_web/templates/changelog.html @@ -7,9 +7,11 @@

Recent Changes
changelog

-Limited to the most recent entries. +

This is a feed of all the changes to the catalog, in the order that they are +accepted. Only the most recent entries are shown, but the API can be used to +inspect every change all the way back to the start. - +
Changelog
Index
Editgroup Description @@ -19,7 +21,7 @@ Limited to the most recent entries.
{{ entry.timestamp.strftime("%Y-%m-%d %H:%M:%S") }}
{% if entry.editgroup.editor.is_bot %} - + {% else %} {% endif %} @@ -28,10 +30,14 @@ Limited to the most recent entries.
- {{ entry.editgroup.editgroup_id }} + editgroup_{{ entry.editgroup.editgroup_id }}
{% if entry.editgroup.description != None %}{{ entry.editgroup.description }}{% endif %} {% endfor %}
+

+ As JSON via API +
+ {% endblock %} diff --git a/python/fatcat_web/templates/editgroup_reviewable.html b/python/fatcat_web/templates/editgroup_reviewable.html index 4cfea697..ec1fc1f5 100644 --- a/python/fatcat_web/templates/editgroup_reviewable.html +++ b/python/fatcat_web/templates/editgroup_reviewable.html @@ -16,7 +16,7 @@ Limited to the most recent entries. {% for editgroup in entries %} {% if editgroup.editor.is_bot %} - + {% else %} {% endif %} diff --git a/python/fatcat_web/templates/editgroup_view.html b/python/fatcat_web/templates/editgroup_view.html index a36dc3e5..dc18f9d3 100644 --- a/python/fatcat_web/templates/editgroup_view.html +++ b/python/fatcat_web/templates/editgroup_view.html @@ -12,9 +12,20 @@
{% for edit in edits %}
-
+
+
+ [view] + {% if auth_to.edit and not editgroup.changelog_index and not editgroup.submitted %} +
[re-edit] +
+
+ + +
+ {% endif %} +
- {{ entity_type }}/{{ edit.ident }} + {{ entity_type }}_{{ edit.ident }} {% if edit.redirect_ident %} => redirect to {{ entity_type }}/{{ edit.redirect_ident }} {% elif not edit.revision %} @@ -24,14 +35,6 @@ {% else %} updated {% endif %} - [view edit] - {% if auth_to.edit and not editgroup.changelog_index and not editgroup.submitted %} - [re-edit] -
- - -
- {% endif %}
{% if edit.revision %} Revision: {{ edit.revision }} @@ -77,36 +80,54 @@ {% endif %}

Editgroup -editgroup {{ editgroup.editgroup_id }}

+editgroup_{{ editgroup.editgroup_id }} {% endblock %} -

What is an editgroup? -An editgroup is a set of entity edits, bundled together into a coherent, -reviewable bundle. -
+

+
+ What is an editgroup? +
+

An editgroup is a set of entity edits, bundled together into a coherent, reviewable bundle. +

-
Status: -{% if editgroup.changelog_index %} - Merged (Changelog #{{ editgroup.changelog_index }}) -{% elif editgroup.submitted %} - Submitted ({{ editgroup.submitted.strftime("%Y-%m-%d %H:%M:%S") }}) -{% else %} - Not Submitted -{% endif %} + + + + + + + + + + + + + + +
Status + {% if editgroup.changelog_index %} + Merged (Changelog #{{ editgroup.changelog_index }}) + {% elif editgroup.submitted %} + Submitted ({{ editgroup.submitted.strftime("%Y-%m-%d %H:%M:%S") }}) + {% else %} + Not Submitted + {% endif %} +
Editor + {{ editgroup.editor.username }} +
Description + {% if editgroup.description %} + {{ editgroup.description }} + {% else %} + none + {% endif %} +
-
Editor: {{ editgroup.editor.username }} -
Description: -{% if editgroup.description %} - {{ editgroup.description }} -{% else %} - none -{% endif %} {% if editgroup.extra %}

Extra Metadata (raw JSON)

{{ entity_macros.extra_metadata(editgroup.extra) }} {% endif %} -

+

All Entity Changes

{{ edit_list(auth_to, editgroup, editgroup.edits.releases, "release", "Release") }} {{ edit_list(auth_to, editgroup, editgroup.edits.works, "work", "Work") }} @@ -116,14 +137,17 @@ reviewable bundle. {{ edit_list(auth_to, editgroup, editgroup.edits.filesets, "fileset", "File Set") }} {{ edit_list(auth_to, editgroup, editgroup.edits.webcaptures, "webcapture", "Web Capture") }}
+
-

Comments and Annotations

+

Comments and Annotations

{% for annotation in editgroup.annotations|reverse %}
{% if annotation.editor.is_bot %} - + {% else %} {% endif %} diff --git a/python/fatcat_web/templates/editor_annotations.html b/python/fatcat_web/templates/editor_annotations.html index c46039f5..7a8b53cf 100644 --- a/python/fatcat_web/templates/editor_annotations.html +++ b/python/fatcat_web/templates/editor_annotations.html @@ -1,15 +1,15 @@ {% extends "base.html" %} {% block body %} -

Comments and Annotations +

{{ editor.username }}: Comments and Annotations
- editor - {{ editor.username }} - - + editor_{{ editor.editor_id }}

+Edit History - +Comments and Annotation History +

{% for annotation in annotations %}
@@ -29,7 +29,7 @@
{% else %} - None! + No comments or annotations for this editor! {% endfor %} {% endblock %} diff --git a/python/fatcat_web/templates/editor_editgroups.html b/python/fatcat_web/templates/editor_editgroups.html index 3c3dd20d..756b3a02 100644 --- a/python/fatcat_web/templates/editor_editgroups.html +++ b/python/fatcat_web/templates/editor_editgroups.html @@ -1,15 +1,15 @@ {% extends "base.html" %} {% block body %} -

Edit History +

{{ editor.username }}: Edit History
- editor - {{ editor.username }} - - + editor_{{editor.editor_id}}

+Edit History - +Comments and Annotation History +
{#
Created (UTC) #} Status @@ -28,7 +28,7 @@ Work in Progress {% endif %} - {{ editgroup.editgroup_id }} + editgroup_{{ editgroup.editgroup_id }} {% if editgroup.description != None %}{{ editgroup.description }}{% endif %} {% endfor %} diff --git a/python/fatcat_web/templates/editor_view.html b/python/fatcat_web/templates/editor_view.html index 6ac58e3d..5906af75 100644 --- a/python/fatcat_web/templates/editor_view.html +++ b/python/fatcat_web/templates/editor_view.html @@ -6,11 +6,20 @@

{{ editor.username }}
- editor {{ editor.editor_id }} + editor_{{ editor.editor_id }}

-

Edit History -

Comments and Annotation History +Edit History - +Comments and Annotation History + +
+
+

+
+ This page is intentionally bare +
+

We don't have much to share about individual editors. +

{% endblock %} diff --git a/python/fatcat_web/templates/entity_history.html b/python/fatcat_web/templates/entity_history.html index c9f45d84..0115b845 100644 --- a/python/fatcat_web/templates/entity_history.html +++ b/python/fatcat_web/templates/entity_history.html @@ -3,9 +3,9 @@ {% block entity_main %} -

Edit History

+

Entity Edit History

-This table only shows merged edits, not work-in-progress. +This table only shows accepted edits included in the catalog, not any work-in-progress.
Changelog @@ -17,7 +17,7 @@ This table only shows merged edits, not work-in-progress.
{{ entry.changelog_entry.timestamp.strftime("%Y-%m-%d %H:%M") }}
{% if entry.editgroup.editor.is_bot %} - + {% else %} {% endif %} @@ -34,5 +34,9 @@ This table only shows merged edits, not work-in-progress. {% if entry.editgroup.description != None %}{{ entry.editgroup.description }}{% endif %} {% endfor %}
+ + {% endblock %} diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index e8a763d2..e68254de 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -5,15 +5,15 @@
{% if editgroup.changelog_index %} Accepted Edit Version -

This is the version of the entity as of a specific merged editgroup: +

This is the version of the entity as of a specific point in time: {% elif editgroup.submitted %} Submitted Edit Version -

This is a version of the entity that has been submitted for approval as part of an editgroup: +

This is a version of the entity that has been submitted for approval as part of: {% else %} Edit In Progress -

This is a version of the entity that has not yet been submitted for approval, part of an editgroup: +

This is a version of the entity that has not yet been submitted for approval. Part of: {% endif %} - {{ editgroup.editgroup_id }} + editgroup_{{ editgroup.editgroup_id }}

{% elif entity.state == None and entity.ident == None %}
@@ -27,17 +27,15 @@
{% endif %} -
- Fatcat Bits -

- {% if entity.state %} - State is "{{ entity.state }}". +

+ Catalog Record + {% if entity.state and entity.state != "active" %} +
State: {{ entity.state }} {% endif %} {% if entity.revision %} - Revision: -
{{ entity.revision }} +
Revision: {{ entity.revision }} {% endif %} -
- As JSON object via API + JSON
diff --git a/python/fatcat_web/templates/entity_view_metadata.html b/python/fatcat_web/templates/entity_view_metadata.html index 7ccdc5bb..90ce25d9 100644 --- a/python/fatcat_web/templates/entity_view_metadata.html +++ b/python/fatcat_web/templates/entity_view_metadata.html @@ -6,6 +6,9 @@

Entity Metadata (schema)

{{ entity_macros.extra_metadata(entity._metadata) }} + {% if entity.extra %}

Extra Metadata (raw JSON)

-- cgit v1.2.3