Uniformize look and feel
This commit is contained in:
parent
17379cb5cd
commit
63628f6a01
@ -2146,7 +2146,8 @@ class Facture extends CommonInvoice
|
|||||||
if (!empty($conf->global->INVOICE_USE_SITUATION))
|
if (!empty($conf->global->INVOICE_USE_SITUATION))
|
||||||
{
|
{
|
||||||
$final = True;
|
$final = True;
|
||||||
while ($i < count($this->lines) && $final == True) {
|
$nboflines = count($this->lines);
|
||||||
|
while (($i < $nboflines) && $final) {
|
||||||
$final = ($this->lines[$i]->situation_percent == 100);
|
$final = ($this->lines[$i]->situation_percent == 100);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,45 +106,45 @@ if ($object->id > 0)
|
|||||||
$totalsize+=$file['size'];
|
$totalsize+=$file['size'];
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref
|
$morehtmlref='<div class="refidno">';
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
|
// Title
|
||||||
|
$morehtmlref.=$object->title;
|
||||||
|
// Thirdparty
|
||||||
|
if ($object->thirdparty->id > 0)
|
||||||
|
{
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
// Define a complementary filter for search of next/prev ref.
|
// Define a complementary filter for search of next/prev ref.
|
||||||
if (! $user->rights->projet->all->lire)
|
if (! $user->rights->projet->all->lire)
|
||||||
{
|
{
|
||||||
$projectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
$objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
||||||
$object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
$object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||||
}
|
}
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
|
||||||
print '</td></tr>';
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
// Label
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
|
||||||
|
|
||||||
// Company
|
|
||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
|
||||||
if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
|
|
||||||
else print ' ';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Visibility
|
|
||||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
|
||||||
if ($object->public) print $langs->trans('SharedProject');
|
|
||||||
else print $langs->trans('PrivateProject');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Statut
|
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
|
||||||
|
|
||||||
// Files infos
|
// Files infos
|
||||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
print "</div>\n";
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
$modulepart = 'project';
|
$modulepart = 'project';
|
||||||
$permission = ($userWrite > 0);
|
$permission = ($userWrite > 0);
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/projet/element.php
|
* \file htdocs/projet/element.php
|
||||||
* \ingroup projet facture
|
* \ingroup projet
|
||||||
* \brief Page of project referrers
|
* \brief Page of project referrers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -121,11 +121,37 @@ $head=project_prepare_head($object);
|
|||||||
dol_fiche_head($head, 'element', $langs->trans("Project"),0,($object->public?'projectpub':'project'));
|
dol_fiche_head($head, 'element', $langs->trans("Project"),0,($object->public?'projectpub':'project'));
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
|
$morehtmlref='<div class="refidno">';
|
||||||
|
// Title
|
||||||
|
$morehtmlref.=$object->title;
|
||||||
|
// Thirdparty
|
||||||
|
if ($object->thirdparty->id > 0)
|
||||||
|
{
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
|
// 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 '<div class="fichecenter">';
|
||||||
|
print '<div class="fichehalfleft">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
/*print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
|
||||||
// Define a complementary filter for search of next/prev ref.
|
// Define a complementary filter for search of next/prev ref.
|
||||||
if (! $user->rights->projet->all->lire)
|
if (! $user->rights->projet->all->lire)
|
||||||
{
|
{
|
||||||
@ -140,26 +166,15 @@ print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
|||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||||
if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
|
if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td></tr>';
|
print '</td></tr>';*/
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
if ($object->public) print $langs->trans('SharedProject');
|
if ($object->public) print $langs->trans('SharedProject');
|
||||||
else print $langs->trans('PrivateProject');
|
else print $langs->trans('PrivateProject');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
//print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
||||||
|
|
||||||
// Date start
|
|
||||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
|
||||||
print dol_print_date($object->date_start,'day');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Date end
|
|
||||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
|
||||||
print dol_print_date($object->date_end,'day');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
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);
|
if ($code) print $langs->trans("OppStatus".$code);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Opportunity percent
|
||||||
|
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>';
|
||||||
|
if (strcmp($object->opp_percent,'')) print price($object->opp_percent,'',$langs,1,0).' %';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Opportunity Amount
|
// Opportunity Amount
|
||||||
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
|
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
|
||||||
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 '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Budget
|
// Date start
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||||
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
|
print dol_print_date($object->date_start,'day');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date end
|
||||||
|
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||||
|
print dol_print_date($object->date_end,'day');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Budget
|
||||||
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,1,0,0,$conf->currency);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Other attributes
|
||||||
|
$cols = 2;
|
||||||
|
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '<div class="fichehalfright">';
|
||||||
|
print '<div class="ficheaddleft">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
// Description
|
||||||
|
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
|
print nl2br($object->description);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Categories
|
||||||
|
if($conf->categorie->enabled) {
|
||||||
|
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||||
|
print $form->showCategories($object->id,'project',1);
|
||||||
|
print "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -98,58 +98,134 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$param=($mode=='mine'?'&mode=mine':'');
|
$param=($mode=='mine'?'&mode=mine':'');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref
|
$morehtmlref='<div class="refidno">';
|
||||||
print '<tr><td class="titlefield">';
|
// Title
|
||||||
print $langs->trans("Ref");
|
$morehtmlref.=$object->title;
|
||||||
print '</td><td>';
|
// Thirdparty
|
||||||
|
if ($object->thirdparty->id > 0)
|
||||||
|
{
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
// Define a complementary filter for search of next/prev ref.
|
// Define a complementary filter for search of next/prev ref.
|
||||||
if (! $user->rights->projet->all->lire)
|
if (! $user->rights->projet->all->lire)
|
||||||
{
|
{
|
||||||
$projectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
$objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
||||||
$object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'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 '</td></tr>';
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
print '<div class="fichehalfleft">';
|
||||||
if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
|
print '<div class="underbanner clearboth"></div>';
|
||||||
else print ' ';
|
|
||||||
print '</td>';
|
print '<table class="border" width="100%">';
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
|
// Ref
|
||||||
|
/*
|
||||||
|
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
|
||||||
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||||
|
print '</td></tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Label
|
||||||
|
//print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
||||||
|
|
||||||
|
// Third party
|
||||||
|
/*
|
||||||
|
print '<tr><td class="titlefield">'.$langs->trans("ThirdParty").'</td><td>';
|
||||||
|
if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1, 'project');
|
||||||
|
else print' ';
|
||||||
|
print '</td></tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
if ($object->public) print $langs->trans('SharedProject');
|
if ($object->public) print $langs->trans('SharedProject');
|
||||||
else print $langs->trans('PrivateProject');
|
else print $langs->trans('PrivateProject');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
//print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
||||||
|
|
||||||
// Date start
|
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
{
|
||||||
print dol_print_date($object->date_start,'day');
|
// Opportunity status
|
||||||
print '</td></tr>';
|
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
|
||||||
|
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||||
// Date end
|
if ($code) print $langs->trans("OppStatus".$code);
|
||||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
print '</td></tr>';
|
||||||
print dol_print_date($object->date_end,'day');
|
|
||||||
print '</td></tr>';
|
// Opportunity percent
|
||||||
|
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>';
|
||||||
// Budget
|
if (strcmp($object->opp_percent,'')) print price($object->opp_percent,'',$langs,1,0).' %';
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
print '</td></tr>';
|
||||||
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
|
|
||||||
print '</td></tr>';
|
// Opportunity Amount
|
||||||
|
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
|
||||||
|
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,1,0,0,$conf->currency);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date start
|
||||||
|
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||||
|
print dol_print_date($object->date_start,'day');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date end
|
||||||
|
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||||
|
print dol_print_date($object->date_end,'day');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Budget
|
||||||
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,1,0,0,$conf->currency);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Other attributes
|
||||||
|
$cols = 2;
|
||||||
|
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
print '<div class="fichehalfright">';
|
||||||
|
print '<div class="ficheaddleft">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
// Description
|
||||||
|
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
|
print nl2br($object->description);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Categories
|
||||||
|
if($conf->categorie->enabled) {
|
||||||
|
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||||
|
print $form->showCategories($object->id,'project',1);
|
||||||
|
print "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -79,61 +79,41 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$head = project_prepare_head($object);
|
$head = project_prepare_head($object);
|
||||||
dol_fiche_head($head, 'notes', $langs->trans('Project'), 0, ($object->public?'projectpub':'project'));
|
dol_fiche_head($head, 'notes', $langs->trans('Project'), 0, ($object->public?'projectpub':'project'));
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
// Project card
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
// Ref
|
$morehtmlref='<div class="refidno">';
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
|
// Title
|
||||||
|
$morehtmlref.=$object->title;
|
||||||
|
// Thirdparty
|
||||||
|
if ($object->thirdparty->id > 0)
|
||||||
|
{
|
||||||
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
|
||||||
|
}
|
||||||
|
$morehtmlref.='</div>';
|
||||||
|
|
||||||
// Define a complementary filter for search of next/prev ref.
|
// Define a complementary filter for search of next/prev ref.
|
||||||
if (! $user->rights->projet->all->lire)
|
if (! $user->rights->projet->all->lire)
|
||||||
{
|
{
|
||||||
$projectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
$objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
||||||
$object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
$object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||||
}
|
}
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Label
|
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
|
||||||
|
|
||||||
// Third party
|
|
||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
|
||||||
if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1);
|
|
||||||
else print' ';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Visibility
|
|
||||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
|
||||||
if ($object->public) print $langs->trans('SharedProject');
|
|
||||||
else print $langs->trans('PrivateProject');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Statut
|
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
|
||||||
|
|
||||||
// Date start
|
|
||||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
|
||||||
print dol_print_date($object->date_start,'day');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Date end
|
|
||||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
|
||||||
print dol_print_date($object->date_end,'day');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print "</table>";
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
|
print '<div class="fichecenter">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
$cssclass="titlefield";
|
$cssclass="titlefield";
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -211,64 +211,132 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$param=($mode=='mine'?'&mode=mine':'');
|
$param=($mode=='mine'?'&mode=mine':'');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
// Project card
|
||||||
|
|
||||||
// Ref
|
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||||
print '<tr><td class="titlefield">';
|
|
||||||
print $langs->trans("Ref");
|
$morehtmlref='<div class="refidno">';
|
||||||
print '</td><td>';
|
// Title
|
||||||
// Define a complementary filter for search of next/prev ref.
|
$morehtmlref.=$object->title;
|
||||||
if (! $user->rights->projet->all->lire)
|
// Thirdparty
|
||||||
{
|
if ($object->thirdparty->id > 0)
|
||||||
$projectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
{
|
||||||
$object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
|
||||||
}
|
}
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param);
|
$morehtmlref.='</div>';
|
||||||
print '</td></tr>';
|
|
||||||
|
// 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 '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
print '<div class="fichecenter">';
|
||||||
if (! empty($object->thirdparty->id)) print $object->thirdparty->getNomUrl(1);
|
print '<div class="fichehalfleft">';
|
||||||
else print ' ';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Visibility
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
|
||||||
if ($object->public) print $langs->trans('SharedProject');
|
|
||||||
else print $langs->trans('PrivateProject');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Statut
|
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
|
||||||
|
|
||||||
// Date start
|
// Ref
|
||||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
/*
|
||||||
print dol_print_date($object->date_start,'day');
|
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
|
||||||
print '</td></tr>';
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||||
|
print '</td></tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
// Date end
|
// Label
|
||||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
//print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
||||||
print dol_print_date($object->date_end,'day');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Budget
|
// Third party
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
/*
|
||||||
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
|
print '<tr><td class="titlefield">'.$langs->trans("ThirdParty").'</td><td>';
|
||||||
print '</td></tr>';
|
if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1, 'project');
|
||||||
|
else print' ';
|
||||||
// Other options
|
print '</td></tr>';
|
||||||
$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))
|
// Visibility
|
||||||
{
|
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||||
print $object->showOptionals($extrafields_project);
|
if ($object->public) print $langs->trans('SharedProject');
|
||||||
}
|
else print $langs->trans('PrivateProject');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Statut
|
||||||
|
//print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>';
|
||||||
|
|
||||||
|
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
|
{
|
||||||
|
// Opportunity status
|
||||||
|
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
|
||||||
|
$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||||
|
if ($code) print $langs->trans("OppStatus".$code);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Opportunity percent
|
||||||
|
print '<tr><td>'.$langs->trans("OpportunityProbability").'</td><td>';
|
||||||
|
if (strcmp($object->opp_percent,'')) print price($object->opp_percent,'',$langs,1,0).' %';
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Opportunity Amount
|
||||||
|
print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
|
||||||
|
if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,1,0,0,$conf->currency);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Date start
|
||||||
|
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||||
|
print dol_print_date($object->date_start,'day');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date end
|
||||||
|
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||||
|
print dol_print_date($object->date_end,'day');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Budget
|
||||||
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,1,0,0,$conf->currency);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Other attributes
|
||||||
|
$cols = 2;
|
||||||
|
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '<div class="fichehalfright">';
|
||||||
|
print '<div class="ficheaddleft">';
|
||||||
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
// Description
|
||||||
|
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
|
||||||
|
print nl2br($object->description);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Categories
|
||||||
|
if($conf->categorie->enabled) {
|
||||||
|
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||||
|
print $form->showCategories($object->id,'project',1);
|
||||||
|
print "</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user