From 83dc1e2c2c6a900ae1c5eeea752dade4ca159d6d Mon Sep 17 00:00:00 2001 From: sparkyx Date: Fri, 6 Nov 2020 17:21:00 +0100 Subject: [PATCH] Follow Up col. order in the list --- include/class/follow_up.class.php | 56 ++++++++++++++++++------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php index b91532828..1149058a3 100644 --- a/include/class/follow_up.class.php +++ b/include/class/follow_up.class.php @@ -617,14 +617,22 @@ class Follow_Up $url=$p_base.$arg; $table=new Sort_Table(); - $table->add(_('Date Doc.'), $url, 'order by ag_timestamp asc', 'order by ag_timestamp desc', 'da', 'dd'); + // 0 + $table->add(_('Date Doc.'), $url, 'order by ag_timestamp asc', 'order by ag_timestamp desc', 'da', 'dd'); //$table->add(_('Date Comm.'), $url, 'order by last_comment', 'order by last_comment desc', 'dca', 'dcd'); + //1 $table->add(_('Date Limite'), $url, 'order by ag_remind_date asc', 'order by ag_remind_date desc', 'ra', 'rd'); - $table->add(_('Etiquette'), $url, 'order by tags asc', 'order by tags desc', 'taa', 'tad'); + //2 $table->add(_('Réf.'), $url, 'order by ag_ref asc', 'order by ag_ref desc', 'ra', 'rd'); + //3 + $table->add(_('Etiquette'), $url, 'order by tags asc', 'order by tags desc', 'taa', 'tad'); + //4 $table->add(_('Groupe'), $url, "order by coalesce((select p_name from profile where p_id=ag_dest),'Aucun groupe')", "order by coalesce((select p_name from profile where p_id=ag_dest),'Aucun groupe') desc", 'dea', 'ded'); + //5 $table->add(_('Dest/Exp'), $url, 'order by name asc', 'order by name desc', 'ea', 'ed'); + //6 $table->add(_('Titre'), $url, 'order by ag_title asc', 'order by ag_title desc', 'ta', 'td'); + //7 $table->add(_('Etat'), $url, 'order by s_value asc', 'order by s_value desc', 'ea', 'ed'); $ord=(!isset($_GET['ord']))?"dd":$_GET['ord']; @@ -669,15 +677,15 @@ class Follow_Up $r.=""; $r.=''.ICheckBox::toggle_checkbox('ag', 'list_ag_frm').''; $r.=''.$table->get_header(0).''; -// $r.=''.$table->get_header(1).''; $r.=''.$table->get_header(1).''; - $r.=th('Priorité','style="width:5.57%"'); - $r.=''.$table->get_header(7).''; - $r.=''.$table->get_header(6).''; $r.=''.$table->get_header(2).''; + $r.=''.$table->get_header(5).''; +// $r.=''.$table->get_header(1).''; + $r.=th('Priorité','style="width:5.57%"'); + $r.=''.$table->get_header(6).''; + $r.=''.$table->get_header(7).''; $r.=''.$table->get_header(3).''; $r.=''.$table->get_header(4).''; - $r.=''.$table->get_header(5).''; $r.=""; @@ -716,7 +724,22 @@ class Follow_Up $r.="".$href.smaller_date($row['my_date']).''.""; //$r.="".$href.$row['str_last_comment'].''.""; $r.="".$href.smaller_date($row['my_remind']).''.""; - /* + $r.="".$href.$row['ag_ref'].''.""; + // Expediteur + $fexp=new Fiche($this->db); + $fexp->id=$row['f_id_dest']; + $qcode_dest=$fexp->strAttribut(ATTR_DEF_QUICKCODE); + + $qexp=($qcode_dest==NOTFOUND)?"Interne":$qcode_dest; + $jsexp=sprintf("javascript:showfiche('%s')", $qexp); + if ($qexp!='Interne') + { + $r.="$href".$qexp." : ".$fexp->getName().''; + } + else + $r.="$href Interne "; + + /* * State */ switch ($row['ag_priority']) @@ -733,26 +756,13 @@ class Follow_Up } $r.=td($priority); - $r.="".$row['s_value'].""; $r.=''.$href. h($row['ag_title']).""; + $r.="".$row['s_value'].""; $r.="".$href."".h($row['tags']).''.''.""; - $r.="".$href.$row['ag_ref'].''.""; $r.="".$href.h($row['dest']).''.""; - // Expediteur - $fexp=new Fiche($this->db); - $fexp->id=$row['f_id_dest']; - $qcode_dest=$fexp->strAttribut(ATTR_DEF_QUICKCODE); - - $qexp=($qcode_dest==NOTFOUND)?"Interne":$qcode_dest; - $jsexp=sprintf("javascript:showfiche('%s')", $qexp); - if ($qexp!='Interne') - { - $r.="$href".$qexp." : ".$fexp->getName().''; - } - else - $r.="$href Interne "; +