Update resource.lib.php
This commit is contained in:
parent
4c025d4323
commit
d1018760df
@ -57,30 +57,30 @@ function resource_prepare_head($object)
|
|||||||
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||||
{
|
{
|
||||||
$nbNote = 0;
|
$nbNote = 0;
|
||||||
if(!empty($object->note_private)) $nbNote++;
|
if(!empty($object->note_private)) $nbNote++;
|
||||||
if(!empty($object->note_public)) $nbNote++;
|
if(!empty($object->note_public)) $nbNote++;
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/resource/note.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans('Notes');
|
$head[$h][1] = $langs->trans('Notes');
|
||||||
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
$upload_dir = $conf->ficheinter->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->resource->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
|
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/resource/document.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Documents");
|
$head[$h][1] = $langs->trans("Documents");
|
||||||
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
|
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
|
||||||
$head[$h][2] = 'documents';
|
$head[$h][2] = 'documents';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fichinter/info.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/resource/info.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans('Info');
|
$head[$h][1] = $langs->trans('Info');
|
||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'intervention','remove');
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'resource', 'remove');
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user