mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-30 21:31:42 +01:00
Fix: use the mini image on tooltip of thirdparties
This commit is contained in:
@@ -5328,7 +5328,7 @@ class Form
|
||||
{
|
||||
$ret.='</ul></div>';
|
||||
}
|
||||
$ret.='<div class="statusref">'.$morehtmlright.'</div>';
|
||||
if ($morehtmlright) $ret.='<div class="statusref">'.$morehtmlright.'</div>';
|
||||
$ret.='</div>';
|
||||
|
||||
return $ret;
|
||||
@@ -5386,19 +5386,15 @@ class Form
|
||||
$id = (! empty($object->id) ? $object->id : $object->rowid);
|
||||
|
||||
$ret='';$dir='';$file='';$originalfile='';$altfile='';$email='';
|
||||
|
||||
if ($modulepart=='societe')
|
||||
{
|
||||
$dir=$conf->societe->multidir_output[$entity];
|
||||
$smallfile=$object->logo;
|
||||
$smallfile=preg_replace('/(\.png|\.gif|\.jpg|\.jpeg|\.bmp)/i','_small\\1',$smallfile);
|
||||
if (! empty($object->logo))
|
||||
{
|
||||
// TODO Introduce get_exdir
|
||||
if ((string) $imagesize == 'mini') $file=$id.'/logos/thumbs/'.getImageFileNameForSize($object->logo, '_mini');
|
||||
else if ((string) $imagesize == 'small') $file=$id.'/logos/thumbs/'.getImageFileNameForSize($object->logo, '_small');
|
||||
else $file=$id.'/logos/thumbs/'.$smallfile;
|
||||
$originalfile=$id.'/logos/thumbs/'.$smallfile;
|
||||
if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.getImageFileNameForSize($object->logo, '_mini'); // getImageFileNameForSize include the thumbs
|
||||
else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.getImageFileNameForSize($object->logo, '_small');
|
||||
else $file=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.$object->logo;
|
||||
$originalfile=get_exdir(0, 0, 0, 0, $object, 'thirdparty').'/logos/'.$object->logo;
|
||||
}
|
||||
}
|
||||
else if ($modulepart=='contact')
|
||||
@@ -5406,11 +5402,10 @@ class Form
|
||||
$dir=$conf->societe->multidir_output[$entity].'/contact';
|
||||
if (! empty($object->photo))
|
||||
{
|
||||
// TODO Introduce get_exdir
|
||||
if ((string) $imagesize == 'mini') $file=$id.'/photos/thumbs/'.getImageFileNameForSize($object->photo, '_mini');
|
||||
else if ((string) $imagesize == 'small') $file=$id.'/photos/thumbs/'.getImageFileNameForSize($object->photo, '_small');
|
||||
else $file=$id.'/photos/'.$object->photo;
|
||||
$originalfile=$id.'/photos/'.$object->photo;
|
||||
if ((string) $imagesize == 'mini') $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.getImageFileNameForSize($object->photo, '_mini');
|
||||
else if ((string) $imagesize == 'small') $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.getImageFileNameForSize($object->photo, '_small');
|
||||
else $file=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.$object->photo;
|
||||
$originalfile=get_exdir(0, 0, 0, 0, $object, 'contact').'/photos/'.$object->photo;
|
||||
}
|
||||
}
|
||||
else if ($modulepart=='userphoto')
|
||||
|
||||
@@ -908,7 +908,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'</div>';
|
||||
if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto($modulepart,$object,0,0,0,'photoref','small',1,0,$maxvisiblephotos).'</div>';
|
||||
}
|
||||
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
|
||||
if ($object->element == 'societe' && ! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||
@@ -3961,9 +3961,12 @@ function get_exdir($num,$level,$alpha,$withoutslash,$object,$modulepart)
|
||||
else
|
||||
{
|
||||
// TODO
|
||||
// We will introduce here a common way of forging path for document storage
|
||||
// We will enhance here a common way of forging path for document storage
|
||||
// Here, object->id, object->ref and object->modulepart are required.
|
||||
|
||||
if (in_array($modulepart, array('thirdparty','contact')))
|
||||
{
|
||||
$path=$object->ref?$object->ref:$object->id;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($withoutslash) && ! empty($path)) $path.='/';
|
||||
|
||||
@@ -1315,7 +1315,7 @@ else
|
||||
$picto=($object->type== Product::TYPE_SERVICE?'service':'product');
|
||||
dol_fiche_head($head, 'card', $titre, 0, $picto);
|
||||
|
||||
dol_banner_tab($object, 'id', '', ($user->societe_id?0:1), 'ref');
|
||||
dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref');
|
||||
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
|
||||
@@ -1835,7 +1835,7 @@ class Societe extends CommonObject
|
||||
{
|
||||
$label.= '</br><div class="photointooltip">';
|
||||
//if (! is_object($form)) $form = new Form($db);
|
||||
$label.= Form::showphoto('societe', $this, 80);
|
||||
$label.= Form::showphoto('societe', $this, 80, 0, 0, 'photowithmargin', 'mini');
|
||||
$label.= '</div><div style="clear: both;"></div>';
|
||||
}
|
||||
$label.= '</div>';
|
||||
|
||||
@@ -662,6 +662,7 @@ div.statusref {
|
||||
padding-right: 12px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 10px;
|
||||
clear: both;
|
||||
}
|
||||
img.photoref {
|
||||
border: 1px solid #CCC;
|
||||
@@ -3650,7 +3651,7 @@ a span.select2-chosen
|
||||
color: #fff !important;
|
||||
}
|
||||
span.noborderoncategories a, li.noborderoncategories a {
|
||||
color: #fff;
|
||||
color: #fff !important;
|
||||
line-height: normal;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user