Go to the documentation of this file.
25 require
'../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
30 $langs->load(
'projects');
32 $action =
GETPOST(
'action',
'aZ09');
36 $mine = (isset($_REQUEST[
'mode']) && $_REQUEST[
'mode'] ==
'mine') ? 1 : 0;
41 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
42 if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object,
'fetchComments') && empty($object->comments)) {
43 $object->fetchComments();
49 $hookmanager->initHooks(array(
'projetnote'));
52 $permissionnote = $user->rights->projet->creer;
59 $reshook = $hookmanager->executeHooks(
'doActions', array(), $object, $action);
63 if (empty($reshook)) {
64 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
72 $title = $langs->trans(
"Project").
' - '.$langs->trans(
"Note").
' - '.$object->ref.
' '.$object->name;
73 if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match(
'/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
74 $title = $object->ref.
' '.$object->name.
' - '.$langs->trans(
"Note");
76 $help_url =
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
80 $userstatic =
new User($db);
84 if ($id > 0 || !empty($ref)) {
87 $userWrite = $object->restrictedProjectArea($user,
'write');
92 print
dol_get_fiche_head($head,
'notes', $langs->trans(
'Project'), -1, ($object->public ?
'projectpub' :
'project'));
97 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
99 $morehtmlref =
'<div class="refidno">';
101 $morehtmlref .= $object->title;
103 if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
104 $morehtmlref .=
'<br>'.$langs->trans(
'ThirdParty').
' : '.$object->thirdparty->getNomUrl(1,
'project');
106 $morehtmlref .=
'</div>';
109 if (empty($user->rights->projet->all->lire)) {
110 $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
111 $object->next_prev_filter =
" rowid IN (".$db->sanitize(count($objectsListId) ?join(
',', array_keys($objectsListId)) :
'0').
")";
114 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
117 print
'<div class="fichecenter">';
118 print
'<div class="underbanner clearboth"></div>';
120 $cssclass =
"titlefield";
121 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
125 print
'<div class="clearboth"></div>';
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.
Class to manage projects.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
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.
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
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.
Class to manage Dolibarr users.
dol_now($mode='auto')
Return date for now.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.