From a2beb43204eecb9cbaf6dc643f9d69d52172ad52 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 16 Apr 2010 14:18:04 +0000 Subject: [PATCH] Layout improvement in hyperlink_back function --- CHANGELOG.txt | 2 ++ includes/ui/ui_controls.inc | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 903df7b9..3eb5338b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -22,6 +22,8 @@ $ -> Affected files 16-Apr-2010 Joe Hunt # Minor fixes in voiding transactions $ /admin/void_transaction.php +! Layout improvement in hyperlink_back function +$ /includes/ui/ui_controls.inc 15-Apr-2010 Joe Hunt ! Added an alternative way of presenting tax included on invoices. diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index 6a43115f..287b446a 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -151,20 +151,23 @@ function access_string($label, $clean=false) function hyperlink_back($center=true, $no_menu=true, $type_no=0, $trans_no=0) { + global $path_to_root; + if ($center) echo "
"; - start_table(false, "width=30%"); + $id = 0; + if ($no_menu && $type_no != 0 && $trans_no != 0) + { + include_once($path_to_root."/admin/db/attachments_db.inc"); + $id = has_attachment($type_no, $trans_no); + } + $width = ($id != 0 ? "30%" : "20%"); + start_table(false, "width=$width"); start_row(); if ($no_menu) { - if ($type_no != 0 && $trans_no != 0) - { - global $path_to_root; - include_once($path_to_root."/admin/db/attachments_db.inc"); - $id = has_attachment($type_no, $trans_no); - if ($id != 0) - echo ""._("View Attachment")."\n"; - } + if ($id != 0) + echo ""._("View Attachment")."\n"; echo ""._("Print")."\n"; } echo "".($no_menu ? _("Close") : _("Back"))."\n"; -- 2.30.2