29 require
'../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/resource/class/dolresource.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/resource.lib.php';
34 $langs->loadLangs(array(
'companies',
'interventions'));
38 $action =
GETPOST(
'action',
'aZ09');
42 $socid = $user->socid;
45 $hookmanager->initHooks(array(
'resourcenote'));
47 $object =
new DolResource($db);
50 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
52 $result =
restrictedArea($user,
'resource', $object->id,
'resource');
54 $permissionnote = $user->rights->resource->write;
61 $reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
65 if (empty($reshook)) {
66 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
78 if ($id > 0 || !empty($ref)) {
80 print
dol_get_fiche_head($head,
'note', $langs->trans(
'ResourceSingular'), -1,
'resource');
82 $linkback =
'<a href="'.DOL_URL_ROOT.
'/resource/list.php'.(!empty($socid) ?
'?id='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
85 $morehtmlref =
'<div class="refidno">';
86 $morehtmlref .=
'</div>';
89 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
92 print
'<div class="fichecenter">';
93 print
'<div class="underbanner clearboth"></div>';
95 print
'<table class="border tableforfield centpercent">';
99 print
'<td class="titlefield">'.$langs->trans(
"ResourceType").
'</td>';
101 print $object->type_label;
109 $permission = $user->rights->resource->write;
110 $cssclass =
'titlefield';
111 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
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.
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
resource_prepare_head($object)
Prepare head for tabs.
restrictedArea(User $user, $features, $object=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.