From b9baee6310b385af42d01b0752145fee949de2a4 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 21 Jun 2012 17:13:37 +0000 Subject: [PATCH] 0000605: Ajouter interface pour les documents state --- include/class_follow_up.php | 23 ++++------------------- sql/upgrade.sql | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/include/class_follow_up.php b/include/class_follow_up.php index d8d02b75d..070a42611 100644 --- a/include/class_follow_up.php +++ b/include/class_follow_up.php @@ -693,12 +693,14 @@ class Follow_Up select ag_id,to_char(ag_timestamp,'DD.MM.YYYY') as my_date, to_char(ag_remind_date,'DD.MM.YYYY') as my_remind, f_id_dest, + s_value, ag_title,dt_value,ag_ref, ag_priority,ag_state, coalesce((select p_name from profile where p_id=ag_dest),'Aucun groupe') as dest, (select ad_value from fiche_Detail where f_id=action_gestion.f_id_dest and ad_id=1) as name, (select count(d_id) from document where document.ag_id=action_gestion.ag_id) as cnt_doc from action_gestion join document_type on (ag_type=dt_id) + join document_state on (ag_state=s_id) where $p_filter_doc $p_search $sort"; $max_line = $this->db->count_sql($sql); $step = $_SESSION['g_pagesize']; @@ -788,25 +790,8 @@ class Follow_Up $r.=""; $r.="" . $row['dt_value'] . ""; - /* - * State - */ - switch ($row['ag_state']) - { - case 1: - $state = 'Fermé'; - break; - case 2: - $state = "A suivre"; - break; - case 3: - $state = "A faire"; - break; - case 4: - $state = "Abandonné"; - break; - } - $r.=td($state); + + $r.=td($row['s_value']); /* * State */ diff --git a/sql/upgrade.sql b/sql/upgrade.sql index eedcbb609..0af1fa573 100644 --- a/sql/upgrade.sql +++ b/sql/upgrade.sql @@ -426,3 +426,17 @@ update menu_ref set me_code='CSV:reportinit' where me_code='CVS:reportinit'; update menu_ref set me_file='export_follow_up_csv.php' where me_code='CSV:ActionGestion'; update menu_ref set me_file='export_stock_histo_csv.php' where me_code='CSV:StockHisto'; update menu_ref set me_file='export_stock_resume_list.php' where me_code='CSV:StockResmList'; + +INSERT INTO menu_ref( + me_code, me_menu, me_file, me_url, me_description, me_parameter, + me_javascript, me_type) + VALUES ('CFGDOCST', 'Etat des documents', 'doc_state.inc.php', null, 'Etat des documents', null,null,'ME'); + +INSERT INTO profile_menu( + me_code, me_code_dep, p_id, p_order, p_type_display, pm_default) + VALUES ('CFGDOCST', 'DIVPARM', 1, 9, 'E', 0); +INSERT INTO profile_menu( + me_code, me_code_dep, p_id, p_order, p_type_display, pm_default) + VALUES ('CFGDOCST', 'DIVPARM', 2,9, 'E', 0); + +alter sequence document_state_s_id_seq restart with 100; \ No newline at end of file