{% set single_verse = contents|length == 1 and contents|first|length == 1 %}
{% set bFullChapter = false %}
{% set bSingleVerse = single_verse %}
{% set nColNum = 0 %}
{% if column_num is defined %}
{% set nColNum = column_num %}
{% endif %}
{% include 'NCBSWBundle:Bible:search/search_in_bible.html.twig' %}
{% if story is not defined and contents|length > 1 %}
<p>{% include 'NCBSWBundle:Bible:chapter/prev-next.html.twig' %}</p>
{% endif %}
{% for chapter_num, chapter_contents in contents if chapter_contents is not empty %}
{% set current_chapter = chapter_contents|first.chapter %}
{% if loop.first %}{% set book_name = current_chapter.book.name %}{% endif %}
<div style="clear:both"></div>
{% if story is not defined %}
<span style="display:inline-block;">
{% endif %}
<h1>
{% if chapter_contents|first == current_chapter.verses|first and chapter_contents|last == current_chapter.verses|last %}
{{ app.session.get('ui_str')["bible.chapternav.bookchapter"]|replace({'_8100_': book_name, '_8200_': chapter_num})|raw }}
{% elseif chapter_contents|length == 1 %}
{{ app.session.get('ui_str')["bible.versenav.bookchapterverse"]|replace({'_8100_': book_name, '_8200_': chapter_num, '_8300_': chapter_contents|first.fullIndexDisplay})|raw }}
{% else %}
{{ app.session.get('ui_str')["bible.versenav.bookchapterverserange"]|replace({'_8100_': book_name, '_8200_': chapter_num, '_8310_': chapter_contents|first.fullIndexDisplay, '_8320_': chapter_contents|last.fullIndexDisplay})|raw }}
{% endif %}
{% if story is defined and story.name is not empty %}
: {{ story.name }}
{% endif %}
</h1>
</span>
{% include 'NCBSWBundle:Bible:sidrbutton.html.twig' %}
<span style="float:left;margin-bottom:7px;">
{% if story is defined %}
{#% include 'NCBSWBundle:Bible:interface/translation_dropdown/dropdown.html.twig' with {'dropdown_target': 'multicolumn'} %#}
{% include 'NCBSWBundle:Bible:interface/popup/bible_story_translation_popup.html.twig' %}
{% else %}
<!-- <small>{{ translation.name }}</small> -->
{% endif %}
</span>
<div style="clear:both"></div>
<span class="iconmenuspan">
{% include 'NCBSWBundle:Default:toolbarstart.html.twig' %}{% include 'NCBSWBundle:Bible:toggleview.html.twig' %}{% include 'NCBSWBundle:Bible:interface/popup/book_add_popup_multi_col.html.twig' %}{% include 'NCBSWBundle:Bible:toolbarsearch.html.twig' %}{% include 'NCBSWBundle:Bible:otlemusic.html.twig' %} {% if contents|length == 1 %}{% include 'NCBSWBundle:General:text_to_speech.html.twig' %}{% endif %} {% include 'NCBSWBundle:Bible:show_hide_links.html.twig' %}<li class="nav-item"><a href="{{ path('bible_info', {'translationUrl': translation.url}) }}" title="{{ app.session.get('ui_str')["generic.bibliographyicon"] }}" class="nav-link"><i class="fas fa-info-circle"></i><span class="mobile-only"> {{ app.session.get('ui_str')["generic.bibliographyicon"] }}</span></a></li>{% include 'NCBSWBundle:Default:askquestioninc.html.twig' %}{% include 'NCBSWBundle:Default:toolbarend.html.twig' %}
</span>
<span>
{% if column_num is defined and column_num < 2 %}
<span id='prev_next_story'></span>
<script>
if(sPrevNextStory != '')
$("#prev_next_story").html(sPrevNextStory);
</script>
{% endif %}
{% if story is not defined %}
{% if single_verse %}
{% include 'NCBSWBundle:Bible:verse/prev-next.html.twig' with {'verse': chapter_contents|first} %}
{% elseif contents|length == 1 %}
<span id="chapter_nav{{ column_num }}">{% include 'NCBSWBundle:Bible:chapter/prev-next.html.twig' with {'chapter': chapter_contents|first.chapter}
%}</span>
{% endif %}
{% endif %}
</span>
<div style="clear:both"></div>
{% set text_style = '' %}
{% if text_style_override is defined and text_style_override is not null %}
{% set text_style = 'style="'~text_style_override~'"' %}
{% endif %}
<div class="text-content" >
{% if right_to_left %}
<p style="direction: rtl;">
{% else %}
<p>
{% endif %}
<div id="tts{{ nColNum }}" >
{% for position, verse in chapter_contents %}
{% include 'NCBSWBundle:Bible:verse/default.html.twig' %}
{% endfor %}
</div>
</p>
</div>
{% if story is not defined %}
{% if single_verse %}
{# Removed for aesthetic reasons ("if" tag kept in place so the "elseif" will still work)
<p>{% include 'NCBSWBundle:Bible:verse/prev-next.html.twig' with {'verse': chapter_contents|first} %}</p>
#}
{% elseif contents|length == 1 %}
<p>{% include 'NCBSWBundle:Bible:chapter/prev-next.html.twig' with {'chapter': chapter_contents|first.chapter} %}</p>
{% endif %}
{% endif %}
{% else %}
{# If the "contents" array is empty, then we have no actual Bible text, so we'll choose an appropriate error message #}
{% if no_content_msg is defined and no_content_msg is not null %}
{{ no_content_msg|trim|raw }}
{% else %}
{{ app.session.get('ui_str')["bible.alert.nocontent"] }}
{% endif %}
{% endfor %}
{% if story is not defined and contents|length > 1 %}
<p>{% include 'NCBSWBundle:Bible:chapter/prev-next.html.twig' %}</p>
{% endif %}
{% include 'NCBSWBundle:Bible:sidr.html.twig' %}
{% if translation is not empty and translation.language_name != 'English' and translation.language_name != 'Latin'%}
<input type=hidden name="IsOtherLang" value="1">
{% endif %}
{% include 'NCBSWBundle:Bible:biblefooter.html.twig' %}