{% from 'reporting/fragments/macros.html' import generate_footnote, create_footnote with context %}
{% macro create_evidence(e, create_place_links=true) %}
{%- set footnotes.has_footnotes = false -%}
{%- set footnotes.footnote_keys = [] -%}
{% if e.evidence.evidence_visible %}Visible{% else %}Hidden{% endif %}
evidence
with
{% if e.evidence.interpretation_confidence %}
{{ e.evidence.interpretation_confidence }}
{% else %}
no
{% endif %}
confidence of interpretation
{%- if e.evidence.evidence_comment -%}
{{ create_footnote('evidence_comment' ~ e.evidence.id) }}
{%- endif -%}
.
The religious group
{{ e.evidence.religion }}[r{{ e.evidence.religion_id}}]
({{ e.evidence.religion_confidence or 'no confidence value' }})
{%- if e.evidence.religion_instance_comment -%}
{{ create_footnote('evidence_religion_instance_comment' ~ e.evidence.id) }}
{% endif %}
was mentioned in the
{% if e.evidence.place_type == 'Unknown' %}
unspecified place
{% else %}
{{ e.evidence.place_type|lower }}
{% endif %}
{{ e.evidence.place_name }}{%- if create_place_links %}[p{{ e.evidence.place_id}}]{%- endif %}
({{ e.evidence.place_attribution_confidence or 'no confidence value' }})
{%- if e.evidence.place_instance_comment -%}
{{ create_footnote('evidence_place_instance_comment' ~ e.evidence.id) }}
{% endif %}
{% if e.evidence.person_name %}
and the
{{ e.evidence.person_type | lower }}
{{ e.evidence.person_name }}[pe{{ e.evidence.person_id}}]
({{ e.evidence.person_confidence or 'no confidence value' }})
{%- if e.evidence.person_instance_comment -%}
{{ create_footnote('evidence_person_instance_comment' ~ e.evidence.id) }}
{% endif %}
{% endif %}
{% if e.evidence.time_instances is none or e.evidence.time_instances|length == 0 %}
with no information about time.
{% elif e.evidence.time_instances|length == 1 %}
{{ e.evidence.time_instances[0].span | render_int4range | safe }}[t{{ e.evidence.time_instances[0].id }}]
({{ e.evidence.time_instances[0].confidence or 'no confidence value' }})
{%- if e.evidence.time_instances[0].comment -%}
{{ create_footnote('evidence_time_instance_comment' ~ e.evidence.id ~ ':' ~ e.evidence.time_instances[0].id) }}
{%- endif -%}.
{% else %}
with {{ e.evidence.time_instances|length }} time instances:
{{ e.evidence.religion }} in {{ e.evidence.place_name }}
{% for ti in e.evidence.time_instances|sort_int4range %}
{% endif %}
This information is based on {{ si.short }} {%- if si.source_page -%}: {{ si.source_page }}{% endif %} {% if si.source_confidence -%} and is rated {{ si.source_confidence }} {%- else -%} with no confidence regarding the source {%- endif -%} {%- if si.comment -%} {% set footnotekey = 'evidence_' ~ e.id ~ '_source_instance_comment_' ~ si.id %} {{ create_footnote(footnotekey) }} {% set _dummy = footnotes.footnote_keys.append((footnotekey, si.comment)) %} {%- endif -%} .
{% else %}This information is based on the following sources: