From 5f6140c81af81ad46b2a66b89ac60cc38c19a59e Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 14 Nov 2005 21:11:25 +0000 Subject: [PATCH] =?UTF-8?q?OK,=20on=20met=20la=20liste=20dans=20la=20colon?= =?UTF-8?q?ne=20de=20droite=20c'est=20plus=20coh=E9rent.=20Mais=20c'est=20?= =?UTF-8?q?pas=20une=20raison=20pour=20supprimer=20le=20libell=E9=20;-)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sinon : - gestion des dates comme ailleurs, avec les | sur les années/mois répétés (bugfix, probablement) - un qui manquait dans le html - on met aussi l'image sur les actions en retard. Bref, on rend les actions de index.php et les actions d'une société données (dans comm.php) identiques (commit // dans quelques secondes sur comm.php) --- htdocs/comm/index.php | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 63ccd938d02..83e2ccc5b29 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -266,14 +266,14 @@ print ''; * */ -$sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code, c.libelle, a.fk_user_author, s.nom as sname, s.idp"; +$sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code, c.libelle, a.fk_user_author, s.nom as sname, s.idp"; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE c.id=a.fk_action AND a.percent < 100 AND s.idp = a.fk_soc"; if ($socidp) { $sql .= " AND s.idp = $socidp"; } -$sql .= " ORDER BY a.datea ASC"; +$sql .= " ORDER BY a.datea DESC, a.id DESC"; $resql=$db->query($sql); if ($resql) @@ -282,7 +282,7 @@ if ($resql) if ($num > 0) { print ''; - print ''; + print ''; $var = true; $i = 0; @@ -292,18 +292,37 @@ if ($resql) $var=!$var; print ""; + if ($oldyear == strftime("%Y",$obj->da) ) + { + print ''; + } + else + { + print '\n"; + $oldyear = strftime("%Y",$obj->da); + } + + if ($oldmonth == strftime("%Y%b",$obj->da) ) + { + print ''; + } + else + { + print '\n"; + $oldmonth = strftime("%Y%b",$obj->da); + } + + print '\n"; + if (date("U",$obj->da) < time()) + { + print ""; + } print "'; - - print '"; + print ""; print ''; $i++;
'.$langs->trans("ActionsToDo").'
'.$langs->trans("ActionsToDo").'
|'.strftime("%Y",$obj->da)."|' .strftime("%b",$obj->da)."'.strftime("%d",$obj->da)."".img_warning("Late")."id\">".img_object($langs->trans("ShowTask"),"task"); $transcode=$langs->trans("Action".$obj->code); $libelle=($transcode!="Action".$obj->code?$transcode:$obj->libelle); print $libelle; print ''. dolibarr_print_date($obj->da); - if (date("U",$obj->da) < time()) - { - print img_warning("Late"); - } - print "$obj->label'.img_object($langs->trans("ShowCustomer"),"company").' '.$obj->sname.'