mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
show difference in number of documents on chart page
This commit is contained in:
parent
899d89a2a9
commit
37d3577603
|
@ -10,6 +10,7 @@
|
|||
mismatch
|
||||
- overhaul notifications, type of receiver is now passed to notification
|
||||
service which allows a more fine grained filtering
|
||||
- show difference in number of documents on chart page
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.21
|
||||
|
|
|
@ -227,7 +227,11 @@ $(document).ready( function() {
|
|||
<?php
|
||||
$this->contentContainerEnd();
|
||||
echo "<table class=\"table table-condensed table-hover\">";
|
||||
echo "<tr><th>".getMLText('chart_'.$type.'_title')."</th><th>".getMLText('total')."</th></tr>";
|
||||
echo "<tr>";
|
||||
echo "<th>".getMLText('chart_'.$type.'_title')."</th><th>".getMLText('total')."</th>";
|
||||
if(in_array($type, array('docspermonth', 'docsaccumulated')))
|
||||
echo "<th></th>";
|
||||
echo "</tr>";
|
||||
$total = 0;
|
||||
switch($type) {
|
||||
case 'docspermonth':
|
||||
|
@ -235,15 +239,28 @@ $(document).ready( function() {
|
|||
case 'docspermimetype':
|
||||
case 'docspercategory':
|
||||
case 'docsperstatus':
|
||||
$oldtotal = 0;
|
||||
foreach($data as $item) {
|
||||
echo "<tr><td>".htmlspecialchars($item['key'])."</td><td>".$item['total']."</td></tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>".htmlspecialchars($item['key'])."</td>";
|
||||
echo "<td>".$item['total']."</td>";
|
||||
if(in_array($type, array('docspermonth')))
|
||||
echo "<td>".sprintf('%+d', $item['total']-$oldtotal)."</td>";
|
||||
echo "</tr>";
|
||||
$oldtotal = $item['total'];
|
||||
$total += $item['total'];
|
||||
}
|
||||
echo "<tr><th></th><th>".$total."<th></tr>";
|
||||
break;
|
||||
case 'docsaccumulated':
|
||||
$oldtotal = 0;
|
||||
foreach($data as $item) {
|
||||
echo "<tr><td>".date('Y-m-d', $item['key']/1000)."</td><td>".$item['total']."</td></tr>";
|
||||
echo "<tr>";
|
||||
echo "<td>".getReadableDate($item['key']/1000)."</td>";
|
||||
echo "<td>".$item['total']."</td>";
|
||||
echo "<td>".sprintf('%+d', $item['total']-$oldtotal)."</td>";
|
||||
echo "</tr>";
|
||||
$oldtotal = $item['total'];
|
||||
$total += $item['total'];
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user