From 61bea8630e31db117513b38f4ac8380101321441 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 4 Dec 2022 11:45:34 +0100 Subject: [PATCH] css --- htdocs/expensereport/card.php | 3 ++- .../tpl/expensereport_linktofile.tpl.php | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 33ec1fede7b..6addeb70859 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2297,7 +2297,7 @@ if ($action == 'create') { } } - $tredited = 'tredited'; + $tredited = 'tredited'; // Case the addfile and linkto file is used for edit (used by following tpl) include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php'; include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php'; @@ -2455,6 +2455,7 @@ if ($action == 'create') { print ''."\n"; print ''; + $tredited = ''; // Case the addfile and linkto file is used for edit (used by following tpl) include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php'; include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php'; diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php index 3835740dd40..fd25a1fff4b 100644 --- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php @@ -136,8 +136,18 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { print ''; } else { - print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>'; - print ''; + if (empty($tredited)) { + $css = 'oddeven nohover trattachnewfilenow'; + $newcolspan = $colspan; + } else { + $css = 'trattachnewfilenow tredited'; + $newcolspan = $colspan - 1; + } + print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>'; + if (!empty($tredited)) { + print ''; + } + print ''; print ''.$langs->trans("NoFilesUploadedYet").''; print ''; }