mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Dashboard - Add gradient background color settings (#6972)
* Dashboard - Add gradient background color setting
This commit is contained in:
@@ -173,12 +173,12 @@
|
||||
//caller id
|
||||
echo "<div class='hud_box'>\n";
|
||||
|
||||
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 13px; background-color: ".$dashboard_number_background_color.";' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_caller_id_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title' style='background-color: ".$dashboard_heading_background_color."; color: ".$dashboard_heading_text_color.";'>".$text['label-caller_id_number']."</span>\n";
|
||||
echo " <div class='hud_container' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_caller_id_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title'>".$text['label-caller_id_number']."</span>\n";
|
||||
|
||||
//doughnut chart
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
echo "<div style='width: 275px; height: 150px; padding-top: 7px;'><canvas id='caller_id_chart'></canvas></div>\n";
|
||||
echo "<div class='hud_chart' style='width: 275px;'><canvas id='caller_id_chart'></canvas></div>\n";
|
||||
|
||||
echo "<script>\n";
|
||||
echo " const caller_id_chart = new Chart(\n";
|
||||
@@ -238,79 +238,81 @@
|
||||
echo "</script>\n";
|
||||
}
|
||||
if ($dashboard_chart_type == "none") {
|
||||
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color."; padding-bottom: 27px;'>".$stats['undefined']."</span>";
|
||||
echo " <span class='hud_stat'>".$stats['undefined']."</span>";
|
||||
}
|
||||
echo " </div>\n";
|
||||
|
||||
//details
|
||||
echo "<form id='form_list_caller_id' method='post' action='".PROJECT_PATH."/app/extensions/resources/dashboard/caller_id.php'>\n";
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
echo "<form id='form_list_caller_id' method='post' action='".PROJECT_PATH."/app/extensions/resources/dashboard/caller_id.php'>\n";
|
||||
|
||||
echo "<div class='hud_details hud_box' id='hud_caller_id_details' style='text-align: right;'>";
|
||||
echo "<div class='hud_details hud_box' id='hud_caller_id_details' style='text-align: right;'>";
|
||||
|
||||
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 "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr style='position: -webkit-sticky; position: sticky; z-index: 5; top: 0;'>\n";
|
||||
echo "<th class='hud_heading'>".$text['label-extension']."</th>\n";
|
||||
echo "<th class='hud_heading'>".$text['label-caller_id']."</th>\n";
|
||||
if (!permission_exists('outbound_caller_id_select')) {
|
||||
echo "<th class='hud_heading'>".$text['label-destination']."</th>\n";
|
||||
}
|
||||
echo "</tr>\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 "<tr href='".$tr_link."'>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." hud_text'>";
|
||||
echo "<a href='".$tr_link."' title=\"".$text['button-edit']."\">".escape($row['destination'])."</a>";
|
||||
if (is_uuid($row['extension_uuid'])) {
|
||||
echo "<input type='hidden' name='extensions[".$x."][extension_uuid]' value=\"".escape($row['extension_uuid'])."\">\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
//select caller id
|
||||
if (permission_exists('outbound_caller_id_select')) {
|
||||
echo "<td valign='top' class='".$row_style[$c]." hud_text input tr_link_void'>";
|
||||
if (count($destinations) > 0) {
|
||||
echo "<select class='formfld' name='extensions[".$x."][outbound_caller_id]' id='outbound_caller_id_number_".$x."' style='width: 100%; min-width: 150px;'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach ($destinations as &$field) {
|
||||
if (!empty($field['destination_caller_id_number'])) {
|
||||
echo "<option value='".escape($field['destination_caller_id_name'])."@".escape($field['destination_caller_id_number'])."' ".($row['outbound_caller_id_number'] == $field['destination_caller_id_number'] ? "selected='selected'" : null).">".escape($field['destination_caller_id_name'])." ".escape($field['destination_caller_id_number'])."</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</select>\n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
}
|
||||
//input caller id
|
||||
else {
|
||||
echo "<td valign='top' class='".$row_style[$c]." hud_text input tr_link_void'>";
|
||||
echo " <input class='formfld' style='width: 100%; min-width: 80px;' type='text' name='extensions[".$x."][outbound_caller_id_name]' maxlength='255' value=\"".escape($row['outbound_caller_id_name'])."\">\n";
|
||||
echo "</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]." hud_text input tr_link_void'>";
|
||||
echo " <input class='formfld' style='width: 100%; min-width: 80px;' type='text' name='extensions[".$x."][outbound_caller_id_number]' maxlength='255' value=\"".$row['outbound_caller_id_number']."\">\n";
|
||||
echo "</td>\n";
|
||||
}
|
||||
echo "</tr>\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 "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr style='position: -webkit-sticky; position: sticky; z-index: 5; top: 0;'>\n";
|
||||
echo "<th class='hud_heading'>".$text['label-extension']."</th>\n";
|
||||
echo "<th class='hud_heading'>".$text['label-caller_id']."</th>\n";
|
||||
if (!permission_exists('outbound_caller_id_select')) {
|
||||
echo "<th class='hud_heading'>".$text['label-destination']."</th>\n";
|
||||
}
|
||||
echo "</tr>\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 "<tr href='".$tr_link."'>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]." hud_text'>";
|
||||
echo "<a href='".$tr_link."' title=\"".$text['button-edit']."\">".escape($row['destination'])."</a>";
|
||||
if (is_uuid($row['extension_uuid'])) {
|
||||
echo "<input type='hidden' name='extensions[".$x."][extension_uuid]' value=\"".escape($row['extension_uuid'])."\">\n";
|
||||
}
|
||||
echo " </td>\n";
|
||||
//select caller id
|
||||
if (permission_exists('outbound_caller_id_select')) {
|
||||
echo "<td valign='top' class='".$row_style[$c]." hud_text input tr_link_void'>";
|
||||
if (count($destinations) > 0) {
|
||||
echo "<select class='formfld' name='extensions[".$x."][outbound_caller_id]' id='outbound_caller_id_number_".$x."' style='width: 100%; min-width: 150px;'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
foreach ($destinations as &$field) {
|
||||
if (!empty($field['destination_caller_id_number'])) {
|
||||
echo "<option value='".escape($field['destination_caller_id_name'])."@".escape($field['destination_caller_id_number'])."' ".($row['outbound_caller_id_number'] == $field['destination_caller_id_number'] ? "selected='selected'" : null).">".escape($field['destination_caller_id_name'])." ".escape($field['destination_caller_id_number'])."</option>\n";
|
||||
}
|
||||
}
|
||||
echo "</select>\n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
}
|
||||
//input caller id
|
||||
else {
|
||||
echo "<td valign='top' class='".$row_style[$c]." hud_text input tr_link_void'>";
|
||||
echo " <input class='formfld' style='width: 100%; min-width: 80px;' type='text' name='extensions[".$x."][outbound_caller_id_name]' maxlength='255' value=\"".escape($row['outbound_caller_id_name'])."\">\n";
|
||||
echo "</td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]." hud_text input tr_link_void'>";
|
||||
echo " <input class='formfld' style='width: 100%; min-width: 80px;' type='text' name='extensions[".$x."][outbound_caller_id_number]' maxlength='255' value=\"".$row['outbound_caller_id_number']."\">\n";
|
||||
echo "</td>\n";
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$x++;
|
||||
$c = ($c) ? 0 : 1;
|
||||
}
|
||||
unset($extensions);
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_caller_id_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>";
|
||||
//$n++;
|
||||
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
|
||||
echo "<span class='hud_expander' onclick=\"$('#hud_caller_id_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
|
||||
echo "</div>\n";
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user