3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2011 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
15 // http://doc.spip.org/@naviguer_doc
16 function inc_documenter_objet_dist($id, $type = "article", $script, $flag_editable=true) {
17 global $spip_lang_left;
20 if ($GLOBALS['meta']["documents_$type"]=='non'
21 OR !autoriser('joindredocument', $type, $id)
25 $joindre = charger_fonction('joindre', 'inc');
26 $res = $joindre(array(
28 'icone' => 'image-24.gif',
29 'fonction' => 'creer.gif',
30 'titre' => _T('titre_joindre_document'),
32 'args' => "id_$type=$id",
34 'intitule' => _T('info_telecharger_ordinateur'),
39 'iframe_script' => generer_url_ecrire("documenter","id_$type=$id&type=$type",true)
42 // eviter le formulaire upload qui se promene sur la page
43 // a cause des position:relative incompris de MSIE
45 if ($GLOBALS['browser_name']!="MSIE") {
46 $res = "\n<table width='100%' cellpadding='0' cellspacing='0' border='0'>\n<tr><td> </td><td style='text-align: $spip_lang_left;width: 50%;'>\n$res</td></tr></table>";
49 $res .= http_script('',"async_upload.js")
50 . http_script('$("form.form_upload").async_upload(async_upload_portfolio_documents);');
54 $documenter = charger_fonction('documenter', 'inc');
56 return "<div id='portfolio'>".$documenter($id, $type, 'portfolio', $flag_editable)."</div><br />"
57 ."<div id='documents'>". $documenter($id, $type, 'documents', $flag_editable)."</div>"