"pagination",
'display' => false
);
$tab_actions['content']['lien'] = null;
$tab_actions['corner']['ajouter'] = null;
$tab_actions['left']['consulter'] = null;
$tab_actions['left']['previsualiser'] = array(
'lien' => ''.OM_ROUTE_SOUSFORM.'&obj='.$obj.'&action=401&idxformulaire='.$idxformulaire.'&idx=',
'id' => '&tri='.$tricolsf.'&objsf='.$obj.'&premiersf='.$premier.'&retourformulaire='.$retourformulaire.'&idxformulaire='.$idxformulaire.'&trisf='.$tricolsf.'&retour=tab',
'lib' => '
Prévisualiser
',
'rights' => array('list' => array($obj, $obj . '_previsualiser'), 'operator' => 'OR'),
'ordre' => 100,
'ajax' => false
);
// Action sur la deuxième colonne de contenu
$tab_actions['specific_content'][1] = array(
'lien' => OM_ROUTE_FORM.'&obj=instruction&action=405&champ=om_fichier_instruction&idx=',
'id' => '" target="_blank',
'ordre' => 10,
'ajax' => false
);
// Add Join here ?
$table = sprintf('(
SELECT
instruction.om_fichier_instruction,
instruction.dossier,
CAST(instruction.instruction AS TEXT),
instruction.fichier_instruction_name AS file_name,
CASE WHEN instruction.document_type_instruction IS NOT NULL
THEN document_type.libelle
ELSE \'N/A\'
END AS libelle,
instruction.date_finalisation_courrier,
instruction.date_retour_rar,
instruction.date_evenement
FROM
%1$sinstruction
LEFT JOIN %1$sdocument_type
ON instruction.document_type_instruction = document_type.document_type
LEFT JOIN %1$sdossier
ON instruction.dossier = dossier.dossier
WHERE instruction.om_fichier_instruction IS NOT NULL
UNION
SELECT
storage.uid,
storage.info::json->>\'dossier\',
CONCAT(\'STORAGE_\',storage.storage),
storage.filename AS file_name,
CASE WHEN storage.info::json->>\'document_type\' != \'\'
THEN storage.info::json->>\'document_type_libelle\'
ELSE \'N/A\'
END AS libelle,
CASE WHEN storage.info::json->>\'date_retour_rar\' != \'\'
THEN CAST(storage.info::json->>\'date_retour_rar\' AS DATE)
ELSE NULL
END AS date_retour_rar,
CASE WHEN storage.info::json->>\'date_finalisation_courrier\' != \'\'
THEN CAST(storage.info::json->>\'date_finalisation_courrier\' AS DATE)
ELSE NULL
END AS date_finalisation_courrier,
CASE WHEN storage.info::json->>\'date_evenement\' != \'\'
THEN CAST(storage.info::json->>\'date_evenement\' AS DATE)
ELSE NULL
END AS date_evenement
FROM
%1$sstorage
WHERE
storage.info::json->>\'can_be_document_instruction\' = \'true\'
) AS instruction',
DB_PREFIXE
);
$champAffiche=array(
"instruction.instruction as \""._("id")."\"",
"CONCAT(
'',
instruction.file_name,
''
) as \""._("nom du fichier")."\"",
"instruction.libelle as type",
"to_char(instruction.date_finalisation_courrier ,'DD/MM/YYYY') as \""._("date de finalisation")."\"",
"to_char(instruction.date_retour_rar ,'DD/MM/YYYY') as \""._("date de notification")."\"",
);
// Limit filter here
// Filtre listing sous formulaire - dossier_instruction
if (in_array($retourformulaire, $foreign_keys_extended["dossier"])) {
$selection = " WHERE (instruction.dossier = '".$f->db->escapeSimple($idxformulaire)."')";
}
$champRecherche = array(
"instruction.instruction as \""._("nom du fichier")."\"",
"instruction.lettretype as type",
"instruction.date_finalisation_courrier as \""._("date de finalisation")."\"",
"instruction.date_retour_rar as \""._("date de notification")."\"",
);