{% load corpus_extras %}
{# template snippet for displaying document label on a form #}
{# used on document merge form to provide enough information to merge accurately #}
{{ document }}
{% if document.description %}
{{ document.description }}
{% endif %}
{% if document.authors.count %}
{{ document.authors.all|join:", " }}
{% endif %}
{% if document.all_languages %}
{{ document.all_languages }}
{% endif %}
{% if document.all_tags %}
{{ document.all_tags }}
{% endif %}
{% if document.notes %}
{{ document.notes }}
{% endif %}
{% if document.needs_review %}
{{ document.needs_review }}
{% endif %}
{% if document.iiif_images %}
{{ document.admin_thumbnails }}
{% endif %}
{% if document.footnotes.count %}
{% regroup document.footnotes.all by source as source_list %}
{% for source in source_list %}
{{ source.grouper.formatted_display|safe }}
{% if source.grouper.source_type.type == "Unpublished" %}
unpublished
{% endif %}
{% for fn in source.list %}
{% if fn.location or fn.url %}
{% include "corpus/snippets/footnote_location.html" %}
{% endif %}
{{ fn.get_doc_relation_display }}
{% if fn.content_html_str %}
{{ fn.content_html_str|safe }}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if document.persondocumentrelation_set.count %}
{% for person_rel in document.persondocumentrelation_set.all %}
{{ person_rel.person }}
{{ person_rel.type }}
{{ person_rel.uncertain }}
{% if person_rel.notes %}
{{ person_rel.notes }}
{% endif %}
{% endfor %}
{% endif %}
{% if document.documentplacerelation_set.count %}
{% for place_rel in document.documentplacerelation_set.all %}
{{ place_rel.place }}
{{ place_rel.type }}
{% if place_rel.notes %}
{{ place_rel.notes }}
{% endif %}
{% endfor %}
{% endif %}
{% if document.events.count %}
{% for event_rel in document.documenteventrelation_set.all %}