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 = $_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)) $object->fetchComments();
49 $permissionnote = $user->rights->projet->creer;
56 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
63 $title = $langs->trans(
"Project").
' - '.$langs->trans(
"Note").
' - '.$object->ref.
' '.$object->name;
64 if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match(
'/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.
' '.$object->name.
' - '.$langs->trans(
"Note");
65 $help_url =
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
68 $form =
new Form($db);
69 $userstatic =
new User($db);
73 if ($id > 0 || !empty($ref))
77 $userWrite = $object->restrictedProjectArea($user,
'write');
82 print dol_get_fiche_head($head,
'notes', $langs->trans(
'Project'), -1, ($object->public ?
'projectpub' :
'project'));
87 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
89 $morehtmlref =
'<div class="refidno">';
91 $morehtmlref .= $object->title;
93 if ($object->thirdparty->id > 0)
95 $morehtmlref .=
'<br>'.$langs->trans(
'ThirdParty').
' : '.$object->thirdparty->getNomUrl(1,
'project');
97 $morehtmlref .=
'</div>';
100 if (!$user->rights->projet->all->lire)
102 $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
103 $object->next_prev_filter =
" rowid in (".(count($objectsListId) ?join(
',', array_keys($objectsListId)) :
'0').
")";
106 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
109 print '<div class="fichecenter">';
110 print '<div class="underbanner clearboth"></div>';
112 $cssclass =
"titlefield";
113 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
117 print '<div class="clearboth"></div>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_now($mode= 'auto')
Return date for now.
Class to manage Dolibarr users.
Class to manage projects.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=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.
project_prepare_head(Project $project)
Prepare array with list of tabs.
print
Draft customers invoices.
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.