26require
'../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
31$langs->load(
'projects');
33$action =
GETPOST(
'action',
'aZ09');
37$mine = (isset($_REQUEST[
'mode']) && $_REQUEST[
'mode'] ==
'mine') ? 1 : 0;
42include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
43if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object,
'fetchComments') && empty($object->comments)) {
44 $object->fetchComments();
50$hookmanager->initHooks(array(
'projetnote'));
53$permissionnote = $user->hasRight(
'projet',
'creer');
61$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
66 include DOL_DOCUMENT_ROOT.
'/core/actions_setnotes.inc.php';
74$title = $langs->trans(
"Notes").
' - '.$object->ref.
' '.$object->name;
75if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match(
'/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) {
76 $title = $object->ref.
' '.$object->name.
' - '.$langs->trans(
"Note");
78$help_url =
"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
82$userstatic =
new User($db);
86if ($id > 0 || !empty($ref)) {
89 $userWrite = $object->restrictedProjectArea($user,
'write');
94 print
dol_get_fiche_head($head,
'notes', $langs->trans(
'Project'), -1, ($object->public ?
'projectpub' :
'project'));
99 if (!empty($_SESSION[
'pageforbacktolist']) && !empty($_SESSION[
'pageforbacktolist'][
'project'])) {
100 $tmpurl = $_SESSION[
'pageforbacktolist'][
'project'];
101 $tmpurl = preg_replace(
'/__SOCID__/', $object->socid, $tmpurl);
102 $linkback =
'<a href="'.$tmpurl.(preg_match(
'/\?/', $tmpurl) ?
'&' :
'?').
'restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
104 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
107 $morehtmlref =
'<div class="refidno">';
109 $morehtmlref .= $object->title;
111 if (!empty($object->thirdparty->id) && $object->thirdparty->id > 0) {
112 $morehtmlref .=
'<br>'.$object->thirdparty->getNomUrl(1,
'project');
114 $morehtmlref .=
'</div>';
117 if (empty($user->rights->projet->all->lire)) {
118 $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
119 $object->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ?join(
',', array_keys($objectsListId)) :
'0').
")";
122 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
125 print
'<div class="fichecenter">';
126 print
'<div class="underbanner clearboth"></div>';
128 $cssclass =
"titlefield";
129 include DOL_DOCUMENT_ROOT.
'/core/tpl/notes.tpl.php';
133 print
'<div class="clearboth"></div>';
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage projects.
Class to manage Dolibarr users.
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='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_now($mode='auto')
Return date for now.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of 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.