2026-06-17 10:06:07 +02:00
|
|
|
{#
|
|
|
|
|
LimeSurvey
|
|
|
|
|
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
|
|
|
|
|
All rights reserved.
|
|
|
|
|
License: GNU/GPL License v2 or later, see LICENSE.php
|
|
|
|
|
LimeSurvey is free software. This version may have been modified pursuant
|
|
|
|
|
to the GNU General Public License, and as distributed it includes or
|
|
|
|
|
is derivative of works licensed under the GNU General Public License or
|
|
|
|
|
other free or open source software licenses.
|
|
|
|
|
See COPYRIGHT.php for copyright notices and details.
|
|
|
|
|
|
|
|
|
|
(¯`·._.·(¯`·._.· Bootstrap Navigation Bar ·._.·´¯)·._.·´¯)
|
|
|
|
|
|
|
|
|
|
This file renders a typical bootstrap navigation bar.
|
|
|
|
|
See: https://getbootstrap.com/components/#navbar
|
|
|
|
|
|
|
|
|
|
For the survey navigator ("Next", "Back", etc.), see: navigation/navigator.twig
|
|
|
|
|
#}
|
|
|
|
|
{% if not aSurveyInfo.popupPreview %}
|
|
|
|
|
{% set navClass = "navbar-light bg-light" %}
|
|
|
|
|
{% if( aSurveyInfo.template == "bootswatch") %}
|
|
|
|
|
{% set navClass = "navbar-default bg-primary" %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
<!-- Bootstrap Navigation Bar -->
|
|
|
|
|
{# ShowMenu used for navbar-toggler and navbar-collapse #}
|
|
|
|
|
{% set ShowMenu = (aSurveyInfo.aNavigator.load.show == "Y" or aSurveyInfo.aNavigator.save.show == "Y")
|
|
|
|
|
or ((aSurveyInfo.bShowClearAll == true or aSurveyInfo.bShowClearAll == null) and aSurveyInfo.options.showclearall == 'on')
|
|
|
|
|
or (aSurveyInfo.aQuestionIndex.bShow == true and aSurveyInfo.format != 'A')
|
|
|
|
|
or (aSurveyInfo.alanguageChanger.show)
|
|
|
|
|
%}
|
2026-11-16 19:51:19 +01:00
|
|
|
{% set showRightLogo = (aSurveyInfo.options.rightlogo == "on" and imageSrc(aSurveyInfo.options.rightlogofile)) %}
|
2026-06-17 10:06:07 +02:00
|
|
|
<div id="survey-nav" class="navbar {{ navClass }} navbar-expand-md fixed-top border-bottom pt-0 pb-0">
|
2026-11-16 19:51:19 +01:00
|
|
|
<div class="container-fluid d-flex align-items-center">
|
2026-06-17 10:06:07 +02:00
|
|
|
{% if ShowMenu %}
|
|
|
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar"
|
|
|
|
|
aria-controls="small-screens-menus" aria-expanded="false">
|
|
|
|
|
<span class="visually-hidden-focusable">{{ gT("Tools") }}</span>
|
|
|
|
|
<span class="navbar-toggler-icon" aria-hidden="true"></span>
|
|
|
|
|
</button>
|
|
|
|
|
{% endif %}
|
2026-11-16 19:51:19 +01:00
|
|
|
{# Left logo #}
|
|
|
|
|
{% if( aSurveyInfo.options.brandlogo == "on" and imageSrc(aSurveyInfo.options.brandlogofile)) %}
|
|
|
|
|
<div class="navbar-brand logo-container logo-left d-none d-md-block">
|
2026-06-17 10:06:07 +02:00
|
|
|
{{ image(aSurveyInfo.options.brandlogofile, aSurveyInfo.name, {"class": "logo img-fluid"}) }}
|
|
|
|
|
</div>
|
|
|
|
|
{% else %}
|
2026-11-16 19:51:19 +01:00
|
|
|
<div class="navbar-brand logo-left">
|
2026-06-17 10:06:07 +02:00
|
|
|
{{ aSurveyInfo.name }}
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
2026-11-16 19:51:19 +01:00
|
|
|
{# Center logo (absolutely centered via CSS, see sass/plain.sass) #}
|
|
|
|
|
{% if( aSurveyInfo.options.centerlogo == "on" and imageSrc(aSurveyInfo.options.centerlogofile)) %}
|
|
|
|
|
<div class="navbar-brand logo-container logo-center d-none d-md-block">
|
|
|
|
|
{{ image(aSurveyInfo.options.centerlogofile, aSurveyInfo.name, {"class": "logo img-fluid"}) }}
|
2026-06-17 10:06:07 +02:00
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if ShowMenu %}
|
2026-11-16 19:51:19 +01:00
|
|
|
<div id="navbar" class="collapse navbar-collapse navbar-nav-scroll pt-2 {{ showRightLogo ? "" : "ms-auto" }}">
|
|
|
|
|
<ul class="nav navbar-nav navbar-action-link navbar-right">
|
2026-06-17 10:06:07 +02:00
|
|
|
{{ include('./subviews/navigation/save_links.twig') }}
|
|
|
|
|
{{ include('./subviews/navigation/clearall_links.twig') }}
|
|
|
|
|
{{ include('./subviews/navigation/question_index_menu.twig') }}
|
|
|
|
|
{{ include('./subviews/navigation/language_changer_top_menu.twig') }}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
2026-11-16 19:51:19 +01:00
|
|
|
{# Right logo #}
|
|
|
|
|
{% if showRightLogo %}
|
|
|
|
|
<div class="navbar-brand logo-container logo-right d-none d-md-block ms-auto">
|
|
|
|
|
{{ image(aSurveyInfo.options.rightlogofile, aSurveyInfo.name, {"class": "logo img-fluid"}) }}
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
2026-06-17 10:06:07 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|