Look and feel v21

This commit is contained in:
Laurent Destailleur 2024-07-24 16:07:15 +02:00
parent a1a0de3ef1
commit cf631563f9
5 changed files with 36 additions and 16 deletions

View File

@ -3780,13 +3780,14 @@ function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0, $mor
* @param string $email EMail to show (only email, without 'Name of recipient' before)
* @param int $cid Id of contact if known
* @param int $socid Id of third party if known
* @param int|string $addlink 0=no link, 1=email has a html email link (+ link to create action if constant AGENDA_ADDACTIONFOREMAIL is on), 'thirdparty'=link to the thirdparty
* @param int|string $addlink 0=no link, 1=email has a html email link (+ link to create action if constant AGENDA_ADDACTIONFOREMAIL is on), 'thirdparty'=link to the thirdparty presend email
* @param int $max Max number of characters to show. Use -1 to hide the mail text and show only the picto.
* @param int $showinvalid 1=Show warning if syntax email is wrong
* @param int|string $withpicto Show picto
* @param int|string $withpicto 0=Show email, 1=Show picto of email + email, 2=Show only picto
* @param string $morecss More CSS
* @return string HTML Link
*/
function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, $showinvalid = 1, $withpicto = 0)
function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, $showinvalid = 1, $withpicto = 0, $morecss = 'paddingrightonly')
{
global $user, $langs, $hookmanager;
@ -3804,7 +3805,7 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64,
}
if ($addlink == 1) {
$newemail = '<a class="paddingrightonly" style="text-overflow: ellipsis;" href="';
$newemail = '<a class="'.($morecss ? $morecss : '').'" style="text-overflow: ellipsis;" href="';
if (!preg_match('/^mailto:/i', $email)) {
$newemail .= 'mailto:';
}
@ -3835,9 +3836,14 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64,
}
}
} elseif ($addlink === 'thirdparty') {
$newemail = '<a class="paddingrightonly" style="text-overflow: ellipsis;" href="'.DOL_URL_ROOT.'/societe/card.php?socid='.$socid.'&action=presend&mode=init#formmailbeforetitle">';
$newemail .= ($withpicto ? img_picto($langs->trans("EMail").' : '.$email, (is_numeric($withpicto) ? 'email' : $withpicto), 'class="paddingrightonly"') : '').$newemail;
$newemail .= '</a>';
$tmpnewemail = '<a class="'.($morecss ? $morecss : '').'" style="text-overflow: ellipsis;" href="'.DOL_URL_ROOT.'/societe/card.php?socid='.$socid.'&action=presend&mode=init#formmailbeforetitle">';
$tmpnewemail .= ($withpicto ? img_picto($langs->trans("EMail").' : '.$email, (is_numeric($withpicto) ? 'email' : $withpicto), 'class="paddingrightonly"') : '');
if ($withpicto == 1) {
$tmpnewemail .= $newemail;
}
$tmpnewemail .= '</a>';
$newemail = $tmpnewemail;
} else {
$newemail = ($withpicto ? img_picto($langs->trans("EMail").' : '.$email, (is_numeric($withpicto) ? 'email' : $withpicto), 'class="paddingrightonly"') : '').$newemail;
@ -4055,7 +4061,7 @@ function dol_print_profids($profID, $profIDtype, $countrycode = '', $addcpButton
* @param string $morecss Add more css
* @return string Formatted phone number
*/
function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addlink = '', $separ = "&nbsp;", $withpicto = '', $titlealt = '', $adddivfloat = 0, $morecss = '')
function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addlink = '', $separ = "&nbsp;", $withpicto = '', $titlealt = '', $adddivfloat = 0, $morecss = 'paddingright')
{
global $conf, $user, $langs, $mysoc, $hookmanager;
@ -4358,9 +4364,9 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
}
}
if ($adddivfloat == 1) {
$rep .= '<div class="nospan float'.($morecss ? ' '.$morecss : '').'" style="margin-right: 10px">';
$rep .= '<div class="nospan float'.($morecss ? ' '.$morecss : '').'">';
} elseif (empty($adddivfloat)) {
$rep .= '<span'.($morecss ? ' class="'.$morecss.'"' : '').' style="margin-right: 10px;">';
$rep .= '<span'.($morecss ? ' class="'.$morecss.'"' : '').'>';
}
$rep .= $newphoneastart;

View File

@ -2545,12 +2545,12 @@ class Project extends CommonObject
$return .= '</div>';
if (!empty($this->thirdparty->phone)) {
$return .= '<div class="inline-block valignmiddle">';
$return .= dol_print_phone($this->thirdparty->phone, $this->thirdparty->country_code, 0, $this->thirdparty->id, 'tel', 'hidenum', 'phone', $this->thirdparty->phone, 0, 'marginleftonly');
$return .= dol_print_phone($this->thirdparty->phone, $this->thirdparty->country_code, 0, $this->thirdparty->id, 'tel', 'hidenum', 'phone', $this->thirdparty->phone, 0, 'paddingleft paddingright');
$return .= '</div>';
}
if (!empty($this->thirdparty->email)) {
$return .= '<div class="inline-block valignmiddle">';
$return .= dol_print_email($this->thirdparty->email, 0, $this->thirdparty->id, 'thirdparty', -1, 1, 1);
$return .= dol_print_email($this->thirdparty->email, 0, $this->thirdparty->id, 'thirdparty', -1, 1, 2, 'paddingleft paddingright');
$return .= '</div>';
}
}

View File

@ -5213,7 +5213,18 @@ class Societe extends CommonObject
$return .= img_picto('', $this->picto);
$return .= '</span>';
$return .= '<div class="info-box-content">';
$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
$return .= '<div class="info-box-ref inline-block tdoverflowmax125 valignmiddle">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref);
$return .= '</div>';
if (!empty($this->phone)) {
$return .= '<div class="inline-block valignmiddle">';
$return .= dol_print_phone($this->phone, $this->country_code, 0, $this->id, 'tel', 'hidenum', 'phone', $this->phone, 0, 'paddingleft paddingright');
$return .= '</div>';
}
if (!empty($this->email)) {
$return .= '<div class="inline-block valignmiddle">';
$return .= dol_print_email($this->email, 0, $this->id, 'thirdparty', -1, 1, 2, 'paddingleft paddingright');
$return .= '</div>';
}
if ($selected >= 0) {
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
@ -5223,7 +5234,7 @@ class Societe extends CommonObject
if (method_exists($this, 'getLibStatut')) {
$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>';
}
$return .= '</div>';
$return .= '</div>'; // end info-box-content
$return .= '</div>';
$return .= '</div>';

View File

@ -1755,6 +1755,9 @@ while ($i < $imaxinloop) {
$companystatic->client = $obj->client;
$companystatic->status = $obj->status;
$companystatic->email = $obj->email;
$companystatic->phone = $obj->phone;
$companystatic->phone_mobile = $obj->phone_mobile;
$companystatic->fax = $obj->fax;
$companystatic->address = $obj->address;
$companystatic->zip = $obj->zip;
$companystatic->town = $obj->town;

View File

@ -220,7 +220,7 @@ body {
<?php
//print getDolUserInt('MAIN_OPTIMIZEFORTEXTBROWSER') ? (getDolUserInt('MAIN_OPTIMIZEFORTEXTBROWSER') > 100 ? 'zoom: '.getDolUserInt('MAIN_OPTIMIZEFORTEXTBROWSER').'%;' : 'zoom: 150%;') : '';
?>
/* zoom: 110%; */
zoom: 105%; /* not supported by al browsers */
}
/* Style used to protect html content in output to avoid attack by replacing full page with js content */
@ -4221,7 +4221,7 @@ table.liste th, table.noborder th, table.noborder tr.liste_titre td, table.nobor
table.liste td, table.noborder td, div.noborder form div, table.tableforservicepart1 td, table.tableforservicepart2 td {
padding: 6px 10px 6px 12px; /* t r b l */
/* line-height: 22px; This create trouble on cell login on list of last events of a contract*/
height: 28px;
height: 30px;
}
table.liste tr.trkanban td {
padding: 12px 15px 12px 15px; /* t r b l */