Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Dev: added more subviews for group rendering in Vanilla
- Loading branch information
LouisGac
committed
Dec 1, 2017
1 parent
a294908
commit 0e91e39
Showing
5 changed files
with
101 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
themes/survey/vanilla/views/subviews/survey/group_subviews/group_container.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{# | ||
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. | ||
(¯`·._.·(¯`·._.· Group Container ·._.·´¯)·._.·´¯) | ||
The container div itself could often change from a template to another, so we clearly separate it. | ||
NOTE: see views/subviews/survey/group.twig comments for more infos | ||
#} | ||
|
||
<div class="{{ aSurveyInfo.class.groupcontainer }} space-col" {{ aSurveyInfo.attr.groupcontainer }}> | ||
|
||
{# Group Name #} | ||
{{ include('./subviews/survey/group_subviews/group_name.twig') }} | ||
|
||
{# Group Description #} | ||
{{ include('./subviews/survey/group_subviews/group_desc.twig') }} | ||
|
||
{# | ||
PRESENT THE QUESTIONS | ||
This is the main part. It will render each question for this group | ||
#} | ||
|
||
<!-- PRESENT THE QUESTIONS --> | ||
{% for aQuestion in aGroup.aQuestions %} | ||
{{ include('./subviews/survey/question_container.twig') }} | ||
{% endfor %} | ||
|
||
<!-- Hidden inputs --> | ||
{% if aGroup.show_last_group == true %} | ||
<input type='hidden' name='lastgroup' value='{{ aGroup.lastgroup }}' id='lastgroup' /> | ||
{% endif %} | ||
|
||
{% if aGroup.show_last_answer == true %} | ||
<input type='hidden' name='lastanswer' value='{{ aGroup.lastanswer }}' id='lastanswer' /> | ||
{% endif %} | ||
</div> |
26 changes: 26 additions & 0 deletions
26
themes/survey/vanilla/views/subviews/survey/group_subviews/group_desc.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{# | ||
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. | ||
(¯`·._.·(¯`·._.· Group Name ·._.·´¯)·._.·´¯) | ||
Presentation of the group description | ||
NOTE: see views/subviews/survey/group.twig comments for more infos | ||
#} | ||
|
||
{% if aGroup.description != '' %} | ||
<!-- Group description --> | ||
<div class="{{ aSurveyInfo.class.groupdesc }} row well space-col" {{ aSurveyInfo.attr.groupdesc }}> | ||
{{ aGroup.description }} | ||
</div> | ||
{% endif %} |
24 changes: 24 additions & 0 deletions
24
themes/survey/vanilla/views/subviews/survey/group_subviews/group_name.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{# | ||
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. | ||
(¯`·._.·(¯`·._.· Group Name ·._.·´¯)·._.·´¯) | ||
Presentation of the group name | ||
NOTE: see views/subviews/survey/group.twig comments for more infos | ||
#} | ||
|
||
<!-- Group Name --> | ||
<div class="{{ aSurveyInfo.class.grouptitle }} text-center h3 space-col" {{ aSurveyInfo.attr.grouptitle }}> | ||
{{ aGroup.name }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters