diff --git a/htdocs/core/lib/eventorganization.lib.php b/htdocs/core/lib/eventorganization.lib.php index 51ff1f2a90f..09ebc88a0b3 100644 --- a/htdocs/core/lib/eventorganization.lib.php +++ b/htdocs/core/lib/eventorganization.lib.php @@ -1,5 +1,6 @@ + * Copyright (C) 2023 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 eventorganizationAdminPrepareHead() { - global $langs, $conf; + global $langs, $conf, $db; + + $extrafields = new ExtraFields($db); + $extrafields->fetch_name_optionals_label('actioncomm'); + $extrafields->fetch_name_optionals_label('eventorganization_conferenceorboothattendee'); $langs->load("eventorganization"); @@ -43,11 +48,19 @@ function eventorganizationAdminPrepareHead() $head[$h][0] = DOL_URL_ROOT.'/admin/eventorganization_confbooth_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("EventOrganizationConfOrBooth").")"; + $nbExtrafields = $extrafields->attributes['actioncomm']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'eventorganization_extrafields'; $h++; $head[$h][0] = DOL_URL_ROOT.'/admin/eventorganization_confboothattendee_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Attendees").")"; + $nbExtrafields = $extrafields->attributes['eventorganization_conferenceorboothattendee']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } $head[$h][2] = 'conferenceorboothattendee_extrafields'; $h++;