mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-02-11 02:51:57 +00:00
group recepition comments in documentListRow()
This commit is contained in:
parent
00b4817bc7
commit
d879cc6114
|
|
@ -2094,15 +2094,21 @@ $(document).ready( function() {
|
|||
$allcomments = array('-1'=>array(), '1'=>array());
|
||||
foreach ($receiptStatus as $r) {
|
||||
$rstat[''.$r['status']]++;
|
||||
if($r['comment'])
|
||||
$allcomments[''.$r['status']][] = htmlspecialchars($r['comment']);
|
||||
if($r['comment']) {
|
||||
// $allcomments[''.$r['status']][] = htmlspecialchars($r['comment']);
|
||||
$m5 = md5(trim($r['comment']));
|
||||
if($allcomments[''.$r['status']][$m5])
|
||||
$allcomments[''.$r['status']][$m5]['n']++;
|
||||
else
|
||||
$allcomments[''.$r['status']][$m5] = array('n'=>1, 'c'=>htmlspecialchars(trim($r['comment'])));
|
||||
}
|
||||
}
|
||||
$totalreceipts = $rstat['-1'] + $rstat['0'] + $rstat['1'];
|
||||
if($totalreceipts) {
|
||||
$content .= ";
|
||||
<div class=\"progress\">
|
||||
<div class=\"bar bar-success\" style=\"width: ".round($rstat['1']/$totalreceipts*100)."%;\">".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '').($allcomments['1'] ? " ".$this->printPopupBox('<i class="icon-comment"></i>', implode('<br />', $allcomments['1']), true) : "")."</div>
|
||||
<div class=\"bar bar-danger\" style=\"width: ".round($rstat['-1']/$totalreceipts*100)."%;\">".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '').($allcomments['-1'] ? " ".$this->printPopupBox('<i class="icon-comment"></i>', implode('<br />', $allcomments['-1']), true) : "")."</div>
|
||||
<div class=\"bar bar-success\" style=\"width: ".round($rstat['1']/$totalreceipts*100)."%;\">".($rstat['1'] ? $rstat['1']."/".$totalreceipts : '').($allcomments['1'] ? " ".$this->printPopupBox('<i class="icon-comment"></i>', implode('<br />', formatComment($allcomments['1'])), true) : "")."</div>
|
||||
<div class=\"bar bar-danger\" style=\"width: ".round($rstat['-1']/$totalreceipts*100)."%;\">".($rstat['-1'] ? $rstat['-1']."/".$totalreceipts : '').($allcomments['-1'] ? " ".$this->printPopupBox('<i class="icon-comment"></i>', implode('<br />', formatComment($allcomments['-1'])), true) : "")."</div>
|
||||
</div>";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user