Fix project into dol_banner
This commit is contained in:
parent
518049bed4
commit
653eb4d907
@ -75,16 +75,19 @@ function fichinter_prepare_head($object)
|
||||
require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
|
||||
$nbResource = 0;
|
||||
$objectres=new Dolresource($db);
|
||||
foreach ($objectres->available_resources as $modresources => $resources)
|
||||
if (is_array($objectres->available_resources))
|
||||
{
|
||||
$resources=(array) $resources; // To be sure $resources is an array
|
||||
foreach($resources as $resource_obj)
|
||||
foreach ($objectres->available_resources as $modresources => $resources)
|
||||
{
|
||||
$linked_resources = $object->getElementResources('fichinter',$object->id,$resource_obj);
|
||||
|
||||
$resources=(array) $resources; // To be sure $resources is an array
|
||||
foreach($resources as $resource_obj)
|
||||
{
|
||||
$linked_resources = $object->getElementResources('fichinter',$object->id,$resource_obj);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=fichinter&element_id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Resources");
|
||||
if ($nbResource > 0) $head[$h][1].= ' <span class="badge">'.$nbResource.'</span>';
|
||||
|
||||
@ -1203,7 +1203,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
if ($user->rights->commande->creer)
|
||||
if ($user->rights->ficheinter->creer)
|
||||
{
|
||||
if ($action != 'classify')
|
||||
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||
|
||||
@ -28,6 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$langs->load("interventions");
|
||||
$langs->load("sendings");
|
||||
@ -105,6 +107,7 @@ $form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$contactstatic=new Contact($db);
|
||||
$userstatic=new User($db);
|
||||
$formproject=new FormProjets($db);
|
||||
|
||||
llxHeader('',$langs->trans("Intervention"));
|
||||
|
||||
@ -133,7 +136,7 @@ if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
if ($user->rights->commande->creer)
|
||||
if ($user->rights->ficheinter->creer)
|
||||
{
|
||||
if ($action != 'classify')
|
||||
//$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user