mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-31 09:33:48 +00:00
Call Center Agents: If selected as Contact, show Gateway name instead of UUID.
Call Center Agent Edit: Set width on Contact select box.
This commit is contained in:
@@ -389,7 +389,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
|
||||
//switch_select_destination(select_type, select_label, select_name, select_value, select_style, action);
|
||||
switch_select_destination("call_center_contact", "", "agent_contact", $agent_contact, "", "");
|
||||
switch_select_destination("call_center_contact", "", "agent_contact", $agent_contact, "width: 350px;", "");
|
||||
|
||||
echo "<br />\n";
|
||||
echo $text['description-contact']."\n";
|
||||
|
||||
@@ -119,7 +119,7 @@ else {
|
||||
//echo th_order_by('agent_busy_delay_time', $text['label-busy_delay_time'], $order_by, $order);
|
||||
echo "<td class='list_control_icons'>";
|
||||
if (permission_exists('call_center_agent_add')) {
|
||||
echo "<a href='call_center_agent_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
echo "<a href='call_center_agent_edit.php' alt='".$text['button-add']."'>".$v_link_label_add."</a>";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
@@ -128,31 +128,48 @@ else {
|
||||
}
|
||||
else { //received results
|
||||
foreach($result as $row) {
|
||||
$tr_link = (permission_exists('call_center_agent_edit')) ? "href='call_center_agent_edit.php?id=".$row[call_center_agent_uuid]."'" : null;
|
||||
$tr_link = (permission_exists('call_center_agent_edit')) ? "href='call_center_agent_edit.php?id=".$row['call_center_agent_uuid']."'" : null;
|
||||
echo "<tr ".$tr_link.">\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row[domain_uuid]."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (permission_exists('call_center_agent_edit')) {
|
||||
echo "<a href='call_center_agent_edit.php?id=".$row[call_center_agent_uuid]."'>".$row[agent_name]."</a>";
|
||||
echo "<a href='call_center_agent_edit.php?id=".$row['call_center_agent_uuid']."'>".$row['agent_name']."</a>";
|
||||
}
|
||||
else {
|
||||
echo $row[agent_name];
|
||||
echo $row['agent_name'];
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row[agent_type]." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row[agent_call_timeout]." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row[agent_contact]." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row[agent_max_no_answer]." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row[agent_status]." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['agent_type']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['agent_call_timeout']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
// parse out gateway uuid
|
||||
$bridge_statement = explode('/', $row['agent_contact']);
|
||||
if ($bridge_statement[0] == 'sofia' && $bridge_statement[1] == 'gateway') {
|
||||
$gateway_uuid = $bridge_statement[2];
|
||||
// retrieve gateway name from db
|
||||
$sql = "select gateway from v_gateways where gateway_uuid = '".$gateway_uuid."' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
$result = $prep_statement->fetchAll(PDO::FETCH_NAMED);
|
||||
if (count($result) > 0) { $gateway_name = $result[0]['gateway']; }
|
||||
unset ($prep_statement, $sql);
|
||||
echo str_replace($gateway_uuid, $gateway_name, $row['agent_contact']);
|
||||
}
|
||||
else {
|
||||
echo $row['agent_contact'];
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['agent_max_no_answer']." </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>".$row['agent_status']." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row[agent_wrap_up_time]." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row[agent_reject_delay_time]." </td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$row[agent_busy_delay_time]." </td>\n";
|
||||
echo " <td class='list_control_icons'>\n";
|
||||
if (permission_exists('call_center_agent_edit')) {
|
||||
echo "<a href='call_center_agent_edit.php?id=".$row[call_center_agent_uuid]."' alt='".$text['button-edit']."'>$v_link_label_edit</a>";
|
||||
echo "<a href='call_center_agent_edit.php?id=".$row['call_center_agent_uuid']."' alt='".$text['button-edit']."'>".$v_link_label_edit."</a>";
|
||||
}
|
||||
if (permission_exists('call_center_agent_delete')) {
|
||||
echo "<a href='call_center_agent_delete.php?id=".$row[call_center_agent_uuid]."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>";
|
||||
echo "<a href='call_center_agent_delete.php?id=".$row['call_center_agent_uuid']."' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">".$v_link_label_delete."</a>";
|
||||
}
|
||||
//echo " <input type='button' class='btn' name='' alt='edit' onclick=\"window.location='call_center_agent_edit.php?id=".$row[call_center_agent_uuid]."'\" value='e'>\n";
|
||||
//echo " <input type='button' class='btn' name='' alt='delete' onclick=\"if (confirm('Are you sure you want to delete this?')) { window.location='call_center_agent_delete.php?id=".$row[call_center_agent_uuid]."' }\" value='x'>\n";
|
||||
@@ -171,7 +188,7 @@ else {
|
||||
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
|
||||
echo " <td class='list_control_icons'>";
|
||||
if (permission_exists('call_center_agent_add')) {
|
||||
echo "<a href='call_center_agent_edit.php' alt='".$text['button-add']."'>$v_link_label_add</a>";
|
||||
echo "<a href='call_center_agent_edit.php' alt='".$text['button-add']."'>".$v_link_label_add."</a>";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user