Update bom.lib.php
This commit is contained in:
parent
cf00b2a2df
commit
02d4a234b7
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2019 Maxime Kohlhaas <maxime@atm-consulting.fr>
|
/* Copyright (C) 2019 Maxime Kohlhaas <maxime@atm-consulting.fr>
|
||||||
|
* Copyright (C) 2019 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
|
||||||
@ -16,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file bom/lib/bom.lib.php
|
* \file htdocs/bom/lib/bom.lib.php
|
||||||
* \ingroup bom
|
* \ingroup bom
|
||||||
* \brief Library files with common functions for BillOfMaterials
|
* \brief Library files with common functions for BillOfMaterials
|
||||||
*/
|
*/
|
||||||
@ -40,7 +41,7 @@ function bomAdminPrepareHead()
|
|||||||
$head[$h][2] = 'settings';
|
$head[$h][2] = 'settings';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
/*$head[$h][0] = dol_buildpath("/bom/admin/about.php", 1);
|
/*$head[$h][0] = DOL_URL_ROOT."/bom/admin/about.php";
|
||||||
$head[$h][1] = $langs->trans("About");
|
$head[$h][1] = $langs->trans("About");
|
||||||
$head[$h][2] = 'about';
|
$head[$h][2] = 'about';
|
||||||
$h++;
|
$h++;
|
||||||
@ -77,7 +78,7 @@ function bomPrepareHead($object)
|
|||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = dol_buildpath("/bom/bom_card.php", 1).'?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT."/bom/bom_card.php?id=".$object->id;
|
||||||
$head[$h][1] = $langs->trans("Card");
|
$head[$h][1] = $langs->trans("Card");
|
||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
$h++;
|
$h++;
|
||||||
@ -87,7 +88,7 @@ function bomPrepareHead($object)
|
|||||||
$nbNote = 0;
|
$nbNote = 0;
|
||||||
if (!empty($object->note_private)) $nbNote++;
|
if (!empty($object->note_private)) $nbNote++;
|
||||||
if (!empty($object->note_public)) $nbNote++;
|
if (!empty($object->note_public)) $nbNote++;
|
||||||
$head[$h][0] = dol_buildpath('/bom/bom_note.php', 1).'?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/bom/bom_note.php?id=".$object->id;
|
||||||
$head[$h][1] = $langs->trans('Notes');
|
$head[$h][1] = $langs->trans('Notes');
|
||||||
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
@ -99,13 +100,13 @@ function bomPrepareHead($object)
|
|||||||
$upload_dir = $conf->bom->dir_output . "/bom/" . dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->bom->dir_output . "/bom/" . dol_sanitizeFileName($object->ref);
|
||||||
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
|
||||||
$nbLinks=Link::count($db, $object->element, $object->id);
|
$nbLinks=Link::count($db, $object->element, $object->id);
|
||||||
$head[$h][0] = dol_buildpath("/bom/bom_document.php", 1).'?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT."/bom/bom_document.php?id=".$object->id;
|
||||||
$head[$h][1] = $langs->trans('Documents');
|
$head[$h][1] = $langs->trans('Documents');
|
||||||
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>';
|
if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' <span class="badge">'.($nbFiles+$nbLinks).'</span>';
|
||||||
$head[$h][2] = 'document';
|
$head[$h][2] = 'document';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = dol_buildpath("/bom/bom_agenda.php", 1).'?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT."/bom/bom_agenda.php?id=".$object->id;
|
||||||
$head[$h][1] = $langs->trans("Events");
|
$head[$h][1] = $langs->trans("Events");
|
||||||
$head[$h][2] = 'agenda';
|
$head[$h][2] = 'agenda';
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user