Look and feel v15

This commit is contained in:
Laurent Destailleur 2022-01-02 18:57:16 +01:00
parent 507f91acf8
commit 0c82577fc5
6 changed files with 15 additions and 13 deletions

View File

@ -8100,7 +8100,7 @@ abstract class CommonObject
* @param string $sdir Directory to scan (full absolute path) * @param string $sdir Directory to scan (full absolute path)
* @param int $size 0=original size, 1='small' use thumbnail if possible * @param int $size 0=original size, 1='small' use thumbnail if possible
* @param int $nbmax Nombre maximum de photos (0=pas de max) * @param int $nbmax Nombre maximum de photos (0=pas de max)
* @param int $nbbyrow Number of image per line or -1 to use div. Used only if size=1. * @param int $nbbyrow Number of image per line or -1 to use div separator or 0 to use no separator. Used only if size=1 or 'small'.
* @param int $showfilename 1=Show filename * @param int $showfilename 1=Show filename
* @param int $showaction 1=Show icon with action links (resize, delete) * @param int $showaction 1=Show icon with action links (resize, delete)
* @param int $maxHeight Max height of original image when size='small' (so we can use original even if small requested). If 0, always use 'small' thumb image. * @param int $maxHeight Max height of original image when size='small' (so we can use original even if small requested). If 0, always use 'small' thumb image.
@ -8219,26 +8219,28 @@ abstract class CommonObject
$alt = ''; $alt = '';
} }
$addphotorefcss = 1;
if ($usesharelink) { if ($usesharelink) {
if ($val['share']) { if ($val['share']) {
if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) { if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) {
$return .= '<!-- Show original file (thumb not yet available with shared links) -->'; $return .= '<!-- Show original file (thumb not yet available with shared links) -->';
$return .= '<img class="photo photowithmargin" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">'; $return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').'" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">';
} else { } else {
$return .= '<!-- Show original file -->'; $return .= '<!-- Show original file -->';
$return .= '<img class="photo photowithmargin" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">'; $return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').'" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?hashp='.urlencode($val['share']).'" title="'.dol_escape_htmltag($alt).'">';
} }
} else { } else {
$return .= '<!-- Show nophoto file (because file is not shared) -->'; $return .= '<!-- Show nophoto file (because file is not shared) -->';
$return .= '<img class="photo photowithmargin" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png" title="'.dol_escape_htmltag($alt).'">'; $return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').'" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png" title="'.dol_escape_htmltag($alt).'">';
} }
} else { } else {
if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) { if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) {
$return .= '<!-- Show thumb -->'; $return .= '<!-- Show thumb -->';
$return .= '<img class="photo photowithmargin maxwidth150onsmartphone maxwidth200" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">'; $return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').' maxwidth150onsmartphone maxwidth200" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">';
} else { } else {
$return .= '<!-- Show original file -->'; $return .= '<!-- Show original file -->';
$return .= '<img class="photo photowithmargin" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">'; $return .= '<img class="photo photowithmargin'.($addphotorefcss ? ' photoref' : '').'" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">';
} }
} }

View File

@ -4506,8 +4506,8 @@ label.radioprivate {
border: 0px; border: 0px;
} }
.photowithmargin { .photowithmargin {
margin-bottom: 2px; /* margin-bottom: 2px;
margin-top: 10px; margin-top: 2px; */
} }
div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a div.photoref frame only */ div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a div.photoref frame only */
margin-right: 15px; margin-right: 15px;

View File

@ -4462,8 +4462,8 @@ label.radioprivate {
border: 0px; border: 0px;
} }
.photowithmargin { .photowithmargin {
margin-bottom: 2px; /* margin-bottom: 2px;
margin-top: 2px; margin-top: 2px; */
} }
div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a div.photoref frame only */ div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a div.photoref frame only */
margin-right: 15px; margin-right: 15px;

View File

@ -165,7 +165,7 @@ if ($id > 0 || !empty($track_id) || !empty($ref)) {
$langs->load("users"); $langs->load("users");
$fuser = new User($db); $fuser = new User($db);
$fuser->fetch($object->fk_user_create); $fuser->fetch($object->fk_user_create);
$morehtmlref .= $fuser->getNomUrl(0); $morehtmlref .= $fuser->getNomUrl(-1);
} }
if (!empty($object->origin_email)) { if (!empty($object->origin_email)) {
$morehtmlref .= '<br>'.$langs->trans("CreatedBy").' : '; $morehtmlref .= '<br>'.$langs->trans("CreatedBy").' : ';

View File

@ -134,7 +134,7 @@ if ($object->id) {
$langs->load("users"); $langs->load("users");
$fuser = new User($db); $fuser = new User($db);
$fuser->fetch($object->fk_user_create); $fuser->fetch($object->fk_user_create);
$morehtmlref .= $fuser->getNomUrl(0); $morehtmlref .= $fuser->getNomUrl(-1);
} }
if (!empty($object->origin_email)) { if (!empty($object->origin_email)) {
$morehtmlref .= '<br>'.$langs->trans("CreatedBy").' : '; $morehtmlref .= '<br>'.$langs->trans("CreatedBy").' : ';

View File

@ -161,7 +161,7 @@ if ($object->fk_user_create > 0) {
$langs->load("users"); $langs->load("users");
$fuser = new User($db); $fuser = new User($db);
$fuser->fetch($object->fk_user_create); $fuser->fetch($object->fk_user_create);
$morehtmlref .= $fuser->getNomUrl(0); $morehtmlref .= $fuser->getNomUrl(-1);
} }
if (!empty($object->origin_email)) { if (!empty($object->origin_email)) {
$morehtmlref .= '<br>'.$langs->trans("CreatedBy").' : '; $morehtmlref .= '<br>'.$langs->trans("CreatedBy").' : ';