Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2021-01-31 13:48:42 +01:00
commit aaa40c6075
2 changed files with 21 additions and 3 deletions

View File

@ -200,6 +200,7 @@
mismatch mismatch
- overhaul notifications, type of receiver is now passed to notification - overhaul notifications, type of receiver is now passed to notification
service which allows a more fine grained filtering service which allows a more fine grained filtering
- show difference in number of documents on chart page
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 5.1.21 Changes in version 5.1.21

View File

@ -227,7 +227,11 @@ $(document).ready( function() {
<?php <?php
$this->contentContainerEnd(); $this->contentContainerEnd();
echo "<table class=\"table table-condensed table-hover\">"; 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; $total = 0;
switch($type) { switch($type) {
case 'docspermonth': case 'docspermonth':
@ -235,15 +239,28 @@ $(document).ready( function() {
case 'docspermimetype': case 'docspermimetype':
case 'docspercategory': case 'docspercategory':
case 'docsperstatus': case 'docsperstatus':
$oldtotal = 0;
foreach($data as $item) { 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']; $total += $item['total'];
} }
echo "<tr><th></th><th>".$total."<th></tr>"; echo "<tr><th></th><th>".$total."<th></tr>";
break; break;
case 'docsaccumulated': case 'docsaccumulated':
$oldtotal = 0;
foreach($data as $item) { 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']; $total += $item['total'];
} }
break; break;