add extrafields count in admin eventorganization
This commit is contained in:
parent
356b3af6e6
commit
afa344393c
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr>
|
/* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -28,7 +29,11 @@
|
|||||||
*/
|
*/
|
||||||
function eventorganizationAdminPrepareHead()
|
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");
|
$langs->load("eventorganization");
|
||||||
|
|
||||||
@ -43,11 +48,19 @@ function eventorganizationAdminPrepareHead()
|
|||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/eventorganization_confbooth_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/eventorganization_confbooth_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("EventOrganizationConfOrBooth").")";
|
$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';
|
$head[$h][2] = 'eventorganization_extrafields';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/admin/eventorganization_confboothattendee_extrafields.php';
|
$head[$h][0] = DOL_URL_ROOT.'/admin/eventorganization_confboothattendee_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Attendees").")";
|
$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';
|
$head[$h][2] = 'conferenceorboothattendee_extrafields';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user