From e6e14fb37a6a8bce6d6ba1c25c0cd7ad50685cd5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 18 Jan 2017 08:45:27 +0100 Subject: [PATCH] show comments of reception seperated by decline/aknowledge --- views/bootstrap/class.Bootstrap.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index cbba93e53..d7cf903cb 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -2156,20 +2156,18 @@ $(document).ready( function() { } if($owner->getID() == $user->getID() && $receiptStatus = $latestContent->getReceiptStatus()) { $rstat = array('-1'=>0, '0'=>0, '1'=>0, '-2'=>0); - $allcomments = array(); + $allcomments = array('-1'=>array(), '1'=>array()); foreach ($receiptStatus as $r) { $rstat[''.$r['status']]++; if($r['comment']) - $allcomments[] = $r['comment']; + $allcomments[''.$r['status']][] = htmlspecialchars($r['comment']); } $totalreceipts = $rstat['-1'] + $rstat['0'] + $rstat['1']; $content .= ";
-
".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '')."
-
".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '')."
+
".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '').($allcomments['1'] ? " ".$this->printPopupBox('', implode('
', $allcomments['1']), true) : "")."
+
".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '').($allcomments['-1'] ? " ".$this->printPopupBox('', implode('
', $allcomments['-1']), true) : "")."
"; - if($allcomments) - $content .= $this->printPopupBox(getMLText('comments'), implode('
', $allcomments), true); } $content .= ""; // $content .= "".$version."";