Add a new dashboard

This commit is contained in:
markjcrane
2021-11-09 18:42:14 -07:00
parent 75e83ff879
commit 032a5aec39
34 changed files with 3249 additions and 20 deletions
+6 -6
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-2019
Portions created by the Initial Developer are Copyright (C) 2008-2021
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -41,7 +41,7 @@
//add multi-lingual support
$language = new text;
$text = $language->get($_SESSION['domain']['language']['code'], 'app/calls');
$text = $language->get($_SESSION['domain']['language']['code'], 'app/call_forward');
//get posted data
if (is_array($_POST['extensions'])) {
@@ -73,7 +73,7 @@
break;
}
header('Location: calls.php'.($search != '' ? '?search='.urlencode($search) : null));
header('Location: call_forward.php'.($search != '' ? '?search='.urlencode($search) : null));
exit;
}
@@ -200,7 +200,7 @@
echo " <div class='heading'><b>".$text['header-call_forward']."</b></div>\n";
echo " <div class='actions'>\n";
if ($num_rows > 10) {
echo button::create(['type'=>'button','label'=>$text['button-view_all'],'icon'=>'project-diagram','collapse'=>false,'link'=>PROJECT_PATH.'/app/calls/calls.php']);
echo button::create(['type'=>'button','label'=>$text['button-view_all'],'icon'=>'project-diagram','collapse'=>false,'link'=>PROJECT_PATH.'/app/call_forward/call_forward.php']);
}
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
@@ -231,7 +231,7 @@
}
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search)."\" placeholder=\"".$text['label-search']."\" onkeydown='list_search_reset();'>";
echo button::create(['label'=>$text['button-search'],'icon'=>$_SESSION['theme']['button_icon_search'],'type'=>'submit','id'=>'btn_search','style'=>($search != '' ? 'display: none;' : null)]);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'calls.php','style'=>($search == '' ? 'display: none;' : null)]);
echo button::create(['label'=>$text['button-reset'],'icon'=>$_SESSION['theme']['button_icon_reset'],'type'=>'button','id'=>'btn_reset','link'=>'call_forward.php','style'=>($search == '' ? 'display: none;' : null)]);
if ($paging_controls_mini != '') {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>";
}
@@ -284,7 +284,7 @@
if (is_array($extensions)) {
$x = 0;
foreach($extensions as $row) {
$list_row_url = PROJECT_PATH."/app/calls/call_edit.php?id=".$row['extension_uuid']."&return_url=".urlencode($_SERVER['REQUEST_URI']);
$list_row_url = PROJECT_PATH."/app/call_forward/call_forward_edit.php?id=".$row['extension_uuid']."&return_url=".urlencode($_SERVER['REQUEST_URI']);
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (!$is_included && $extensions) {
echo " <td class='checkbox'>\n";
+1 -1
View File
@@ -495,7 +495,7 @@
echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-call_forward']."</b></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>'calls.php']);
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$_SESSION['theme']['button_icon_back'],'id'=>'btn_back','link'=>'call_forward.php']);
echo button::create(['type'=>'submit','label'=>$text['button-save'],'icon'=>$_SESSION['theme']['button_icon_save'],'id'=>'btn_save','style'=>'margin-left: 15px;']);
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
@@ -0,0 +1,51 @@
<?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) 2021
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//includes
//require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get($_SESSION['domain']['language']['code'], 'app/call_forward');
//set a variable for the included code to know its included
$is_included = true;
//include the call forward
require_once "app/call_forward/call_forward.php";
?>
@@ -0,0 +1,22 @@
<?php
$array['dashboard'][$x]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
$array['dashboard'][$x]['dashboard_name'] = 'Call Forward';
$array['dashboard'][$x]['dashboard_path'] = 'app/call_forward/resources/dashboard/call_forward.php';
$array['dashboard'][$x]['dashboard_order'] = '0';
$array['dashboard'][$x]['dashboard_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_description'] = 'Call routing for extension using Call forward, Follow Me and Do Not Disturb.';
$y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '5de9537d-4098-405f-9922-caf5f85fade3';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin';
$y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'b550e850-36d5-4cde-9936-85180f401df4';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin';
$y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '6d04646f-54cf-49f4-a3ce-a16e7adda2b9';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user';
?>