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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 890 - (hide annotations)
Thu Nov 29 10:43:18 2012 UTC (12 years, 2 months ago) by fmichon
File size: 4018 byte(s)
Ajout d'un peu de cohérence dans les filtres et les requêtes des listing transversaux de consultations et de messages

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 fmichon 890 'instructeur.nom as "'._("instructeur").'"',
25 nhaye 650 '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 ||
26     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
27 nhaye 615 as "'._("enjeu").'"',
28 nhaye 509 );
29    
30 fmichon 890 $table .= "
31     LEFT JOIN ".DB_PREFIXE."instructeur
32     ON instructeur.instructeur=dossier.instructeur
33     LEFT JOIN ".DB_PREFIXE."om_utilisateur
34     ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur";
35 nhaye 509
36 fmichon 890 //
37     $selection=" WHERE
38     consultation.lu IS FALSE
39     AND dossier.division = ".$_SESSION['division']."";
40 nhaye 509
41 nhaye 615 $tri=" ORDER BY dossier.enjeu_erp, dossier.enjeu_urba, consultation.date_retour";
42 nhaye 509
43     $champRecherche = array(
44     'dossier.dossier as "'._("dossier").'"',
45 fmichon 890 'instructeur.nom as "'._("instructeur").'"',
46 nhaye 509 );
47    
48     $tab_actions['corner']['ajouter']=NULL;
49 nhaye 661 $tab_actions['left']['consulter']=array('lien' => '../spg/direct_link.php?obj=dossier_instruction_tous_encours&amp;action=3'.
50     '&amp;direct_field=dossier&direct_form=consultation&direct_action=3&direct_idx=',
51 nhaye 525 'id' => '',
52 nhaye 509 'lib' => '<span class="om-icon om-icon-16 om-icon-fix consult-16" title="'._('Consulter').'">'._('Consulter').'</span>',
53     'rights' => array('list' => array($obj, $obj.'_consulter'), 'operator' => 'OR'),
54     'ordre' => 10,);
55     $tab_actions['content'] = $tab_actions['left']['consulter'];
56    
57    
58     $champs = array();
59    
60     $champs['service_abrege'] = array(
61     'table' => 'service',
62     'colonne' => 'abrege',
63     'type' => 'text',
64     'libelle' => _('Service (abrege)'));
65    
66     $champs['service'] = array(
67     'table' => 'service',
68     'colonne' => 'libelle',
69     'type' => 'text',
70     'libelle' => _('Service'));
71    
72 fmichon 890 $champs['instructeur'] =
73     array('colonne' => 'instructeur',
74     'table' => 'dossier',
75     'libelle' => _('Instructeur'),
76     'type' => 'text');
77    
78 nhaye 509 $champs['date_envoi'] =
79     array('colonne' => 'date_envoi',
80     'table' => 'consultation',
81     'libelle' => _('Date d\'envoi'),
82     'type' => 'date',
83     'where' => 'intervaldate');
84     $champs['date_retour'] =
85     array('colonne' => 'date_retour',
86     'table' => 'consultation',
87     'libelle' => _('Date de retour'),
88     'type' => 'date',
89     'where' => 'intervaldate');
90    
91     $champs['date_limite'] =
92     array('colonne' => 'date_limite',
93     'table' => 'consultation',
94     'libelle' => _('Date limite'),
95     'type' => 'date',
96     'where' => 'intervaldate');
97    
98     $options[] = array('type' => 'search',
99     'display' => true,
100     'advanced' => $champs,
101     'absolute_object' => 'consultation');
102    
103     /**
104     * Options
105     */
106    
107     $options[] = array(
108     "type" => "condition",
109     "field" => "case consultation.lu when 't' then 'Oui' else 'Non' end",
110     "case" => array(
111     "0" => array(
112     "values" => array("Non", ),
113     "style" => "consultation_non_lue",
114     ),
115     ),
116     );
117    
118     ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26