2 |
//$Id$ |
//$Id$ |
3 |
//gen openMairie le 10/02/2011 20:32 |
//gen openMairie le 10/02/2011 20:32 |
4 |
include('../gen/sql/pgsql/consultation.inc.php'); |
include('../gen/sql/pgsql/consultation.inc.php'); |
|
$table=DB_PREFIXE."consultation inner join ".DB_PREFIXE."service on consultation.service=service.service"; |
|
|
$champAffiche=array("consultation", |
|
|
"consultation.service", |
|
|
"libelle", |
|
|
"to_char(date_envoi,'DD/MM/YYYY') as date_envoi", |
|
|
"to_char(date_retour,'DD/MM/YYYY') as date_retour", |
|
|
"to_char(date_limite,'DD/MM/YYYY') as date_limite", |
|
|
"avis"); |
|
|
$champRecherche=array("libelle"); |
|
|
if(isset($idx)) |
|
|
$selection=" where dossier ='".$idx."'"; |
|
|
else |
|
|
$selection=""; |
|
|
// ============================================================================= |
|
|
// href particulier pour edition d etat |
|
|
// ============================================================================= |
|
|
|
|
|
$href[3]['lien'] = "../pdf/pdfetat.php?idx="; |
|
|
$href[3]['id']= "&obj=consultation"; |
|
|
$href[3]['lib']= "<span class=\"om-icon om-icon-16 om-icon-fix pdf-16\" title=\"". |
|
|
_("Edition")."\">"._("Edition")."</span>"; |
|
|
|
|
|
// probleme lies a la gestion par nature |
|
5 |
|
|
6 |
if ($retourformulaire== 'service'){ |
if ($retourformulaire== 'service'){ |
7 |
$href[0] = array("lien" => "#", "id" => "", "lib" => "", ); |
// Actions en coin : ajouter |
8 |
$href[1] = array("lien" => "", "id" => "", "lib" => "", ); |
$tab_actions['corner']['ajouter'] = NULL; |
9 |
$href[2] = array("lien" => "#", "id" => "", "lib" => "", ); |
// Actions a gauche : consulter |
10 |
|
$tab_actions['left']['consulter'] = NULL; |
11 |
$selection=" where consultation.service ='".$idx."'"; |
$selection=" where consultation.service ='".$idx."'"; |
12 |
} |
} |
13 |
|
|
14 |
|
/** |
15 |
|
* Création d'une nouvelle action du formulaire de consultation, l'ajout de plusieurs consultations en une seule fois |
16 |
|
*/ |
17 |
|
if ($retourformulaire == 'dossier' |
18 |
|
OR $retourformulaire == 'PC' |
19 |
|
OR $retourformulaire == 'PA' |
20 |
|
OR $retourformulaire == 'PD' |
21 |
|
OR $retourformulaire == 'DP') { |
22 |
|
$id=""; |
23 |
|
$selection=" WHERE (consultation.dossier ='".$idx."')"; |
24 |
|
$lien = "../app/consultation_multiple.php?obj=$obj&idx=$idx&ret=$retourformulaire"; |
25 |
|
$right = array('list' => array($obj, $obj.'_ajouter'),'operator' => 'OR'); |
26 |
|
$tab_actions['corner']['ajouter_multiple'] = array ( |
27 |
|
'lien' => $lien, |
28 |
|
'id' => $id, |
29 |
|
'lib' => '<span class="om-icon om-icon-16 om-icon-fix mut-add-16" title="'._('Ajouter plusieurs').'">'._('Ajouter plusieurs').'</span>', |
30 |
|
'right' => $right, |
31 |
|
); |
32 |
|
} |
33 |
|
|
34 |
|
/** |
35 |
|
* Options |
36 |
|
*/ |
37 |
|
|
38 |
|
$options[] = array( |
39 |
|
"type" => "condition", |
40 |
|
"field" => "case consultation.lu when 't' then 'Oui' else 'Non' end", |
41 |
|
"case" => array( |
42 |
|
"0" => array( |
43 |
|
"values" => array("Non", ), |
44 |
|
"style" => "consultation_non_lue", |
45 |
|
), |
46 |
|
), |
47 |
|
); |
48 |
?> |
?> |