32 global $langs, $conf, $db;
34 $langs->loadLangs(array(
"members",
"partnership"));
37 $extrafields->fetch_name_optionals_label(
'partnership');
42 $head[$h][0] = DOL_URL_ROOT .
'/partnership/admin/setup.php';
43 $head[$h][1] = $langs->trans(
"Settings");
44 $head[$h][2] =
'settings';
48 $head[$h][0] = DOL_URL_ROOT .
'/partnership/admin/partnership_extrafields.php';
49 $head[$h][1] = $langs->trans(
"ExtraFields");
50 $nbExtrafields = $extrafields->attributes[
'partnership'][
'count'];
51 if ($nbExtrafields > 0) {
52 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . $nbExtrafields .
'</span>';
54 $head[$h][2] =
'partnership_extrafields';
57 $head[$h][0] = DOL_URL_ROOT .
'/partnership/admin/website.php';
58 $head[$h][1] = $langs->trans(
"BlankSubscriptionForm");
59 $head[$h][2] =
'website';
85 global $db, $langs, $conf;
87 $langs->load(
"partnership");
92 $head[$h][0] = DOL_URL_ROOT .
'/partnership/partnership_card.php?id=' .
$object->id;
93 $head[$h][1] = $langs->trans(
"Card");
94 $head[$h][2] =
'card';
97 if (isset(
$object->fields[
'note_public']) || isset(
$object->fields[
'note_private'])) {
99 if (!empty(
$object->note_private)) {
102 if (!empty(
$object->note_public)) {
105 $head[$h][0] = DOL_URL_ROOT .
'/partnership/partnership_note.php?id=' .
$object->id;
106 $head[$h][1] = $langs->trans(
'Notes');
108 $head[$h][1] .= (!
getDolGlobalString(
'MAIN_OPTIMIZEFORTEXTBROWSER') ?
'<span class="badge marginleftonlyshort">' . $nbNote .
'</span>' :
'');
110 $head[$h][2] =
'note';
114 require_once DOL_DOCUMENT_ROOT .
'/core/lib/files.lib.php';
115 require_once DOL_DOCUMENT_ROOT .
'/core/class/link.class.php';
117 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
119 $head[$h][0] = DOL_URL_ROOT .
'/partnership/partnership_document.php?id=' .
$object->id;
120 $head[$h][1] = $langs->trans(
'Documents');
121 if (($nbFiles + $nbLinks) > 0) {
122 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . ($nbFiles + $nbLinks) .
'</span>';
124 $head[$h][2] =
'document';
127 $head[$h][0] = DOL_URL_ROOT .
'/partnership/partnership_agenda.php?id=' .
$object->id;
128 $head[$h][1] = $langs->trans(
"Events");
129 $head[$h][2] =
'agenda';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
static count($dbs, $objecttype, $objectid)
Return nb of links.
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).
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
partnershipAdminPrepareHead()
Prepare admin pages header.
partnershipPrepareHead($object)
Prepare array of tabs for Partnership.