|
@@ -1065,11 +1065,11 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|
|
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0;
|
|
|
$modulepart='unknown';
|
|
|
|
|
|
- if ($object->element == 'societe') $modulepart='societe';
|
|
|
- if ($object->element == 'contact') $modulepart='contact';
|
|
|
- if ($object->element == 'member') $modulepart='memberphoto';
|
|
|
- if ($object->element == 'user') $modulepart='userphoto';
|
|
|
- if ($object->element == 'product') $modulepart='product';
|
|
|
+ if ($object->element == 'societe') $modulepart='societe';
|
|
|
+ if ($object->element == 'contact') $modulepart='contact';
|
|
|
+ if ($object->element == 'member') $modulepart='memberphoto';
|
|
|
+ if ($object->element == 'user') $modulepart='userphoto';
|
|
|
+ if ($object->element == 'product') $modulepart='product';
|
|
|
if (class_exists("Imagick"))
|
|
|
{
|
|
|
if ($object->element == 'propal') $modulepart='propal';
|
|
@@ -1077,6 +1077,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|
|
if ($object->element == 'facture') $modulepart='facture';
|
|
|
if ($object->element == 'fichinter') $modulepart='ficheinter';
|
|
|
if ($object->element == 'contrat') $modulepart='contract';
|
|
|
+ if ($object->element == 'order_supplier') $modulepart='supplier_order';
|
|
|
}
|
|
|
|
|
|
if ($object->element == 'product')
|
|
@@ -1102,12 +1103,11 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|
|
{
|
|
|
if ($showimage)
|
|
|
{
|
|
|
- if ($modulepart != 'unknown')
|
|
|
+ if ($modulepart != 'unknown')
|
|
|
{
|
|
|
$phototoshow='';
|
|
|
-
|
|
|
// Check if a preview file is available
|
|
|
- if (in_array($modulepart, array('propal', 'commande', 'facture', 'ficheinter', 'contract')) && class_exists("Imagick"))
|
|
|
+ if (in_array($modulepart, array('propal', 'commande', 'facture', 'ficheinter', 'contract', 'supplier_order')) && class_exists("Imagick"))
|
|
|
{
|
|
|
$objectref = dol_sanitizeFileName($object->ref);
|
|
|
$dir_output = $conf->$modulepart->dir_output . "/";
|
|
@@ -1137,7 +1137,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|
|
if (file_exists($fileimage))
|
|
|
{
|
|
|
$phototoshow = '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref">';
|
|
|
- $phototoshow.= '<img height="70" class="photo photowithmargin" src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercu'.$modulepart.'&file='.urlencode($relativepathimage).'">';
|
|
|
+ $phototoshow.= '<img height="70" class="photo photowithmargin photowithborder" src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercu'.$modulepart.'&file='.urlencode($relativepathimage).'">';
|
|
|
$phototoshow.= '</div></div>';
|
|
|
}
|
|
|
// Si fichier png PDF de plus d'1 page trouve
|
|
@@ -1145,7 +1145,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|
|
{
|
|
|
$preview = preg_replace('/\.png/','',$relativepathimage) . "-0.png";
|
|
|
$phototoshow = '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref">';
|
|
|
- $phototoshow.= '<img height="70" class="photo photowithmargin" src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercu'.$modulepart.'&file='.urlencode($preview).'"><p>';
|
|
|
+ $phototoshow.= '<img height="70" class="photo photowithmargin photowithborder" src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercu'.$modulepart.'&file='.urlencode($preview).'"><p>';
|
|
|
$phototoshow.= '</div></div>';
|
|
|
}
|
|
|
}
|
|
@@ -1171,7 +1171,6 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|
|
$width=80;
|
|
|
$cssclass='photorefcenter';
|
|
|
$nophoto=img_picto('', 'title_agenda', '', false, 1);
|
|
|
- $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').' src="'.$nophoto.'"></div></div>';
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1179,8 +1178,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|
|
$picto = $object->picto;
|
|
|
if ($object->element == 'project' && ! $object->public) $picto = 'project'; // instead of projectpub
|
|
|
$nophoto=img_picto('', 'object_'.$picto, '', false, 1);
|
|
|
- $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').' src="'.$nophoto.'"></div></div>';
|
|
|
}
|
|
|
+ $morehtmlleft.='<!-- No photo to show --><div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').' src="'.$nophoto.'"></div></div>';
|
|
|
$morehtmlleft.='</div>';
|
|
|
}
|
|
|
}
|