{#
    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="{{ aSurveyInfo.class.loadlinksli }}" {{ aSurveyInfo.attr.loadlinksli }}>
        <a href="#" data-limesurvey-submit='{ "loadall":"loadall" }' class='{{ aSurveyInfo.class.loadlinkslia }} animate' {{ aSurveyInfo.attr.loadlinkslia }}>
            {{ gT('Load unfinished survey') }}
        </a>
    </li>
{% endif %}

{% if aSurveyInfo.aNavigator.save.show == "Y" %}
    <!-- Resume later button -->
    <li class="{{ aSurveyInfo.class.savelinksli }}" {{ aSurveyInfo.attr.savelinksli }}>
        <a href="#" data-limesurvey-submit='{ "saveall":"saveall" }' class='{{ aSurveyInfo.class.savelinkslia }} animate'>
            {{ 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('destroy'); }, 3500);
                ", "POS_POSTSCRIPT" ) }}
        {% endif %}
    </li>
{% endif %}
