32 global $langs, $conf, $db;
35 $extrafields->fetch_name_optionals_label(
'don');
40 $head[$h][0] = DOL_URL_ROOT.
'/don/admin/donation.php';
41 $head[$h][1] = $langs->trans(
"Miscellaneous");
42 $head[$h][2] =
'general';
51 $head[$h][0] = DOL_URL_ROOT.
'/don/admin/donation_extrafields.php';
52 $head[$h][1] = $langs->trans(
"ExtraFields");
53 $nbExtrafields = $extrafields->attributes[
'don'][
'count'];
54 if ($nbExtrafields > 0) {
55 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
57 $head[$h][2] =
'attributes';
73 global $db, $langs, $conf;
78 $head[$h][0] = DOL_URL_ROOT.
'/don/card.php?id='.
$object->id;
79 $head[$h][1] = $langs->trans(
"Donation");
80 $head[$h][2] =
'card';
89 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
90 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
92 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
94 $head[$h][0] = DOL_URL_ROOT.
'/don/document.php?id='.
$object->id;
95 $head[$h][1] = $langs->trans(
'Documents');
96 if (($nbFiles + $nbLinks) > 0) {
97 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
99 $head[$h][2] =
'documents';
103 if (!empty(
$object->note_private)) {
106 if (!empty(
$object->note_public)) {
109 $head[$h][0] = DOL_URL_ROOT.
'/don/note.php?id='.
$object->id;
110 $head[$h][1] = $langs->trans(
"Notes");
112 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
114 $head[$h][2] =
'note';
117 $head[$h][0] = DOL_URL_ROOT.
'/don/info.php?id='.
$object->id;
118 $head[$h][1] = $langs->trans(
"Info");
119 $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).