"._("consultations")." -> "._("mes retours");
//
$tab_description = _("Les consultations qui sont notees comme non lues qui".
" concernent des dossiers d'instruction dont je suis".
" l'instructeur.");
$type_consultation_field = 'CASE WHEN service.type_consultation=\'avec_avis_attendu\'
THEN \''._("avec avis attendu").'\'
WHEN service.type_consultation=\'pour_conformite\'
THEN \''._("pour conformite").'\'
WHEN service.type_consultation=\'pour_information\'
THEN \''._("pour information").'\'
END as "'._("type_consultation").'"';
//
$champAffiche = array(
'consultation.consultation as "'._("consultation").'"',
'dossier.dossier_libelle as "'._("dossier").'"',
'concat(service.abrege,\' \',service.libelle) as "'._("service").'"',
$type_consultation_field,
'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"',
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"',
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"',
'avis_consultation.libelle as "'._("avis_consultation").'"',
'CASE WHEN dossier.enjeu_erp is TRUE THEN \'ERP\' ELSE \'\' END ||
CASE WHEN dossier.enjeu_urba is TRUE THEN \'URBA\' ELSE \'\' END
as "'._("enjeu").'"',
);
$table .= "
LEFT JOIN ".DB_PREFIXE."instructeur
ON instructeur.instructeur=dossier.instructeur
LEFT JOIN ".DB_PREFIXE."om_utilisateur
ON instructeur.om_utilisateur = om_utilisateur.om_utilisateur";
//
$selection = " WHERE
consultation.lu IS FALSE
AND om_utilisateur.login='".$_SESSION['login']."'";
$tri=" ORDER BY dossier.enjeu_erp, dossier.enjeu_urba, consultation.date_retour";
$champRecherche = array(
'dossier.dossier as "'._("dossier").'"',
);
$tab_actions['corner']['ajouter']=NULL;
$tab_actions['left']['consulter']=$tab_actions['left']['consulter']=array('lien' => '../spg/direct_link.php?obj=dossier_instruction_mes_encours&action=3'.
'&direct_field=dossier&direct_form=consultation&direct_action=3&direct_idx=',
'id' => '',
'lib' => ''._('Consulter').'',
'rights' => array('list' => array($obj, $obj.'_consulter'), 'operator' => 'OR'),
'ordre' => 10,);
$tab_actions['content'] = $tab_actions['left']['consulter'];
/**
* OPTIONS - ADVSEARCH
*/
//
$champs = array();
//
$champs['service_abrege'] = array(
'table' => 'service',
'colonne' => 'abrege',
'type' => 'text',
'libelle' => _('Service (abrege)'),
);
//
$champs['service'] = array(
'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',
);
// advsearch -> options
$options[] = array(
'type' => 'search',
'display' => true,
'advanced' => $champs,
'absolute_object' => 'consultation',
);
/**
* Options
*/
// On met la ligne en couleur selon le type de condition
$options[] = array(
"type" => "condition",
"field" => 'CASE WHEN service.type_consultation=\'avec_avis_attendu\'
THEN \''._("avec avis attendu").'\'
WHEN service.type_consultation=\'pour_conformite\'
THEN \''._("pour conformite").'\'
WHEN service.type_consultation=\'pour_information\'
THEN \''._("pour information").'\'
END',
"case" => array(
array(
"values" => array(_("avec avis attendu"), ),
"style" => "consultation-avec-avis-attendu",
),
array(
"values" => array(_("pour conformite"), ),
"style" => "consultation-pour-conformite",
),
array(
"values" => array(_("pour information"), ),
"style" => "consultation-pour-information",
),
),
);
?>