diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css index fac6a4ea1..01ef67236 100644 --- a/html/css/style-classic7.css +++ b/html/css/style-classic7.css @@ -3396,4 +3396,18 @@ li.li-active { background-color: rgba(246, 180, 157, 0.58); color:red; + } + /** followup : detail : list of concerned actions **/ + div.concerned_action { + height: 11rem; + overflow: auto; + background-color: white; + border:navy 1px solid; + width: 100%; + scroll-padding-right: 20px; + } + div.FullDetailActionChildren { + z-index: 12; + position: absolute; + height: auto; } \ No newline at end of file diff --git a/include/class/follow_up.class.php b/include/class/follow_up.class.php index ae9308982..e03750c6d 100644 --- a/include/class/follow_up.class.php +++ b/include/class/follow_up.class.php @@ -616,12 +616,12 @@ class Follow_Up /* upload the documents */ $doc=new Document($this->db); $doc->upload($this->ag_id); - if (trim($this->ag_comment??"")!='' && Document_Option::can_add_comment($this->ag_id)) + if (noalyss_trim($this->ag_comment??"")!='' && Document_Option::can_add_comment($this->ag_id)) { $this->db->exec_sql("insert into action_gestion_comment (ag_id,tech_user,agc_comment,agc_comment_raw) values ($1,$2,$3,$4)" , array($this->ag_id, $_SESSION[SESSION_KEY.'g_user'], strip_tags($this->ag_description),$this->ag_comment)); } - if (trim($this->ag_description)!='' && Document_Option::can_add_comment($this->ag_id)) + if (noalyss_trim($this->ag_description)!='' && Document_Option::can_add_comment($this->ag_id)) { $this->db->exec_sql("insert into action_gestion_comment (ag_id,tech_user,agc_comment,agc_comment_raw) values ($1,$2,$3,$4)" , array($this->ag_id, $_SESSION[SESSION_KEY.'g_user'],strip_tags($this->ag_description), $this->ag_description)); @@ -1918,7 +1918,7 @@ where } } /** - * Return the first parent of the event tree, or -1 if not found. The parent is an action with a lower id, + * @brief Return the first parent of the event tree, or -1 if not found. The parent is an action with a lower id, * so it can happen than an action has several ones * @return arrary of integer (ag_id) */ @@ -1977,7 +1977,7 @@ where from action_gestion join t on (ag_id=aga_greatest) join document_type on (ag_type=dt_id) - + order by key_path "; $ret_array=$this->db->get_array($sql,array($p_id)); // Empty returns @@ -1996,82 +1996,80 @@ where /* * First we retrieve the parent */ - $parent=$this->get_parent(); + $parent_id=$this->db->get_value("select min( get_follow_up_tree) from comptaproc.get_follow_up_tree($1)",[$this->ag_id]); $http=new HttpInput(); $base=HtmlInput::request_to_string(array("gDossier", "ac", "sb", "sc", "f_id"))."&sa=detail"; - if ($parent==-1) + $parent=array(); + if (empty($parent_id)) { echo _('Principal'); - $parent=array(); - $parent [0]['aga_least']= $this->ag_id; + $parent_id= $this->ag_id; } - - $nb_parent=count($parent); - for ($i=0;$i< $nb_parent;$i++) + + + $fu_parent=new Follow_Up($this->db, $parent_id); + $fu_parent->get(); + echo''; + $xaction=sprintf('view_action(%d,%d,%d)', $fu_parent->ag_id, + Dossier::id(), 1); + $showAction=''; + echo $showAction. + $fu_parent->ag_timestamp," ", + h($fu_parent->ag_title), + '('.h($fu_parent->ag_ref).')', + ''; + + echo ""; + echo ''; + } /** * @brief Display the list of parent of the current Follow_Up @@ -2084,18 +2082,23 @@ where { $a_parent=$this->db->get_array( " - select ag_id,ag_title as title ,to_char(ag_timestamp,'DD/MM/YY') as str_date,ag_ref||' '||dt_value as action_ref - from - action_gestion - join document_type on (ag_type=dt_id) - where ag_id in (select aga_least from action_gestion_related where aga_greatest = $1) - order by ag_id + select ag1.ag_id + ,ag1.ag_title as title + ,to_char(ag1.ag_timestamp,'DD/MM/YY') as str_date + ,ag1.ag_ref||' '||dt_value as action_ref + from + action_gestion ag1 + join document_type on (ag_type=dt_id) + join (select distinct get_follow_up_tree from comptaproc.get_follow_up_tree($1)) tree_ag + on (tree_ag.get_follow_up_tree=ag1.ag_id) +order by ag_id ", array($this->ag_id) ); if ( empty($a_parent ) ) return; echo '