From 49d0c8d5ff9b757d7fcd315ede9413e017594b1e Mon Sep 17 00:00:00 2001 From: jean Date: Sat, 4 Jun 2016 16:34:26 +0200 Subject: [PATCH] FIX #4173 Ergonomie of product/service card Add configuration key PRODUCT_NODISPLAYIFNOPHOTO to avoid displaying nophoto.png --- htdocs/core/lib/functions.lib.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 34e52b3c205..c95a83be335 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -902,8 +902,15 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r if ($showimage) $morehtmlleft.='
'.$object->show_photos($conf->product->multidir_output[$object->entity],'small',-$maxvisiblephotos,0,0,0,$width,0).'
'; else { - $nophoto='/public/theme/common/nophoto.png'; - $morehtmlleft.='
No photo
'; + if (!empty($conf->global->PRODUCT_NODISPLAYIFNOPHOTO)) { + $nophoto=''; + $morehtmlleft.='
'; + } + else { + $nophoto='/public/theme/common/nophoto.png'; + $morehtmlleft.='
No photo
'; + } + } } else