From 5e93bea2fdc651cf694f0b725520a079a12aa6c4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 17 Jan 2017 18:31:44 +0100 Subject: [PATCH] show status of reception if document is owned by current user --- views/bootstrap/class.Bootstrap.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 52363192d..849e64340 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2154,6 +2154,23 @@ $(document).ready( function() { } else { $content .= getOverallStatusText($status["status"]); } + if($owner->getID() == $user->getID() && $receiptStatus = $latestContent->getReceiptStatus()) { + $rstat = array('-1'=>0, '0'=>0, '1'=>0, '-2'=>0); + $allcomments = array(); + foreach ($receiptStatus as $r) { + $rstat[''.$r['status']]++; + if($r['comment']) + $allcomments[] = $r['comment']; + } + $totalreceipts = $rstat['-1'] + $rstat['0'] + $rstat['1']; + $content .= "; +
+
".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '')."
+
".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '')."
+
"; + if($allcomments) + $content .= implode('
', $allcomments); + } $content .= ""; // $content .= "".$version.""; $content .= "";