33 $langs->load(
"assets");
38 $head[$h][0] = DOL_URL_ROOT.
'/asset/admin/setup.php';
39 $head[$h][1] = $langs->trans(
"Settings");
40 $head[$h][2] =
'settings';
53 $head[$h][0] = DOL_URL_ROOT.
'/asset/admin/asset_extrafields.php';
54 $head[$h][1] = $langs->trans(
"ExtraFields");
55 $head[$h][2] =
'asset_extrafields';
58 $head[$h][0] = DOL_URL_ROOT.
'/asset/admin/assetmodel_extrafields.php';
59 $head[$h][1] = $langs->trans(
"ExtraFieldsAssetModel");
60 $head[$h][2] =
'assetmodel_extrafields';
76 global $db, $langs, $conf;
78 $langs->load(
"assets",
"admin");
83 $head[$h][0] = DOL_URL_ROOT .
'/asset/card.php?id=' . $object->id;
84 $head[$h][1] = $langs->trans(
"Card");
85 $head[$h][2] =
'card';
88 if (empty($object->not_depreciated)) {
89 $head[$h][0] = DOL_URL_ROOT .
'/asset/depreciation_options.php?id=' . $object->id;
90 $head[$h][1] = $langs->trans(
"AssetDepreciationOptions");
91 $head[$h][2] =
'depreciation_options';
95 $head[$h][0] = DOL_URL_ROOT .
'/asset/accountancy_codes.php?id=' . $object->id;
96 $head[$h][1] = $langs->trans(
"AssetAccountancyCodes");
97 $head[$h][2] =
'accountancy_codes';
100 if (empty($object->not_depreciated)) {
101 $head[$h][0] = DOL_URL_ROOT .
'/asset/depreciation.php?id=' . $object->id;
102 $head[$h][1] = $langs->trans(
"AssetDepreciation");
103 $head[$h][2] =
'depreciation';
107 if (isset($object->disposal_date) && $object->disposal_date !==
"") {
108 $head[$h][0] = DOL_URL_ROOT .
'/asset/disposal.php?id=' . $object->id;
109 $head[$h][1] = $langs->trans(
"AssetDisposal");
110 $head[$h][2] =
'disposal';
114 if (isset($object->fields[
'note_public']) || isset($object->fields[
'note_private'])) {
116 if (!empty($object->note_private)) {
119 if (!empty($object->note_public)) {
122 $head[$h][0] = DOL_URL_ROOT .
'/asset/note.php?id=' . $object->id;
123 $head[$h][1] = $langs->trans(
'Notes');
125 $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ?
'<span class="badge marginleftonlyshort">' . $nbNote .
'</span>' :
'');
127 $head[$h][2] =
'note';
131 require_once DOL_DOCUMENT_ROOT .
'/core/lib/files.lib.php';
132 require_once DOL_DOCUMENT_ROOT .
'/core/class/link.class.php';
134 $nbFiles = count(
dol_dir_list($upload_dir,
'files', 0,
'',
'(\.meta|_preview.*\.png)$'));
135 $nbLinks =
Link::count($db, $object->element, $object->id);
136 $head[$h][0] = DOL_URL_ROOT .
'/asset/document.php?id=' . $object->id;
137 $head[$h][1] = $langs->trans(
'Documents');
138 if (($nbFiles + $nbLinks) > 0) {
139 $head[$h][1] .=
'<span class="badge marginleftonlyshort">' . ($nbFiles + $nbLinks) .
'</span>';
141 $head[$h][2] =
'document';
144 $head[$h][0] = DOL_URL_ROOT .
'/asset/agenda.php?id=' . $object->id;
145 $head[$h][1] = $langs->trans(
"Events");
146 $head[$h][2] =
'agenda';
172 global $langs, $conf;
174 $langs->load(
"assets",
"admin");
179 $head[$h][0] = DOL_URL_ROOT .
'/asset/model/card.php?id=' . $object->id;
180 $head[$h][1] = $langs->trans(
"Card");
181 $head[$h][2] =
'card';
184 $head[$h][0] = DOL_URL_ROOT .
'/asset/model/depreciation_options.php?id=' . $object->id;
185 $head[$h][1] = $langs->trans(
"AssetDepreciationOptions");
186 $head[$h][2] =
'depreciation_options';
189 $head[$h][0] = DOL_URL_ROOT .
'/asset/model/accountancy_codes.php?id=' . $object->id;
190 $head[$h][1] = $langs->trans(
"AssetAccountancyCodes");
191 $head[$h][2] =
'accountancy_codes';
194 if (isset($object->fields[
'note_public']) || isset($object->fields[
'note_private'])) {
196 if (!empty($object->note_private)) {
199 if (!empty($object->note_public)) {
202 $head[$h][0] = DOL_URL_ROOT .
'/asset/model/note.php?id=' . $object->id;
203 $head[$h][1] = $langs->trans(
'Notes');
205 $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ?
'<span class="badge marginleftonlyshort">' . $nbNote .
'</span>' :
'');
207 $head[$h][2] =
'note';
211 $head[$h][0] = DOL_URL_ROOT .
'/asset/model/agenda.php?id=' . $object->id;
212 $head[$h][1] = $langs->trans(
"Events");
213 $head[$h][2] =
'agenda';