32 global $db, $langs, $conf;
34 $langs->load(
"workstation");
39 $head[$h][0] =
dol_buildpath(
"/workstation/workstation_card.php", 1).
'?id='.$object->id;
40 $head[$h][1] = $langs->trans(
"Card");
41 $head[$h][2] =
'card';
44 if (isset($object->fields[
'note_public']) || isset($object->fields[
'note_private'])) {
46 if (!empty($object->note_private)) {
49 if (!empty($object->note_public)) {
52 $head[$h][0] =
dol_buildpath(
'/workstation/workstation_note.php', 1).
'?id='.$object->id;
53 $head[$h][1] = $langs->trans(
'Notes');
55 $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ?
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>' :
'');
57 $head[$h][2] =
'note';
61 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
62 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
64 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
65 $nbLinks =
Link::count($db, $object->element, $object->id);
66 $head[$h][0] =
dol_buildpath(
"/workstation/workstation_document.php", 1).
'?id='.$object->id;
67 $head[$h][1] = $langs->trans(
'Documents');
68 if (($nbFiles + $nbLinks) > 0) {
69 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
71 $head[$h][2] =
'document';
74 $head[$h][0] =
dol_buildpath(
"/workstation/workstation_agenda.php", 1).
'?id='.$object->id;
75 $head[$h][1] = $langs->trans(
"Events");
76 $head[$h][2] =
'agenda';