From 7ff44dfc3ee517bf053d601c733484d4982ed411 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Feb 2024 23:33:34 +0100 Subject: [PATCH 1/2] FIX Responsive on admin project --- htdocs/projet/admin/project.php | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 2186dc580e4..d2f8967c000 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -298,6 +298,7 @@ print '
'; print load_fiche_titre($langs->trans("ProjectsNumberingModules"), '', ''); +print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table print ''; print ''; print ''; @@ -387,13 +388,15 @@ foreach ($dirmodels as $reldir) { } } -print '
'.$langs->trans("Name").'

'; - +print ''; +print '
'; +print '
'; if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { // Task numbering module print load_fiche_titre($langs->trans("TasksNumberingModules"), '', ''); + print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table print ''; print ''; print ''; @@ -483,7 +486,9 @@ if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { } } - print '
'.$langs->trans("Name").'

'; + print ''; + print '
'; + print '
'; } @@ -515,8 +520,9 @@ if ($resql) { dol_print_error($db); } -print "\n"; -print "\n"; +print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table +print '
'."\n"; +print ''."\n"; print ' \n"; print " \n"; print '\n"; @@ -622,7 +628,9 @@ foreach ($dirmodels as $reldir) { } } -print '
'.$langs->trans("Name")."".$langs->trans("Description")."'.$langs->trans("Activated")."

'; +print ''; +print ''; +print '
'; @@ -655,8 +663,9 @@ if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { dol_print_error($db); } - print "\n"; - print "\n"; + print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table + print '
'."\n"; + print ''."\n"; print ' \n"; print " \n"; print '\n"; @@ -761,7 +770,9 @@ if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { } } - print '
'.$langs->trans("Name")."".$langs->trans("Description")."'.$langs->trans("Activated")."

'; + print ''; + print ''; + print '
'; } @@ -775,6 +786,7 @@ print ''; print ''; print ''; +print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table print ''; print ''; print "\n"; @@ -830,7 +842,7 @@ print ''; $morehtmlref .= $moreaddress; @@ -3281,9 +3281,9 @@ function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0, $mor $linkend = ''; if ($morecss == 'float') { // deprecated - return '
'.($withpicto ? img_picto($langs->trans("Url"), 'globe').' ' : '').$link.'
'; + return '
'.($withpicto ? img_picto($langs->trans("Url"), 'globe', 'class="paddingrightonly"') : '').$link.'
'; } else { - return $linkstart.''.($withpicto ? img_picto('', 'globe').' ' : '').$link.''.$linkend; + return $linkstart.''.($withpicto ? img_picto('', 'globe', 'class="paddingrightonly"') : '').$link.''.$linkend; } } @@ -3301,7 +3301,10 @@ function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0, $mor */ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, $showinvalid = 1, $withpicto = 0) { - global $conf, $user, $langs, $hookmanager; + global $user, $langs, $hookmanager; + + //global $conf; $conf->global->AGENDA_ADDACTIONFOREMAIL = 1; + //$showinvalid = 1; $email = 'rrrrr'; $newemail = dol_escape_htmltag($email); @@ -3314,30 +3317,35 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, } if (!empty($addlink)) { - $newemail = ''; + + $newemail .= ($withpicto ? img_picto($langs->trans("EMail").' : '.$email, (is_numeric($withpicto) ? 'email' : $withpicto), 'class="paddingrightonly"') : ''); + $newemail .= dol_trunc($email, $max); $newemail .= ''; if ($showinvalid && !isValidEmail($email)) { $langs->load("errors"); - $newemail .= img_warning($langs->trans("ErrorBadEMail", $email)); + $newemail .= img_warning($langs->trans("ErrorBadEMail", $email), '', 'paddingrightonly'); } if (($cid || $socid) && isModEnabled('agenda') && $user->hasRight("agenda", "myactions", "create")) { $type = 'AC_EMAIL'; - $link = ''; + $linktoaddaction = ''; if (getDolGlobalString('AGENDA_ADDACTIONFOREMAIL')) { - $link = ''.img_object($langs->trans("AddAction"), "calendar").''; + $linktoaddaction = ''.img_object($langs->trans("AddAction"), "calendar").''; } - if ($link) { - $newemail = '
'.$newemail.' '.$link.'
'; + if ($linktoaddaction) { + $newemail = '
'.$newemail.' '.$linktoaddaction.'
'; } } } else { + $newemail = ($withpicto ? img_picto($langs->trans("EMail").' : '.$email, (is_numeric($withpicto) ? 'email' : $withpicto), 'class="paddingrightonly"') : '').$newemail; + if ($showinvalid && !isValidEmail($email)) { $langs->load("errors"); $newemail .= img_warning($langs->trans("ErrorBadEMail", $email)); @@ -3345,8 +3353,10 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, } //$rep = '
'; - $rep = ($withpicto ? img_picto($langs->trans("EMail").' : '.$email, (is_numeric($withpicto) ? 'email' : $withpicto)).' ' : '').$newemail; + //$rep = ($withpicto ? img_picto($langs->trans("EMail").' : '.$email, (is_numeric($withpicto) ? 'email' : $withpicto), 'class="paddingrightonly"') : '').$newemail; //$rep .= '
'; + $rep = $newemail; + if ($hookmanager) { $parameters = array('cid' => $cid, 'socid' => $socid, 'addlink' => $addlink, 'picto' => $withpicto);
".$langs->trans("Parameters")."