{#
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.



(¯`·._.·(¯`·._.·  Save/Load buttons  ·._.·´¯)·._.·´¯)

Display the buttons to load/save a survey.
There are many cases when those button are not shown:
via survey configuration, at start page, when survey is completed, etc
#}
{% if aSurveyInfo.aNavigator.load.show == "Y" %}
    <!-- Load unfinished survey button -->
    <li class="nav-item ls-no-js-hidden px-2" {{ aSurveyInfo.attr.loadlinksli }}>
        <a href="#" data-limesurvey-submit='{ "loadall":"loadall" }'
           class='nav-link ls-link-action ls-link-loadall'>
            {{ gT('Load unfinished survey') }}
        </a>
    </li>
{% endif %}

{% if aSurveyInfo.access_mode == "O" and aSurveyInfo.hastokenstable == true and not aSurveyInfo.filltoken %}
    <!-- Fill token button -->
    <li class="nav-item ls-no-js-hidden">
        <a href="{{ aSurveyInfo.surveyUrl }}?lang=en&filltoken=true"
            class="nav-link ls-link-action">
            {% if aSurveyInfo.allowregister == "Y" %}
                {{ gT("Register") }}
            {% else %}
                {{ gT("Enter access code") }}
            {% endif %}
        </a>
    </li>
{% endif %}

{% if aSurveyInfo.aNavigator.save.show == "Y" %}
    <!-- Resume later button -->
    <li class="nav-item ls-no-js-hidden">
        <a href="#" data-limesurvey-submit='{ "saveall":"saveall" }' class='nav-link'>
            {{ gT('Resume later') }}
        </a>
        {% if(aSurveyInfo.saved.text and aSurveyInfo.options.showpopups > 0) %}
            <div class="alert-popup"></div>
            {{ registerScript("saveflashmessage","
                $('.alert-popup').popover({
                    title: '" ~ aSurveyInfo.saved.title ~ "',
                    content: '<div>" ~ aSurveyInfo.saved.text ~ "</div>',
                    html: true,
                    container: 'body',
                    placement: 'bottom',
                    delay: { 'show': 500, 'hide': 100 },
                    trigger: 'click',
                }).popover('show');
                setTimeout(function(){ $('.alert-popup').popover('dispose'); }, 3500);
                ", "POS_POSTSCRIPT" ) }}
        {% endif %}
    </li>
{% endif %}

