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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 878 - (hide annotations)
Thu Nov 29 09:20:27 2012 UTC (12 years, 2 months ago) by fmichon
File size: 1795 byte(s)
Ajout d'un style css pour la mise en gras des non lus + Ajout d'un tri par date + Amélioration de l'ordre des colonnes présentées

1 mlimic 709 <?php
2     //$Id$
3    
4     include('../gen/sql/pgsql/dossier_message.inc.php');
5    
6 fmichon 878 // SELECT
7 mlimic 709 $champAffiche = array(
8     'dossier_message.message as "'._("message").'"',
9 fmichon 878 'dossier_message.dossier as "'._("dossier").'"',
10     'to_char(dossier_message.date_emission ,\'DD/MM/YYYY\') as "'._("date_emission").'"',
11 mlimic 709 'dossier_message.type as "'._("type").'"',
12     'dossier_message.emetteur as "'._("emetteur").'"',
13     "case dossier_message.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"",
14     );
15 fmichon 878 // Tri par date
16     $tri = "order by date_emission desc, lu";
17 mlimic 709
18 fmichon 878 /**
19     * Gestion de l'affichage dans le contexte du dossier
20     */
21 mlimic 709 if ($retourformulaire == 'dossier'
22 fmichon 878 OR $retourformulaire == 'dossier_instruction'
23     OR $retourformulaire == 'dossier_instruction_mes_encours'
24     OR $retourformulaire == 'dossier_instruction_tous_encours'
25     OR $retourformulaire == 'dossier_instruction_mes_clotures'
26     OR $retourformulaire == 'dossier_instruction_tous_clotures') {
27     // SELECT
28     $champAffiche = array(
29     'dossier_message.message as "'._("message").'"',
30     'to_char(dossier_message.date_emission ,\'DD/MM/YYYY\') as "'._("date_emission").'"',
31     'dossier_message.type as "'._("type").'"',
32     'dossier_message.emetteur as "'._("emetteur").'"',
33     "case dossier_message.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"",
34     );
35     // Filtre sur le dossier
36 mlimic 709 $selection=" WHERE (dossier_message.dossier ='".$idx."')";
37     }
38    
39 fmichon 878 /**
40     * Options
41     */
42     // On affiche le champ lu en gras
43     $options[] = array(
44     "type" => "condition",
45     "field" => "case dossier_message.lu when 't' then 'Oui' else 'Non' end",
46     "case" => array(
47     "0" => array(
48     "values" => array("Non", ),
49     "style" => "non_lu",
50     ),
51     ),
52     );
53    
54 mlimic 709 ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26