28 require
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/resource/class/dolresource.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/resource.lib.php';
33 $langs->loadLangs(array(
'companies',
'interventions'));
37 $action =
GETPOST(
'action',
'aZ09');
41 $socid = $user->socid;
44 $hookmanager->initHooks(array(
'resourcenote'));
46 $object =
new DolResource($db);
49 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
51 $result =
restrictedArea($user,
'resource', $object->id,
'resource');
53 $permissionnote = $user->rights->resource->write;
60 $reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
64 if (empty($reshook)) {
65 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
77 if ($id > 0 || !empty($ref)) {
79 print
dol_get_fiche_head($head,
'note', $langs->trans(
'ResourceSingular'), -1,
'resource');
81 $linkback =
'<a href="'.DOL_URL_ROOT.
'/resource/list.php'.(!empty($socid) ?
'?id='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
84 $morehtmlref =
'<div class="refidno">';
85 $morehtmlref .=
'</div>';
88 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
91 print
'<div class="fichecenter">';
92 print
'<div class="underbanner clearboth"></div>';
94 print
'<table class="border tableforfield centpercent">';
98 print
'<td class="titlefield">'.$langs->trans(
"ResourceType").
'</td>';
100 print $object->type_label;
108 $permission = $user->rights->resource->write;
109 $cssclass =
'titlefield';
110 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if($cancel &&!$id) if($action== 'add'&&!$cancel) if($action== 'delete') if($id) $form
Actions.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
resource_prepare_head($object)
Prepare head for tabs.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_banner_tab($object, $paramid, $morehtml= '', $shownav=1, $fieldid= 'rowid', $fieldref= 'ref', $morehtmlref= '', $moreparam= '', $nodbprefix=0, $morehtmlleft= '', $morehtmlstatus= '', $onlybanner=0, $morehtmlright= '')
Show tab footer of a card.