{% if translation is not defined %}
{% if work is not defined %}
{% set work = passage.findWork() %}
{% endif %}
{% set translation = work.selectTranslation() %}
{% elseif work is not defined %}
{% set work = translation.work %}
{% endif %}
{% if work.stories is not empty %}
{% set story = work.stories|first %}
{% endif %}
{% set work_id = '' %}
{% if work is defined %}
{% set work_id = work.id %}
{% endif %}
{% set nColNum = 0 %}
{% if column_num is defined %}
{% set nColNum = column_num %}
{% endif %}
{% set bHasPrevNextWordExp = false %}
{% include 'NCBSWBundle:Exposition:search/search_in_work.html.twig' %}
{% if (IsSwedenborgWork is not defined or IsSwedenborgWork == 0) and all_stories is defined and all_stories is not empty %}
<form style="display:inline;" class="noprint">
<div class="input-group col" style="padding: 0 0 10px 0; display:inline-flex; max-width:450px;">
<input class="form-control py-2" id="searchTerm" name="searchTerm" placeholder="{{ app.session.get('ui_str')["search.searchstoryexplanations"] }}" value="" onKeyPress="return onEnterSearch(this.form)" />
<span class="input-group-append">
<button class="btn btn-primary" id="btnSearch" type="button" title="Search Explanations" onclick="onSearchStory()"><i class="fa fa-magnifying-glass"> </i></button>
</span>
</div>
</form>
<script>
function onSearchStory()
{
var sSearchTerm = $("#searchTerm").val();
if(sSearchTerm == '')
alert("Please enter search text.");
else
{
var sUrl = "{{ path('bible_stories') }}?st=" + encodeURIComponent(sSearchTerm);
top.location=sUrl;
}
}
</script>
{% endif %}
<div style="clear:both"></div>
<span style="display:inline-block;">
<h1>
{% set passage_title = '' %}
{% if passage is not null and passage.swedenborgSection is not null %}
{% set passage_title = app.session.get('ui_str')["exposition.passage.sectiontitle"]|replace({'_8100_': translation.translatedTitle, '_2000_': passage.swedenborgSection})|raw %}
{{ passage_title }}
{% else %}
{{ translation.translatedTitle }}
{% endif %}
</h1>
</span>
{% include 'NCBSWBundle:Exposition:sidrbuttonw.html.twig' %}
<div style="clear:both"></div>
{% if IsSwedenborgWork is defined and IsSwedenborgWork == 1 %}
<span class="iconmenuspan">
{% include 'NCBSWBundle:Default:toolbarstart.html.twig' %}{% include 'NCBSWBundle:Exposition:toc_link.html.twig' %}{% include 'NCBSWBundle:Exposition:interface/popup/work_add_popup.html.twig' %}
{% if translation.getUrl() is not null %}
<li class="nav-item"><a href="{{ path('exposition_translation_index', {'translationUrl': translation.getUrl()}) }}" 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>
{% endif %}
{% include 'NCBSWBundle:General:text_to_speech.html.twig' %}
{% include 'NCBSWBundle:Exposition:related_bible_ref.html.twig' %}
{% include 'NCBSWBundle:Exposition:show_scan_image.html.twig' %}
{% include 'NCBSWBundle:Default:askquestioninc.html.twig' %}
{% include 'NCBSWBundle:Exposition:edit_translation.html.twig' %}
{% include 'NCBSWBundle:Default:toolbarend.html.twig' %}
</span>
{% else %}
<span class="iconmenuspan">
{% include 'NCBSWBundle:Default:toolbarstart.html.twig' %}
<li class="nav-item"><a href="{{ path('exposition_translation_index', {'translationUrl': translation.getUrl()}) }}" 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:General:text_to_speech.html.twig' %}
{% include 'NCBSWBundle:Exposition:related_bible_ref.html.twig' %}
{% include 'NCBSWBundle:Exposition:show_scan_image.html.twig' %}
{% include 'NCBSWBundle:Default:askquestioninc.html.twig' %}
{% include 'NCBSWBundle:Exposition:edit_translation.html.twig' %}
{% include 'NCBSWBundle:Default:toolbarend.html.twig' %}
</span>
{% if authors is defined and authors != '' and concept_prev_next is not defined %}
<small><p>{{ app.session.get('ui_str')["generic.writtenby"] }} {{ authors }}</p></small>
{% endif %}
{% endif %}
{% set nColNum = 0 %}
{% if column_num is defined %}
{% set nColNum = column_num %}
{% endif %}
{% set total_length = columns|length %}
{% if nColNum > 1 %}
{% set aPrevWordExplanation = null %}
{% set aNextWordExplanation = null %}
{% set queryParams = app.request.query.all %}
{% set sLinkEnd = '' %}
{% if queryParams['wep'] is defined and queryParams['wep'] == 2 %}
{% set sLinkEnd = '?wep=2' %}
{% set aPrevWordExplanation = app.session.get('prev_word_explanation2') %}
{% set aNextWordExplanation = app.session.get('next_word_explanation2') %}
{% else %}
{% set aPrevWordExplanation = app.session.get('prev_word_explanation') %}
{% set aNextWordExplanation = app.session.get('next_word_explanation') %}
{% endif %}
{% if aPrevWordExplanation is not empty %}
{% if aPrevWordExplanation[work_id] is defined %}
{% if nColNum == 2 %}
{% if total_length == 2 %}
{% set prev_word_link = path('arbitrary_two_column', multicolumn_route_params|merge({'column2Details': aPrevWordExplanation[work_id]}) ) %}
{% elseif total_length == 3 %}
{% set prev_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column2Details': aPrevWordExplanation[work_id]}) ) %}
{% endif %}
{% elseif nColNum == 3 %}
{% set prev_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column3Details': aPrevWordExplanation[work_id]}) )~sLinkEnd %}
{% endif %}
<a class="nav_link" href="{{ prev_word_link }}" title="← {{ app.session.get('ui_str')["exposition.passage.prev"] }}"><i class="fa-duotone fa-circle-arrow-left" style="--fa-secondary-opacity: 0.3;"></i></a>
{% set bHasPrevNextWordExp = true %}
{% endif %}
{% endif %}
{% if aNextWordExplanation is not empty %}
{% if aNextWordExplanation[work_id] is defined %}
{% if nColNum == 2 %}
{% if total_length == 2 %}
{% set next_word_link = path('arbitrary_two_column', multicolumn_route_params|merge({'column2Details': aNextWordExplanation[work_id]}) ) %}
{% elseif total_length == 3 %}
{% set next_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column2Details': aNextWordExplanation[work_id]}) ) %}
{% endif %}
{% elseif nColNum == 3 %}
{% set next_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column3Details': aNextWordExplanation[work_id]}) )~sLinkEnd %}
{% endif %}
<a class="nav_link" href="{{ next_word_link }}" title="{{ app.session.get('ui_str')["exposition.passage.next"] }} →"><i class="fa-duotone fa-circle-arrow-right" style="--fa-secondary-opacity: 0.3;"></i></a>
{% set bHasPrevNextWordExp = true %}
{% endif %}
{% endif %}
{% if not bHasPrevNextWordExp %}
{% if (concept_prev_next is defined and concept_prev_next is not null) %}
{% set sPrevConceptUrl = concept_prev_next['prev_concept_url'] %}
{% if sPrevConceptUrl != '' %}
{% set sPrevConceptUrl = 'explanation_'~sPrevConceptUrl %}
{% if nColNum == 2 %}
{% if total_length == 2 %}
{% set prev_word_link = path('arbitrary_two_column', multicolumn_route_params|merge({'column2Details': sPrevConceptUrl}) ) %}
{% elseif total_length == 3 %}
{% set prev_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column2Details': sPrevConceptUrl}) ) %}
{% endif %}
{% elseif nColNum == 3 %}
{% set prev_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column3Details': sPrevConceptUrl}) )~sLinkEnd %}
{% endif %}
<a class="nav_link" href="{{ prev_word_link }}" title="← {{ app.session.get('ui_str')["exposition.passage.prev"] }}"><i class="fa-duotone fa-circle-arrow-left" style="--fa-secondary-opacity: 0.3;"></i></a>
{% endif %}
{% set sNextConceptUrl = concept_prev_next['next_concept_url'] %}
{% if sNextConceptUrl != '' %}
{% set sNextConceptUrl = 'explanation_'~sNextConceptUrl %}
{% if nColNum == 2 %}
{% if total_length == 2 %}
{% set next_word_link = path('arbitrary_two_column', multicolumn_route_params|merge({'column2Details': sNextConceptUrl}) ) %}
{% elseif total_length == 3 %}
{% set next_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column2Details': sNextConceptUrl}) ) %}
{% endif %}
{% elseif nColNum == 3 %}
{% set next_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column3Details': sNextConceptUrl}) )~sLinkEnd %}
{% else %}
{% if total_length == 2 %}
{% set next_word_link = path('arbitrary_two_column', multicolumn_route_params|merge({'column1Details': sNextConceptUrl}) ) %}
{% elseif total_length == 3 %}
{% set next_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column1Details': sNextConceptUrl}) ) %}
{% endif %}
{% endif %}
<a class="nav_link" href="{{ next_word_link }}" title="{{ app.session.get('ui_str')["exposition.passage.next"] }} →"><i class="fa-duotone fa-circle-arrow-right" style="--fa-secondary-opacity: 0.3;"></i></a>
{% endif %}
{% endif %}
{% endif %}
{% if verse_explanations is defined and verse_explanations is not empty %}
<span id='prev_next_verse_explanation{{ nColNum }}'></span>
<script>
if(aPrevNextVerseExplanation[{{ nColNum }}] != '')
$("#prev_next_verse_explanation{{ nColNum }}").html(aPrevNextVerseExplanation[{{ nColNum }}]);
</script>
{% endif %}
{% else %}
{% if (concept_prev_next is defined and concept_prev_next is not null) %}
{% set sPrevConceptUrl = concept_prev_next['prev_concept_url'] %}
{% if sPrevConceptUrl != '' %}
{% set sPrevConceptUrl = 'explanation_'~sPrevConceptUrl %}
{% if total_length == 2 %}
{% set prev_word_link = path('arbitrary_two_column', multicolumn_route_params|merge({'column1Details': sPrevConceptUrl}) ) %}
{% elseif total_length == 3 %}
{% set prev_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column1Details': sPrevConceptUrl}) ) %}
{% endif %}
<a class="nav_link" href="{{ prev_word_link }}" title="← {{ app.session.get('ui_str')["exposition.passage.prev"] }}"><i class="fa-duotone fa-circle-arrow-left" style="--fa-secondary-opacity: 0.3;"></i></a>
{% endif %}
{% set sNextConceptUrl = concept_prev_next['next_concept_url'] %}
{% if sNextConceptUrl != '' %}
{% set sNextConceptUrl = 'explanation_'~sNextConceptUrl %}
{% if total_length == 2 %}
{% set next_word_link = path('arbitrary_two_column', multicolumn_route_params|merge({'column1Details': sNextConceptUrl}) ) %}
{% elseif total_length == 3 %}
{% set next_word_link = path('arbitrary_three_column', multicolumn_route_params|merge({'column1Details': sNextConceptUrl}) ) %}
{% endif %}
<a class="nav_link" href="{{ next_word_link }}" title="{{ app.session.get('ui_str')["exposition.passage.next"] }} →"><i class="fa-duotone fa-circle-arrow-right" style="--fa-secondary-opacity: 0.3;"></i></a>
{% endif %}
{% endif %}
{% endif %}
{% if not bHasPrevNextWordExp and (IsSwedenborgWork is not defined or IsSwedenborgWork != 1) %}
<span id='prev_next_category{{ nColNum }}'></span>
<script>
if(sPrevNextCategory != '')
{
$("#prev_next_category{{ nColNum }}").html(sPrevNextCategory);
}
</script>
{% endif %}
{% include 'NCBSWBundle:Exposition:passage_links.html.twig' with {'link_position': '1'} %}
<div style="clear:both;">
{% if story is defined and story is not null and story.illustrations is not empty %}
<p> {% include 'NCBSWBundle:Media:image_tag.html.twig' with {'image_entity': random(story.illustrations).image, 'border': 1} %}
<br><br>
{% endif %}
{% if story is defined and story is not null %}
{% set embed_options = story.getMultimedia() %}
{% for embed_entity in embed_options %}
{% include 'NCBSWBundle:Media:embed_iframe.html.twig' %}
{% endfor %}
{% endif %}
{% if image is defined and image is not null %}
{% include 'NCBSWBundle:Media:image_tag.html.twig' with {'image_entity': image, 'border': 1} %}
{% endif %}
{% set text_style = '' %}
{% if text_style_override is defined and text_style_override is not null %}
{% set text_style = 'style="'~text_style_override|replace({'"':"'"})~'"' %}
{% endif %}
<div class="text-content" {{ text_style|trim|raw }}>
{% include 'NCBSWBundle:Exposition:passage_text.html.twig' %}
</div>
{% for media_item in passage.media %}
{% include 'NCBSWBundle:Media:embed_iframe.html.twig' with {'embed_entity': media_item.embed} %}
{% endfor %}
</div>
{% include 'NCBSWBundle:Exposition:passage_links.html.twig' with {'link_position': '2'} %}
<span id="chapternav2"></span>
<script>
//setTimeout(checkOtherLang, 1000);
// Clone chapter nav from column 1
const originalSpan = document.getElementById("chapter_nav1");
if(originalSpan)
{
const clonedSpan = originalSpan.cloneNode(true);
document.getElementById("chapternav2").appendChild(clonedSpan);
}
function checkOtherLang()
{
var oIsOtherLang = document.getElementsByName("IsOtherLang");
var nLen = oIsOtherLang.length;
for(var i=0;i<nLen;i++)
{
if(oIsOtherLang[i].value == "1")
{
var oOtherLangLink = document.getElementsByName("OtherLangLink");
var nLen2 = oOtherLangLink.length;
for(var j=0;j<nLen2;j++)
{
oOtherLangLink[j].style.display = "";
}
break;
}
}
}
</script>
{% if translation is defined %}
<script>
sMsgNoSectionNum = "{{ app.session.get('ui_str')["exposition.passage.outofrange"]|replace({'_1000_': translation.translatedTitle})|raw }}";
</script>
{% endif %}