| '.$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 ' ';
+
+/*print '| '.$langs->trans("Ref").' | ';
// Define a complementary filter for search of next/prev ref.
if (! $user->rights->projet->all->lire)
{
@@ -140,26 +166,15 @@ print ' | | '.$langs->trans("Label").' | '.$object->title.' | ';
print '| '.$langs->trans("ThirdParty").' | ';
if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
else print ' ';
-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))
{
@@ -169,19 +184,65 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
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);
+ if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,1,0,0,$conf->currency);
print ' | ';
}
-// Budget
-print '| '.$langs->trans("Budget").' | ';
-if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
+// 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 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();
diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php
index e26a56c3cc7..c7ab28e38ae 100644
--- a/htdocs/projet/ganttview.php
+++ b/htdocs/projet/ganttview.php
@@ -98,58 +98,134 @@ if ($id > 0 || ! empty($ref))
$param=($mode=='mine'?'&mode=mine':'');
- print '';
+
+ // Project card
+
$linkback = ''.$langs->trans("BackToList").'';
-
- // Ref
- print '| ';
- print $langs->trans("Ref");
- print ' | ';
+
+ $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)
{
- $projectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
- $object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
+ $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
+ $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
}
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param);
- print ' | ';
-
- print '| '.$langs->trans("Label").' | '.$object->title.' | ';
-
- print '| '.$langs->trans("ThirdParty").' | ';
- if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
- else print ' ';
- print ' | ';
- print ' ';
-
+
+ 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.' | ';
+
+ // Third party
+ /*
+ 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 ' | ';
-
- // Budget
- print '| '.$langs->trans("Budget").' | ';
- if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
- print ' | ';
-
+ //print '| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' | ';
+
+ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+ {
+ // Opportunity status
+ print '| '.$langs->trans("OpportunityStatus").' | ';
+ $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
+ 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,1,0,0,$conf->currency);
+ 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 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();
}
diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php
index 43df7ce3b3d..31081c92256 100644
--- a/htdocs/projet/note.php
+++ b/htdocs/projet/note.php
@@ -79,61 +79,41 @@ if ($id > 0 || ! empty($ref))
$head = project_prepare_head($object);
dol_fiche_head($head, 'notes', $langs->trans('Project'), 0, ($object->public?'projectpub':'project'));
- print '';
-
+
+ // Project card
+
$linkback = ''.$langs->trans("BackToList").'';
-
- // Ref
- print '| '.$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)
{
- $projectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
- $object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
+ $objectsListId = $object->getProjectsAuthorizedForUser($user,0,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.' | ';
-
- // Third party
- print '| '.$langs->trans("ThirdParty").' | ';
- if ($object->thirdparty->id > 0) print $object->thirdparty->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 ' | ';
-
- // Budget
- print '| '.$langs->trans("Budget").' | ';
- if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
- print ' | ';
- print " ";
-
- print ' ';
-
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+
+ print '';
+ print ' ';
+
$cssclass="titlefield";
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
-
+
+ print ' ';
+
+ print '';
+
dol_fiche_end();
}
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index 9def807c746..46c2e965ea1 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -211,64 +211,132 @@ if ($id > 0 || ! empty($ref))
$param=($mode=='mine'?'&mode=mine':'');
- print '';
- $linkback = ''.$langs->trans("BackToList").'';
-
- // Ref
- print '| ';
- print $langs->trans("Ref");
- print ' | ';
- // Define a complementary filter for search of next/prev ref.
- if (! $user->rights->projet->all->lire)
- {
- $projectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
- $object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
- }
- print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param);
- 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 '| '.$langs->trans("Label").' | '.$object->title.' | ';
- print '| '.$langs->trans("ThirdParty").' | ';
- if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
- else print ' ';
- print ' | ';
- print ' ';
+ print '';
+ print ' ';
+ print ' ';
- // Visibility
- print ' | '.$langs->trans("Visibility").' | ';
- if ($object->public) print $langs->trans('SharedProject');
- else print $langs->trans('PrivateProject');
- print ' | ';
+ print ' ';
- // Statut
- print '| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' | ';
- // Date start
- print '| '.$langs->trans("DateStart").' | ';
- print dol_print_date($object->date_start,'day');
- print ' | ';
+ // Ref
+ /*
+ print '| '.$langs->trans("Ref").' | ';
+ print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
+ print ' | ';
+ */
- // Date end
- print '| '.$langs->trans("DateEnd").' | ';
- print dol_print_date($object->date_end,'day');
- print ' | ';
+ // Label
+ //print '| '.$langs->trans("Label").' | '.$object->title.' | ';
- // Budget
- print '| '.$langs->trans("Budget").' | ';
- if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
- 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_project->attribute_label))
- {
- print $object->showOptionals($extrafields_project);
- }
+ // Third party
+ /*
+ print '| '.$langs->trans("ThirdParty").' | ';
+ if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1, 'project');
+ 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).' | ';
+
+ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+ {
+ // Opportunity status
+ print '| '.$langs->trans("OpportunityStatus").' | ';
+ $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
+ 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,1,0,0,$conf->currency);
+ 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 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 '';
- print ' ';
dol_fiche_end();
}
|