35 global $langs,
$conf, $user, $form;
40 $showmediasection = 0;
41 if (isModEnabled(
'mailing') || isModEnabled(
'website')) {
42 $showmediasection = 1;
45 $helptext = $langs->trans(
"ECMAreaDesc").
'<br>';
46 $helptext .= $langs->trans(
"ECMAreaDesc2a").
'<br>';
47 $helptext .= $langs->trans(
"ECMAreaDesc2b");
48 if ($showmediasection) {
49 $helptext .=
'<br>'.$langs->trans(
"ECMAreaDesc3");
52 $head[$h][0] = DOL_URL_ROOT.
'/ecm/index.php';
53 $head[$h][1] = $langs->trans(
"ECMSectionsManual").$form->textwithpicto(
'', $helptext, 1,
'info',
'', 0, 3);
54 $head[$h][2] =
'index';
58 $head[$h][0] = DOL_URL_ROOT.
'/ecm/index_auto.php';
59 $head[$h][1] = $langs->trans(
"ECMSectionsAuto").$form->textwithpicto(
'', $helptext, 1,
'info',
'', 0, 3);
60 $head[$h][2] =
'index_auto';
65 $head[$h][0] = DOL_URL_ROOT.
'/ecm/index_medias.php?file_manager=1';
66 $head[$h][1] = $langs->trans(
"ECMSectionsMedias").$form->textwithpicto(
'', $helptext, 1,
'info',
'', 0, 3);
67 $head[$h][2] =
'index_medias';
93 global $langs,
$conf, $user;
97 if ($module ==
'ecm') {
98 $head[$h][0] = DOL_URL_ROOT.
'/ecm/dir_card.php?section='.
$object->id;
99 $head[$h][1] = $langs->trans(
"Directory");
100 $head[$h][2] =
'card';
103 $head[$h][0] = DOL_URL_ROOT.
'/ecm/dir_card.php?section='.$section.
'&module='.$module;
104 $head[$h][1] = $langs->trans(
"Directory");
105 $head[$h][2] =
'card';
124 $head[$h][0] = DOL_URL_ROOT.
'/ecm/file_card.php?section='.
$object->section_id.
'&urlfile='.urlencode(
$object->label);
125 $head[$h][1] = $langs->trans(
"File");
126 $head[$h][2] =
'card';
130 $head[$h][0] = DOL_URL_ROOT.
'/ecm/file_note.php?section='.
$object->section_id.
'&urlfile='.urlencode(
$object->label);
131 $head[$h][1] = $langs->trans(
"Notes");
133 if (!empty(
$object->note_private)) {
136 if (!empty(
$object->note_public)) {
140 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbNote.
'</span>';
142 $head[$h][2] =
'note';
156 global $langs,
$conf;
160 $head[$h][0] = DOL_URL_ROOT.
'/ecm/index.php?action=file_manager';
161 $head[$h][1] = $langs->trans(
'ECMFileManager');
162 $head[$h][2] =
'file_manager';
165 $head[$h][0] = DOL_URL_ROOT.
'/ecm/search.php';
166 $head[$h][1] = $langs->trans(
'Search');
167 $head[$h][2] =
'search_form';
180 global $langs,
$conf, $db;
183 $extrafields->fetch_name_optionals_label(
'ecm_files');
184 $extrafields->fetch_name_optionals_label(
'ecm_directories');
191 $head[$h][0] = DOL_URL_ROOT.
"/admin/ecm.php";
192 $head[$h][1] = $langs->trans(
"Setup");
193 $head[$h][2] =
'ecm';
196 $head[$h][0] = DOL_URL_ROOT.
'/admin/ecm_files_extrafields.php';
197 $head[$h][1] = $langs->trans(
"ExtraFieldsEcmFiles");
198 $nbExtrafields = $extrafields->attributes[
'ecm_files'][
'count'];
199 if ($nbExtrafields > 0) {
200 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
202 $head[$h][2] =
'attributes_ecm_files';
205 $head[$h][0] = DOL_URL_ROOT.
'/admin/ecm_directories_extrafields.php';
206 $head[$h][1] = $langs->trans(
"ExtraFieldsEcmDirectories");
207 $nbExtrafields = $extrafields->attributes[
'ecm_directories'][
'count'];
208 if ($nbExtrafields > 0) {
209 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
211 $head[$h][2] =
'attributes_ecm_directories';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
ecm_prepare_dasboard_head()
Prepare array with list of different ecm main dashboard.
ecm_file_prepare_head($object)
Prepare array with list of tabs.
ecm_prepare_head_fm($object)
Prepare array with list of tabs.
ecm_prepare_head($object, $module='ecm', $section='')
Prepare array with list of tabs.
ecm_admin_prepare_head()
Return array head with list of tabs to view object information.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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 a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...