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

Diff of /trunk/sql/pgsql/consultation.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/sql/pgsql/consultation.inc revision 38 by fraynaud, Thu Jul 21 14:47:33 2011 UTC trunk/sql/pgsql/consultation.inc.php revision 499 by nhaye, Fri Oct 12 16:19:48 2012 UTC
# Line 2  Line 2 
2  //$Id$  //$Id$
3  //gen openMairie le 10/02/2011 20:32  //gen openMairie le 10/02/2011 20:32
4  include('../gen/sql/pgsql/consultation.inc.php');  include('../gen/sql/pgsql/consultation.inc.php');
 $table="consultation inner join service on consultation.service=service.service";  
 $champAffiche=array("consultation",  
                     "consultation.service",  
                     "libelle",  
                     "to_char(date_envoi,'DD/MM/YYYY') as date_envoi",  
                     "to_char(date_retour,'DD/MM/YYYY') as date_retour",  
                     "to_char(date_limite,'DD/MM/YYYY') as date_limite",  
                     "avis");  
 $champRecherche=array("libelle");  
 if(isset($idx))  
   $selection=" where dossier ='".$idx."'";  
 else  
   $selection="";  
 // =============================================================================  
 // href particulier pour edition d etat  
 // =============================================================================  
   
 $href[3]['lien'] = "../pdf/pdfetat.php?idx=";  
 $href[3]['id']= "&obj=consultation";  
 $href[3]['lib']= "<img src='../img/ico_pdf.png' border=0>";  
5    
6  // probleme lies a la gestion par nature  $table .= "INNER JOIN ".DB_PREFIXE."om_utilisateur
7            ON om_utilisateur.om_utilisateur=dossier.instructeur ";
8            
9    if(isset($idx)) {
10        $selection=" WHERE consultation.dossier ='".$idx."'";
11    }
12    else {
13        $selection=" WHERE om_utilisateur.login='".$_SESSION['login']."'";
14        $tab_actions['corner']['ajouter']=NULL;
15    }
16    
17  if ($retourformulaire== 'service'){  if ($retourformulaire== 'service'){
18      $href[0] = array("lien" => "#", "id" => "", "lib" => "", );      // Actions en coin : ajouter
19      $href[1] = array("lien" => "", "id" => "", "lib" => "", );      $tab_actions['corner']['ajouter'] = NULL;
20      $href[2] = array("lien" => "#", "id" => "", "lib" => "", );      // Actions a gauche : consulter
21        $tab_actions['left']['consulter'] = NULL;
22      $selection=" where consultation.service ='".$idx."'";      $selection=" where consultation.service ='".$idx."'";
23  }  }
24    
25    $champs = array();
26    
27    $champs['service_abrege'] = array(
28        'table' => 'service',
29        'colonne' => 'abrege',
30        'type' => 'text',
31        'libelle' => _('Service (abrege)'));
32    
33    $champs['service'] = array(
34        'table' => 'service',
35        'colonne' => 'libelle',
36        'type' => 'text',
37        'libelle' => _('Service'));
38    
39    $champs['date_envoi'] =
40        array('colonne' => 'date_envoi',
41              'table' => 'consultation',
42              'libelle' => _('Date d\'envoi'),
43              'type' => 'date',
44              'where' => 'intervaldate');
45    $champs['date_retour'] =
46        array('colonne' => 'date_retour',
47              'table' => 'consultation',
48              'libelle' => _('Date de retour'),
49              'type' => 'date',
50              'where' => 'intervaldate');
51        
52    $champs['date_limite'] =
53        array('colonne' => 'date_limite',
54              'table' => 'consultation',
55              'libelle' => _('Date limite'),
56              'type' => 'date',
57              'where' => 'intervaldate');
58    
59    
60    $options[] =  array('type' => 'search',
61                         'display' => true,
62                         'advanced' => $champs,
63                         'default_form' => 'advanced',
64                         'absolute_object' => 'consultation');
65    
66    /**
67     * Options
68     */
69    
70    $options_tab[] = array(
71        "type" => "condition",
72        "field" => "om_collectivite.niveau",
73        "case" => array(
74            "0" => array(
75                "style" => "tab_desactive",
76            ),
77        ),
78    );
79  ?>  ?>

Legend:
Removed from v.38  
changed lines
  Added in v.499

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26