Add permission_exists outbound_caller_id_name to hide column if user is does not have the permission.

This commit is contained in:
FusionPBX 2020-07-07 11:04:17 -06:00 committed by GitHub
parent 65fdd51f07
commit e9584fe09c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -255,7 +255,9 @@
} }
echo th_order_by('extension', $text['label-extension'], $order_by, $order); echo th_order_by('extension', $text['label-extension'], $order_by, $order);
echo th_order_by('effective_caller_id_name', $text['label-effective_cid_name'], $order_by, $order, null, "class='hide-xs'"); echo th_order_by('effective_caller_id_name', $text['label-effective_cid_name'], $order_by, $order, null, "class='hide-xs'");
echo th_order_by('outbound_caller_id_name', $text['label-outbound_cid_name'], $order_by, $order, null, "class='hide-sm-dn'"); if (permission_exists("outbound_caller_id_name")) {
echo th_order_by('outbound_caller_id_name', $text['label-outbound_cid_name'], $order_by, $order, null, "class='hide-sm-dn'");
}
echo th_order_by('call_group', $text['label-call_group'], $order_by, $order); echo th_order_by('call_group', $text['label-call_group'], $order_by, $order);
if (permission_exists("extension_user_context")) { if (permission_exists("extension_user_context")) {
echo th_order_by('user_context', $text['label-user_context'], $order_by, $order); echo th_order_by('user_context', $text['label-user_context'], $order_by, $order);
@ -296,7 +298,9 @@
echo " </td>\n"; echo " </td>\n";
echo " <td class='hide-xs'>".escape($row['effective_caller_id_name'])."&nbsp;</td>\n"; echo " <td class='hide-xs'>".escape($row['effective_caller_id_name'])."&nbsp;</td>\n";
echo " <td class='hide-sm-dn'>".escape($row['outbound_caller_id_name'])."&nbsp;</td>\n"; if (permission_exists("outbound_caller_id_name")) {
echo " <td class='hide-sm-dn'>".escape($row['outbound_caller_id_name'])."&nbsp;</td>\n";
}
echo " <td>".escape($row['call_group'])."&nbsp;</td>\n"; echo " <td>".escape($row['call_group'])."&nbsp;</td>\n";
if (permission_exists("extension_user_context")) { if (permission_exists("extension_user_context")) {
echo " <td>".escape($row['user_context'])."</td>\n"; echo " <td>".escape($row['user_context'])."</td>\n";
@ -358,4 +362,4 @@
//show the footer //show the footer
require_once "resources/footer.php"; require_once "resources/footer.php";
?> ?>