31 global $langs, $conf, $db;
34 $extrafields->fetch_name_optionals_label(
'don');
39 $head[$h][0] = DOL_URL_ROOT.
'/don/admin/donation.php';
40 $head[$h][1] = $langs->trans(
"Miscellaneous");
41 $head[$h][2] =
'general';
50 $head[$h][0] = DOL_URL_ROOT.
'/don/admin/donation_extrafields.php';
51 $head[$h][1] = $langs->trans(
"ExtraFields");
52 $nbExtrafields = $extrafields->attributes[
'don'][
'count'];
53 if ($nbExtrafields > 0) {
54 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
56 $head[$h][2] =
'attributes';
72 global $db, $langs, $conf;
77 $head[$h][0] = DOL_URL_ROOT.
'/don/card.php?id='.
$object->id;
78 $head[$h][1] = $langs->trans(
"Donation");
79 $head[$h][2] =
'card';
88 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
89 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
91 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
93 $head[$h][0] = DOL_URL_ROOT.
'/don/document.php?id='.
$object->id;
94 $head[$h][1] = $langs->trans(
'Documents');
95 if (($nbFiles + $nbLinks) > 0) {
96 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
98 $head[$h][2] =
'documents';
102 if (!empty(
$object->note_private)) {
105 if (!empty(
$object->note_public)) {
108 $head[$h][0] = DOL_URL_ROOT.
'/don/note.php?id='.
$object->id;
109 $head[$h][1] = $langs->trans(
"Notes");
111 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
113 $head[$h][2] =
'note';
116 $head[$h][0] = DOL_URL_ROOT.
'/don/info.php?id='.
$object->id;
117 $head[$h][1] = $langs->trans(
"Info");
118 $head[$h][2] =
'info';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
static count($dbs, $objecttype, $objectid)
Return nb of links.
donation_prepare_head($object)
Prepare array with list of tabs.
donation_admin_prepare_head()
Prepare array with list of admin tabs.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).