1 |
nhaye |
509 |
<?php |
2 |
fmichon |
644 |
|
3 |
|
|
// |
4 |
nhaye |
509 |
include('../gen/sql/pgsql/consultation.inc.php'); |
5 |
|
|
|
6 |
fmichon |
644 |
// |
7 |
|
|
$ent = _("instruction")." -> "._("tous les retours de consultation"); |
8 |
|
|
|
9 |
|
|
// |
10 |
|
|
$tab_description = _("Les consultations qui sont notees comme non lues qui". |
11 |
|
|
" concernent des dossiers d'instruction situes dans ma". |
12 |
|
|
" division."); |
13 |
|
|
|
14 |
|
|
// |
15 |
nhaye |
509 |
$champAffiche = array( |
16 |
nhaye |
525 |
'consultation.consultation as "'._("consultation").'"', |
17 |
nhaye |
509 |
'consultation.dossier as "'._("dossier").'"', |
18 |
nhaye |
525 |
'service.abrege as "'._("service").'"', |
19 |
nhaye |
509 |
'service.libelle as "'._("service").'"', |
20 |
|
|
'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"', |
21 |
|
|
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
22 |
|
|
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
23 |
|
|
'avis_consultation.libelle as "'._("avis_consultation").'"', |
24 |
nhaye |
649 |
'CASE WHEN dossier.enjeu_erp is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu-16" title="'._('Enjeu ERP').'">ERP</span>\' ELSE \'\' END || |
25 |
|
|
CASE WHEN dossier.enjeu_urba is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu-16" title="'._('Enjeu Urba').'">URBA</span>\' ELSE \'\' END |
26 |
nhaye |
615 |
as "'._("enjeu").'"', |
27 |
nhaye |
509 |
); |
28 |
|
|
|
29 |
|
|
$table .= "LEFT OUTER JOIN ".DB_PREFIXE."om_utilisateur |
30 |
|
|
ON om_utilisateur.om_utilisateur=dossier.instructeur "; |
31 |
|
|
|
32 |
|
|
// XXX Ajouter le critere concernant la division de l'instructeur connecte |
33 |
|
|
$selection=" WHERE consultation.lu IS FALSE"; |
34 |
|
|
|
35 |
nhaye |
615 |
$tri=" ORDER BY dossier.enjeu_erp, dossier.enjeu_urba, consultation.date_retour"; |
36 |
nhaye |
509 |
|
37 |
|
|
$champRecherche = array( |
38 |
|
|
'dossier.dossier as "'._("dossier").'"', |
39 |
|
|
'om_utilisateur.nom as "'._("instructeur").'"', |
40 |
|
|
); |
41 |
|
|
|
42 |
|
|
$tab_actions['corner']['ajouter']=NULL; |
43 |
nhaye |
525 |
$tab_actions['left']['consulter']=array('lien' => '../spg/direct_link.php?obj=dossier&action=3'. |
44 |
nhaye |
630 |
'&direct_field=dossier&direct_form=consultation&direct_action=1&direct_idx=', |
45 |
nhaye |
525 |
'id' => '', |
46 |
nhaye |
509 |
'lib' => '<span class="om-icon om-icon-16 om-icon-fix consult-16" title="'._('Consulter').'">'._('Consulter').'</span>', |
47 |
|
|
'rights' => array('list' => array($obj, $obj.'_consulter'), 'operator' => 'OR'), |
48 |
|
|
'ordre' => 10,); |
49 |
|
|
$tab_actions['content'] = $tab_actions['left']['consulter']; |
50 |
|
|
|
51 |
|
|
|
52 |
|
|
$champs = array(); |
53 |
|
|
|
54 |
|
|
$champs['service_abrege'] = array( |
55 |
|
|
'table' => 'service', |
56 |
|
|
'colonne' => 'abrege', |
57 |
|
|
'type' => 'text', |
58 |
|
|
'libelle' => _('Service (abrege)')); |
59 |
|
|
|
60 |
|
|
$champs['service'] = array( |
61 |
|
|
'table' => 'service', |
62 |
|
|
'colonne' => 'libelle', |
63 |
|
|
'type' => 'text', |
64 |
|
|
'libelle' => _('Service')); |
65 |
|
|
|
66 |
|
|
$champs['date_envoi'] = |
67 |
|
|
array('colonne' => 'date_envoi', |
68 |
|
|
'table' => 'consultation', |
69 |
|
|
'libelle' => _('Date d\'envoi'), |
70 |
|
|
'type' => 'date', |
71 |
|
|
'where' => 'intervaldate'); |
72 |
|
|
$champs['date_retour'] = |
73 |
|
|
array('colonne' => 'date_retour', |
74 |
|
|
'table' => 'consultation', |
75 |
|
|
'libelle' => _('Date de retour'), |
76 |
|
|
'type' => 'date', |
77 |
|
|
'where' => 'intervaldate'); |
78 |
|
|
|
79 |
|
|
$champs['date_limite'] = |
80 |
|
|
array('colonne' => 'date_limite', |
81 |
|
|
'table' => 'consultation', |
82 |
|
|
'libelle' => _('Date limite'), |
83 |
|
|
'type' => 'date', |
84 |
|
|
'where' => 'intervaldate'); |
85 |
|
|
|
86 |
|
|
$options[] = array('type' => 'search', |
87 |
|
|
'display' => true, |
88 |
|
|
'advanced' => $champs, |
89 |
|
|
'absolute_object' => 'consultation'); |
90 |
|
|
|
91 |
|
|
/** |
92 |
|
|
* Options |
93 |
|
|
*/ |
94 |
|
|
|
95 |
|
|
$options[] = array( |
96 |
|
|
"type" => "condition", |
97 |
|
|
"field" => "case consultation.lu when 't' then 'Oui' else 'Non' end", |
98 |
|
|
"case" => array( |
99 |
|
|
"0" => array( |
100 |
|
|
"values" => array("Non", ), |
101 |
|
|
"style" => "consultation_non_lue", |
102 |
|
|
), |
103 |
|
|
), |
104 |
|
|
); |
105 |
|
|
|
106 |
|
|
?> |