{% extends 'NCBSWBundle:General:multicolumn/header_framework.html.twig' %}
{% set bOnMobile = app.session.get('is_on_mobile') %}
{# precompute chapter/book/translation/canonicalchapter/canonicalbook entities (or should that be done in controller?) #}
{% if contents is not empty %}
{% set first_verse = contents|first|first.findMainVerse() %}
{% set last_verse = contents|last|last.findMainVerse() %}
{% set first_chapter = first_verse.chapter %}
{% set last_chapter = last_verse.chapter %}
{% if first_chapter == last_chapter %}
{% set chapter = first_chapter %}
{% endif %}
{% set book = first_chapter.book %}
{% set canonical_book = book.canonicalization %}
{% elseif canonically_numbered %}
{% set canonical_book = book %}
{% endif %}
{% block crumb_trail %}
{#
<li class="breadcrumb-item">
(all content?)///
</li>
#}
{% if story is defined %}
<li class="breadcrumb-item">
<a href="{{ path('bible_stories') }}" title="{{ app.session.get('ui_str')["linktitle.short.bible.stories"] }}"><i class="fad fa-book-open-reader"></i></a>
</li>
{% if all_stories is defined %}
<li class="breadcrumb-item">
{% include 'NCBSWBundle:Bible:interface/story_dropdown/story_dropdown_rev.html.twig' %}
{% include 'NCBSWBundle:Bible:interface/popup/bible_story_popup.html.twig' %}
</li>
{% endif %}
{% else %}
<li class="breadcrumb-item">
<a href="{{ path('bible_translation_list') }}" aria-label="Back to Bible home"><i class="fad fa-book-bible"></i></a>
</li>
<li class="breadcrumb-item">
{#% include 'NCBSWBundle:Bible:interface/translation_dropdown/dropdown.html.twig' with {'dropdown_target': 'multicolumn'} %#}
{% include 'NCBSWBundle:Bible:interface/popup/translation_popup.html.twig' with {'dropdown_target': 'multicolumn'} %}
</li>
{% if contents is not empty %}
<li class="breadcrumb-item">
{% if bOnMobile %}
{% include 'NCBSWBundle:Bible:interface/popup/book_popup.html.twig' %}
{% else %}
{% include 'NCBSWBundle:Bible:interface/popup/book_popup_multi_col.html.twig' %}
{% endif %}
{#% include 'NCBSWBundle:Bible:interface/book_dropdown/dropdown.html.twig' %#}
</li>
<li class="breadcrumb-item">
{% if bOnMobile %}
{% include 'NCBSWBundle:Bible:interface/popup/chapter_popup.html.twig' %}
{% else %}
{% include 'NCBSWBundle:Bible:interface/popup/chapter_popup_multi_col.html.twig' %}
{% endif %}
{#% include 'NCBSWBundle:Bible:interface/chapter_dropdown/dropdown.html.twig' %#}
</li>
{% if first_chapter == last_chapter and (first_verse != chapter.verses|first or last_verse != chapter.verses|last) %}
<li class="breadcrumb-item">
<button type="button" class="btn btn-text" >
{% if first_verse == last_verse %}
{{ app.session.get('ui_str')["bible.versenav.versenum"]|replace({'_8300_': first_verse.indexDisplay})|raw }}
{% else %}
{{ app.session.get('ui_str')["bible.versenav.verserange"]|replace({'_8310_': first_verse.indexDisplay, '_8320_': last_verse.indexDisplay})|raw }}
{% endif %}
</button>
</li>
{% endif %}
{% endif %}
{% endif %}
{% endblock %}