{% extends "base.html" %} {% import "entity_macros.html" as entity_macros %} {% macro entity_edit_header(auth_to, editgroup, edit, entity_type, entity_name) -%}
[view] [diff] {% if auth_to.edit and not editgroup.changelog_index and not editgroup.submitted %}
[re-edit]
{% endif %}
{{ 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 %} {%- endmacro %} {% macro edit_list(auth_to, editgroup, edits, entity_type, entity_name) -%}

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

{% for edit in edits %}
{{ entity_edit_header(auth_to, editgroup, edit, entity_type, entity_name) }} {% if edit.extra %} {{ entity_macros.extra_metadata(edit.extra) }} {% endif %}
{% endfor %}
{%- endmacro %} {% block title %}Editgroup{% endblock %} {% block body %} {# extended by changelog_entry #} {% block editgroupheader %}

{% block pagetitle %}Editgroup{% endblock %} editgroup_{{ editgroup.editgroup_id }}

{% if not auth_to.submit %}
What is an editgroup?

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

{% endif %}
{% if editgroup.changelog_index %} {% set editing_status = "completed" %} {% set submit_status = "completed" %} {% set accept_status = "completed" %} {% elif editgroup.submitted %} {% set editing_status = "completed" %} {% set submit_status = "completed" %} {% set accept_status = "active" %} {% else %} {% set editing_status = "completed" %} {% set submit_status = "active" %} {% set accept_status = "" %} {% endif %}
{% if not editgroup.changelog_index and auth_to.submit and editgroup.submitted %}
{% else %} Edit {% endif %}
Make changes to entities
{% if not editgroup.changelog_index and auth_to.submit and not editgroup.submitted %}
{% else %} Submitted {% endif %}
For review and feedback from others
{% if not editgroup.changelog_index and auth_to.accept %}
{% else %} Accepted {% endif %}
Changes added to catalog
{% endblock %}
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 %}
{% if editgroup.extra %}

Extra Metadata (raw JSON)

{{ entity_macros.extra_metadata(editgroup.extra) }} {% endif %} {% block editgroupedits %}

All Entity Changes

{{ edit_list(auth_to, editgroup, editgroup.edits.releases, "release", "Release") }} {{ edit_list(auth_to, editgroup, editgroup.edits.works, "work", "Work") }} {{ edit_list(auth_to, editgroup, editgroup.edits.containers, "container", "Container") }} {{ edit_list(auth_to, editgroup, editgroup.edits.creators, "creator", "Creator") }} {{ edit_list(auth_to, editgroup, editgroup.edits.files, "file", "File") }} {{ edit_list(auth_to, editgroup, editgroup.edits.filesets, "fileset", "File Set") }} {{ edit_list(auth_to, editgroup, editgroup.edits.webcaptures, "webcapture", "Web Capture") }}
As JSON via API
{% endblock %}
{% block editgroupannotations %}

Comments and Annotations

{% for annotation in editgroup.annotations|reverse %}
{% if annotation.editor.is_bot %} {% else %} {% endif %} {{ annotation.editor.username}} {% if annotation.editor.is_admin %} Admin {% endif %} at {{ annotation.created.strftime("%Y-%m-%d %H:%M:%S") }} {# TODO: get individual editgroup annotation not supported yet (as JSON) #} {% if annotation.extra and annotation.extra.disposition %} {% set disp = annotation.extra.disposition %} {{ annotation.extra.disposition|capitalize }} {% endif %}
{% if annotation.extra %}
Review Metadata (raw JSON)
{{ entity_macros.extra_metadata(annotation.extra) }}
{% endif %}
{{ annotation.comment_markdown|markdown(escape=True) }}
{% else %} None! {% endfor %} {% if not editgroup.changelog_index and auth_to.annotate %}

Add Comment

Markdown is allowed

{% endif %} {% endblock %} {% endblock %} {% block postscript %} {% endblock %}