Call Routing: More responsive layout, includes additional info in list view.

This commit is contained in:
reliberate 2016-03-29 16:28:17 -06:00
parent 94ed94f786
commit 7a1e3b7a0b
5 changed files with 99 additions and 73 deletions

View File

@ -286,6 +286,20 @@ $text['label-call-forward']['sv-se'] = "Vidarekoppling ";
$text['label-call-forward']['uk'] = "Переадресація";
$text['label-call-forward']['de-at'] = "Rufumleitung";
$text['header-call_routing']['en-us'] = "Call Routing";
$text['header-call_routing']['es-cl'] = "Enrutamiento de Llamadas";
$text['header-call_routing']['pt-pt'] = "Roteamento de Chamadas";
$text['header-call_routing']['fr-fr'] = "Routage des Appels";
$text['header-call_routing']['pt-br'] = "Roteamento de Chamadas";
$text['header-call_routing']['pl'] = "Trasy połączeń";
$text['header-call_routing']['he'] = "ניתוב שיחות";
$text['header-call_routing']['uk'] = "маршрутизація викликів";
$text['header-call_routing']['sv-se'] = "samtals Rutter";
$text['header-call_routing']['de-at'] = "Anrufrouten";
$text['header-call_routing']['ro'] = "Маршрутизация вызовов";
$text['header-call_routing']['fa'] = "";
$text['header-call_routing']['ar-eg'] = "توجيه الدعوة";
$text['description-on-busy']['en-us'] = "If enabled, it overrides the value of voicemail enabling in extension.";
$text['description-on-busy']['es-cl'] = "Si está habilitada, anula el valor del correo de voz que permite en la extensión.";
$text['description-on-busy']['pt-pt'] = "Se ativado, ele substitui o valor de correio de voz que permite em extensão.";
@ -349,25 +363,15 @@ $text['description-call-prompt']['sv-se'] = "Kräv verifiering för att ta emot
$text['description-call-prompt']['uk'] = "";
$text['description-call-prompt']['de-at'] = "Nachfragen, ob der Anruf auch wirklich durchgestellt werden soll.";
$text['description-3']['en-us'] = "The following list the extensions that have been assigned to this user account.";
$text['description-3']['es-cl'] = "El siguiente listado muestra las extensiones que han sido asignadas a esta cuenta de usuario.";
$text['description-3']['pt-pt'] = "A tabela seguinte lista as extensões que foram atribuídas a esta conta de utilizador.";
$text['description-3']['fr-fr'] = "Ici la liste des extensions assignées à cet usager.";
$text['description-3']['pt-br'] = "Utilize os campos para filtrar a informação sobre os registos de chamadas desejados.";
$text['description-3']['pl'] = "Widoczne są numery wewnętrzne przypisane to danego konta użytkownika.";
$text['description-3']['sv-se'] = "Följande listar anknytningar som har knytets mot användarkontot. ";
$text['description-3']['uk'] = "";
$text['description-3']['de-at'] = "Nachfolgend werden alle Nebenstellen aufgelistet, die diesem Benutzerkonto zugeordnet sind.";
$text['description-2']['en-us'] = "Use the links to configure call forward follow me, or do not disturb.";
$text['description-2']['es-cl'] = "Utilice los links para configurar reenvio de llamada, sígueme o no Molestar.";
$text['description-2']['pt-pt'] = "Utilizar os links para definir as funcinalidades de encaminhamento de chamada, seguimento ou de não perturbar.";
$text['description-2']['fr-fr'] = "Utiliser les liens afin de configurer le renvoi 'follow me', ou ne pas déranger.";
$text['description-2']['pt-br'] = "A informação contem a origem, destino, duração e outros detalhes úteis da chamada.";
$text['description-2']['pl'] = "Za pomocą poniższych linków można skonfigurować przekierowania, usługę „Podążaj z mną” lub „Nie przeszkadzać” (DnD).";
$text['description-2']['sv-se'] = "Använd länkarna för att konfigurera Vidarekoppling, Följ Mig och Stör Ej. ";
$text['description-2']['uk'] = "";
$text['description-2']['de-at'] = "Benutzen Sie die Funktionen um Rufumleitung, Anrufweiterschaltung oder Nicht stören zu konfigurieren.";
$text['description-call_routing']['en-us'] = "Define alternate inbound call handling for the following extensions.";
$text['description-call_routing']['es-cl'] = "Definir alternativa para el manejo de las siguientes extensiones de llamadas entrantes.";
$text['description-call_routing']['pt-pt'] = "Definir alternativo chamada de entrada assistência para as seguintes extensões.";
$text['description-call_routing']['fr-fr'] = "Définir la manipulation pour les extensions suivantes alternent appel entrant.";
$text['description-call_routing']['pt-br'] = "Definir alternativo chamada de entrada assistência para as seguintes extensões.";
$text['description-call_routing']['pl'] = "Definiowanie alternatywnego połączenia przychodzącego obsługi dla następujących rozszerzeń.";
$text['description-call_routing']['sv-se'] = "Definiera alternativa inkommande samtalshantering för följande tillägg.";
$text['description-call_routing']['uk'] = "Визначити обробку для наступних розширень альтернативного вхідного дзвінка.";
$text['description-call_routing']['de-at'] = "Definieren Sie alternative eingehende Anruf für die folgenden Erweiterungen der Handhabung.";
$text['description']['en-us'] = "Directs incoming calls for extension:";
$text['description']['es-cl'] = "Dirige las llamadas entrantes hacia una extensión:";
@ -457,4 +461,4 @@ $text['check-false']['uk'] = "Ні";
$text['check-false']['fr-fr'] = "";
$text['check-false']['de-at'] = "Aus";
?>
?>

View File

@ -84,11 +84,8 @@ else {
$result_count = $row['count'];
unset ($prep_statement, $row);
if ($is_included == 'true') {
if ($is_included) {
$rows_per_page = 10;
if ($result_count > 10) {
echo "<script>document.getElementById('btn_viewall_callrouting').style.display = 'inline-block';</script>\n";
}
}
else {
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
@ -115,61 +112,102 @@ else {
$row_style["0"] = "row_style0";
$row_style["1"] = "row_style1";
if ($is_included != "true") {
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo " <tr>\n";
echo " <td align='left' width='100%'><b>".$text['title']."</b><br>\n";
echo " ".$text['description-2']."\n";
echo " ".$text['description-3']."\n";
echo " </td>\n";
echo " <form method='get' action=''>\n";
echo " <td style='vertical-align: top; text-align: right; white-space: nowrap;'>\n";
echo "<div style='float: left;'>";
echo " <b>".$text['header-call_routing']."</b><br />";
if (!$is_included) {
echo $text['description-call_routing']."<br />";
}
echo " <br />";
echo "</div>\n";
echo "<div style='float: right; margin-bottom: 10px;'>";
echo " <form method='get' action=''>\n";
echo " <table border='0' cellpadding='0' cellspacing='0'>\n";
echo " <tr>\n";
echo " <td style='vertical-align: top; white-space: nowrap;'>\n";
if ($result_count > 10 && $is_included) {
echo " <input id='btn_viewall_callrouting' type='button' class='btn' value='".$text['button-view_all']."' onclick=\"document.location.href='".PROJECT_PATH."/app/calls/calls.php';\">";
}
if (!$is_included) {
echo " <input type='text' class='txt' style='width: 150px' name='search' value='".$search."'>";
echo " <input type='submit' class='btn' name='submit' value='".$text['button-search']."'>";
if ($paging_controls_mini != '') {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
}
echo " </td>\n";
echo " </form>\n";
echo " </tr>\n";
echo "</table>\n";
echo "<br />";
}
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo "</div>\n";
echo "<table class='tr_hover' width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo "<th>".$text['table-extension']."</th>\n";
echo "<th>".$text['table-tools']."</th>\n";
echo "<th>".$text['table-description']."</th>\n";
if (permission_exists('call_forward')) { echo "<th>".$text['label-call-forward']."</th>\n"; }
if (permission_exists('follow_me')) { echo "<th>".$text['label-follow-me']."</th>\n"; }
if (permission_exists('do_not_disturb')) { echo "<th>".$text['label-dnd']."</th>\n"; }
if (!$is_included) {
echo "<th class='hidden-xs'>".$text['table-description']."</th>\n";
}
echo "<td class='list_control_icon'>&nbsp;</td>\n";
echo "</tr>\n";
if ($result_count > 0) {
foreach($result as $row) {
$tr_url = PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid'];
$tr_url = PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid']."&return_url=".urlencode($_SERVER['REQUEST_URI']);
$tr_link = (permission_exists('call_forward') || permission_exists('follow_me') || permission_exists('do_not_disturb')) ? "href='".$tr_url."'" : null;
echo "<tr ".$tr_link.">\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['extension']."</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>\n";
if (permission_exists('call_forward')) { echo "<a href='".$tr_url."'>".$text['label-call-forward']."</a>&nbsp;&nbsp;&nbsp;"; }
if (permission_exists('follow_me')) { echo "<a href='".$tr_url."'>".$text['label-follow-me']."</a>&nbsp;&nbsp;&nbsp;"; }
if (permission_exists('do_not_disturb')) { echo "<a href='".$tr_url."'>".$text['label-dnd']."</a>"; }
echo " </td>\n";
echo " <td valign='top' class='row_stylebg' width='40%'>".$row['description']."&nbsp;</td>\n";
if (permission_exists('call_forward')) {
echo "<td valign='top' class='".$row_style[$c]."'>".(($row['forward_all_enabled'] == 'true') ? format_phone($row['forward_all_destination']) : '&nbsp;')."</td>";
}
if (permission_exists('follow_me')) {
if ($row['follow_me_uuid'] != '') {
//check if follow me is enabled
$sql = "select follow_me_enabled from v_follow_me where follow_me_uuid = '".$row['follow_me_uuid']."' and domain_uuid = '".$domain_uuid."'";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$row_x = $prep_statement->fetch(PDO::FETCH_NAMED);
$follow_me_enabled = ($row_x['follow_me_enabled'] == 'true') ? true : false;
unset($sql, $prep_statement, $row_x);
//get destination count if enabled
if ($follow_me_enabled) {
$sql = "select count(follow_me_destination_uuid) as destination_count from v_follow_me_destinations where follow_me_uuid = '".$row['follow_me_uuid']."' and domain_uuid = '".$domain_uuid."'";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
$row_x = $prep_statement->fetch(PDO::FETCH_NAMED);
$follow_me_destination_count = $row_x['destination_count'];
unset($sql, $prep_statement, $row_x);
}
}
else {
$follow_me_enabled = false;
}
echo "<td valign='top' class='".$row_style[$c]."'>".(($follow_me_enabled) ? $text['label-enabled']." (".$follow_me_destination_count.")" : '&nbsp;')."</td>";
}
if (permission_exists('do_not_disturb')) {
echo "<td valign='top' class='".$row_style[$c]."'>".(($row['do_not_disturb'] == 'true') ? $text['label-enabled'] : '&nbsp;')."</td>";
}
if (!$is_included) {
echo "<td valign='top' class='row_stylebg hidden-xs'>".$row['description']."&nbsp;</td>\n";
}
echo " <td class='list_control_icon'><a href='".$tr_url."' alt='".$text['button-edit']."'>".$v_link_label_edit."</a></td>\n";
echo "</tr>\n";
if ($c==0) { $c=1; } else { $c=0; }
$c = ($c) ? 0 : 1;
} //end foreach
unset($sql, $result, $row_count);
} //end if results
echo "</table>";
echo "<br>";
echo "<br />";
if (strlen($paging_controls) > 0 && ($is_included != "true")) {
if (strlen($paging_controls) > 0 && (!$is_included)) {
echo "<center>".$paging_controls."</center>\n";
echo "<br><br>\n";
echo "<br /><br />\n";
}
if ($is_included != "true") {
if (!$is_included) {
echo "<br />";
require_once "resources/footer.php";
}

View File

@ -98,7 +98,7 @@ require_once "resources/paging.php";
}
//prepare to page the results
if ($is_included == 'true') {
if ($is_included) {
$rows_per_page = 10;
}
else {

View File

@ -1078,20 +1078,6 @@ $text['header-user_dashboard']['ro'] = "Panou control utilizator";
$text['header-user_dashboard']['fa'] = "";
$text['header-user_dashboard']['ar-eg'] = "الصفحه الرئيسيه للمستخدم";
$text['header-call_routing']['en-us'] = "Call Routing";
$text['header-call_routing']['es-cl'] = "Enrutamiento de Llamadas";
$text['header-call_routing']['pt-pt'] = "Roteamento de Chamadas";
$text['header-call_routing']['fr-fr'] = "Routage des Appels";
$text['header-call_routing']['pt-br'] = "Roteamento de Chamadas";
$text['header-call_routing']['pl'] = "Trasy połączeń";
$text['header-call_routing']['he'] = "ניתוב שיחות";
$text['header-call_routing']['uk'] = "маршрутизація викликів";
$text['header-call_routing']['sv-se'] = "samtals Rutter";
$text['header-call_routing']['de-at'] = "Anrufrouten";
$text['header-call_routing']['ro'] = "Маршрутизация вызовов";
$text['header-call_routing']['fa'] = "";
$text['header-call_routing']['ar-eg'] = "توجيه الدعوة";
$text['description-user_language']['en-us'] = "Select the language.";
$text['description-user_language']['es-cl'] = "Seleccione el idioma.";
$text['description-user_language']['pt-pt'] = "Selecione o idioma.";
@ -1282,4 +1268,4 @@ $text['button-view_all']['ro'] = "";
$text['button-view_all']['de-at'] = "Alle anzeigen";
$text['button-view_all']['he'] = "הצג הכל";
?>
?>

View File

@ -1185,10 +1185,8 @@ if (!is_array($selected_blocks) || in_array('routing', $selected_blocks) || in_a
//call routing
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/calls/calls.php")) {
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
$is_included = "true";
echo "<div class='col-xs-12 col-sm-12 col-md-6 col-lg-7' style='margin: 0 0 20px 0;'>\n";
echo " <div style='float: right;'><input id='btn_viewall_callrouting' type='button' class='btn' style='display: none;' value='".$text['button-view_all']."' onclick=\"document.location.href='".PROJECT_PATH."/app/calls/calls.php';\"></div>\n";
echo " <div style='float: left;'><b>".$text['header-call_routing']."</b><br /><br /></div>\n";
$is_included = true;
echo "<div class='col-xs-12 col-sm-12 col-md-6 col-lg-7' style='margin: 0 0 50px 0;'>\n";
require_once "app/calls/calls.php";
echo "</div>\n";
}
@ -1203,7 +1201,7 @@ if (!is_array($selected_blocks) || in_array('routing', $selected_blocks) || in_a
//ring group forward
if (file_exists($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."/app/ring_groups/ring_group_forward.php")) {
if (permission_exists('ring_group_forward')) {
$is_included = "true";
$is_included = true;
echo "<div class='col-xs-12 col-sm-12 col-md-6 col-lg-5' style='margin: 0 0 50px 0;'>\n";
require_once "app/ring_groups/ring_group_forward.php";
echo "</div>";