Skip to content

Commit

Permalink
Update missed, recent calls and new messages
Browse files Browse the repository at this point in the history
  • Loading branch information
markjcrane authored Sep 14, 2024
1 parent c406761 commit a9f61e8
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 14 deletions.
6 changes: 3 additions & 3 deletions app/voicemails/resources/dashboard/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
$array['dashboard'][$x]['dashboard_content'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_chart_type'] = 'icon';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color'] = '';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#bfbfbf';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] ='';
$array['dashboard'][$x]['dashboard_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1';
$array['dashboard'][$x]['dashboard_row_span'] = '2';
$array['dashboard'][$x]['dashboard_row_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_order'] = '70';
$array['dashboard'][$x]['dashboard_enabled'] = 'true';
Expand Down
13 changes: 13 additions & 0 deletions app/voicemails/resources/dashboard/voicemails.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,22 @@
</script>
<?php
}

//dashboard number
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "number") {
echo " <span class='hud_stat'>".$messages['new']."</span>";
}

//dashboard icon
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "icon") {
echo "<span class='hud_content'>\n";
echo "<div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n";
echo " <span class='' style=\"background-color: #03c04a; color: #ffffff; font-size: 12px; font-weight: bold; text-align: center; position: absolute; bottom: -5px; right: -15px; padding: 4px 8px; border-radius: 50%;\">".$messages['new']."</span>\n";
echo " </div>\n";
echo "</span>";
}

echo "</div>\n";

if ($dashboard_details_state != 'disabled') {
Expand Down
12 changes: 6 additions & 6 deletions app/xml_cdr/resources/dashboard/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
$array['dashboard'][$x]['dashboard_content'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_chart_type'] = 'icon';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color'] = '';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#bfbfbf';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] ='';
$array['dashboard'][$x]['dashboard_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1';
$array['dashboard'][$x]['dashboard_row_span'] = '2';
$array['dashboard'][$x]['dashboard_row_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_order'] = '70';
$array['dashboard'][$x]['dashboard_enabled'] = 'true';
Expand Down Expand Up @@ -56,10 +56,10 @@
$array['dashboard'][$x]['dashboard_content'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_chart_type'] = 'icon';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color'] = '';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = '#bfbfbf';
$array['dashboard'][$x]['dashboard_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = '';
Expand All @@ -69,7 +69,7 @@
$array['dashboard'][$x]['dashboard_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1';
$array['dashboard'][$x]['dashboard_row_span'] = '2';
$array['dashboard'][$x]['dashboard_row_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_order'] = '70';
$array['dashboard'][$x]['dashboard_enabled'] = 'true';
Expand Down
12 changes: 12 additions & 0 deletions app/xml_cdr/resources/dashboard/missed_calls.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,21 @@
</script>
<?php
}

//dashboard number
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "number") {
echo "<span class='hud_stat'>".$num_rows."</span>";
}

//dashboard icon
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "icon") {
echo "<span class='hud_content'>\n";
echo "<div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n";
echo " <span class='' style=\"background-color: #EA4C46; color: #ffffff; font-size: 12px; font-weight: bold; text-align: center; position: absolute; bottom: -5px; right: -15px; padding: 4px 8px; border-radius: 50%;\">".$num_rows."</span>\n";
echo " </div>\n";
echo "</span>";
}
echo "</div>\n";

if ($dashboard_details_state != 'disabled') {
Expand Down
13 changes: 13 additions & 0 deletions app/xml_cdr/resources/dashboard/recent_calls.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,22 @@
</script>
<?php
}

//dashboard numeric
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "number") {
echo "<span class='hud_stat'>".$num_rows."</span>";
}

//dashboard icon
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "icon") {
echo "<div class='hud_content'>\n";
echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n";
echo " <span class='' style=\"background-color: #417ed3; color: #ffffff; font-size: 12px; font-weight: bold; text-align: center; position: absolute; bottom: -5px; right: -15px; padding: 4px 8px; border-radius: 50%;\">".$num_rows."</span>\n";
echo " </div>\n";
echo "</div>";
}

echo "</div>\n";

if ($dashboard_details_state != 'disabled') {
Expand Down
8 changes: 3 additions & 5 deletions core/dashboard/dashboard_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,8 @@
echo "</td>\n";
echo "</tr>\n";

if (
$action == "add" ||
$dashboard_path == "dashboard/icon"
) {
echo " <tr class='type_icon' ".($dashboard_path != 'dashboard/icon' ? "style='display: none;'" : null).">";
if ($action == "add" || $dashboard_path == "dashboard/icon" || $dashboard_chart_type == "icon") {
echo " <tr class='type_icon'>"; // ".(($dashboard_path != 'dashboard/icon' || $dashboard_chart_type == "icon") ? "style='display: none;'" : null)."
echo " <td class='vncell'>".$text['label-icon']."</td>";
echo " <td class='vtable' style='vertical-align: bottom;'>";
if (file_exists($_SERVER["PROJECT_ROOT"].'/resources/fontawesome/fa_icons.php')) {
Expand Down Expand Up @@ -818,6 +815,7 @@
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select name='dashboard_chart_type' class='formfld'>\n";
echo " <option value='doughnut'>".$text['label-doughnut']."</option>\n";
echo " <option value='icon' ".(!empty($dashboard_chart_type) && $dashboard_chart_type == "icon" ? "selected='selected'" : null).">".$text['label-icon']."</option>\n";
echo " <option value='number' ".(!empty($dashboard_chart_type) && $dashboard_chart_type == "number" ? "selected='selected'" : null).">".$text['label-number']."</option>\n";
if ($dashboard_path == "system/system_status") {
echo " <option value='progress_bar' ".(!empty($dashboard_chart_type) && $dashboard_chart_type == "progress_bar" ? "selected='selected'" : null).">".$text['label-progress_bar']."</option>\n";
Expand Down

0 comments on commit a9f61e8

Please sign in to comment.