Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: Converted php into twig for arrays/array/no_dropdown question type
- Loading branch information
1 parent
7beb995
commit 70c9ba3
Showing
12 changed files
with
135 additions
and
138 deletions.
There are no files selected for viewing
47 changes: 0 additions & 47 deletions
47
application/views/survey/questions/answer/arrays/array/no_dropdown/answer.php
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
application/views/survey/questions/answer/arrays/array/no_dropdown/answer.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,47 @@ | ||
{# | ||
/** | ||
* array array, no dropdown, Html | ||
* | ||
* @var $sColumns : the columns, generated with the view columns/col.php | ||
* @var $sHeaders : the headers, generated with the view rows/cell/thead.php | ||
* @var $sRows : the rows, generated with the view rows/answer_row.php | ||
* | ||
* @var $extraclass | ||
* | ||
*/ | ||
#} | ||
<!-- Array --> | ||
|
||
<!-- answer --> | ||
<table class="{{ coreClass }} table table-bordered table-hover table-array-radio" role="group" aria-labelledby="ls-question-text-{{ basename }}"> | ||
<colgroup class="col-responses"> | ||
<col class="col-answers" style='width: {{ answerwidth }}%;' /> | ||
|
||
{# columns/col.php #} | ||
{{sColumns }} | ||
|
||
</colgroup> | ||
<thead aria-hidden="true"> | ||
<tr class="ls-heading"> | ||
|
||
{# rows/cell/thead.php #} | ||
{{ sHeaders }} | ||
|
||
</tr> | ||
</thead> | ||
<tbody> | ||
{% if anscount==0 %} | ||
<tr> | ||
<th class="answertext"> | ||
{{ gT('Error: This question has no answers.') }} | ||
</th> | ||
</tr> | ||
{% endif %} | ||
|
||
{# rows/answer_row.php #} | ||
{{ sRows }} | ||
|
||
</tbody> | ||
</table> | ||
<!-- end of answer --> |
6 changes: 3 additions & 3 deletions
6
.../arrays/array/no_dropdown/columns/col.php → ...arrays/array/no_dropdown/columns/col.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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
<?php | ||
{# | ||
/** | ||
* Array, column | ||
* | ||
* @var $class | ||
* @var $cellwidth | ||
*/ | ||
?> | ||
#} | ||
|
||
<!-- col --> | ||
<col class="<?php echo $class; ?>" style='width: <?php echo $cellwidth;?>%'/> | ||
<col class="{{ class }}" style='width: {{ cellwidth }}%'/> | ||
<!-- end of col --> |
38 changes: 0 additions & 38 deletions
38
application/views/survey/questions/answer/arrays/array/no_dropdown/rows/answer_row.php
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
application/views/survey/questions/answer/arrays/array/no_dropdown/rows/answer_row.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,39 @@ | ||
{# | ||
/** | ||
* Generate a row for the table | ||
* | ||
* @var $answer_tds : the cells of each row, generated with the view rows/cells/*.php | ||
* @var $myfname | ||
* @var $answertext | ||
* @var $value | ||
* @var $right_exists | ||
* @var $answertextright | ||
*/ | ||
#} | ||
|
||
<!-- answer_row --> | ||
<tr id="javatbd{{ myfname }}" class="answers-list radio-list {% if odd %} ls-odd{% else %} ls-even{% endif %}{% | ||
if error %} ls-error-mandatory has-error{% endif %}" role="radiogroup" aria-labelledby="answertext{{ myfname }}"> | ||
<th id="answertext{{ myfname }}" class="answertext control-label{% if answerwidth==0 %} sr-only{% endif %}"> | ||
{{ answertext }} | ||
|
||
{# Value for expression manager javascript (use id) ; no need to submit #} | ||
{{ C.Html.hiddenField("java"~myfname,value,({ | ||
'id' : "java"~myfname, | ||
'disabled' : true, | ||
})) | ||
}} | ||
</th> | ||
|
||
{# Defined in answer_td view #} | ||
{{ answer_tds }} | ||
|
||
{% if right_exists %} | ||
<th class='answertextright information-item{% if answerwidth==0 %} sr-only{% endif %}'>{{ answertextright }}</th> | ||
{% endif %} | ||
|
||
{# No answer should come after right text at bipolar question #} | ||
{{ no_answer_td }} | ||
|
||
</tr> | ||
<!-- end of answer_row --> |
26 changes: 0 additions & 26 deletions
26
application/views/survey/questions/answer/arrays/array/no_dropdown/rows/cells/answer_td.php
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
application/views/survey/questions/answer/arrays/array/no_dropdown/rows/cells/answer_td.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 @@ | ||
{# | ||
/** | ||
* Array, no drop down | ||
* @var $label | ||
* @var $ld | ||
* @var $myfname | ||
* @var $ld | ||
* @var $CHECKED | ||
* @var $checkconditionFunction | ||
*/ | ||
#} | ||
|
||
<!-- answer_td --> | ||
<td class="answer_cell_{{ ld }}{% if ld=="" %} noanswer-item{% endif %} answer-item radio-item"> | ||
<input | ||
type="radio" | ||
name="{{ myfname }}" | ||
value="{{ ld }}" | ||
id="answer{{ myfname }}-{{ ld }}" | ||
{{ CHECKED }} | ||
/> | ||
<label for="answer{{ myfname }}-{{ ld }}" class="ls-label-xs-visibility"> | ||
{{ label }} | ||
</label> | ||
</td> | ||
<!-- end of answer_td --> |
10 changes: 0 additions & 10 deletions
10
...ation/views/survey/questions/answer/arrays/array/no_dropdown/rows/cells/header_answer.php
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
...tion/views/survey/questions/answer/arrays/array/no_dropdown/rows/cells/header_answer.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,8 @@ | ||
{# | ||
/** | ||
* Array header : answer or sub question | ||
* @var $class | ||
* @var $content | ||
*/ | ||
#} | ||
{{ doRender('/survey/questions/answer/global/table/cell/head_header', ({'class':class,'content':content})) }} |
11 changes: 0 additions & 11 deletions
11
.../views/survey/questions/answer/arrays/array/no_dropdown/rows/cells/header_information.php
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
...views/survey/questions/answer/arrays/array/no_dropdown/rows/cells/header_information.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,9 @@ | ||
{# | ||
/** | ||
* Array header : informationnal item | ||
* @var $class | ||
* @var $content | ||
*/ | ||
#} | ||
|
||
{{ doRender('/survey/questions/answer/global/table/cell/head_information', ({'class':class,'content':content})) }} |
6 changes: 3 additions & 3 deletions
6
.../array/no_dropdown/rows/repeat_header.php → ...array/no_dropdown/rows/repeat_header.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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<?php | ||
{# | ||
/** | ||
* This view is used to repeat the headers of the table (question advanced attribute) | ||
* | ||
* @var $sHeaders | ||
*/ | ||
?> | ||
#} | ||
<!-- repeat_header no drop down --> | ||
</tbody> | ||
|
||
<tbody> | ||
<tr class="ls-heading ls-heading-repeat hidden-xs" aria-hidden="true"> | ||
<?php echo $sHeaders; ?> | ||
{{ sHeaders }} | ||
</tr> | ||
<!-- end of repeat_header --> |