From 37d3577603262591b479756ec2e1b22f0d511890 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 31 Jan 2021 13:48:25 +0100 Subject: [PATCH] show difference in number of documents on chart page --- CHANGELOG | 1 + views/bootstrap/class.Charts.php | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7832181d9..77929f9a9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/views/bootstrap/class.Charts.php b/views/bootstrap/class.Charts.php index de8c3be69..afe106741 100644 --- a/views/bootstrap/class.Charts.php +++ b/views/bootstrap/class.Charts.php @@ -227,7 +227,11 @@ $(document).ready( function() { contentContainerEnd(); echo ""; - echo ""; + echo ""; + echo ""; + if(in_array($type, array('docspermonth', 'docsaccumulated'))) + echo ""; + echo ""; $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 ""; + echo ""; + echo ""; + echo ""; + if(in_array($type, array('docspermonth'))) + echo ""; + echo ""; + $oldtotal = $item['total']; $total += $item['total']; } echo ""; break; case 'docsaccumulated': + $oldtotal = 0; foreach($data as $item) { - echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + $oldtotal = $item['total']; $total += $item['total']; } break;
".getMLText('chart_'.$type.'_title')."".getMLText('total')."
".getMLText('chart_'.$type.'_title')."".getMLText('total')."
".htmlspecialchars($item['key'])."".$item['total']."
".htmlspecialchars($item['key'])."".$item['total']."".sprintf('%+d', $item['total']-$oldtotal)."
".$total."
".date('Y-m-d', $item['key']/1000)."".$item['total']."
".getReadableDate($item['key']/1000)."".$item['total']."".sprintf('%+d', $item['total']-$oldtotal)."