From 6ab47a845e9c1bcb8df1c792d6cb36121ca2ef07 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 10 Jun 2017 13:54:43 +0200 Subject: [PATCH] Fix look and feel v6 --- htdocs/comm/action/listactions.php | 22 ++++++------ htdocs/core/class/html.formactions.class.php | 37 +++++++++++++------- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 7bedc4d8356..01094a78164 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -47,12 +47,12 @@ $status=GETPOST("status",'alpha'); $type=GETPOST('type'); $optioncss = GETPOST('optioncss','alpha'); // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) -if (GETPOST('actioncode','array')) +if (GETPOST('actioncode','array')) { $actioncode=GETPOST('actioncode','array',3); if (! count($actioncode)) $actioncode='0'; } -else +else { $actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE)); } @@ -337,11 +337,11 @@ if ($resql) if ($pid) $nav.=''; if ($usergroup) $nav.=''; print $nav; - + print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, -1 * $nbtotalofrecords, '', 0, $nav, '', $limit); $moreforfilter=''; - + $i = 0; print '
'; print ''."\n"; @@ -369,11 +369,11 @@ if ($resql) print $searchpicto; print ''; print "\n"; - + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"a.id",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Title"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield,$sortorder); - //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateStart"),$_SERVER["PHP_SELF"],"a.datep",$param,'','align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"a.datep2",$param,'','align="center"',$sortfield,$sortorder); @@ -392,7 +392,7 @@ if ($resql) require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; $caction=new CActionComm($db); $arraylist=$caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0)); - + $var=true; while ($i < min($num,$limit)) { @@ -405,15 +405,13 @@ if ($resql) continue; } - - $actionstatic->id=$obj->id; $actionstatic->ref=$obj->id; $actionstatic->type_code=$obj->type_code; $actionstatic->type_label=$obj->type_label; $actionstatic->type_picto=$obj->type_picto; $actionstatic->label=$obj->label; - + print ''; // Action (type) @@ -443,7 +441,7 @@ if ($resql) if (! empty($arraylist[$labeltype])) $labeltype=$arraylist[$labeltype]; print dol_trunc($labeltype,28); print ''; - + // Start date print ''; print ''; - + print "\n"; $i++; } diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 456faa7931e..a6ec8db928a 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -188,9 +188,9 @@ class FormActions print load_fiche_titre($title, $buttontoaddnewevent, ''); $page=0; $param=''; $sortfield='a.datep'; - - $total = 0; - + + $total = 0; + print '
'; print '
'; print dol_print_date($db->jdate($obj->dp),"dayhour"); @@ -514,7 +512,7 @@ if ($resql) print ''.$actionstatic->LibStatut($obj->percent,3,1,$datep).'
'; print ''; @@ -209,12 +209,23 @@ class FormActions { $ref=$action->getNomUrl(1,-1); $label=$action->getNomUrl(0,38); - - + print ''; print ''; print ''; - print ''; + print ''; print ''; print '
'.$ref.''.$label.''.$action->type.''; + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + if ($action->type_picto) print img_picto('', $action->type_picto); + else { + if ($action->type_code == 'AC_RDV') print img_picto('', 'object_group').' '; + if ($action->type_code == 'AC_TEL') print img_picto('', 'object_phoning').' '; + if ($action->type_code == 'AC_FAX') print img_picto('', 'object_phoning_fax').' '; + if ($action->type_code == 'AC_EMAIL') print img_picto('', 'object_email').' '; + } + } + print $action->type; + print ''.dol_print_date($action->datep,'dayhour'); if ($action->datef) { @@ -233,7 +244,7 @@ class FormActions $userstatic->id = $action->author->id; $userstatic->firstname = $action->author->firstname; $userstatic->lastname = $action->author->lastname; - print $userstatic->getNomUrl(1); + print $userstatic->getNomUrl(1, '', 0, 0, 16, 0, '', ''); } print ''; @@ -285,22 +296,22 @@ class FormActions if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO)) unset($arraylist['AC_OTH_AUTO']); $out=''; - - if (! empty($multiselect)) + + if (! empty($multiselect)) { if (!is_array($selected) && !empty($selected)) $selected = explode(',', $selected); $out.=$form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0); } - else + else { $out.=$form->selectarray($htmlname, $arraylist, $selected); } - - if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) + + if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) { $out.=info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup").($hideinfohelp == -1 ? ". ".$langs->trans("YouCanSetDefaultValueInModuleSetup") : ''),1); } - + if ($nooutput) return $out; else print $out; return '';