Add Destination Map

- Shows all defined destinations
This commit is contained in:
FusionPBX
2026-01-21 14:51:49 -07:00
committed by GitHub
parent 3a570e335b
commit 76a9944b2f
4 changed files with 244 additions and 2 deletions

View File

@@ -163,6 +163,33 @@ $text['title-destination_summary']['zh-cn'] = "目的地概要";
$text['title-destination_summary']['ja-jp'] = "目的地の概要";
$text['title-destination_summary']['ko-kr'] = "목적지 요약";
$text['title-destination_map']['en-us'] = "Destination Map";
$text['title-destination_map']['en-gb'] = "Destination Map";
$text['title-destination_map']['ar-eg'] = "خريطة الوجهات";
$text['title-destination_map']['de-at'] = "Zielkarte";
$text['title-destination_map']['de-ch'] = "Zielkarte";
$text['title-destination_map']['de-de'] = "Zielkarte";
$text['title-destination_map']['el-gr'] = "Χάρτης Προορισμών";
$text['title-destination_map']['es-cl'] = "Mapa de Destinos";
$text['title-destination_map']['es-mx'] = "Mapa de Destinos";
$text['title-destination_map']['fr-ca'] = "Carte des destinations";
$text['title-destination_map']['fr-fr'] = "Carte des destinations";
$text['title-destination_map']['he-il'] = "מפת יעדים";
$text['title-destination_map']['it-it'] = "Mappa delle destinazioni";
$text['title-destination_map']['ka-ge'] = "დანიშნულების რუკა";
$text['title-destination_map']['nl-nl'] = "Bestemmingskaart";
$text['title-destination_map']['pl-pl'] = "Mapa celów";
$text['title-destination_map']['pt-br'] = "Mapa de Destinos";
$text['title-destination_map']['pt-pt'] = "Mapa de Destinos";
$text['title-destination_map']['ro-ro'] = "Hartă a destinațiilor";
$text['title-destination_map']['ru-ru'] = "Карта направлений";
$text['title-destination_map']['sv-se'] = "Målkarta";
$text['title-destination_map']['uk-ua'] = "Карта напрямків";
$text['title-destination_map']['tr-tr'] = "Yerler Haritası";
$text['title-destination_map']['zh-cn'] = "目的地地图";
$text['title-destination_map']['ja-jp'] = "目的地マップ";
$text['title-destination_map']['ko-kr'] = "목적지 지도";
$text['button-outbound']['en-us'] = "Outbound";
$text['button-outbound']['en-gb'] = "Outbound";
$text['button-outbound']['ar-eg'] = "صادر";
@@ -352,6 +379,33 @@ $text['button-local']['zh-cn'] = "当地的";
$text['button-local']['ja-jp'] = "地元";
$text['button-local']['ko-kr'] = "현지의";
$text['button-map']['en-us'] = "Map";
$text['button-map']['en-gb'] = "Map";
$text['button-map']['ar-eg'] = "خريطة";
$text['button-map']['de-at'] = "Karte";
$text['button-map']['de-ch'] = "Karte";
$text['button-map']['de-de'] = "Karte";
$text['button-map']['el-gr'] = "Χάρτης";
$text['button-map']['es-cl'] = "Mapa";
$text['button-map']['es-mx'] = "Mapa";
$text['button-map']['fr-ca'] = "Carte";
$text['button-map']['fr-fr'] = "Carte";
$text['button-map']['he-il'] = "מפה";
$text['button-map']['it-it'] = "Mappa";
$text['button-map']['ka-ge'] = "მაპა";
$text['button-map']['nl-nl'] = "Kaart";
$text['button-map']['pl-pl'] = "Mapa";
$text['button-map']['pt-br'] = "Mapa";
$text['button-map']['pt-pt'] = "Mapa";
$text['button-map']['ro-ro'] = "Hartă";
$text['button-map']['ru-ru'] = "Карта";
$text['button-map']['sv-se'] = "Karta";
$text['button-map']['uk-ua'] = "Карта";
$text['button-map']['tr-tr'] = "Harita";
$text['button-map']['zh-cn'] = "地图";
$text['button-map']['ja-jp'] = "地図";
$text['button-map']['ko-kr'] = "지도";
$text['message-maximum_destinations']['en-us'] = "Maximum Destinations:";
$text['message-maximum_destinations']['en-gb'] = "Maximum Destinations:";
$text['message-maximum_destinations']['ar-eg'] = "الحد الأقصي لجهات الأتصال";
@@ -1758,6 +1812,33 @@ $text['description-destinations']['zh-cn'] = "入站目的地是入站呼叫的
$text['description-destinations']['ja-jp'] = "受信宛先は、受信通話の DID/DDI、DNIS、またはエイリアスです。";
$text['description-destinations']['ko-kr'] = "인바운드 대상은 DID/DDI, DNIS 또는 인바운드 통화의 별칭입니다.";
$text['description-destination_map']['en-us'] = "The destination map is a list of all defined destinations such as Extensions, Voicemails, Ring Group, IVR Menus, Conferences, and more.";
$text['description-destination_map']['en-gb'] = "The destination map is a list of all defined destinations such as Extensions, Voicemails, Ring Group, IVR Menus, Conferences, and more.";
$text['description-destination_map']['ar-eg'] = "خريطة الوجهات هي قائمة بجميع الوجهات المحددة مثل الامتدادات، الرسائل الصوتية، مجموعة الرنين، قوائم IVR، المؤتمرات وأكثر من ذلك.";
$text['description-destination_map']['de-at'] = "Die Zielkarte ist eine Liste aller definierten Ziele wie Erweiterungen, Sprachboxen, Rufgruppen, IVR-Menüs, Konferenzen und mehr.";
$text['description-destination_map']['de-ch'] = "Die Zielkarte ist eine Liste aller definierten Ziele wie Erweiterungen, Sprachboxen, Rufgruppen, IVR-Menüs, Konferenzen und mehr.";
$text['description-destination_map']['de-de'] = "Die Zielkarte ist eine Liste aller definierten Ziele wie Erweiterungen, Sprachboxen, Rufgruppen, IVR-Menüs, Konferenzen und mehr.";
$text['description-destination_map']['el-gr'] = "Ο χάρτης προορισμού είναι μια λίστα με όλους τους ορισμένους προορισμούς όπως Επεκτάσεις, Αποθηκευμένες Μηνύματα, Ομάδες Κλήσης, Μενού IVR, Συνεδρίες και περισσότερα.";
$text['description-destination_map']['es-cl'] = "El mapa de destinos es una lista de todos los destinos definidos como Extensiones, Buzones de Voz, Grupo de Llamadas, Menús IVR, Conferencias y más.";
$text['description-destination_map']['es-mx'] = "El mapa de destinos es una lista de todos los destinos definidos como Extensiones, Buzones de Voz, Grupo de Llamadas, Menús IVR, Conferencias y más.";
$text['description-destination_map']['fr-ca'] = "La carte des destinations est une liste de tous les destinations définies telles que les extensions, les boîtes vocales, le groupe d'appels, les menus IVR, les conférences et plus.";
$text['description-destination_map']['fr-fr'] = "La carte des destinations est une liste de toutes les destinations définies telles que les extensions, les boîtes vocales, le groupe d'appels, les menus IVR, les conférences et plus.";
$text['description-destination_map']['he-il'] = "מפת היעדים היא רשימה של כל היעדים המוגדרים כגון הרחבות, דואר קול, קבוצת קולות, תפריטים IVR, כנסיות ועוד.";
$text['description-destination_map']['it-it'] = "La mappa delle destinazioni è un elenco di tutte le destinazioni definite come Estensioni, Voce Messaggi, Gruppo di Chiamate, Menu IVR, Conferenze e altro.";
$text['description-destination_map']['ka-ge'] = "დანიშნულების რუკაა ყველა განსაზღვრული დანიშნულების სია, როგორიცაა გაფართოებები, ვოისმეილები, რინგ ჯგუფი, IVR მენიუს, კონფერენციები და სხვა.";
$text['description-destination_map']['nl-nl'] = "De bestemmingskaart is een lijst van alle gedefinieerde bestemmingen zoals extensies, voicemails, bellen groep, IVR-menu's, conferenties en meer.";
$text['description-destination_map']['pl-pl'] = "Mapa przeznaczeń to lista wszystkich zdefiniowanych przeznaczeń, takich jak rozszerzenia, skrzynki pocztowe, grupa dzwoniąca, menu IVR, konferencje i wiele więcej.";
$text['description-destination_map']['pt-br'] = "O mapa de destinos é uma lista de todos os destinos definidos como Extensões, Caixas Postais, Grupo de Chamadas, Menus IVR, Conferências e mais.";
$text['description-destination_map']['pt-pt'] = "O mapa de destinos é uma lista de todos os destinos definidos como Extensões, Caixas de Voz, Grupo de Chamadas, Menus IVR, Conferências e mais.";
$text['description-destination_map']['ro-ro'] = "Harta destinațiilor este o listă a tuturor destinațiilor definite, cum ar fi Extensii, Mesaje Vocale, Grup de Apeluri, Meniuri IVR, Conferințe și multe altele.";
$text['description-destination_map']['ru-ru'] = "Карта назначений — это список всех определённых назначений, таких как Расширения, Голосовые почты, Группа вызовов, Меню IVR, Конференции и многое другое.";
$text['description-destination_map']['sv-se'] = "Destinationskartan är en lista över alla definierade destinationer som till exempel extensioner, röstbrevlådor, ringgrupp, IVR-menyer, konferenser och mer.";
$text['description-destination_map']['uk-ua'] = "Карта призначень — це список усіх визначених призначень, таких як розширення, голосові поштові скриньки, група дзвінків, меню IVR, конференції та багато іншого.";
$text['description-destination_map']['tr-tr'] = "Hedef haritası, uzantılar, sesli postalar, arama grubu, IVR menüleri, konferanslar ve daha fazlası gibi tanımlanmış tüm hedeflerin listesidir.";
$text['description-destination_map']['zh-cn'] = "目的地图是所有已定义目的地的列表例如扩展、语音信箱、呼叫组、IVR菜单、会议和更多。";
$text['description-destination_map']['ja-jp'] = "目的地マップは、拡張、音声メール、リンググループ、IVRメニュー、会議など、定義されたすべての目的地のリストです。";
$text['description-destination_map']['ko-kr'] = "목적지 맵은 확장, 음성 메일, 링 그룹, IVR 메뉴, 회의 등 정의된 모든 목적지의 목록입니다.";
$text['description-destination_type']['en-us'] = "Select the type.";
$text['description-destination_type']['en-gb'] = "Select the type.";
$text['description-destination_type']['ar-eg'] = "اختر النوع";
@@ -2622,4 +2703,3 @@ $text['label-to']['zh-cn'] = "到";
$text['label-to']['ja-jp'] = "";
$text['label-to']['ko-kr'] = "에게";
?>

View File

@@ -0,0 +1,153 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2026
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (!(permission_exists('destination_add') || permission_exists('destination_edit'))) {
echo "access denied";
exit;
}
//get the search string
$search = $_REQUEST['search'] ?? '';
//get the destinations
$destinations = new destinations();
$array = $destinations->get('dialplan');
//get the language
$domain_language = $settings->get('domain', 'language');
//add multi-lingual support
$language = new text;
$text = $language->get();
//add multi-lingual support
$language2 = new text;
//count the rows
$num_rows = 0;
foreach($array as $key => $value) {
foreach($value as $row) {
//show only rows that match the search
if (!empty($search) && !empty($row['uuid'])) {
if (stripos($row['label'].$row['extension'], $search) !== false) {
$destination_array[$key][] = $row;
$num_rows++;
}
}
//count the rows when the search is empty
if (empty($search) && !empty($row['uuid'])) {
$destination_array[$key][] = $row;
$num_rows++;
}
}
}
//include the header
require_once "resources/header.php";
//show the content
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-destination_map']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
echo " <div class='actions'>\n";
echo "<form id='form_search' class='inline' method='get'>\n";
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
echo button::create(['label'=>$text['button-search'],'icon'=>$settings->get('theme', 'button_icon_search'),'type'=>'submit','id'=>'btn_search']);
if ($paging_controls_mini != '') {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
}
echo " </form>\n";
echo " </div>\n";
echo " <div style='clear: both;'>".$text['description-destination_map']."</div>\n";
echo "</div>\n";
//loop through the destinations array
if (!empty($destination_array)) {
foreach($destination_array as $key => $value) {
//add multi-lingual support
if (file_exists(dirname(__DIR__, 2)."/app/".$key."/app_languages.php")) {
$text2 = $language2->get($domain_language, 'app/'.$key);
}
//set the applications php list filename
$app_name_list = $key.'.php';
if ($key == 'call_centers') {
$app_name_list = 'call_center_queues.php';
}
//echo "<h3>".$text['title-'.$key]."</h3>\n";
echo "<div class=\"category\" id=\"".escape($key)."\">\n";
echo "<b><a href='/app/".$key."/".$app_name_list."'>".$text2['title-'.$key]."</a></b><br>\n";
echo "<div class=\"card\">\n";
echo " <table class='list'>\n";
echo " <tr class='list-row' href='".$list_row_url."'>\n";
echo " <th>".$text['label-label']."</th>\n";
echo " <th>".$text['label-extension']."</th>\n";
echo " <th>&nbsp;</th>\n";
//echo " <th>description</th>\n";
echo " </tr>\n";
foreach($value as $row) {
if (!empty($row['uuid'])) {
//set the applications php edit filename
$app_name_edit = database::singular($key).'_edit.php';
if ($key == 'call_centers') {
$app_name_edit = 'call_center_queue_edit.php';
}
//set the row URL
$list_row_url = '/app/'.$key.'/'.$app_name_edit.'?id='.$row['uuid'];
//show the row
echo " <tr class='list-row' href='".$list_row_url."'>\n";
echo " <td class='overflow no-wrap'>\n";
echo " ".$row['label']."\n";
echo " </td>\n";
echo " <td class='overflow no-wrap'>\n";
echo " ".$row['extension']."\n";
echo " </td>\n";
// echo " <td class='overflow no-wrap'>\n";
// echo " ".$row['description']."\n";
// echo " </td>\n";
echo " <td class=''>\n";
echo " &nbsp;\n";
echo " </td>\n";
echo " </tr>\n";
}
}
echo " </table>\n";
echo "</div >\n";
echo "<br />\n";
}
}
//include the footer
require_once "resources/footer.php";

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2025
Portions created by the Initial Developer are Copyright (C) 2008-2026
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -288,6 +288,7 @@
if (permission_exists('destination_delete') && $destinations) {
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$settings->get('theme', 'button_icon_delete'),'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
}
echo button::create(['type'=>'button','label'=>$text['button-map'],'icon'=>$settings->get('theme', 'button_icon_map'),'id'=>'btn_back','style'=>'margin-right: 15px;','link'=>'destination_map.php']);
echo "<form id='form_search' class='inline' method='get'>\n";
if (permission_exists('destination_all')) {
if ($show == 'all') {

View File

@@ -2880,6 +2880,14 @@
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "comment icon";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "8a0b1125-008e-47dd-9004-cf7680509125";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "button_icon_map";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "fa-regular fa-compass";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "814ed631-a315-4bde-a822-4038432ae2a6";
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "keyboard_shortcut_check_all_enabled";