Fix image on ticket

This commit is contained in:
Laurent Destailleur 2019-09-26 14:28:34 +02:00
parent 0e5d0a7784
commit aa5f35f14f
3 changed files with 7 additions and 14 deletions

View File

@ -6721,16 +6721,9 @@ abstract class CommonObject
$dir = $sdir . '/';
$pdir = '/';
if ($modulepart == 'ticket')
{
$dir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->track_id.'/';
$pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->track_id.'/';
}
else
{
$dir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/';
$pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/';
}
$dir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/';
$pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/';
// For backward compatibility
if ($modulepart == 'product' && ! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO))

View File

@ -7003,8 +7003,8 @@ class Form
// Left part of banner
if ($morehtmlleft)
{
if ($conf->browser->layout == 'phone') $ret.='<div class="floatleft">'.$morehtmlleft.'</div>'; // class="center" to have photo in middle
else $ret.='<div class="inline-block floatleft">'.$morehtmlleft.'</div>';
if ($conf->browser->layout == 'phone') $ret.='<!-- morehmltleft --><div class="floatleft">'.$morehtmlleft.'</div>'; // class="center" to have photo in middle
else $ret.='<!-- morehmltleft --><div class="inline-block floatleft">'.$morehtmlleft.'</div>';
}
//if ($conf->browser->layout == 'phone') $ret.='<div class="clearboth"></div>';

View File

@ -1099,7 +1099,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
{
global $conf, $langs, $hookmanager;
$out="\n".'<div class="tabs" data-role="controlgroup" data-type="horizontal">'."\n";
$out="\n".'<!-- dol_get_fiche_head --><div class="tabs" data-role="controlgroup" data-type="horizontal">'."\n";
if ($morehtmlright) $out.='<div class="inline-block floatright tabsElem">'.$morehtmlright.'</div>'; // Output right area first so when space is missing, text is in front of tabs and not under.
@ -1346,7 +1346,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
elseif ($object->element == 'ticket')
{
$width=80; $cssclass='photoref';
$showimage=$object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->track_id);
$showimage=$object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->ref);
$maxvisiblephotos=(isset($conf->global->TICKETSUP_MAX_VISIBLE_PHOTO)?$conf->global->TICKETSUP_MAX_VISIBLE_PHOTO:2);
if ($conf->browser->layout == 'phone') $maxvisiblephotos=1;
if ($showimage) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$object->show_photos('ticket', $conf->ticket->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0).'</div>';