diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php
index 818cbca264d..d8f3bfbf102 100644
--- a/htdocs/core/lib/agenda.lib.php
+++ b/htdocs/core/lib/agenda.lib.php
@@ -20,8 +20,8 @@
*/
/**
- * \file htdocs/core/lib/agenda.lib.php
- * \brief Set of function for the agenda module
+ * \file htdocs/core/lib/agenda.lib.php
+ * \brief Set of function for the agenda module
*/
@@ -314,7 +314,7 @@ function show_array_last_actions_done($max = 5)
print '
';
$staticaction->type_code = $obj->code;
- $staticaction->libelle = $obj->label;
+ $staticaction->label = $obj->label;
$staticaction->id = $obj->id;
print '| '.$staticaction->getNomUrl(1, 34).' | ';
diff --git a/htdocs/core/lib/asset.lib.php b/htdocs/core/lib/asset.lib.php
index 9d71e2b38f1..719091973e3 100644
--- a/htdocs/core/lib/asset.lib.php
+++ b/htdocs/core/lib/asset.lib.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2022 Frédéric France
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,7 +29,11 @@
*/
function assetAdminPrepareHead()
{
- global $langs, $conf;
+ global $langs, $conf, $db;
+
+ $extrafields = new ExtraFields($db);
+ $extrafields->fetch_name_optionals_label('asset');
+ $extrafields->fetch_name_optionals_label('assetmodel');
$langs->load("assets");
@@ -52,11 +57,19 @@ function assetAdminPrepareHead()
$head[$h][0] = DOL_URL_ROOT.'/asset/admin/asset_extrafields.php';
$head[$h][1] = $langs->trans("ExtraFields");
+ $nbExtrafields = is_countable($extrafields->attributes['asset']['label']) ? count($extrafields->attributes['asset']['label']) : 0;
+ if ($nbExtrafields > 0) {
+ $head[$h][1] .= ' '.$nbExtrafields.'';
+ }
$head[$h][2] = 'asset_extrafields';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/asset/admin/assetmodel_extrafields.php';
$head[$h][1] = $langs->trans("ExtraFieldsAssetModel");
+ $nbExtrafields = is_countable($extrafields->attributes['assetmodel']['label']) ? count($extrafields->attributes['assetmodel']['label']) : 0;
+ if ($nbExtrafields > 0) {
+ $head[$h][1] .= ' '.$nbExtrafields.'';
+ }
$head[$h][2] = 'assetmodel_extrafields';
$h++;