/
progess_bar.twig
34 lines (29 loc) · 1.57 KB
/
progess_bar.twig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{#
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.
(¯`·._.·(¯`·._.· Top Container·._.·´¯)·._.·´¯)
This file generate the top container: it's above the form it self, and contains the progress bar.
The progress bar is a Bootstrap progress bar.
@see: http://getbootstrap.com/components/#progress
#}
<!-- Top container -->
<div class="top-container">
<div class="container top-content">
{% if aSurveyInfo.format != 'A' and aSurveyInfo.showprogress is defined and aSurveyInfo.showprogress == 'Y' %}
{{ registerPublicCssFile('lime-progress.css') }}
{% set progressValue = ( aSurveyInfo.progress.total > 0 ) ? intval( (aSurveyInfo.progress.currentstep - 1) / aSurveyInfo.progress.total * 100 ) : 0 %}
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="{{ progressValue }}" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: {{ progressValue }}%;">
{{ progressValue }}%
</div>
</div>
{% endif %}
</div> <!-- must hide it without javascript -->
</div>