140 |
// FROM |
// FROM |
141 |
$table = sprintf( |
$table = sprintf( |
142 |
'%s |
'%s |
|
%s |
|
143 |
%s', |
%s', |
144 |
$conf["query_ct_from"], |
$conf["query_ct_from"], |
145 |
$sqlFilter['FROM'], |
$sqlFilter['FROM'] |
|
$join_enjeux_dossier |
|
146 |
); |
); |
147 |
|
|
148 |
// WHERE |
// WHERE |
154 |
$sqlFilter['WHERE'] |
$sqlFilter['WHERE'] |
155 |
); |
); |
156 |
// |
// |
157 |
$tri = " ORDER BY enjeux_dossier.priorite_enjeux, dossier_message.date_emission ASC "; |
$tri = " ORDER BY $order_by_enjeux_priorite_dossier, dossier_message.date_emission ASC "; |
158 |
|
$options[] = array( |
159 |
|
'type' => 'pagination_group_by', |
160 |
|
'pagination_group_by' => false |
161 |
|
); |
162 |
// |
// |
163 |
if ($contexte === 'contentieux') { |
if ($contexte === 'contentieux') { |
164 |
// |
// |
303 |
// |
// |
304 |
$advsearch_fields_end = array( |
$advsearch_fields_end = array( |
305 |
'enjeu' => array( |
'enjeu' => array( |
306 |
'table' => 'enjeux_dossier', |
'tablejoin' => sprintf( |
307 |
'colonne' => 'enjeux_libelles', |
'INNER JOIN ( |
308 |
|
SELECT |
309 |
|
lien_dossier_enjeux.dossier, |
310 |
|
string_agg(enjeux.libelle, \', \') AS enjeux_libelles |
311 |
|
FROM |
312 |
|
%1$slien_dossier_enjeux |
313 |
|
LEFT JOIN %1$senjeux |
314 |
|
ON lien_dossier_enjeux.enjeux = enjeux.enjeux |
315 |
|
GROUP BY |
316 |
|
lien_dossier_enjeux.dossier) AS enjeux_libelles |
317 |
|
ON enjeux_libelles.dossier = dossier.dossier |
318 |
|
AND TRANSLATE( |
319 |
|
LOWER(enjeux_libelles.enjeux_libelles::varchar), |
320 |
|
\'àáâãäçèéêëìíîïñòóôõöùúûüýÿ\', |
321 |
|
\'aaaaaceeeeiiiinooooouuuuyy\' |
322 |
|
) LIKE %%s', |
323 |
|
DB_PREFIXE |
324 |
|
), |
325 |
'type' => 'text', |
'type' => 'text', |
326 |
'libelle' => __('Enjeu'), |
'libelle' => __('Enjeu'), |
327 |
'taille' => '', |
'taille' => '', |