mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-31 13:39:55 +00:00
Update how the application icon is determined
- Created application_icons array - Add the application_icon before the code is displayed
This commit is contained in:
@@ -292,6 +292,19 @@
|
||||
//create the destinations object
|
||||
$destinations = new destinations();
|
||||
|
||||
//build the application icons array
|
||||
$application_icons = array();
|
||||
$application_icons["call_centers"] = "fa-headset";
|
||||
$application_icons["call_flows"] = "fa-share-nodes";
|
||||
$application_icons["conferences"] = "fa-comments";
|
||||
$application_icons["destinations"] = "fa-right-to-bracket";
|
||||
$application_icons["dialplans"] = "fa-right-left";
|
||||
$application_icons["extensions"] = "fa-suitcase";
|
||||
$application_icons["ivr_menus"] = "fa-diagram-project";
|
||||
$application_icons["ring_groups"] = "fa-users";
|
||||
$application_icons["time_conditions"] = "fa-clock";
|
||||
$application_icons["voicemails"] = "fa-envelope";
|
||||
|
||||
//build the call flow summary array
|
||||
$xml_cdr = new xml_cdr(["database" => $database, "settings" => $settings, "destinations" => $destinations]);
|
||||
$xml_cdr->domain_uuid = $domain_uuid;
|
||||
@@ -308,6 +321,10 @@
|
||||
}
|
||||
//prepares the raw call flow data to be displayed
|
||||
$call_flow_summary = $xml_cdr->call_flow_summary($call_flow_array);
|
||||
//add the application_icon to the array
|
||||
foreach($call_flow_summary as $id => $row) {
|
||||
$call_flow_summary[$id]["application_icon"] = $application_icons[$row["application_name"] ?? ''] ?? '';
|
||||
}
|
||||
|
||||
//debug information
|
||||
if (isset($_REQUEST['debug']) && $_REQUEST['debug'] == 'true') {
|
||||
@@ -589,9 +606,8 @@
|
||||
echo " </tr>\n";
|
||||
$i = 1;
|
||||
foreach ($call_flow_summary as $row) {
|
||||
$application_icon = $row["application_icon"][$row["application_name"] ?? ''] ?? '';
|
||||
echo " <tr>\n";
|
||||
echo " <td style='width: 0; padding-right: 0;' valign='top' class='".$row_style[$c]."'><span class='fa-solid ".$application_icon."' style='opacity: 0.8;'></span></td>";
|
||||
echo " <td style='width: 0; padding-right: 0;' valign='top' class='".$row_style[$c]."'><span class='fa-solid ".$row["application_icon"]."' style='opacity: 0.8;'></span></td>";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'><a href=\"".$row["application_url"]."\">".escape($row["application_label"])."</a></td>\n";
|
||||
if ($call_direction == 'local' || $call_direction == 'outbound') {
|
||||
echo " <td valign='top' class='".$row_style[$c]."'><a href=\"".$row["source_url"]."\">".escape($row["source_number"])."</a></td>\n";
|
||||
|
||||
Reference in New Issue
Block a user