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 '
';
+
+ $action=$this->get_children($parent_id);
+ for ($o=0; $odb, $parent[$i]['aga_least']);
- $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).')',
- '';
+ $class=($this->ag_id == $action[$o]['aga_greatest'])?' class="highlight" ':'';
- echo "";
- echo '';
+ // Count the number of direct parents
+ $count_parent =$this->db->get_value('select count(*) from action_gestion_related where aga_greatest = $1',array($action[$o]['aga_greatest']));
+ $direct_parent=($count_parent > 1 ) ? _('direct parent ').$count_parent:"";
- $action=$this->get_children($parent[$i]['aga_least']);
- for ($o=0; $o1 )?str_repeat(" ",$action[$o]['depth']-1)."⇨":"";
+ if ($p_view!='READ'&&$p_base!='ajax')
{
- $class=($this->ag_id == $action[$o]['aga_greatest'])?' class="highlight" ':'';
-
- // Count the number of direct parents
- $count_parent =$this->db->get_value('select count(*) from action_gestion_related where aga_greatest = $1',array($action[$o]['aga_greatest']));
- $direct_parent=($count_parent > 1 ) ? _('direct parent ').$count_parent:"";
-
- $margin=($action[$o]['depth']>1 )?str_repeat(" ",$action[$o]['depth']-1)."⇨":"";
- if ($p_view!='READ'&&$p_base!='ajax')
- {
- $rmAction=sprintf("return confirm_box(null,'"._('Voulez-vous effacer cette action ')."', function () {remove_action('%s','%s','%s');});",
- dossier::id(), $action[$o]['aga_greatest'],
- $http->request('ag_id',"number"));
- $showAction='';
- $js=Icon_Action::trash("acact".$action[$o]['aga_greatest'], $rmAction);
- echo '- '.$margin.$showAction.$action[$o]['str_date'].
- h($action[$o]['title']).'('.h($action[$o]['action_ref']).')'.$direct_parent.'
'." "
- .$js.'';
- }
- else
- /*
- * Display detail requested from Ajax Div
- */
- if ($p_base=='ajax')
- {
- $xaction=sprintf('view_action(%d,%d,%d)', $action[$o]['aga_greatest'],
- Dossier::id(), 1);
- $showAction='';
- echo '- '.$margin.$showAction.$action[$o]['str_date']." ".
- h($action[$o]['title']).'('.h($action[$o]['action_ref']).')'.$direct_parent.'
'." "
- .'';
- }
- /*
- * READ ONLY
- */
- else
- {
- $showAction='';
- echo '- '.$margin.$showAction.$action[$o]['str_date']." ".
- h($action[$o]['title']).'('.h($action[$o]['action_ref']).')'.$direct_parent.'
'." "
- .'';
- }
+ $rmAction=sprintf("return confirm_box(null,'"._('Voulez-vous effacer cette action ')."', function () {remove_action('%s','%s','%s');});",
+ dossier::id(), $action[$o]['aga_greatest'],
+ $http->request('ag_id',"number"));
+ $showAction='';
+ $js=Icon_Action::trash("acact".$action[$o]['aga_greatest'], $rmAction);
+ echo '- '.$margin.$showAction.$action[$o]['str_date'].
+ h($action[$o]['title']).'('.h($action[$o]['action_ref']).')'.$direct_parent.'
'." "
+ .$js.'';
+ }
+ else
+ /*
+ * Display detail requested from Ajax Div
+ */
+ if ($p_base=='ajax')
+ {
+ $xaction=sprintf('view_action(%d,%d,%d)', $action[$o]['aga_greatest'],
+ Dossier::id(), 1);
+ $showAction='';
+ echo '- '.$margin.$showAction.$action[$o]['str_date']." ".
+ h($action[$o]['title']).'('.h($action[$o]['action_ref']).')'.$direct_parent.'
'." "
+ .'';
+ }
+ /*
+ * READ ONLY
+ */
+ else
+ {
+ $showAction='';
+ echo '- '.$margin.$showAction.$action[$o]['str_date']." ".
+ h($action[$o]['title']).'('.h($action[$o]['action_ref']).')'.$direct_parent.'
'." "
+ .'';
}
- 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 '';
$base=HtmlInput::request_to_string(array("gDossier", "ac", "sa", "sb", "sc",
"f_id"));
+ $http=new HttpInput();
for ($o=0; $oag_id == $a_parent[$o]['ag_id'])?' class="highlight" ':'';
@@ -2104,9 +2107,11 @@ where
{
$rmAction=sprintf("return confirm_box(null,'"._('Voulez-vous effacer cette action ')."', function () {remove_action('%s','%s','%s');});",
dossier::id(), $a_parent[$o]['ag_id'],
- $_REQUEST['ag_id']);
+ $http->request('ag_id',"number"));
$showAction='';
- $js=''.SMALLX.'';
+
+ $js=\Icon_Action::trash('acact'.$a_parent[$o]['ag_id'],$rmAction);
+
echo '- '.$showAction.$a_parent[$o]['str_date'].
h($a_parent[$o]['title']).'('.h($a_parent[$o]['action_ref']).')'.''." "
.$js.'
';
diff --git a/include/template/follow_up-display.php b/include/template/follow_up-display.php
index 807dbc2ed..5d098abca 100644
--- a/include/template/follow_up-display.php
+++ b/include/template/follow_up-display.php
@@ -3,13 +3,14 @@
//This file is part of NOALYSS and is under GPL
//see licence.txt
$uniq=uniqid("tab",TRUE);
-?>
+?>
+
-
-
+
+
|
@@ -110,9 +111,10 @@ if ($this->ag_id > 0 && Document_Option::is_enable_contact_multiple($this->dt_id
|
-
-
+
+
+
@@ -186,16 +188,19 @@ if ($this->ag_id > 0 && Document_Option::is_enable_contact_multiple($this->dt_id
-
+
+
+
@@ -256,7 +269,7 @@ function small(p_id_textarea){
}
-
+
input();
?>
diff --git a/include/template/followup-show-action-add.php b/include/template/followup-show-action-add.php
index 2f749ff10..2983cc60f 100644
--- a/include/template/followup-show-action-add.php
+++ b/include/template/followup-show-action-add.php
@@ -21,6 +21,8 @@
if (!defined('ALLOWED'))
die('Appel direct ne sont pas permis');
+
+\Noalyss\Dbg::echo_file(__FILE__);
$sup_parameter=HtmlInput::array_to_string(["sc","sb","f_id","qcode"], $_REQUEST,"&");
$cn=Dossier::connect();
/**
@@ -34,10 +36,10 @@ if ( ! empty ($g_user->get_writable_profile()))
'onclick="document.getElementById(\'action_add_d\').style.display=\'block\';"');
}
?>
-
+
-
+=\Noalyss\Dbg::echo_file(__FILE__)?>
+