Debug v13

This commit is contained in:
Laurent Destailleur
2020-12-17 11:57:12 +01:00
parent 36e0f07090
commit b0d524beed
18 changed files with 98 additions and 97 deletions

View File

@@ -1620,6 +1620,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$showimage = $object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->ref);
$maxvisiblephotos = (isset($conf->global->TICKET_MAX_VISIBLE_PHOTO) ? $conf->global->TICKET_MAX_VISIBLE_PHOTO : 2);
if ($conf->browser->layout == 'phone') $maxvisiblephotos = 1;
if ($showimage)
{
$showphoto = $object->show_photos('ticket', $conf->ticket->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0);
@@ -1636,8 +1637,11 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$nophoto = '';
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"></div>';
} else { // Show no photo link
$nophoto = '/public/theme/common/nophoto.png';
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo'.$modulepart.($cssclass ? ' '.$cssclass : '').'" alt="No photo" border="0"'.($width ? ' style="width: '.$width.'px"' : '').' src="'.DOL_URL_ROOT.$nophoto.'"></div>';
$nophoto = img_picto('No photo', 'object_ticket');
$morehtmlleft .= '<!-- No photo to show -->';
$morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref">';
$morehtmlleft .= $nophoto;
$morehtmlleft .= '</div></div>';
}
}
} else {
@@ -3213,7 +3217,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt',
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
'help', 'holiday',
'intervention', 'label', 'language', 'list', 'listlight', 'lot',
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'lot',
'map-marker-alt', 'member', 'money-bill-alt', 'mrp', 'note', 'next',
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
@@ -5590,12 +5594,10 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = '
if ($level == 3) $path = substr($num, 2, 1).'/'.substr($num, 1, 1).'/'.substr($num, 0, 1);
} else {
// We will enhance here a common way of forging path for document storage.
// In a future, we may distribut directories on several levels depending on setup and object.
// In a future, we may distribute directories on several levels depending on setup and object.
// Here, $object->id, $object->ref and $modulepart are required.
//var_dump($modulepart);
if (!in_array($modulepart, array('product'))) { // Test to remove
$path = dol_sanitizeFileName(empty($object->ref) ? (string) $object->id : $object->ref);
}
$path = dol_sanitizeFileName(empty($object->ref) ? (string) $object->id : $object->ref);
}
if (empty($withoutslash) && !empty($path)) $path .= '/';
@@ -8533,7 +8535,7 @@ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = '
* @param string $statusType status0 status1 status2 status3 status4 status5 status6 status7 status8 status9 : image name or badge name
* @param int $displayMode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto
* @param string $url The url for link
* @param array $params Various params. Example: array('tooltip'=>'...', 'badgeParams'=>...)
* @param array $params Various params. Example: array('tooltip'=>'no|...', 'badgeParams'=>...)
* @return string Html status string
*/
function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $statusType = 'status0', $displayMode = 0, $url = '', $params = array())
@@ -8602,7 +8604,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
$statusLabelShort = (empty($statusLabelShort) ? $statusLabel : $statusLabelShort);
$dolGetBadgeParams['attr']['class'] = 'badge-status';
$dolGetBadgeParams['attr']['title'] = empty($params['tooltip']) ? $statusLabel : $params['tooltip'];
$dolGetBadgeParams['attr']['title'] = empty($params['tooltip']) ? $statusLabel : ($params['tooltip'] != 'no' ? $params['tooltip'] : '');
if ($displayMode == 3) {
$return = dolGetBadge((empty($conf->dol_optimize_smallscreen) ? $statusLabel : (empty($statusLabelShort) ? $statusLabel : $statusLabelShort)), '', $statusType, 'dot', $url, $dolGetBadgeParams);