{% load i18n corpus_extras %} {% spaceless %}
  • {% if "SHOW_RELEVANCE_SCORES" in FEATURE_FLAGS %} {# show relevance score if enabled #} Relevance: {{ document.score|default:0 }} {% endif %} {# title #}

    {# result number #} {% with page_obj.start_index|default:1 as start_adjust %}{{ forloop.counter0|add:start_adjust }}{% endwith %} {# type and shelfmark #} {{ document.type }} {{ document.shelfmark|shelfmark_wrap }}

    {# metadata #} {# description #} {# TODO: Adjust lang attribute logic for non-English descriptions #}

    {# display keywords in context if any #} {% with document_highlights=highlighting|dict_item:document.id %} {% if document_highlights.description %} {% for snippet in document_highlights.description %} {{ snippet|safe }} {% if not forloop.last %}[…]{% endif %} {% endfor %} {% else %} {# otherwise, display truncated description #} {{ document.description|truncatewords:25 }} {% endif %} {% endwith %}

    {# transcription: keywords in context if any, or excerpt #} {% with document_highlights=highlighting|dict_item:document.id lang=document.language_code lang_script=document.language_script %} {% if document_highlights.transcription or document.transcription %}
    {% if document_highlights.transcription %} {% for snippet in document_highlights.transcription %} {% if snippet.label %}{{ snippet.label.strip|safe }}{% endif %} {{ snippet.text.strip|safe }}{% if snippet.text.strip and not forloop.last %}
    […]
    {% endif %} {% endfor %} {% elif document.transcription %} {# otherwise, display truncated transcription #} {# NOTE: might be nice to display N lines instead of using truncatechars #} {{ document.transcription.0|safe|truncatechars_html:150 }} {% endif %}
    {% endif %} {% endwith %} {# translation: keywords in context if any, or excerpt #} {% with document_highlights=highlighting|dict_item:document.id lang=document.translation_language_code dir=document.translation_language_direction %} {% if document_highlights.translation or document.translation %}
    {% if document_highlights.translation %} {% for snippet in document_highlights.translation %} {% if snippet.label %}{{ snippet.label.strip|safe }}{% endif %} {{ snippet.text.strip|safe }}{% if snippet.text.strip and not forloop.last %}
    […]
    {% endif %} {% endfor %} {% elif document.translation %} {# otherwise, display truncated transcription #} {# NOTE: might be nice to display N lines instead of using truncatechars #} {{ document.translation.0|safe|truncatechars_html:150 }} {% endif %}
    {% endif %} {% endwith %} {# related documents and entities #} {% if document.related_documents or document.related_people or document.related_places %} {% endif %} {# tags #} {% if document.tags %} {# Translators: label for tags on a document #}

    {% translate 'Tags' %}

    {% endif %} {# scholarship records #}

    {% if document.scholarship_count %} {% if document.num_editions %} {% comment %}Translators: number of editions for this document{% endcomment %} {% blocktranslate count counter=document.num_editions trimmed %} 1 Transcription {% plural %} {{ counter }} Transcriptions {% endblocktranslate %} {% endif %} {% if document.num_translations %} {% comment %}Translators: number of translations for this document{% endcomment %} {% blocktranslate count counter=document.num_translations trimmed %} 1 Translation {% plural %} {{ counter }} Translations {% endblocktranslate %} {% endif %} {% if document.num_discussions %} {% comment %}Translators: number of sources that discuss this document{% endcomment %} {% blocktranslate count counter=document.num_discussions trimmed %} 1 Discussion {% plural %} {{ counter }} Discussions {% endblocktranslate %} {% endif %} {% else %} {% translate 'No Scholarship Records' %} {% endif %}

    {% if document.iiif_images %} {% else %} {# Translators: label for when no image thumbnail is available #} {% translate 'No Image' %} {% endif %}
    {# view link #} {# Translators: screen-reader label for "view document details" link #} {% blocktranslate asvar aria_view_details with document_label=document|get_document_label %}View details for {{ document_label }}{% endblocktranslate %} {% translate 'View document details' %}
  • {% endspaceless %}