Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: added views for statistic rendering
- Loading branch information
LouisGac
committed
Dec 18, 2015
1 parent
24740cd
commit 30b1e77
Showing
4 changed files
with
203 additions
and
47 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
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
97 changes: 97 additions & 0 deletions
97
application/views/admin/export/generatestats/_statisticsoutput_answer.php
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,97 @@ | ||
<?php | ||
/** | ||
* This view render the list of answers in top of the graph | ||
* | ||
* @var $label | ||
* @var $grawdata | ||
* @var $gdata | ||
* @var $i | ||
* @var $extraline | ||
* @var $sColumnNameForView | ||
* potentialy not set when controller will try to load them in $aData (so will need defaut values) | ||
* @var $aggregated | ||
* @var $aggregatedPercentage | ||
* @var $sumitems | ||
* @var $sumpercentage | ||
* @var $TotalCompleted | ||
* @var $casepercentage | ||
*/ | ||
?> | ||
|
||
<tr> | ||
<td align='center' ><?php echo $label[$i]; ?></td> | ||
<td align='center' ><?php echo $grawdata[$i]; ?></td> | ||
|
||
<?php if ($gdata[$i] === "N/A"): ?> | ||
<td align='center' > | ||
<?php echo sprintf("%01.2f", $gdata[$i]); ?>% | ||
</td> | ||
<?php else: ?> | ||
<?php if($aggregated):?> | ||
<td align='center' > | ||
<?php echo sprintf("%01.2f", $gdata[$i]); ?>% | ||
</td> | ||
<td align='center' > | ||
<?php echo sprintf("%01.2f", $aggregatedPercentage); ?>% | ||
</td> | ||
<td align='center'> | ||
<strong> | ||
<?php eT("Sum");?> <?php eT("Answers"); ?> | ||
</strong> | ||
</td> | ||
<td align='center'> | ||
<strong> | ||
<?php echo $sumitems; ?> | ||
</strong> | ||
</td> | ||
<td align='center'> | ||
<strong> | ||
<?php echo $sumpercentage; ?>% | ||
</strong> | ||
</td> | ||
<td align='center'> | ||
<strong> | ||
<?php echo $sumpercentage; ?>% | ||
</strong> | ||
</td> | ||
<?php else: ?> | ||
<td align='center' > | ||
<?php echo sprintf("%01.2f", $gdata[$i]);?>% | ||
</td> | ||
<?php endif;?> | ||
<?php endif;?> | ||
</tr> | ||
|
||
<?php if ($gdata[$i] != "N/A"): ?> | ||
<?php if($aggregated): ?> | ||
<tr> | ||
<td align='center'> | ||
<strong> | ||
<?php eT("Number of cases");?> | ||
</strong> | ||
</td> | ||
<td align='center'> | ||
<strong> | ||
<?php echo $TotalCompleted; ?> | ||
</strong> | ||
</td> | ||
<td align='center'> | ||
<strong> | ||
<?php echo $casepercentage; ?>% | ||
</strong> | ||
</td> | ||
<td align='center'> | ||
| ||
</td> | ||
</tr> | ||
<?php endif; ?> | ||
<?php endif; ?> | ||
|
||
|
||
<?php if($extraline): ?> | ||
<tr> | ||
<td class='statisticsbrowsecolumn' colspan='3' style='display: none'> | ||
<div class='statisticsbrowsecolumn' id='columnlist_<?php echo $sColumnNameForView; ?>'> | ||
</td> | ||
</tr> | ||
<?php endif; ?> |
Oops, something went wrong.