| '.$langs->trans("Ref").' | ';
+
+ $morehtmlref=' ';
+ // Title
+ $morehtmlref.=$object->title;
+ // Thirdparty
+ if ($object->thirdparty->id > 0)
+ {
+ $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
+ }
+ $morehtmlref.=' ';
+
// Define a complementary filter for search of next/prev ref.
if (! $user->rights->projet->all->lire)
{
$objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
$object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
}
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+
+ print '';
+ print ' ';
+ print ' ';
+
+ print ' ';
+
+
+ // Ref
+ /*
+ print '| '.$langs->trans("Ref").' | ';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
print ' | ';
+ */
// Label
- print '| '.$langs->trans("Label").' | '.$object->title.' | ';
+ //print '| '.$langs->trans("Label").' | '.$object->title.' | ';
// Third party
- print '| '.$langs->trans("ThirdParty").' | ';
+ /*
+ print ' | | '.$langs->trans("ThirdParty").' | ';
if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1, 'project');
else print' ';
print ' | ';
+ */
// Visibility
- print '| '.$langs->trans("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 '| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' | ';
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{
@@ -861,31 +876,53 @@ else
print '';
}
+ // 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 ' | ';
+
// Budget
print '| '.$langs->trans("Budget").' | ';
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,1,0,0,$conf->currency);
print ' | ';
+ // Other attributes
+ $cols = 2;
+ include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
+
+ print ' ';
+
+ print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+
+ print ' ';
+
// Description
- print '| '.$langs->trans("Description").' | ';
+ print ' | '.$langs->trans("Description").' | ';
print nl2br($object->description);
print ' | ';
// Categories
if($conf->categorie->enabled) {
- print '| '.$langs->trans("Categories").' | ';
- print $form->showCategories($object->id,'project',1);
- print " | ";
- }
-
- // Other options
- $parameters=array();
- $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
- if (empty($reshook) && ! empty($extrafields->attribute_label))
- {
- print $object->showOptionals($extrafields);
+ print '| '.$langs->trans("Categories").' | ';
+ print $form->showCategories($object->id,'project',1);
+ print " | ";
}
+
print ' ';
+
+ print ' ';
+ print ' ';
+ print ' ';
+
+ print '';
}
dol_fiche_end();
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 5b572a7d455..cc224176634 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -37,7 +37,8 @@ class Project extends CommonObject
public $table_element_line = 'projet_task';
public $fk_element = 'fk_projet';
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
-
+ public $picto = 'projectpub';
+
/**
* {@inheritdoc}
*/
diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php
index b8e0134aa1f..f9220b6e555 100644
--- a/htdocs/projet/class/task.class.php
+++ b/htdocs/projet/class/task.class.php
@@ -33,7 +33,8 @@ class Task extends CommonObject
{
public $element='project_task'; //!< Id that identify managed objects
public $table_element='projet_task'; //!< Name of table without prefix where object is stored
-
+ public $picto = 'task';
+
var $fk_task_parent;
var $label;
var $description;
diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php
index 794e9c3af00..228f5fab27d 100644
--- a/htdocs/projet/contact.php
+++ b/htdocs/projet/contact.php
@@ -149,13 +149,37 @@ if ($id > 0 || ! empty($ref))
dol_fiche_head($head, 'contact', $langs->trans("Project"), 0, ($object->public?'projectpub':'project'));
- /*
- * Projet synthese pour rappel
- */
- print '';
+ // Project card
+
+ $linkback = ''.$langs->trans("BackToList").'';
+
+ $morehtmlref='';
+ // Title
+ $morehtmlref.=$object->title;
+ // Thirdparty
+ if ($object->thirdparty->id > 0)
+ {
+ $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
+ }
+ $morehtmlref.=' ';
+
+ // Define a complementary filter for search of next/prev ref.
+ if (! $user->rights->projet->all->lire)
+ {
+ $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
+ $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
+ }
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
- $linkback = ''.$langs->trans("BackToList").'';
+ print '';
+ print ' ';
+ print ' ';
+
+ print ' ';
+
+ /*
// Ref
print '| '.$langs->trans('Ref').' | ';
// Define a complementary filter for search of next/prev ref.
@@ -176,26 +200,14 @@ if ($id > 0 || ! empty($ref))
if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1);
else print ' ';
print ' | ';
-
+ */
+
// Visibility
- print '| '.$langs->trans("Visibility").' | ';
+ print ' | | '.$langs->trans("Visibility").' | ';
if ($object->public) print $langs->trans('SharedProject');
else print $langs->trans('PrivateProject');
print ' | ';
- // Status
- 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 ' | ';
-
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
{
// Opportunity status
@@ -204,21 +216,69 @@ if ($id > 0 || ! empty($ref))
if ($code) print $langs->trans("OppStatus".$code);
print '';
+ // Opportunity percent
+ print '| '.$langs->trans("OpportunityProbability").' | ';
+ if (strcmp($object->opp_percent,'')) print price($object->opp_percent,'',$langs,1,0).' %';
+ print ' | ';
+
// Opportunity Amount
print '| '.$langs->trans("OpportunityAmount").' | ';
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
print ' | ';
}
- // Budget
+ // 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 ' | ';
+
+ // Budget
print '| '.$langs->trans("Budget").' | ';
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
print ' | ';
+ // Other attributes
+ $cols = 2;
+ include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
+
print " ";
- print ' ';
-
+ print ' ';
+ print '';
+ print ' ';
+ print ' ';
+
+ print ' ';
+
+ // Description
+ print '| '.$langs->trans("Description").' | ';
+ print nl2br($object->description);
+ print ' | ';
+
+ // Categories
+ if($conf->categorie->enabled) {
+ print '| '.$langs->trans("Categories").' | ';
+ print $form->showCategories($object->id,'project',1);
+ print " | ";
+ }
+
+ print ' ';
+
+ print ' ';
+ print ' ';
+ print '';
+
+ print '';
+
+ dol_fiche_end();
+
+ 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)
diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php
index 6c8593789ca..ec1e976237a 100644
--- a/htdocs/projet/info.php
+++ b/htdocs/projet/info.php
@@ -76,6 +76,7 @@ llxHeader("",$title,$help_url);
$object = new Project($db);
$object->fetch($id);
+$object->fetch_thirdparty();
$object->info($id);
$head = project_prepare_head($object);
@@ -83,11 +84,38 @@ $head = project_prepare_head($object);
dol_fiche_head($head, 'agenda', $langs->trans("Project"), 0, ($object->public?'projectpub':'project'));
-print '| ';
+// Project card
+
+$linkback = ''.$langs->trans("BackToList").'';
+
+$morehtmlref=' ';
+// Title
+$morehtmlref.=$object->title;
+// Thirdparty
+if ($object->thirdparty->id > 0)
+{
+ $morehtmlref.=' '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
+}
+$morehtmlref.=' ';
+
+// Define a complementary filter for search of next/prev ref.
+if (! $user->rights->projet->all->lire)
+{
+ $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
+ $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
+}
+
+dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+
+print '';
+print ' ';
dol_print_object_info($object, 1);
-print ' | ';
+print '';
+
+print '';
dol_fiche_end();
|