Improve presentation of shared lines
This commit is contained in:
parent
f2d15ebd5e
commit
fb25407611
|
@ -296,13 +296,30 @@ trait ajaxHelper {
|
||||||
}
|
}
|
||||||
$activeDevices = $this->aminterface->sccp_get_active_device();
|
$activeDevices = $this->aminterface->sccp_get_active_device();
|
||||||
foreach ($lineList as $key => $lineArr) {
|
foreach ($lineList as $key => $lineArr) {
|
||||||
if (array_key_exists($lineArr['mac'], $activeDevices)) {
|
if (!empty($outLineList[$lineList[$key]['name']])) {
|
||||||
$actDevStat = $activeDevices[$lineArr['mac']];
|
$outLineList[$lineList[$key]['name']]['mac'] .= "<br>".$lineList[$key]['mac'];
|
||||||
$lineList[$key]['line_status'] = "{$actDevStat['status']} | {$actDevStat['act']}";
|
if (array_key_exists($lineArr['mac'], $activeDevices)) {
|
||||||
|
$actDevStat = $activeDevices[$lineArr['mac']];
|
||||||
|
$outLineList[$lineList[$key]['name']]['line_status'] .= "<br>" . "{$actDevStat['status']} | {$actDevStat['act']}";
|
||||||
|
} else {
|
||||||
|
$outLineList[$lineList[$key]['name']]['line_status'] .= "<br>" . '|';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$lineList[$key]['line_status'] = '|';
|
$outLineList[$lineList[$key]['name']] = $lineList[$key];
|
||||||
|
if (array_key_exists($lineArr['mac'], $activeDevices)) {
|
||||||
|
$actDevStat = $activeDevices[$lineArr['mac']];
|
||||||
|
$outLineList[$lineList[$key]['name']]['line_status'] = "{$actDevStat['status']} | {$actDevStat['act']}";
|
||||||
|
} else {
|
||||||
|
// create a new output list
|
||||||
|
$outLineList[$lineList[$key]['name']] = $lineList[$key];
|
||||||
|
$outLineList[$lineList[$key]['name']]['line_status'] = '|';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
unset($lineList);
|
||||||
|
foreach ($outLineList as $valueArray) {
|
||||||
|
$lineList[] = $valueArray;
|
||||||
|
}
|
||||||
return $lineList;
|
return $lineList;
|
||||||
break;
|
break;
|
||||||
case 'getPhoneGrid':
|
case 'getPhoneGrid':
|
||||||
|
|
Loading…
Reference in a new issue