Operator Panel: Show status change buttons only if extensions assigned to current user.
This commit is contained in:
parent
4c3a023bf7
commit
314bb4ff20
|
|
@ -65,17 +65,18 @@ echo " <td valign='top' align='left' width='50%' nowrap>";
|
||||||
echo " <b>".$text['title-operator_panel']."</b>";
|
echo " <b>".$text['title-operator_panel']."</b>";
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
echo " <td valign='top' align='center' nowrap>";
|
echo " <td valign='top' align='center' nowrap>";
|
||||||
echo " <input type='hidden' id='current_user_status' value=''>";
|
|
||||||
|
|
||||||
$status_options = Array(
|
if (sizeof($_SESSION['user']['extensions']) > 0) {
|
||||||
"Available" => $text['label-status_available'],
|
$status_options = Array(
|
||||||
"Available (On Demand)" => $text['label-status_on_demand'],
|
"Available" => $text['label-status_available'],
|
||||||
"On Break" => $text['label-status_on_break'],
|
"Available (On Demand)" => $text['label-status_on_demand'],
|
||||||
"Do Not Disturb" => $text['label-status_do_not_disturb'],
|
"On Break" => $text['label-status_on_break'],
|
||||||
"Logged Out" => $text['label-status_logged_out']
|
"Do Not Disturb" => $text['label-status_do_not_disturb'],
|
||||||
);
|
"Logged Out" => $text['label-status_logged_out']
|
||||||
foreach ($status_options as $status_value => $status_label) {
|
);
|
||||||
echo " <input type='button' class='btn' value=\"".$status_label."\" onclick=\"send_cmd('index.php?status='+escape('".$status_value."'));\">";
|
foreach ($status_options as $status_value => $status_label) {
|
||||||
|
echo " <input type='button' class='btn' value=\"".$status_label."\" onclick=\"send_cmd('index.php?status='+escape('".$status_value."'));\">";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo " </td>";
|
echo " </td>";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue