mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
add extrafields count in admin eventorganization
This commit is contained in:
parent
356b3af6e6
commit
afa344393c
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr>
|
||||
* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$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] .= '<span class="badge marginleftonlyshort">'.$nbExtrafields.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'conferenceorboothattendee_extrafields';
|
||||
$h++;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user