35 global $langs,
$conf, $form;
40 $showmediasection = 0;
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] =
dolBuildUrl(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] =
dolBuildUrl(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';
64 if ($showmediasection) {
65 $head[$h][0] =
dolBuildUrl(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';
180 global $langs,
$conf, $extrafields;
182 $extrafields->fetch_name_optionals_label(
'ecm_files');
183 $extrafields->fetch_name_optionals_label(
'ecm_directories');
190 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
"/admin/ecm.php");
191 $head[$h][1] = $langs->trans(
"Setup");
192 $head[$h][2] =
'ecm';
195 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/admin/extrafields.php', array(
'elementtype' =>
'ecm_files'));
196 $head[$h][1] = $langs->trans(
"ExtraFieldsEcmFiles");
197 $nbExtrafields = $extrafields->attributes[
'ecm_files'][
'count'];
198 if ($nbExtrafields > 0) {
199 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
201 $head[$h][2] =
'attributes_ecm_files';
204 $head[$h][0] =
dolBuildUrl(DOL_URL_ROOT.
'/admin/extrafields.php', array(
'elementtype' =>
'ecm_directories'));
205 $head[$h][1] = $langs->trans(
"ExtraFieldsEcmDirectories");
206 $nbExtrafields = $extrafields->attributes[
'ecm_directories'][
'count'];
207 if ($nbExtrafields > 0) {
208 $head[$h][1] .=
'<span class="badge marginleftonlyshort">'.$nbExtrafields.
'</span>';
210 $head[$h][2] =
'attributes_ecm_directories';
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
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).