36 $head[$h][0] = DOL_URL_ROOT.
'/don/admin/donation.php';
37 $head[$h][1] = $langs->trans(
"Miscellaneous");
38 $head[$h][2] =
'general';
47 $head[$h][0] = DOL_URL_ROOT.
'/don/admin/donation_extrafields.php';
48 $head[$h][1] = $langs->trans(
"ExtraFields");
49 $head[$h][2] =
'attributes';
65 global $db, $langs, $conf;
70 $head[$h][0] = DOL_URL_ROOT.
'/don/card.php?id='.$object->id;
71 $head[$h][1] = $langs->trans(
"Donation");
72 $head[$h][2] =
'card';
81 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
82 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
84 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
85 $nbLinks =
Link::count($db, $object->element, $object->id);
86 $head[$h][0] = DOL_URL_ROOT.
'/don/document.php?id='.$object->id;
87 $head[$h][1] = $langs->trans(
'Documents');
88 if (($nbFiles + $nbLinks) > 0) $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
89 $head[$h][2] =
'documents';
93 if (!empty($object->note_private)) $nbNote++;
94 if (!empty($object->note_public)) $nbNote++;
95 $head[$h][0] = DOL_URL_ROOT.
'/don/note.php?id='.$object->id;
96 $head[$h][1] = $langs->trans(
"Notes");
97 if ($nbNote > 0) $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
98 $head[$h][2] =
'note';
101 $head[$h][0] = DOL_URL_ROOT.
'/don/info.php?id='.$object->id;
102 $head[$h][1] = $langs->trans(
"Info");
103 $head[$h][2] =
'info';
dol_sanitizeFileName($str, $newstr= '_', $unaccent=1)
Clean a string to use it as a file name.
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0)
Scan a directory and return a list of files/directories.
static count($db, $objecttype, $objectid)
Return nb of links.
donation_admin_prepare_head()
Prepare array with list of admin tabs.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode= 'add')
Complete or removed entries into a head array (used to build tabs).
donation_prepare_head($object)
Prepare array with list of tabs.