mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
add table with data below chart
This commit is contained in:
parent
dda50a931a
commit
daf6ebe454
|
@ -228,6 +228,29 @@ $(document).ready( function() {
|
|||
<div id="chart" style="height: 400px;" class="chart"></div>
|
||||
<?php
|
||||
$this->contentContainerEnd();
|
||||
echo "<table class=\"table table-condensed table-hover\">";
|
||||
echo "<tr><th>".getMLText('chart_'.$type.'_title')."</th><th>".getMLText('total')."</th></tr>";
|
||||
$total = 0;
|
||||
switch($type) {
|
||||
case 'docspermonth':
|
||||
case 'docsperuser':
|
||||
case 'docspermimetype':
|
||||
case 'docspercategory':
|
||||
case 'docsperstatus':
|
||||
foreach($data as $item) {
|
||||
echo "<tr><td>".htmlspecialchars($item['key'])."</td><td>".$item['total']."</td></tr>";
|
||||
$total += $item['total'];
|
||||
}
|
||||
break;
|
||||
case 'docsaccumulated':
|
||||
foreach($data as $item) {
|
||||
echo "<tr><td>".date('Y-m-d', $item['key']/1000)."</td><td>".$item['total']."</td></tr>";
|
||||
$total += $item['total'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
echo "<tr><th></th><th>".$total."<th></tr>";
|
||||
echo "</table>";
|
||||
echo "</div>\n";
|
||||
|
||||
if(!in_array($type, array('docspermonth', 'docsaccumulated'))) {
|
||||
|
@ -245,4 +268,3 @@ $(document).ready( function() {
|
|||
$this->htmlEndPage();
|
||||
} /* }}} */
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user