Update call_block.php

This commit is contained in:
FusionPBX 2019-10-28 16:40:32 -06:00 committed by GitHub
parent 9cb0c210ed
commit 0356b4992c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 3 deletions

View File

@ -99,7 +99,7 @@
}
//prepare to page the results
$sql = "select count(*) from v_call_block ";
$sql = "select count(*) from view_call_block ";
$sql .= "where domain_uuid = :domain_uuid ";
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
@ -118,7 +118,11 @@
$offset = $rows_per_page * $page;
//get the list
$sql = str_replace('count(*)', '*', $sql);
$sql = "select * from view_call_block ";
$sql .= "where domain_uuid = :domain_uuid ";
if (isset($sql_search)) {
$sql .= "and ".$sql_search;
}
$sql .= order_by($order_by, $order, 'call_block_number');
$sql .= limit_offset($rows_per_page, $offset);
$database = new database;
@ -174,6 +178,7 @@
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle();' ".($result ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
echo th_order_by('extension', $text['label-extension'], $order_by, $order);
echo th_order_by('call_block_number', $text['label-number'], $order_by, $order);
echo th_order_by('call_block_name', $text['label-name'], $order_by, $order);
echo th_order_by('call_block_count', $text['label-count'], $order_by, $order, '', "class='center'");
@ -200,6 +205,14 @@
echo " </td>\n";
}
echo " <td>";
if (strlen($row['extension']) == 0) {
echo $text['label-all'];
}
else {
echo "<a href='".$list_row_url."'>".escape($row['extension'])."</a>";
}
echo " </td>\n";
echo " <td>";
if (permission_exists('call_block_edit')) {
echo "<a href='".$list_row_url."'>".escape($row['call_block_number'])."</a>";
}
@ -243,4 +256,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>