1 |
<?php |
2 |
//$Id$ |
3 |
|
4 |
include('../gen/sql/pgsql/consultation.inc.php'); |
5 |
|
6 |
// SELECT |
7 |
$champAffiche = array( |
8 |
'consultation.consultation as "'._("consultation").'"', |
9 |
'consultation.dossier as "'._("dossier").'"', |
10 |
'to_char(consultation.date_envoi ,\'DD/MM/YYYY\') as "'._("date_envoi").'"', |
11 |
'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"', |
12 |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
13 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
14 |
'service.libelle as "'._("service").'"', |
15 |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
16 |
"case consultation.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"", |
17 |
); |
18 |
|
19 |
/** |
20 |
* Gestion particulière de l'affichage du listing des consultations dans le |
21 |
* contexte d'un dossier d'instruction (pour un service consulté) |
22 |
*/ |
23 |
if ($retourformulaire == 'service') { |
24 |
// Actions en coin : ajouter |
25 |
$tab_actions['corner']['ajouter'] = NULL; |
26 |
// Actions a gauche : consulter |
27 |
$tab_actions['left']['consulter'] = NULL; |
28 |
$selection=" where consultation.service ='".$idx."'"; |
29 |
} |
30 |
|
31 |
/** |
32 |
* Gestion particulière de l'affichage du listing des consultations dans le |
33 |
* contexte d'un dossier d'instruction (pour l'instructeur) |
34 |
*/ |
35 |
if ($retourformulaire == 'dossier' |
36 |
OR $retourformulaire == 'dossier_instruction' |
37 |
OR $retourformulaire == 'dossier_instruction_mes_encours' |
38 |
OR $retourformulaire == 'dossier_instruction_tous_encours' |
39 |
OR $retourformulaire == 'dossier_instruction_mes_clotures' |
40 |
OR $retourformulaire == 'dossier_instruction_tous_clotures') { |
41 |
// SELECT |
42 |
$champAffiche = array( |
43 |
'consultation.consultation as "'._("consultation").'"', |
44 |
'to_char(consultation.date_envoi ,\'DD/MM/YYYY\') as "'._("date_envoi").'"', |
45 |
'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"', |
46 |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
47 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
48 |
'service.libelle as "'._("service").'"', |
49 |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
50 |
"case consultation.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"", |
51 |
); |
52 |
// Filtre dur les données du dossier |
53 |
$selection=" WHERE (consultation.dossier ='".$idx."')"; |
54 |
// Ajout d'une action supplémentaire - ajout de consultations multiples |
55 |
$id=""; |
56 |
$lien = "../app/consultation_multiple.php?obj=$obj&idx=$idx&ret=$retourformulaire"; |
57 |
$right = array('list' => array($obj, $obj.'_ajouter'),'operator' => 'OR'); |
58 |
$tab_actions['corner']['ajouter_multiple'] = array ( |
59 |
'lien' => $lien, |
60 |
'id' => $id, |
61 |
'lib' => '<span class="om-icon om-icon-16 om-icon-fix mut-add-16" title="'._('Ajouter plusieurs').'">'._('Ajouter plusieurs').'</span>', |
62 |
'right' => $right, |
63 |
); |
64 |
} |
65 |
|
66 |
/** |
67 |
* Options |
68 |
*/ |
69 |
// On affiche le champ lu en gras |
70 |
$options[] = array( |
71 |
"type" => "condition", |
72 |
"field" => "case consultation.lu when 't' then 'Oui' else 'Non' end", |
73 |
"case" => array( |
74 |
"0" => array( |
75 |
"values" => array("Non", ), |
76 |
"style" => "non_lu", |
77 |
), |
78 |
), |
79 |
); |
80 |
|
81 |
?> |