38 $langs->load(
"intracommreport");
43 $head[$h][0] =
dol_buildpath(
"/intracommreport/admin/setup.php", 1);
44 $head[$h][1] = $langs->trans(
"Settings");
45 $head[$h][2] =
'settings';
83 global $db, $langs, $conf;
85 $langs->load(
"mymodule@mymodule");
87 $showtabofpagecontact = 0;
88 $showtabofpagenote = 0;
89 $showtabofpagedocument = 0;
90 $showtabofpageagenda = 0;
96 $head[$h][1] = $langs->trans(
"IntraCommReport");
97 $head[$h][2] =
'card';
100 if ($showtabofpagecontact) {
102 $head[$h][1] = $langs->trans(
"Contacts");
103 $head[$h][2] =
'contact';
107 if ($showtabofpagenote) {
108 if (isset(
$object->fields[
'note_public']) || isset(
$object->fields[
'note_private'])) {
110 if (!empty(
$object->note_private)) {
113 if (!empty(
$object->note_public)) {
117 $head[$h][1] = $langs->trans(
'Notes');
119 $head[$h][1] .= (!
getDolGlobalInt(
'MAIN_OPTIMIZEFORTEXTBROWSER') ?
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>' :
'');
121 $head[$h][2] =
'note';
126 if ($showtabofpagedocument) {
127 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
128 require_once DOL_DOCUMENT_ROOT.
'/core/class/link.class.php';
130 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
133 $head[$h][1] = $langs->trans(
'Documents');
134 if (($nbFiles + $nbLinks) > 0) {
135 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).
'</span>';
137 $head[$h][2] =
'document';
141 if ($showtabofpageagenda) {
143 $head[$h][1] = $langs->trans(
"Events");
144 $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.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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).
intracommreportPrepareHead($object)
Prepare array of tabs for IntraCommReport.
intracommreportAdminPrepareHead()
Prepare admin pages header.