/[openfoncier]/trunk/sql/pgsql/consultation_tous_retours.inc.php
ViewVC logotype

Contents of /trunk/sql/pgsql/consultation_tous_retours.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1663 - (show annotations)
Fri Apr 12 17:08:33 2013 UTC (11 years, 9 months ago) by fmichon
File size: 5469 byte(s)
Homogénéisation des titres de page + Suppression des colonnes arrondissements et délai de notification + Ajout de l'instructeur et de la division dans l'écran de recherche des dossier d'instruction

1 <?php
2
3 //
4 include('../gen/sql/pgsql/consultation.inc.php');
5
6 //
7 $ent = _("instruction")." -> "._("consultations")." -> "._("tous les retours");
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 $type_consultation_field = 'CASE WHEN service.type_consultation=\'avec_avis_attendu\'
14 THEN \''._("avec avis attendu").'\'
15 WHEN service.type_consultation=\'pour_conformite\'
16 THEN \''._("pour conformite").'\'
17 WHEN service.type_consultation=\'pour_information\'
18 THEN \''._("pour information").'\'
19 END as "'._("type_consultation").'"';
20 //
21 $champAffiche = array(
22 'consultation.consultation as "'._("consultation").'"',
23 'consultation.dossier as "'._("dossier").'"',
24 'concat(service.abrege,\' \',service.libelle) as "'._("service").'"',
25 $type_consultation_field,
26 'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"',
27 'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"',
28 'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"',
29 'avis_consultation.libelle as "'._("avis_consultation").'"',
30 'instructeur.nom as "'._("instructeur").'"',
31 'CASE WHEN dossier.enjeu_erp is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_erp-16" title="'._('Enjeu ERP').'">ERP</span>\' ELSE \'\' END ||
32 CASE WHEN dossier.enjeu_urba is TRUE THEN \'<span class="om-icon om-icon-16 om-icon-fix enjeu_urba-16" title="'._('Enjeu Urba').'">URBA</span>\' ELSE \'\' END
33 as "'._("enjeu").'"',
34 );
35
36 $table .= "
37 LEFT JOIN ".DB_PREFIXE."instructeur
38 ON instructeur.instructeur=dossier.instructeur
39 LEFT JOIN ".DB_PREFIXE."om_utilisateur
40 ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur";
41
42 //
43 $selection=" WHERE
44 consultation.lu IS FALSE
45 AND dossier.division = ".$_SESSION['division']."";
46
47 $tri=" ORDER BY dossier.enjeu_erp, dossier.enjeu_urba, consultation.date_retour";
48
49 $champRecherche = array(
50 'dossier.dossier as "'._("dossier").'"',
51 'instructeur.nom as "'._("instructeur").'"',
52 );
53
54 $tab_actions['corner']['ajouter']=NULL;
55 $tab_actions['left']['consulter']=array('lien' => '../spg/direct_link.php?obj=dossier_instruction_tous_encours&amp;action=3'.
56 '&amp;direct_field=dossier&direct_form=consultation&direct_action=3&direct_idx=',
57 'id' => '',
58 'lib' => '<span class="om-icon om-icon-16 om-icon-fix consult-16" title="'._('Consulter').'">'._('Consulter').'</span>',
59 'rights' => array('list' => array($obj, $obj.'_consulter'), 'operator' => 'OR'),
60 'ordre' => 10,);
61 $tab_actions['content'] = $tab_actions['left']['consulter'];
62
63
64 $champs = array();
65
66 $champs['service_abrege'] = array(
67 'table' => 'service',
68 'colonne' => 'abrege',
69 'type' => 'text',
70 'libelle' => _('Service (abrege)'));
71
72 $champs['service'] = array(
73 'table' => 'service',
74 'colonne' => 'libelle',
75 'type' => 'text',
76 'libelle' => _('Service'));
77
78 $champs['instructeur'] =
79 array('colonne' => 'instructeur',
80 'table' => 'dossier',
81 'libelle' => _('Instructeur'),
82 'type' => 'text');
83
84 $champs['date_envoi'] =
85 array('colonne' => 'date_envoi',
86 'table' => 'consultation',
87 'libelle' => _('Date d\'envoi'),
88 'type' => 'date',
89 'where' => 'intervaldate');
90 $champs['date_retour'] =
91 array('colonne' => 'date_retour',
92 'table' => 'consultation',
93 'libelle' => _('Date de retour'),
94 'type' => 'date',
95 'where' => 'intervaldate');
96
97 $champs['date_limite'] =
98 array('colonne' => 'date_limite',
99 'table' => 'consultation',
100 'libelle' => _('Date limite'),
101 'type' => 'date',
102 'where' => 'intervaldate');
103
104 $options[] = array('type' => 'search',
105 'display' => true,
106 'advanced' => $champs,
107 'absolute_object' => 'consultation');
108
109 /**
110 * Options
111 */
112
113 $options[] = array(
114 "type" => "condition",
115 "field" => "case consultation.lu when 't' then 'Oui' else 'Non' end",
116 "case" => array(
117 "0" => array(
118 "values" => array("Non", ),
119 "style" => "consultation_non_lue",
120 ),
121 ),
122 );
123 /**
124 * Options
125 */
126 // On met la ligne en couleur selon le type de condition
127 $options[] = array(
128 "type" => "condition",
129 "field" => 'CASE WHEN service.type_consultation=\'avec_avis_attendu\'
130 THEN \''._("avec avis attendu").'\'
131 WHEN service.type_consultation=\'pour_conformite\'
132 THEN \''._("pour conformite").'\'
133 WHEN service.type_consultation=\'pour_information\'
134 THEN \''._("pour information").'\'
135 END',
136 "case" => array(
137 array(
138 "values" => array(_("avec avis attendu"), ),
139 "style" => "consultation-avec-avis-attendu",
140 ),
141 array(
142 "values" => array(_("pour conformite"), ),
143 "style" => "consultation-pour-conformite",
144 ),
145 array(
146 "values" => array(_("pour information"), ),
147 "style" => "consultation-pour-information",
148 ),
149 ),
150 );
151
152 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26