From 44fe36fc3d5201e1b20f26b4fb85a89db01bd033 Mon Sep 17 00:00:00 2001 From: fusionate Date: Fri, 9 Jun 2023 18:12:38 +0000 Subject: [PATCH] Transactions: Hide View button if not desired. --- .../database_transactions.php | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/app/database_transactions/database_transactions.php b/app/database_transactions/database_transactions.php index 4eb1203c10..499de06361 100644 --- a/app/database_transactions/database_transactions.php +++ b/app/database_transactions/database_transactions.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2016 - 2022 + Portions created by the Initial Developer are Copyright (C) 2016 - 2023 the Initial Developer. All Rights Reserved. Contributor(s): @@ -190,10 +190,7 @@ echo th_order_by('transaction_address', $text['label-transaction_address'], $order_by, $order); echo th_order_by('transaction_type', $text['label-transaction_type'], $order_by, $order); echo th_order_by('transaction_date', $text['label-transaction_date'], $order_by, $order); - //echo th_order_by('transaction_old', $text['label-transaction_old'], $order_by, $order); - //echo th_order_by('transaction_new', $text['label-transaction_new'], $order_by, $order); - //echo th_order_by('transaction_result', $text['label-transaction_result'], $order_by, $order); - if (permission_exists('database_transaction_edit') && $list_row_edit_button == 'true') { + if (permission_exists('database_transaction_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') { echo "  \n"; } echo "\n"; @@ -212,12 +209,9 @@ echo " ".escape($row['transaction_address'])." \n"; echo " ".escape($row['transaction_type'])." \n"; echo " ".escape($row['transaction_date'])." \n"; - //echo " ".escape($row['transaction_old']." \n"; - //echo " ".escape($row['transaction_new']." \n"; - //echo " ".escape($row['transaction_result']." \n"; - if (permission_exists('database_transaction_edit')) { - echo " "; - echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$button_icon_view,'link'=>$list_row_url]); + if (permission_exists('database_transaction_edit') && !empty($list_row_edit_button) && $list_row_edit_button == 'true') { + echo " \n"; + echo button::create(['type'=>'button','title'=>$text['button-view'],'icon'=>$_SESSION['theme']['button_icon_view'],'link'=>$list_row_url]); echo " \n"; } echo "\n"; @@ -233,4 +227,4 @@ //include the footer require_once "resources/footer.php"; -?> +?> \ No newline at end of file