| '.$langs->trans('Ref').' | ';
+ // Define a complementary filter for search of next/prev ref.
+ if (! $user->rights->projet->all->lire)
{
- if ($object->societe->id > 0) $result=$object->societe->fetch($object->societe->id);
-
- // To verify role of users
- //$userAccess = $object->restrictedProjectArea($user,'read');
- $userWrite = $object->restrictedProjectArea($user,'write');
- //$userDelete = $object->restrictedProjectArea($user,'delete');
- //print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
-
- $head = project_prepare_head($object);
- dol_fiche_head($head, 'contact', $langs->trans("Project"), 0, ($object->public?'projectpub':'project'));
-
-
- /*
- * Projet synthese pour rappel
- */
- print '';
-
- $linkback = ''.$langs->trans("BackToList").'';
-
- // Ref
- print '| '.$langs->trans('Ref').' | ';
- // Define a complementary filter for search of next/prev ref.
- if (! $user->rights->projet->all->lire)
- {
- $objectsListId = $object->getProjectsAuthorizedForUser($user,$mine,0);
- $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
- }
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
- print ' | ';
-
- // Label
- print '| '.$langs->trans("Label").' | '.$object->title.' | ';
-
- // Customer
- print "| ".$langs->trans("ThirdParty")." | ";
- print '';
- if ($object->societe->id > 0) print $object->societe->getNomUrl(1);
- else print ' ';
- print ' | ';
-
- // Visibility
- print '| '.$langs->trans("Visibility").' | ';
- if ($object->public) print $langs->trans('SharedProject');
- else print $langs->trans('PrivateProject');
- print ' | ';
-
- // Statut
- print '| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' | ';
-
- // Date start
- print '| '.$langs->trans("DateStart").' | ';
- print dol_print_date($object->date_start,'day');
- print ' | ';
-
- // Date end
- print '| '.$langs->trans("DateEnd").' | ';
- print dol_print_date($object->date_end,'day');
- print ' | ';
-
- print " ";
-
- print '';
-
- // Contacts lines (modules that overwrite templates must declare this into descriptor)
- $dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
- foreach($dirtpls as $reldir)
- {
- $res=@include dol_buildpath($reldir.'/contacts.tpl.php');
- if ($res) break;
- }
+ $objectsListId = $object->getProjectsAuthorizedForUser($user,$mine,0);
+ $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
}
- else
+ print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '');
+ print ' |
';
+
+ // Label
+ print '