diff --git a/app/call_forward/resources/dashboard/call_forward.php b/app/call_forward/resources/dashboard/call_forward.php index fd41ee96ad..e713081ac5 100644 --- a/app/call_forward/resources/dashboard/call_forward.php +++ b/app/call_forward/resources/dashboard/call_forward.php @@ -102,12 +102,12 @@ //begin widget echo "
\n"; - echo "
\n"; - echo " ".$text['header-call_forward']."\n"; + echo "
\n"; + echo " ".$text['header-call_forward']."\n"; //doughnut chart if ($dashboard_chart_type == "doughnut") { - echo "
\n"; + echo "
\n"; echo "\n"; } if ($dashboard_chart_type == "none") { - echo " ".$stats['call_forward'].""; + echo " ".$stats['call_forward'].""; } echo "
\n"; //details - echo "
"; - echo "\n"; - echo "\n"; - echo "\n"; - if (permission_exists('call_forward')) { - echo " \n"; - } - if (permission_exists('follow_me')) { - echo " \n"; - } - if (permission_exists('do_not_disturb')) { - echo " \n"; - } - echo "\n"; - if (is_array($extensions) && @sizeof($extensions) != 0) { - foreach ($extensions as $row) { - $tr_link = PROJECT_PATH."/app/call_forward/call_forward_edit.php?id=".$row['extension_uuid']; - echo "\n"; - echo " \n"; - if (permission_exists('call_forward')) { - echo " \n"; - } - if (permission_exists('follow_me')) { - //get destination count - $follow_me_destination_count = 0; - if ($row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid'])) { - $sql = "select count(*) from v_follow_me_destinations "; - $sql .= "where follow_me_uuid = :follow_me_uuid "; - $sql .= "and domain_uuid = :domain_uuid "; - $parameters['follow_me_uuid'] = $row['follow_me_uuid']; - $parameters['domain_uuid'] = $_SESSION['domain_uuid']; - $database = new database; - $follow_me_destination_count = $database->select($sql, $parameters, 'column'); - unset($sql, $parameters); - } - echo " \n"; - } - if (permission_exists('do_not_disturb')) { - echo " \n"; - } - echo "\n"; - $c = ($c) ? 0 : 1; + if ($dashboard_details_state != 'disabled') { + echo "
"; + echo "
".$text['label-extension']."".$text['label-call_forward']."".$text['label-follow_me']."".$text['label-dnd']."
".escape($row['extension'])."".($row['forward_all_enabled'] == 'true' ? escape(format_phone($row['forward_all_destination'])) : ' ')."".($follow_me_destination_count ? $text['label-enabled'].' ('.$follow_me_destination_count.')' : ' ')."".($row['do_not_disturb'] == 'true' ? $text['label-enabled'] : ' ')."
\n"; + echo "\n"; + echo "\n"; + if (permission_exists('call_forward')) { + echo " \n"; } - unset($extensions); + if (permission_exists('follow_me')) { + echo " \n"; + } + if (permission_exists('do_not_disturb')) { + echo " \n"; + } + echo "\n"; + if (is_array($extensions) && @sizeof($extensions) != 0) { + foreach ($extensions as $row) { + $tr_link = PROJECT_PATH."/app/call_forward/call_forward_edit.php?id=".$row['extension_uuid']; + echo "\n"; + echo " \n"; + if (permission_exists('call_forward')) { + echo " \n"; + } + if (permission_exists('follow_me')) { + //get destination count + $follow_me_destination_count = 0; + if ($row['follow_me_enabled'] == 'true' && is_uuid($row['follow_me_uuid'])) { + $sql = "select count(*) from v_follow_me_destinations "; + $sql .= "where follow_me_uuid = :follow_me_uuid "; + $sql .= "and domain_uuid = :domain_uuid "; + $parameters['follow_me_uuid'] = $row['follow_me_uuid']; + $parameters['domain_uuid'] = $_SESSION['domain_uuid']; + $database = new database; + $follow_me_destination_count = $database->select($sql, $parameters, 'column'); + unset($sql, $parameters); + } + echo " \n"; + } + if (permission_exists('do_not_disturb')) { + echo " \n"; + } + echo "\n"; + $c = ($c) ? 0 : 1; + } + unset($extensions); + } + + echo "
".$text['label-extension']."".$text['label-call_forward']."".$text['label-follow_me']."".$text['label-dnd']."
".escape($row['extension'])."".($row['forward_all_enabled'] == 'true' ? escape(format_phone($row['forward_all_destination'])) : ' ')."".($follow_me_destination_count ? $text['label-enabled'].' ('.$follow_me_destination_count.')' : ' ')."".($row['do_not_disturb'] == 'true' ? $text['label-enabled'] : ' ')."
\n"; + echo "
"; + //$n++; + + echo "\n"; } - - echo "\n"; - echo "
"; - //$n++; - - echo "\n"; echo "
\n"; ?> diff --git a/app/domain_limits/resources/dashboard/domain_limits.php b/app/domain_limits/resources/dashboard/domain_limits.php index db9eb6be7a..7bac4f2b3b 100644 --- a/app/domain_limits/resources/dashboard/domain_limits.php +++ b/app/domain_limits/resources/dashboard/domain_limits.php @@ -110,12 +110,12 @@ $hud_stat_title = $text['label-destinations']; } - echo "
\n"; - echo " ".$text['label-domain_limits']."\n"; + echo "
\n"; + echo " ".$text['label-domain_limits']."\n"; //doughnut chart if ($dashboard_chart_type == "doughnut") { - echo "
\n"; + echo "
\n"; echo "\n"; } if ($dashboard_chart_type == "none") { - echo " ".$hud_stat_used.""; + echo " ".$hud_stat_used.""; } echo "
\n"; //details - echo "
"; + if ($dashboard_details_state != 'disabled') { + echo "
"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - //data - foreach ($_SESSION['limit'] as $category => $value) { - $used = $usage[$category]; - $limit = $value['numeric']; - switch ($category) { - case 'users': - if (!permission_exists('user_view')) { continue 2; } - $url = '/core/users/users.php'; - break; - case 'call_center_queues': - if (!permission_exists('call_center_active_view')) { continue 2; } - $url = '/app/call_centers/call_center_queues.php'; - break; - case 'destinations': - if (!permission_exists('destination_view')) { continue 2; } - $url = '/app/destinations/destinations.php'; - break; - case 'devices': - if (!permission_exists('device_view')) { continue 2; } - $url = '/app/devices/devices.php'; - break; - case 'extensions': - if (!permission_exists('extension_view')) { continue 2; } - $url = '/app/extensions/extensions.php'; - break; - case 'gateways': - if (!permission_exists('gateway_view')) { continue 2; } - $url = '/app/gateways/gateways.php'; - break; - case 'ivr_menus': - if (!permission_exists('ivr_menu_view')) { continue 2; } - $url = '/app/ivr_menus/ivr_menus.php'; - break; - case 'ring_groups': - if (!permission_exists('ring_group_view')) { continue 2; } - $url = '/app/ring_groups/ring_groups.php'; - break; - } - $tr_link = "href='".PROJECT_PATH.$url."'"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "
".$text['label-feature']."".$text['label-used']."".$text['label-total']."
".$text['label-'.$category]."".$used."".$limit."
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; - $c = ($c) ? 0 : 1; + + //data + foreach ($_SESSION['limit'] as $category => $value) { + $used = $usage[$category]; + $limit = $value['numeric']; + switch ($category) { + case 'users': + if (!permission_exists('user_view')) { continue 2; } + $url = '/core/users/users.php'; + break; + case 'call_center_queues': + if (!permission_exists('call_center_active_view')) { continue 2; } + $url = '/app/call_centers/call_center_queues.php'; + break; + case 'destinations': + if (!permission_exists('destination_view')) { continue 2; } + $url = '/app/destinations/destinations.php'; + break; + case 'devices': + if (!permission_exists('device_view')) { continue 2; } + $url = '/app/devices/devices.php'; + break; + case 'extensions': + if (!permission_exists('extension_view')) { continue 2; } + $url = '/app/extensions/extensions.php'; + break; + case 'gateways': + if (!permission_exists('gateway_view')) { continue 2; } + $url = '/app/gateways/gateways.php'; + break; + case 'ivr_menus': + if (!permission_exists('ivr_menu_view')) { continue 2; } + $url = '/app/ivr_menus/ivr_menus.php'; + break; + case 'ring_groups': + if (!permission_exists('ring_group_view')) { continue 2; } + $url = '/app/ring_groups/ring_groups.php'; + break; + } + $tr_link = "href='".PROJECT_PATH.$url."'"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + $c = ($c) ? 0 : 1; + } + + echo "
".$text['label-feature']."".$text['label-used']."".$text['label-total']."
".$text['label-'.$category]."".$used."".$limit."
\n"; + echo "
"; + //$n++; + + echo ""; } - - echo "\n"; - echo "
"; - //$n++; - - echo ""; echo "
\n"; } diff --git a/app/extensions/resources/dashboard/caller_id.php b/app/extensions/resources/dashboard/caller_id.php index eb1c7199f0..aa2ba1b873 100644 --- a/app/extensions/resources/dashboard/caller_id.php +++ b/app/extensions/resources/dashboard/caller_id.php @@ -173,12 +173,12 @@ //caller id echo "
\n"; - echo "
\n"; - echo " ".$text['label-caller_id_number']."\n"; + echo "
\n"; + echo " ".$text['label-caller_id_number']."\n"; //doughnut chart if ($dashboard_chart_type == "doughnut") { - echo "
\n"; + echo "
\n"; echo "\n"; } if ($dashboard_chart_type == "none") { - echo " ".$stats['undefined'].""; + echo " ".$stats['undefined'].""; } echo "
\n"; //details - echo "
\n"; + if ($dashboard_details_state != 'disabled') { + echo "\n"; - echo "
"; + echo "
"; - if (is_array($extensions) && @sizeof($extensions) != 0) { - echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'collapse'=>false,'style'=>"position: absolute; margin-top: -35px; margin-left: -72px;"]); - } - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - if (!permission_exists('outbound_caller_id_select')) { - echo "\n"; - } - echo "\n"; - - //data - if (is_array($extensions) && @sizeof($extensions) != 0) { - $x = 0; - foreach ($extensions as $row) { - $tr_link = PROJECT_PATH."/app/extensions/extension_edit.php?id=".$row['extension_uuid']; - echo "\n"; - echo " \n"; - //select caller id - if (permission_exists('outbound_caller_id_select')) { - echo "\n"; - } - //input caller id - else { - echo "\n"; - echo "\n"; - } - echo "\n"; - $x++; - $c = ($c) ? 0 : 1; + if (is_array($extensions) && @sizeof($extensions) != 0) { + echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'collapse'=>false,'style'=>"position: absolute; margin-top: -35px; margin-left: -72px;"]); } - unset($extensions); + + echo "
".$text['label-extension']."".$text['label-caller_id']."".$text['label-destination']."
"; - echo "".escape($row['destination']).""; - if (is_uuid($row['extension_uuid'])) { - echo "\n"; - } - echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if (!permission_exists('outbound_caller_id_select')) { + echo "\n"; + } + echo "\n"; + + //data + if (is_array($extensions) && @sizeof($extensions) != 0) { + $x = 0; + foreach ($extensions as $row) { + $tr_link = PROJECT_PATH."/app/extensions/extension_edit.php?id=".$row['extension_uuid']; + echo "\n"; + echo " \n"; + //select caller id + if (permission_exists('outbound_caller_id_select')) { + echo "\n"; + } + //input caller id + else { + echo "\n"; + echo "\n"; + } + echo "\n"; + $x++; + $c = ($c) ? 0 : 1; + } + unset($extensions); + } + + echo "
".$text['label-extension']."".$text['label-caller_id']."".$text['label-destination']."
"; + echo "".escape($row['destination']).""; + if (is_uuid($row['extension_uuid'])) { + echo "\n"; + } + echo "
\n"; + echo "
"; + //$n++; + + echo "\n"; + echo "\n"; + + echo ""; } - - echo "\n"; - echo "
"; - //$n++; - - echo "\n"; - echo "\n"; - - echo ""; echo "
\n"; } diff --git a/app/ring_groups/resources/dashboard/ring_group_forward.php b/app/ring_groups/resources/dashboard/ring_group_forward.php index c525302d76..6c36606abe 100644 --- a/app/ring_groups/resources/dashboard/ring_group_forward.php +++ b/app/ring_groups/resources/dashboard/ring_group_forward.php @@ -153,13 +153,12 @@ //ring group forward echo "
\n"; - echo "
\n"; - echo " ".$text['header-ring-group-forward']."\n"; - + echo "
\n"; + echo " ".$text['header-ring-group-forward']."\n"; //doughnut chart if ($dashboard_chart_type == "doughnut") { - echo "
\n"; + echo "
\n"; echo "\n"; } if ($dashboard_chart_type == "none") { - echo " ".$stats['forwarding'].""; + echo " ".$stats['forwarding'].""; } echo "
\n"; //details - if (permission_exists('ring_group_forward')) { - echo "
\n"; - } - - echo "
"; - - if (is_array($result) && @sizeof($result) != 0 && permission_exists('ring_group_forward')) { - echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'collapse'=>false,'style'=>"position: absolute; margin-top: -35px; margin-left: -72px;",'onclick'=>"list_form_submit('form_list_ring_group_forward');"]); - } - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - -//data - if (is_array($result) && @sizeof($result) != 0) { - $x = 0; - foreach ($result as $row) { - $tr_link = PROJECT_PATH."/app/ring_groups/ring_group_edit.php?id=".$row['ring_group_uuid']; - echo "\n"; - echo " \n"; - echo " \n"; - if (permission_exists('ring_group_forward')) { - echo " \n"; - if (permission_exists('ring_group_forward')) { - echo " \n"; - echo "\n"; - $x++; - $c = ($c) ? 0 : 1; + if ($dashboard_details_state != 'disabled') { + if (permission_exists('ring_group_forward')) { + echo "\n"; } - unset($result); + + echo "
"; + + if (is_array($result) && @sizeof($result) != 0 && permission_exists('ring_group_forward')) { + echo button::create(['type'=>'button','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'collapse'=>false,'style'=>"position: absolute; margin-top: -35px; margin-left: -72px;",'onclick'=>"list_form_submit('form_list_ring_group_forward');"]); + } + + echo "
".$text['label-name']."".$text['label-extension']."".$text['label-forwarding']."".$text['label-destination']."
".escape($row['ring_group_name'])."".escape($row['ring_group_extension']).""; - if ($row["ring_group_forward_enabled"] == 'true') { - echo $text['option-enabled']; - } - else { - echo $text['option-disabled']; - } - } - echo " "; - echo escape(format_phone($row["ring_group_forward_destination"] ?? '')); - } - echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + //data + if (is_array($result) && @sizeof($result) != 0) { + $x = 0; + foreach ($result as $row) { + $tr_link = PROJECT_PATH."/app/ring_groups/ring_group_edit.php?id=".$row['ring_group_uuid']; + echo "\n"; + echo " \n"; + echo " \n"; + if (permission_exists('ring_group_forward')) { + echo " \n"; + if (permission_exists('ring_group_forward')) { + echo " \n"; + echo "\n"; + $x++; + $c = ($c) ? 0 : 1; + } + unset($result); + } + + echo "
".$text['label-name']."".$text['label-extension']."".$text['label-forwarding']."".$text['label-destination']."
".escape($row['ring_group_name'])."".escape($row['ring_group_extension']).""; + if ($row["ring_group_forward_enabled"] == 'true') { + echo $text['option-enabled']; + } + else { + echo $text['option-disabled']; + } + } + echo " "; + echo escape(format_phone($row["ring_group_forward_destination"] ?? '')); + } + echo "
\n"; + echo "
"; + //$n++; + + if (permission_exists('ring_group_forward')) { + echo "\n"; + echo "
\n"; + } + + echo ""; } - - echo "\n"; - echo "
"; - //$n++; - - if (permission_exists('ring_group_forward')) { - echo "\n"; - echo "\n"; - } - - echo ""; echo "
\n"; ?> diff --git a/app/switch/resources/dashboard/switch_status.php b/app/switch/resources/dashboard/switch_status.php index 3b1cfdfb0f..284d197894 100644 --- a/app/switch/resources/dashboard/switch_status.php +++ b/app/switch/resources/dashboard/switch_status.php @@ -76,13 +76,14 @@ $registrations = $registration->count(); } - echo "
\n"; - echo " ".$text['label-switch_status']."\n"; +//show the content + echo "
\n"; + echo " ".$text['label-switch_status']."\n"; if ($dashboard_chart_type == "doughnut") { //add doughnut chart ?> -
+
+ \n"; $x = 0; foreach($dashboard as $row) { - $dashboard_name = $row['dashboard_name']; + $dashboard_name = str_replace(" ", "_", strtolower($row['dashboard_name'])); $dashboard_icon = $row['dashboard_icon'] ?? ''; $dashboard_url = $row['dashboard_url'] ?? ''; $dashboard_chart_type = $row['dashboard_chart_type'] ?? 'doughnut'; - $dashboard_heading_background_color = $row['dashboard_heading_background_color'] ?? $settings->get('theme', 'dashboard_heading_background_color'); - $dashboard_heading_text_color = $row['dashboard_heading_text_color'] ?? $settings->get('theme', 'dashboard_heading_text_color'); - $dashboard_number_background_color = $row['dashboard_number_background_color'] ?? $settings->get('theme', 'dashboard_number_background_color'); $dashboard_number_text_color = $row['dashboard_number_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color'); $dashboard_details_state = $row['dashboard_details_state']; - echo "
\n"; + $grid_row_end = ($dashboard_details_state == "expanded" || empty($dashboard_details_state)) ? "grid-row-end: span 5;" : "grid-row-end: span 2;"; + + echo "
\n"; include($row['dashboard_path']); echo "
\n"; $x++; diff --git a/core/dashboard/resources/dashboard/icon.php b/core/dashboard/resources/dashboard/icon.php index 1763ab78b1..d8f7c7720f 100644 --- a/core/dashboard/resources/dashboard/icon.php +++ b/core/dashboard/resources/dashboard/icon.php @@ -11,21 +11,23 @@ //dashboard icon echo "
\n"; - echo "
\n"; - echo " ". $dashboard_name . ""; // (isset($text['label-'.$dashboard_name])) ? $text['label-'.$dashboard_name] : $dashboard_name - echo " \n"; + echo "
\n"; + echo " ".$dashboard_name.""; // (isset($text['label-'.$dashboard_name])) ? $text['label-'.$dashboard_name] : $dashboard_name + echo " \n"; echo "
\n"; - echo "
"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "  \n"; - echo "
\n"; - //echo "".$text['label-view_all']."\n"; - echo "
"; - //$n++; + if ($dashboard_detail_state != "disabled") { + echo "
"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "  \n"; + echo "
\n"; + //echo "".$text['label-view_all']."\n"; + echo "
"; + //$n++; + } echo ""; echo "
\n"; diff --git a/themes/default/css.php b/themes/default/css.php index 3cce04155b..9113b9a817 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -2631,7 +2631,7 @@ else { //default: white $padding_top_bottom = (int) floor((100-$tmp) * 0.25); ?> padding-top: ; - padding-bottom: ; + padding-bottom: ; } span.hud_stat:hover {