diff --git a/include/action.common.inc.php b/include/action.common.inc.php index e870fe74e..a1542c6a8 100644 --- a/include/action.common.inc.php +++ b/include/action.common.inc.php @@ -38,7 +38,29 @@ if (isset($_REQUEST['f_id'])) if (isset($_REQUEST['sb'])) $supl_hidden.=HtmlInput::hidden('sb', $_REQUEST['sb']); $supl_hidden.=HtmlInput::hidden('ac', $_REQUEST['ac']); - +/*-----------------------------------------------------------------------------*/ +/* For other action +/*-----------------------------------------------------------------------------*/ +if ( isset ($_GET['other_action_bt'])) { + var_dump($_GET); + /** + * The action id are in the array mag_id + * the tag to remove are vin the array remtag + * the tag to add are in the array addtag + * the state in ag_state + */ + if ( isset ($_GET['ag_id'])) { + switch ($_GET['othact']) { + case 'IMP': + //Impression + case 'ST': + // Etat + case 'ETIREM': + //tag + case 'ETIADD': + } + } +} /* --------------------------------------------------------------------------- */ /* We ask to generate the document */ @@ -188,14 +210,14 @@ if ($sub_action == 'delete') // Show a list of the action if ($sub_action == "list") { - Follow_Up::show_action_list($cn, $base); // Add a button to export to Csv - echo '
"; + Follow_Up::show_action_list($cn, $base); } //-------------------------------------------------------------------------------- // Add an action diff --git a/include/action.inc.php b/include/action.inc.php index 2eb535a9d..ab7f68a61 100644 --- a/include/action.inc.php +++ b/include/action.inc.php @@ -25,7 +25,7 @@ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); require_once('class_ipopup.php'); global $g_user; $retour=HtmlInput::button_anchor(_('Retour liste'), - HtmlInput::request_to_string(array("closed_action","remind_date_end","remind_date","sag_ref","only_internal","state","ac","gDossier","qcode","ag_dest_query","query","tdoc","date_start","date_end","hsstate","tag"))); + HtmlInput::request_to_string(array("closed_action","remind_date_end","remind_date","sag_ref","only_internal","state","ac","gDossier","qcode","ag_dest_query","query","tdoc","date_start","date_end","hsstate","searchtag"))); //----------------------------------------------------- // Follow_Up //----------------------------------------------------- diff --git a/include/ajax_search_add_tag.php b/include/ajax_search_add_tag.php index e69b2aa8c..ae536927f 100644 --- a/include/ajax_search_add_tag.php +++ b/include/ajax_search_add_tag.php @@ -24,10 +24,10 @@ require_once 'class_tag.php'; ob_start(); if ($_GET['clear']==1) { /* Add a clear button */ - echo Tag::add_clear_button(); + echo Tag::add_clear_button($_GET['pref']); } $tag=new Tag($cn,$_GET['id']); -$tag->update_search_cell(); +$tag->update_search_cell($_GET['pref']); $response= ob_get_clean(); ob_end_clean(); diff --git a/include/ajax_search_clear_tag.php b/include/ajax_search_clear_tag.php index 7d9640699..2edfa7be6 100644 --- a/include/ajax_search_clear_tag.php +++ b/include/ajax_search_clear_tag.php @@ -22,7 +22,7 @@ if ( !defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); require_once 'class_tag.php'; ob_start(); -echo Tag::button_search(); +echo Tag::button_search($_GET['pref']); $response= ob_get_clean(); ob_end_clean(); $html=escape_xml($response); diff --git a/include/ajax_search_display_tag.php b/include/ajax_search_display_tag.php index f211114c2..f4ce0cf9a 100644 --- a/include/ajax_search_display_tag.php +++ b/include/ajax_search_display_tag.php @@ -23,7 +23,7 @@ if ( !defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); require_once 'class_tag.php'; ob_start(); $tag=new Tag($cn); -$tag->select_search(); +$tag->select_search($_GET['pref']); $response= ob_get_clean(); ob_end_clean(); diff --git a/include/category_followup.inc.php b/include/category_followup.inc.php index fc2a51793..7e17893e9 100644 --- a/include/category_followup.inc.php +++ b/include/category_followup.inc.php @@ -40,7 +40,7 @@ $ag_id=(isset($_REQUEST['ag_id']))?$_REQUEST['ag_id']:0; if (! isset($_GET['submit_query'])) {$_REQUEST['closed_action']=1;$_GET['closed_action']=1;} $p_action=$_REQUEST['ac']; -$base="ac=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']."&".HtmlInput::request_to_string(array("closed_action","remind_date_end","remind_date","sag_ref","only_internal","state","gDossier","qcode","ag_dest","query","tdoc","date_start","date_end","hsstate","tag","sb","sc"),""); +$base="ac=$p_action&sc=sv&sb=detail&f_id=".$_REQUEST['f_id']."&".HtmlInput::request_to_string(array("closed_action","remind_date_end","remind_date","sag_ref","only_internal","state","gDossier","qcode","ag_dest","query","tdoc","date_start","date_end","hsstate","searchtag","sb","sc"),""); $retour=HtmlInput::button_anchor('Retour','?'.dossier::get().'&'.$base); $fiche=new Fiche($cn,$_REQUEST['f_id']); diff --git a/include/class_follow_up.php b/include/class_follow_up.php index 04a6d4ec2..43272035a 100644 --- a/include/class_follow_up.php +++ b/include/class_follow_up.php @@ -504,7 +504,7 @@ class Follow_Up /* add the number of item */ $Hid = new IHidden(); $r.=$Hid->input("nb_item", MAX_ARTICLE); - $r.=HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remind_date","sag_ref","only_internal","state","qcode", "ag_dest_query", "query", "tdoc", "date_start", "date_end", "hsstate","tag")); + $r.=HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remind_date","sag_ref","only_internal","state","qcode", "ag_dest_query", "query", "tdoc", "date_start", "date_end", "hsstate","searchtag")); $a_tag=$this->tag_get(); /* get template */ ob_start(); @@ -663,18 +663,19 @@ class Follow_Up $this->insert_action(); } - /** myList($p_filter="") - * \brief Show list of action by default if sorted on date - * \param $p_base base url with ac... - * \param $p_filter filters on the document_type - * \param $p_search must a valid sql command ( ex 'and ag_title like upper('%hjkh%')) - * \return string containing html code + /** + * myList($p_base, $p_filter = "", $p_search = "") + * Show list of action by default if sorted on date + * @param $p_base base url with ac... + * @param $p_filter filters on the document_type + * @param $p_search must a valid sql command ( ex 'and ag_title like upper('%hjkh%')) + * @return string containing html code */ function myList($p_base, $p_filter = "", $p_search = "") { // for the sort - $url = HtmlInput::get_to_string(array("closed_action","remind_date_end","remind_date","sag_ref","only_internal","state","qcode", "ag_dest_query", "query", "tdoc", "date_start", "date_end", "hsstate","tag")) . '&' . $p_base; + $url = HtmlInput::get_to_string(array("closed_action","remind_date_end","remind_date","sag_ref","only_internal","state","qcode", "ag_dest_query", "query", "tdoc", "date_start", "date_end", "hsstate","searchtag")) . '&' . $p_base; $table = new Sort_Table(); $table->add('Date Doc.', $url, 'order by ag_timestamp asc', 'order by ag_timestamp desc', 'da', 'dd'); @@ -725,6 +726,7 @@ class Follow_Up $r.=$bar; $r.='