Skip to content

Commit

Permalink
Fixed issue #11534: right align statistic columns
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Aug 24, 2016
1 parent 0d5e35c commit 66f8e67
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions application/helpers/admin/statistics_helper.php
Expand Up @@ -899,10 +899,10 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,
$statisticsoutput .= "\n<table class='statisticstable table table-bordered >\n"
."\t<thead><tr class='success'><th style='text-align: center; '><strong>".sprintf(gT("Field summary for %s"),$qtitle).":</strong>"
."</th></tr>\n"
."\t<tr><th colspan='2' align='center'><strong>$qquestion</strong></th></tr>\n"
."\t<tr>\n\t\t<th width='50%' align='center' ><strong>"
."\t<tr><th colspan='2' align='right'><strong>$qquestion</strong></th></tr>\n"
."\t<tr>\n\t\t<th width='50%' align='right' ><strong>"
.gT("Calculation")."</strong></th>\n"
."\t\t<th width='50%' align='center' ><strong>"
."\t\t<th width='50%' align='right' ><strong>"
.gT("Result")."</strong></th>\n"
."\t</tr></thead>\n";

Expand Down Expand Up @@ -979,12 +979,12 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,
case 'html':

$statisticsoutput .= "\n<table class='statisticstable table table-bordered' >\n"
."\t<thead><tr class='success'><th colspan='2' align='center' class='success'><strong>".sprintf(gT("Field summary for %s"),$qtitle).":</strong>"
."\t<thead><tr class='success'><th colspan='2' align='right' class='success'><strong>".sprintf(gT("Field summary for %s"),$qtitle).":</strong>"
."</th></tr>\n"
."\t<tr><th colspan='2' align='center'><strong>$qquestion</strong></th></tr>\n"
."\t<tr>\n\t\t<th width='50%' align='center' ><strong>"
."\t<tr><th colspan='2' align='right'><strong>$qquestion</strong></th></tr>\n"
."\t<tr>\n\t\t<th width='50%' align='right' ><strong>"
.gT("Calculation")."</strong></th>\n"
."\t\t<th width='50%' align='center' ><strong>"
."\t\t<th width='50%' align='right' ><strong>"
.gT("Result")."</strong></th>\n"
."\t</tr></thead>\n";

Expand Down Expand Up @@ -1113,8 +1113,8 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,
case 'html':

$statisticsoutput .= "\t<tr>\n"
."\t\t<td align='center' >$shw[0]</td>\n"
."\t\t<td align='center' >$shw[1]</td>\n"
."\t\t<td align='right' >$shw[0]</td>\n"
."\t\t<td align='right' >$shw[1]</td>\n"
."\t</tr>\n";

break;
Expand Down Expand Up @@ -1154,7 +1154,7 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,

//footer of question type "N"
$statisticsoutput .= "\t<tr class='info'>\n"
."\t\t<td colspan='4' align='center'>\n"
."\t\t<td colspan='4' align='right'>\n"
."\t\t\t<font size='1'>".gT("Null values are ignored in calculations")."<br />\n"
."\t\t\t".sprintf(gT("Q1 and Q3 calculated using %s"), "<a href='http://mathforum.org/library/drmath/view/60969.html' target='_blank'>".gT("minitab method")."</a>")
."</font>\n"
Expand All @@ -1163,7 +1163,7 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,
if($browse)
{
$statisticsoutput .= "\t<tr>\n"
."\t\t<td align='center' colspan='4'>
."\t\t<td align='right' colspan='4'>
<input type='button' class='statisticsbrowsebutton numericalbrowse btn btn-default btn-large' value='"
.gT("Browse")."' id='$fieldname' /></td>\n</tr>";
$statisticsoutput .= "<tr><td class='statisticsbrowsecolumn' colspan='3' style='display: none'>
Expand Down Expand Up @@ -1205,7 +1205,7 @@ protected function buildOutputList($rt, $language, $surveyid, $outputType, $sql,

//output
$statisticsoutput .= "\t<tr>\n"
."\t\t<td align='center' colspan='4'>".gT("Not enough values for calculation")."</td>\n"
."\t\t<td align='right' colspan='4'>".gT("Not enough values for calculation")."</td>\n"
."\t</tr>\n</table><br />\n";

break;
Expand Down
Expand Up @@ -20,12 +20,12 @@

<!-- _statisticsoutput_answer -->
<tr>
<td align='center' ><?php echo $label[$i]; ?></td>
<td align='center' ><?php echo $grawdata[$i]; ?></td>
<td align='right' ><?php echo $label[$i]; ?></td>
<td align='right' ><?php echo $grawdata[$i]; ?></td>

<?php if ($bNAgData): ?>

<td align='center' >
<td align='right' >
<?php echo sprintf("%01.2f", $gdata[$i]); ?>%
</td>

Expand All @@ -34,11 +34,11 @@
<?php endif;?>

<?php if ($showAggregatedPercentage):?>
<td align='center' >
<td align='right' >
<?php echo sprintf("%01.2f", $aggregatedPercentage); ?>%
</td>
<?php elseif($showEmptyAggregatedPercentage):?>
<td align='center' >
<td align='right' >
&nbsp;
</td>
<?php endif;?>
Expand All @@ -48,22 +48,22 @@

<?php if ($bShowSumAnswer ):?>
<tr>
<td align='center'>
<td align='right'>
<strong>
<?php eT("Sum");?>(<?php eT("Answers"); ?>)
</strong>
</td>
<td align='center'>
<td align='right'>
<strong>
<?php echo $sumitems; ?>
</strong>
</td>
<td align='center'>
<td align='right'>
<strong>
<?php echo $sumpercentage; ?>%
</strong>
</td>
<td align='center'>
<td align='right'>
<strong>
<?php echo $sumpercentage; ?>%
</strong>
Expand Down

0 comments on commit 66f8e67

Please sign in to comment.