forked from Wavyzz/dolibarr
code syntax m... directories
This commit is contained in:
@@ -41,14 +41,19 @@ function myobjectPrepareHead($object)
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
if (isset($object->fields['note_public']) || isset($object->fields['note_private']))
|
||||
{
|
||||
if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) {
|
||||
$nbNote = 0;
|
||||
if (!empty($object->note_private)) $nbNote++;
|
||||
if (!empty($object->note_public)) $nbNote++;
|
||||
if (!empty($object->note_private)) {
|
||||
$nbNote++;
|
||||
}
|
||||
if (!empty($object->note_public)) {
|
||||
$nbNote++;
|
||||
}
|
||||
$head[$h][0] = dol_buildpath('/mymodule/myobject_note.php', 1).'?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('Notes');
|
||||
if ($nbNote > 0) $head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : '');
|
||||
if ($nbNote > 0) {
|
||||
$head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : '');
|
||||
}
|
||||
$head[$h][2] = 'note';
|
||||
$h++;
|
||||
}
|
||||
@@ -60,7 +65,9 @@ function myobjectPrepareHead($object)
|
||||
$nbLinks = Link::count($db, $object->element, $object->id);
|
||||
$head[$h][0] = dol_buildpath("/mymodule/myobject_document.php", 1).'?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans('Documents');
|
||||
if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
|
||||
if (($nbFiles + $nbLinks) > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
|
||||
}
|
||||
$head[$h][2] = 'document';
|
||||
$h++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user