From 80274227d8b292727ede37184deca5772e19fe43 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 1 Mar 2019 15:23:28 -0800 Subject: improve editgroup (and derived) views --- python/fatcat_web/templates/editgroup_view.html | 92 +++++++++++++------------ 1 file changed, 47 insertions(+), 45 deletions(-) (limited to 'python/fatcat_web/templates/editgroup_view.html') diff --git a/python/fatcat_web/templates/editgroup_view.html b/python/fatcat_web/templates/editgroup_view.html index 2557b060..2341f06a 100644 --- a/python/fatcat_web/templates/editgroup_view.html +++ b/python/fatcat_web/templates/editgroup_view.html @@ -1,6 +1,38 @@ {% extends "base.html" %} {% block body %} +{% macro edit_list(edits, entity_type, entity_name) -%} +
+

{{ entity_name }} Edits ({{ edits|count }})

+
+
+ {% for edit in edits %} +
+
+
+ {{ entity_type }}/{{ edit.ident }} + {% if edit.redirect_ident %} + => redirect to {{ entity_type }}/{{ edit.redirect_ident }} + {% elif not edit.revision %} + deleted + {% elif not edit.prev_revision %} + created + {% else %} + updated + {% endif %} +
+ {% if edit.revision %} + Revision: {{ edit.revision }} + {% endif %} + {% if edit.extra %} + {% endif %} +
+
+ {% endfor %} +
+
+{%- endmacro %} + {# extended by changelog_entry #} {% block editgroupheader %}

Edit Group @@ -11,53 +43,16 @@
Description: {{ editgroup.description }}

-
-
- Work Edits ({{ editgroup.edits.works|count }}) -
- Some content -
+
+ {{ edit_list(editgroup.edits.works, "work", "Work") }} + {{ edit_list(editgroup.edits.releases, "release", "Release") }} + {{ edit_list(editgroup.edits.containers, "container", "Container") }} + {{ edit_list(editgroup.edits.creators, "creator", "Creator") }} + {{ edit_list(editgroup.edits.files, "file", "File") }} + {{ edit_list(editgroup.edits.filesets, "fileset", "File Set") }} + {{ edit_list(editgroup.edits.webcaptures, "webcapture", "Web Capture") }}
-

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

- - -

Release Edits ({{ editgroup.edits.releases|count }})

- - -

Container Edits ({{ editgroup.edits.containers|count }})

- - -

Creator Edits ({{ editgroup.edits.creators|count }})

- - -

File Edits ({{ editgroup.edits.files|count }})

-

What is an editgroup? @@ -65,3 +60,10 @@ An editgroup is a set of entity edits, bundled together into a coherent, reviewable bundle. {% endblock %} + +{% block postscript %} + +{% endblock %} -- cgit v1.2.3