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'); |
5 |
|
|
6 |
$table .= "INNER JOIN ".DB_PREFIXE."om_utilisateur |
if(isset($idx) ) { |
7 |
ON om_utilisateur.om_utilisateur=dossier.instructeur "; |
$premier = intval($premier); |
|
|
|
|
if(isset($idx)) { |
|
8 |
$selection=" WHERE consultation.dossier ='".$idx."'"; |
$selection=" WHERE consultation.dossier ='".$idx."'"; |
9 |
} |
$lien = "../app/consultation_multiple.php?obj=$obj&idx=$idx"; |
10 |
else { |
$id=""; |
11 |
$selection=" WHERE om_utilisateur.login='".$_SESSION['login']."'"; |
//$lien = "../scr/sousform.php?obj=$obj&action=0&tri=&objsf=$obj"; |
12 |
$tab_actions['corner']['ajouter']=NULL; |
//$id = "&premiersf=$premiersf&retourformulaire=$retourformulaire&idxformulaire=$idx&trisf=&retour=tab"; |
13 |
|
$right = array('list' => array($obj, $obj.'_ajouter'),'operator' => 'OR'); |
14 |
} |
} |
15 |
|
|
16 |
if ($retourformulaire== 'service'){ |
if ($retourformulaire== 'service'){ |
21 |
$selection=" where consultation.service ='".$idx."'"; |
$selection=" where consultation.service ='".$idx."'"; |
22 |
} |
} |
23 |
|
|
24 |
$champs = array(); |
/** |
25 |
|
* Création d'une nouvelle action du formulaire de consultation, l'ajout de plusieurs consultations en une seule fois |
26 |
$champs['service_abrege'] = array( |
*/ |
27 |
'table' => 'service', |
$tab_actions['corner']['ajouter_multiple'] = array ( |
28 |
'colonne' => 'abrege', |
'lien' => $lien, |
29 |
'type' => 'text', |
'id' => $id, |
30 |
'libelle' => _('Service (abrege)')); |
'lib' => '<span class="om-icon om-icon-16 om-icon-fix mut-add-16" title="'._('Ajouter plusieurs').'">'._('Ajouter plusieurs').'</span>', |
31 |
|
'right' => $right, |
32 |
$champs['service'] = array( |
); |
33 |
'table' => 'service', |
|
|
'colonne' => 'libelle', |
|
|
'type' => 'text', |
|
|
'libelle' => _('Service')); |
|
|
|
|
|
$champs['date_envoi'] = |
|
|
array('colonne' => 'date_envoi', |
|
|
'table' => 'consultation', |
|
|
'libelle' => _('Date d\'envoi'), |
|
|
'type' => 'date', |
|
|
'where' => 'intervaldate'); |
|
|
$champs['date_retour'] = |
|
|
array('colonne' => 'date_retour', |
|
|
'table' => 'consultation', |
|
|
'libelle' => _('Date de retour'), |
|
|
'type' => 'date', |
|
|
'where' => 'intervaldate'); |
|
|
|
|
|
$champs['date_limite'] = |
|
|
array('colonne' => 'date_limite', |
|
|
'table' => 'consultation', |
|
|
'libelle' => _('Date limite'), |
|
|
'type' => 'date', |
|
|
'where' => 'intervaldate'); |
|
|
|
|
|
|
|
|
$options[] = array('type' => 'search', |
|
|
'display' => true, |
|
|
'advanced' => $champs, |
|
|
'default_form' => 'advanced', |
|
|
'absolute_object' => 'consultation'); |
|
|
|
|
34 |
/** |
/** |
35 |
* Options |
* Options |
36 |
*/ |
*/ |
37 |
|
|
38 |
$options_tab[] = array( |
$options[] = array( |
39 |
"type" => "condition", |
"type" => "condition", |
40 |
"field" => "om_collectivite.niveau", |
"field" => "case consultation.lu when 't' then 'Oui' else 'Non' end", |
41 |
"case" => array( |
"case" => array( |
42 |
"0" => array( |
"0" => array( |
43 |
"style" => "tab_desactive", |
"values" => array("Non", ), |
44 |
), |
"style" => "consultation_non_lue", |
45 |
), |
), |
46 |
|
), |
47 |
); |
); |
48 |
?> |
?> |