2
0
forked from Wavyzz/dolibarr

Better responsive

This commit is contained in:
Laurent Destailleur
2020-10-13 10:51:51 +02:00
parent 7c67dbf6d5
commit bc6b5d919a
6 changed files with 45 additions and 27 deletions

View File

@@ -1522,8 +1522,9 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$showimage = $object->is_photo_available($conf->product->multidir_output[$entity]);
$maxvisiblephotos = (isset($conf->global->PRODUCT_MAX_VISIBLE_PHOTO) ? $conf->global->PRODUCT_MAX_VISIBLE_PHOTO : 5);
if ($conf->browser->layout == 'phone') $maxvisiblephotos = 1;
if ($showimage) $morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('product', $conf->product->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0).'</div>';
else {
if ($showimage) {
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('product', $conf->product->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0).'</div>';
} else {
if (!empty($conf->global->PRODUCT_NODISPLAYIFNOPHOTO)) {
$nophoto = '';
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"></div>';
@@ -1610,9 +1611,9 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
// If the preview file is found
if (file_exists($fileimage))
{
$phototoshow = '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref">';
$phototoshow = '<div class="photoref">';
$phototoshow .= '<img height="'.$heightforphotref.'" class="photo photowithmargin photowithborder" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=apercu'.$modulepart.'&amp;file='.urlencode($relativepathimage).'">';
$phototoshow .= '</div></div>';
$phototoshow .= '</div>';
}
}
} elseif (!$phototoshow)