diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index e67111fad6c..60fb20206b7 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1282,6 +1282,33 @@ if ($id > 0) print img_picto($langs->trans("ViewCal"),'object_calendarperuser','class="hideonsmartphone"').' '; print ''."\n"; print ''; + + if (empty($conf->global->AGENDA_DISABLE_BUILDDOC)) + { + print '
 
'; + print ''; // ancre + + /* + * Documents generes + */ + + $filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id; + $urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id; + + $genallowed=$user->rights->agenda->myactions->create; + $delallowed=$user->rights->agenda->myactions->delete; + + $var=true; + + $somethingshown=$formfile->show_documents('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang); + + print '
'; + + + print '
'; + + print '
 
'; + } } } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 674be61311d..42e0c4c9523 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -300,6 +300,10 @@ class FormFile include_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php'; $modellist=ModeleThirdPartyDoc::liste_modeles($this->db); } + } + else if ($modulepart == 'agenda') + { + null; } else if ($modulepart == 'propal') { diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 44e962de3ea..236f418dd86 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -446,7 +446,7 @@ function actions_prepare_head($object) $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$')); $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')'; + if ($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.''; $head[$h][2] = 'documents'; $h++;