forked from hschottm/survey_ce
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from pdir/bugfix_and_reference-db
Bugfix and reference db
- Loading branch information
Showing
15 changed files
with
710 additions
and
224 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{php,yml}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{css,scss,js,twig,html5}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.{html5,svg,min.css,min.js}] | ||
insert_final_newline = false |
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
84 changes: 49 additions & 35 deletions
84
src/Resources/contao/templates/backend/be_survey_result_cumulated.html5
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,47 +1,61 @@ | ||
<div id="tl_buttons"> | ||
<a href="<?php echo $this->hrefBack; ?>" class="header_back" title="<?php echo $this->back; ?>" accesskey="b" onclick="Backend.getScrollOffset();"><?php echo $this->back; ?></a> | ||
<a href="<?php echo $this->hrefExport; ?>" class="header_export" title="<?php echo $this->export; ?>" onclick="Backend.getScrollOffset();"><?php echo $this->export; ?></a> | ||
<a href="<?php echo $this->hrefBack; ?>" class="header_back" title="<?php echo $this->back; ?>" accesskey="b" | ||
onclick="Backend.getScrollOffset();"><?php echo $this->back; ?></a> | ||
<a href="<?php echo $this->hrefExport; ?>" class="header_export" title="<?php echo $this->export; ?>" | ||
onclick="Backend.getScrollOffset();"><?php echo $this->export; ?></a> | ||
</div> | ||
|
||
<?php if (!empty($this->categories)): ?> | ||
<div class="tl_survey_results_categories"> | ||
<h2 class="sub_headline"><?= ($GLOBALS['TL_LANG']['tl_survey_result']['BE']['categoryResults'] ?? 'Categories') ?></h2> | ||
<div class="tl_survey_results_categories"> | ||
<h2 | ||
class="sub_headline"><?= ($GLOBALS['TL_LANG']['tl_survey_result']['BE']['categoryResults'] ?? 'Categories') ?></h2> | ||
|
||
<table class="tl_cumulated multiplechoice"> | ||
<thead> | ||
<tr> | ||
<th colspan="2"><?= ($GLOBALS['TL_LANG']['tl_survey_result']['BE']['category'] ?? 'Category') ?></th> | ||
<th><?= ($GLOBALS['TL_LANG']['tl_survey_result']['BE']['percent'] ?? 'Percent') ?></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php $counter = 1; ?> | ||
<?php foreach ($this->categories as $id => $category): ?> | ||
<tr> | ||
<td class="counter"><?php echo $counter; ?>.</td> | ||
<td class="answer"><?php echo $category['name']; ?></td> | ||
<td class="selections"><?php echo $category['percent']; ?>%</td> | ||
</tr> | ||
<?php $counter++; ?> | ||
<?php endforeach; ?> | ||
</tbody> | ||
</table> | ||
<table class="tl_cumulated multiplechoice"> | ||
<thead> | ||
<tr> | ||
<th colspan="2"><?= ($GLOBALS['TL_LANG']['tl_survey_result']['BE']['category'] ?? 'Category') ?></th> | ||
<th><?= ($GLOBALS['TL_LANG']['tl_survey_result']['BE']['percent'] ?? 'Percent') ?></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php $counter = 1; ?> | ||
<?php foreach ($this->categories as $id => $category): ?> | ||
<tr> | ||
<td class="counter"><?php echo $counter; ?>.</td> | ||
<td class="answer"><?php echo $category['name']; ?></td> | ||
<td class="selections"><?php echo $category['percent']; ?>%</td> | ||
</tr> | ||
<?php $counter++; ?> | ||
<?php endforeach; ?> | ||
</tbody> | ||
</table> | ||
|
||
|
||
</div> | ||
</div> | ||
<?php endif; ?> | ||
|
||
<div class="tl_survey_results_cumulated"> | ||
<div class="tl_listing_container"> | ||
<h2><?php echo $this->heading; ?></h2> | ||
<table cellpadding="0" cellspacing="0" class="tl_listing" summary="<?php echo $this->summary; ?>"> | ||
<?php foreach ($this->data as $data): ?> | ||
<tr onmouseover="Theme.hoverRow(this, 1);" onmouseout="Theme.hoverRow(this, 0);"> | ||
<td class="tl_file_list"><div class="questionheader"><span class="questionnumber"><?php echo $data["number"] ?>.</span> <span class="questiontitle"><?php echo $data["title"] ?></span> <span class="questiontype">[<?php echo $data["type"] ?>]</span></div><div class="statdata"><div><?php echo $this->lngAnswered ?>: <?php echo $data["answered"] ?></div><div><?php echo $this->lngSkipped; ?>: <?php echo $data["skipped"] ?></div></div></td> | ||
<td class="tl_file_list tl_right_nowrap"><a href="<?php echo $data["hrefdetails"] ?>" title="<?php echo $data["titledetails"] ?>"><img src="<?php echo $this->imgdetails; ?>" width="16" height="16" alt="<?php echo $data["titledetails"] ?>" /></a> </td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</table> | ||
</div> | ||
<div class="tl_listing_container"> | ||
<h2><?php echo $this->heading; ?></h2> | ||
<table cellpadding="0" cellspacing="0" class="tl_listing"> | ||
<details noflow><?php echo $this->summary; ?></details> | ||
<?php foreach ($this->data as $data): ?> | ||
<tr onmouseover="Theme.hoverRow(this, 1);" onmouseout="Theme.hoverRow(this, 0);"> | ||
<td class="tl_file_list"> | ||
<div class="questionheader"><span class="questionnumber"><?php echo $data["number"] ?>.</span> <span | ||
class="questiontitle"><?php echo $data["title"] ?></span> <span | ||
class="questiontype">[<?php echo $data["type"] ?>]</span></div> | ||
<div class="statdata"> | ||
<div><?php echo $this->lngAnswered ?>: <?php echo $data["answered"] ?></div> | ||
<div><?php echo $this->lngSkipped; ?>: <?php echo $data["skipped"] ?></div> | ||
</div> | ||
</td> | ||
<td class="tl_file_list tl_right_nowrap"><a href="<?php echo $data[" hrefdetails"] ?>" | ||
title="<?php echo $data["titledetails"] ?>"><img src="<?php echo $this->imgdetails; ?>" width="16" height="16" | ||
alt="<?php echo $data[" titledetails"] ?>" /></a> </td> | ||
</tr> | ||
<?php endforeach; ?> | ||
</table> | ||
</div> | ||
</div> | ||
|
39 changes: 20 additions & 19 deletions
39
src/Resources/contao/templates/survey/survey_answers_constantsum.html5
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,24 +1,25 @@ | ||
<?php $counter = 1; ?> | ||
<?php foreach ($this->choices as $id => $choice): ?> | ||
<h3><?php echo $counter; ?>. <?php echo $choice; ?></h3> | ||
<table class="tl_cumulated constantsum" summary="<?php echo $this->summary; ?>"> | ||
<thead> | ||
<tr> | ||
<th colspan="2"><?php echo $this->answer; ?></th> | ||
<th><?php echo $this->nrOfSelections; ?></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php $linecounter = 1; ?> | ||
<?php foreach ($this->cumulated[$counter] as $answervalue => $nrOfAnswers): ?> | ||
<tr> | ||
<td class="counter"><?php echo $linecounter; ?>.</td> | ||
<td class="answer"><?php echo $answervalue; ?></td> | ||
<td class="selections"><?php echo (($nrOfAnswers) ? $nrOfAnswers : 0); ?></td> | ||
</tr> | ||
<?php $linecounter++; ?> | ||
<?php endforeach; ?> | ||
<?php $counter++; ?> | ||
</tbody> | ||
<table class="tl_cumulated constantsum"> | ||
<details noflow><?php echo $this->summary; ?></details> | ||
<thead> | ||
<tr> | ||
<th colspan="2"><?php echo $this->answer; ?></th> | ||
<th><?php echo $this->nrOfSelections; ?></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php $linecounter = 1; ?> | ||
<?php foreach ($this->cumulated[$counter] as $answervalue => $nrOfAnswers): ?> | ||
<tr> | ||
<td class="counter"><?php echo $linecounter; ?>.</td> | ||
<td class="answer"><?php echo $answervalue; ?></td> | ||
<td class="selections"><?php echo (($nrOfAnswers) ? $nrOfAnswers : 0); ?></td> | ||
</tr> | ||
<?php $linecounter++; ?> | ||
<?php endforeach; ?> | ||
<?php $counter++; ?> | ||
</tbody> | ||
</table> | ||
<?php endforeach; ?> |
Oops, something went wrong.