<?php
$data = array();
$userData = $queueMonitor->getAvailableUsers();
if ($userData) {
    $data[__("ROUTING_QUEUE_MONITOR_USERDROPDOWN_USER_OPTIONGROUP_TITLE")] = CHtml::listData($userData, "userId", "formattedName");
}
$externalAgentData = $queueMonitor->getAvailableExternalAgents();
if ($externalAgentData) {
    $data[__("ROUTING_QUEUE_MONITOR_USERDROPDOWN_EXTERNAL_AGENT_OPTIONGROUP_TITLE")] = CHtml::listData($externalAgentData, "userId", "formattedName");
}
echo CHtml::dropDownList("userDropdown_".$queueMonitor->getQueue()->id, false, $data);

if (Yii::app()->user->translateMode) {
	echo '<i data-translation-id="ROUTING_QUEUE_MONITOR_USERDROPDOWN_USER_OPTIONGROUP_TITLE"></i>';
	echo '<i data-translation-id="ROUTING_QUEUE_MONITOR_USERDROPDOWN_EXTERNAL_AGENT_OPTIONGROUP_TITLE"></i>';

}