Uniformise code
This commit is contained in:
parent
0f88bdd971
commit
dada679110
@ -55,6 +55,7 @@ else
|
||||
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE));
|
||||
}
|
||||
if ($actioncode == '' && empty($actioncodearray)) $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE);
|
||||
$search_title=GETPOST('search_title','alpha');
|
||||
|
||||
$dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth'), GETPOST('dateselectday'), GETPOST('dateselectyear'));
|
||||
$datestart=dol_mktime(0, 0, 0, GETPOST('datestartmonth'), GETPOST('datestartday'), GETPOST('datestartyear'));
|
||||
@ -106,13 +107,6 @@ if (! $user->rights->agenda->allactions->read || $filter=='mine') // If no permi
|
||||
$filtert=$user->id;
|
||||
}
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
{
|
||||
$datestart='';
|
||||
$dateend='';
|
||||
}
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array('agendalist'));
|
||||
|
||||
@ -133,6 +127,18 @@ if (GETPOST("viewcal") || GETPOST("viewweek") || GETPOST("viewday"))
|
||||
exit;
|
||||
}
|
||||
|
||||
$parameters=array('id'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
||||
{
|
||||
$actioncode='';
|
||||
$search_title='';
|
||||
$datestart='';
|
||||
$dateend='';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@ -201,6 +207,7 @@ if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable
|
||||
if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started
|
||||
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
|
||||
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
|
||||
if ($search_title) $sql.=natural_search("a.label", $search_title);
|
||||
// We must filter on assignement table
|
||||
if ($filtert > 0 || $usergroup > 0)
|
||||
{
|
||||
@ -323,7 +330,7 @@ if ($resql)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"><input type="text" name="search_title" value="'.$search_title.'"></td>';
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
print '<td class="liste_titre"></td>';
|
||||
@ -442,13 +449,13 @@ if ($resql)
|
||||
if ($obj->fk_user_action > 0)
|
||||
{
|
||||
$userstatic->fetch($obj->fk_user_action);
|
||||
print $userstatic->getLoginUrl(1);
|
||||
print $userstatic->getNomUrl(1);
|
||||
}
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
// Status/Percent
|
||||
print '<td align="center" class="nowrap">'.$actionstatic->LibStatut($obj->percent,6).'</td>';
|
||||
print '<td align="center" class="nowrap">'.$actionstatic->LibStatut($obj->percent,3).'</td>';
|
||||
|
||||
print '<td></td>';
|
||||
|
||||
|
||||
@ -550,8 +550,8 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
*/
|
||||
function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask=1, $preselectedday='', $var=false)
|
||||
{
|
||||
global $db, $user, $bc, $langs;
|
||||
global $form, $formother, $projectstatic, $taskstatic;
|
||||
global $conf, $db, $user, $bc, $langs;
|
||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||
|
||||
$lastprojectid=0;
|
||||
$workloadforid=array();
|
||||
@ -569,7 +569,6 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
}
|
||||
|
||||
//dol_syslog('projectLinesPerDay inc='.$inc.' preselectedday='.$preselectedday.' task parent id='.$parent.' level='.$level." count(lines)=".$numlines." count(lineswithoutlevel0)=".count($lineswithoutlevel0));
|
||||
|
||||
for ($i = 0 ; $i < $numlines ; $i++)
|
||||
{
|
||||
if ($parent == 0) $level = 0;
|
||||
@ -609,11 +608,6 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
|
||||
print "<tr ".$bc[$var].">\n";
|
||||
|
||||
// Project
|
||||
print "<td>";
|
||||
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
||||
print "</td>";
|
||||
|
||||
// Ref
|
||||
print '<td>';
|
||||
$taskstatic->ref=($lines[$i]->ref?$lines[$i]->ref:$lines[$i]->id);
|
||||
@ -633,6 +627,21 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
||||
print "</td>\n";
|
||||
|
||||
// Project
|
||||
print "<td>";
|
||||
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
||||
print "</td>";
|
||||
|
||||
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
|
||||
{
|
||||
// Thirdparty
|
||||
print '<td class="nowrap">';
|
||||
$thirdpartystatic->id=$lines[$i]->socid;
|
||||
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
||||
print $thirdpartystatic->getNomUrl(1, 'project', 10);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Planned Workload
|
||||
print '<td align="right">';
|
||||
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
|
||||
@ -796,26 +805,6 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
|
||||
print "<tr ".$bc[$var].">\n";
|
||||
|
||||
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY))
|
||||
{
|
||||
// Thirdparty
|
||||
print '<td class="nowrap">';
|
||||
$thirdpartystatic->id=$lines[$i]->socid;
|
||||
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
||||
print $thirdpartystatic->getNomUrl(1, 'project', 10);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Project
|
||||
print '<td class="nowrap">'.$var;
|
||||
$projectstatic->id=$lines[$i]->fk_project;
|
||||
$projectstatic->ref=$lines[$i]->projectref;
|
||||
$projectstatic->title=$lines[$i]->projectlabel;
|
||||
$projectstatic->public=$lines[$i]->public;
|
||||
$projectstatic->thirdparty_name=$lines[$i]->thirdparty_name;
|
||||
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
||||
print "</td>";
|
||||
|
||||
// Ref
|
||||
print '<td class="nowrap">';
|
||||
$taskstatic->id=$lines[$i]->id;
|
||||
@ -837,6 +826,26 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
//print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0);
|
||||
print "</td>\n";
|
||||
|
||||
// Project
|
||||
print '<td class="nowrap">'.$var;
|
||||
$projectstatic->id=$lines[$i]->fk_project;
|
||||
$projectstatic->ref=$lines[$i]->projectref;
|
||||
$projectstatic->title=$lines[$i]->projectlabel;
|
||||
$projectstatic->public=$lines[$i]->public;
|
||||
$projectstatic->thirdparty_name=$lines[$i]->thirdparty_name;
|
||||
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
||||
print "</td>";
|
||||
|
||||
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY))
|
||||
{
|
||||
// Thirdparty
|
||||
print '<td class="nowrap">';
|
||||
$thirdpartystatic->id=$lines[$i]->socid;
|
||||
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
||||
print $thirdpartystatic->getNomUrl(1, 'project', 10);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Planned Workload
|
||||
print '<td align="right">';
|
||||
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
|
||||
|
||||
@ -1200,12 +1200,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
// Project affected to user
|
||||
$newmenu->add("/projet/index.php?leftmenu=myprojects&mode=mine", $langs->trans("MyProjects"), 0, $user->rights->projet->lire, '', $mainmenu, 'myprojects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=myprojects&action=create&mode=mine", $langs->trans("NewProject"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=myprojects&mode=mine&search_status=1", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/list.php?leftmenu=myprojects&mode=mine&search_status=99", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
|
||||
// All project i have permission on
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects&search_status=1", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects&search_status=99", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
|
||||
@ -127,6 +127,7 @@ Activate=Activate
|
||||
Activated=Activated
|
||||
Closed=Closed
|
||||
Closed2=Closed
|
||||
NotClosed=Not closed
|
||||
Enabled=Enabled
|
||||
Deprecated=Deprecated
|
||||
Disable=Disable
|
||||
|
||||
@ -567,7 +567,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
print '<textarea name="description" wrap="soft" class="centpercent" rows="'.ROWS_3.'">'.$_POST["description"].'</textarea>';
|
||||
print '</td></tr>';
|
||||
|
||||
if($conf->categorie->enabled) {
|
||||
if ($conf->categorie->enabled) {
|
||||
// Categories
|
||||
print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1);
|
||||
@ -829,7 +829,6 @@ else
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// Ref
|
||||
/*
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Ref").'</td><td>';
|
||||
@ -875,17 +874,14 @@ else
|
||||
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>';
|
||||
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
$end=dol_print_date($object->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
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);
|
||||
|
||||
@ -179,29 +179,6 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
/*
|
||||
// Ref
|
||||
print '<tr><td class="titlefield">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
// 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').")";
|
||||
}
|
||||
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>';
|
||||
|
||||
// Customer
|
||||
print "<tr><td>".$langs->trans("ThirdParty")."</td>";
|
||||
print '<td colspan="3">';
|
||||
if ($object->thirdparty->id > 0) print $object->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
*/
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($object->public) print $langs->trans('SharedProject');
|
||||
@ -227,15 +204,12 @@ if ($id > 0 || ! empty($ref))
|
||||
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>';
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
$end=dol_print_date($object->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
print '</td></tr>';
|
||||
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
|
||||
@ -151,31 +151,12 @@ 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.
|
||||
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');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$object->title.'</td></tr>';
|
||||
|
||||
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 class="titlefield">'.$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>';
|
||||
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
// Opportunity status
|
||||
@ -195,14 +176,11 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</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');
|
||||
$end=dol_print_date($object->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
print '</td></tr>';
|
||||
|
||||
// Budget
|
||||
|
||||
@ -130,63 +130,19 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// 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
|
||||
print '<tr><td class="titlefield">'.$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>';
|
||||
|
||||
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>';
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
$end=dol_print_date($object->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
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);
|
||||
|
||||
@ -270,7 +270,11 @@ else if ($year > 0)
|
||||
$sql.= " AND p.datee BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
|
||||
}
|
||||
if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
|
||||
if ($search_status >= 0) $sql .= " AND p.fk_statut = ".$db->escape($search_status);
|
||||
if ($search_status >= 0)
|
||||
{
|
||||
if ($search_status == 99) $sql .= " AND p.fk_statut <> 2";
|
||||
else $sql .= " AND p.fk_statut = ".$db->escape($search_status);
|
||||
}
|
||||
if ($search_opp_status)
|
||||
{
|
||||
if (is_numeric($search_opp_status) && $search_opp_status > 0) $sql .= " AND p.fk_opp_status = ".$db->escape($search_opp_status);
|
||||
@ -575,7 +579,10 @@ if ($resql)
|
||||
if (! empty($arrayfields['p.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre nowrap" align="right">';
|
||||
print $form->selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('Draft'),'1'=>$langs->trans('Opened'),'2'=>$langs->trans('Closed')),$search_status);
|
||||
$arrayofstatus = array();
|
||||
foreach($projectstatic->statuts_short as $key => $val) $arrayofstatus[$key]=$langs->trans($val);
|
||||
$arrayofstatus['99']=$langs->trans("NotClosed").' ('.$langs->trans('Draft').'+'.$langs->trans('Opened').')';
|
||||
print $form->selectarray('search_status', $arrayofstatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
// Action column
|
||||
|
||||
@ -235,42 +235,19 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
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%">';
|
||||
|
||||
|
||||
// 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
|
||||
print '<tr><td class="titlefield">'.$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>';
|
||||
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
/*if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
// Opportunity status
|
||||
print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
|
||||
@ -287,18 +264,15 @@ if ($id > 0 || ! empty($ref))
|
||||
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>';
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($object->date_start,'day');
|
||||
$end=dol_print_date($object->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
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);
|
||||
|
||||
@ -191,49 +191,85 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td class="titlefield">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td>';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_start,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_end,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
// Project card
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Title
|
||||
$morehtmlref.=$projectstatic->title;
|
||||
// Thirdparty
|
||||
if ($projectstatic->thirdparty->id > 0)
|
||||
{
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $projectstatic->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);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, '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%">';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_start,'day');
|
||||
$end=dol_print_date($projectstatic->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
print '</td></tr>';
|
||||
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->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($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if($conf->categorie->enabled) {
|
||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($projectstatic->id,'project',1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
@ -134,50 +134,86 @@ if ($object->id > 0)
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td class="titlefield">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td>';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_start,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_end,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
// Project card
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Title
|
||||
$morehtmlref.=$projectstatic->title;
|
||||
// Thirdparty
|
||||
if ($projectstatic->thirdparty->id > 0)
|
||||
{
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $projectstatic->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);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, '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%">';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_start,'day');
|
||||
$end=dol_print_date($projectstatic->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
print '</td></tr>';
|
||||
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->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($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if($conf->categorie->enabled) {
|
||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($projectstatic->id,'project',1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
@ -99,14 +99,14 @@ $fieldstosearchall = array(
|
||||
if (empty($user->socid)) $fieldstosearchall['t.note_private']="NotePrivate";
|
||||
|
||||
$arrayfields=array(
|
||||
'p.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>1),
|
||||
'p.title'=>array('label'=>$langs->trans("ProjectLabel"), 'checked'=>0),
|
||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>0),
|
||||
'p.fk_statut'=>array('label'=>$langs->trans("ProjectStatus"), 'checked'=>1),
|
||||
't.ref'=>array('label'=>$langs->trans("RefTask"), 'checked'=>1, 'position'=>80),
|
||||
't.label'=>array('label'=>$langs->trans("LabelTask"), 'checked'=>1, 'position'=>80),
|
||||
't.dateo'=>array('label'=>$langs->trans("DateStart"), 'checked'=>1, 'position'=>100),
|
||||
't.datee'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1, 'position'=>101),
|
||||
'p.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>1),
|
||||
'p.title'=>array('label'=>$langs->trans("ProjectLabel"), 'checked'=>0),
|
||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>0),
|
||||
'p.fk_statut'=>array('label'=>$langs->trans("ProjectStatus"), 'checked'=>1),
|
||||
't.planned_workload'=>array('label'=>$langs->trans("PlannedWorkload"), 'checked'=>1, 'position'=>102),
|
||||
't.duration_effective'=>array('label'=>$langs->trans("TimeSpent"), 'checked'=>1, 'position'=>103),
|
||||
't.progress_calculated'=>array('label'=>$langs->trans("ProgressCalculated"), 'checked'=>1, 'position'=>104),
|
||||
@ -232,14 +232,8 @@ $sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."projet_task as t";
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
if ($search_project_user > 0)
|
||||
{
|
||||
$sql.=", ".MAIN_DB_PREFIX."element_contact as ecp";
|
||||
}
|
||||
if ($search_task_user > 0)
|
||||
{
|
||||
$sql.=", ".MAIN_DB_PREFIX."element_contact as ect";
|
||||
}
|
||||
if ($search_project_user > 0) $sql.=", ".MAIN_DB_PREFIX."element_contact as ecp";
|
||||
if ($search_task_user > 0) $sql.=", ".MAIN_DB_PREFIX."element_contact as ect";
|
||||
$sql.= " WHERE t.fk_projet = p.rowid";
|
||||
$sql.= " AND p.entity IN (".getEntity('project',1).')';
|
||||
if (! $user->rights->projet->all->lire) $sql.=" AND p.rowid IN (".($projectsListId?$projectsListId:'0').")"; // public and assigned to projects, or restricted to company for external users
|
||||
@ -277,7 +271,11 @@ else if ($year > 0)
|
||||
$sql.= " AND t.datee BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
|
||||
}
|
||||
if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
|
||||
if ($search_projectstatus >= 0) $sql .= " AND p.fk_statut = ".$db->escape($search_projectstatus);
|
||||
if ($search_projectstatus >= 0)
|
||||
{
|
||||
if ($search_projectstatus == 99) $sql .= " AND p.fk_statut <> 2";
|
||||
else $sql .= " AND p.fk_statut = ".$db->escape($search_projectstatus);
|
||||
}
|
||||
if ($search_public!='') $sql .= " AND p.public = ".$db->escape($search_public);
|
||||
if ($search_project_user > 0) $sql.= " AND ecp.fk_c_type_contact IN (".join(',',array_keys($listofprojectcontacttype)).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_project_user;
|
||||
if ($search_task_user > 0) $sql.= " AND ect.fk_c_type_contact IN (".join(',',array_keys($listoftaskcontacttype)).") AND ect.element_id = t.rowid AND ect.fk_socpeople = ".$search_task_user;
|
||||
@ -405,14 +403,14 @@ if ($resql)
|
||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'" id="tablelines3">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'],$_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.title']['checked'])) print_liste_field_titre($arrayfields['p.title']['label'],$_SERVER["PHP_SELF"],"p.title","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'],$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'],$_SERVER["PHP_SELF"],"p.fk_statut","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['t.ref']['checked'])) print_liste_field_titre($arrayfields['t.ref']['label'],$_SERVER["PHP_SELF"],"t.ref","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['t.label']['checked'])) print_liste_field_titre($arrayfields['t.label']['label'],$_SERVER["PHP_SELF"],"t.label","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['t.dateo']['checked'])) print_liste_field_titre($arrayfields['t.dateo']['label'],$_SERVER["PHP_SELF"],"t.dateo","",$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['t.datee']['checked'])) print_liste_field_titre($arrayfields['t.datee']['label'],$_SERVER["PHP_SELF"],"t.datee","",$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'],$_SERVER["PHP_SELF"],"p.ref","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.title']['checked'])) print_liste_field_titre($arrayfields['p.title']['label'],$_SERVER["PHP_SELF"],"p.title","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'],$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'],$_SERVER["PHP_SELF"],"p.fk_statut","",$param,"",$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['t.planned_workload']['checked'])) print_liste_field_titre($arrayfields['t.planned_workload']['label'],$_SERVER["PHP_SELF"],"t.planned_workload","",$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['t.duration_effective']['checked'])) print_liste_field_titre($arrayfields['t.duration_effective']['label'],$_SERVER["PHP_SELF"],"t.duration_effective","",$param,'align="center"',$sortfield,$sortorder);
|
||||
if (! empty($arrayfields['t.progress_calculated']['checked'])) print_liste_field_titre($arrayfields['t.progress_calculated']['label'],$_SERVER["PHP_SELF"],"","",$param,'align="center"');
|
||||
@ -439,32 +437,6 @@ if ($resql)
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_project_ref" value="'.$search_project_ref.'" size="4">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['p.title']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_project_title" value="'.$search_project_title.'" size="6">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_societe" value="'.dol_escape_htmltag($search_societe).'" size="4">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['p.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
$listofstatus=array(-1=>' ');
|
||||
foreach($projectstatic->statuts_short as $key => $val) $listofstatus[$key]=$langs->trans($val);
|
||||
print $form->selectarray('search_projectstatus', $listofstatus, $search_projectstatus);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['t.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
@ -495,6 +467,33 @@ if ($resql)
|
||||
$formother->select_year($year?$year:-1,'year',1, 20, 5);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_project_ref" value="'.$search_project_ref.'" size="4">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['p.title']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_project_title" value="'.$search_project_title.'" size="6">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_societe" value="'.dol_escape_htmltag($search_societe).'" size="4">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['p.fk_statut']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
$arrayofstatus = array();
|
||||
foreach($projectstatic->statuts_short as $key => $val) $arrayofstatus[$key]=$langs->trans($val);
|
||||
$arrayofstatus['99']=$langs->trans("NotClosed").' ('.$langs->trans('Draft').'+'.$langs->trans('Opened').')';
|
||||
print $form->selectarray('search_projectstatus', $arrayofstatus, $search_projectstatus, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['t.planned_workload']['checked'])) print '<td></td>';
|
||||
if (! empty($arrayfields['t.duration_effective']['checked'])) print '<td></td>';
|
||||
if (! empty($arrayfields['t.progress_calculated']['checked'])) print '<td></td>';
|
||||
@ -580,48 +579,6 @@ if ($resql)
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
// Project url
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
print $projectstatic->getNomUrl(1, 'task');
|
||||
if ($projectstatic->hasDelay()) print img_warning("Late");
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Title
|
||||
if (! empty($arrayfields['p.title']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print dol_trunc($obj->projecttitle,80);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Company
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
if ($obj->socid)
|
||||
{
|
||||
$socstatic->id=$obj->socid;
|
||||
$socstatic->name=$obj->name;
|
||||
print $socstatic->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Status
|
||||
if (! empty($arrayfields['p.fk_statut']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print $projectstatic->getLibStatut(1);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Ref
|
||||
if (! empty($arrayfields['t.ref']['checked']))
|
||||
{
|
||||
@ -655,6 +612,48 @@ if ($resql)
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Project ref
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
print $projectstatic->getNomUrl(1, 'task');
|
||||
if ($projectstatic->hasDelay()) print img_warning("Late");
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Project title
|
||||
if (! empty($arrayfields['p.title']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print dol_trunc($obj->projecttitle,80);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Third party
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
if ($obj->socid)
|
||||
{
|
||||
$socstatic->id=$obj->socid;
|
||||
$socstatic->name=$obj->name;
|
||||
print $socstatic->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Project status
|
||||
if (! empty($arrayfields['p.fk_statut']['checked']))
|
||||
{
|
||||
print '<td>';
|
||||
print $projectstatic->getLibStatut(1);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
// Planned workload
|
||||
if (! empty($arrayfields['t.planned_workload']['checked']))
|
||||
|
||||
@ -113,53 +113,86 @@ if ($object->id > 0)
|
||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($projectstatic->public?'projectpub':'project'));
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td class="titlefield">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td>';
|
||||
// Project card
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Title
|
||||
$morehtmlref.=$projectstatic->title;
|
||||
// Thirdparty
|
||||
if ($projectstatic->thirdparty->id > 0)
|
||||
{
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $projectstatic->thirdparty->getNomUrl(1, 'project');
|
||||
}
|
||||
$morehtmlref.='</div>';
|
||||
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($projectstatic,'project_ref','',1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
dol_banner_tab($projectstatic, '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%">';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_start,'day');
|
||||
$end=dol_print_date($projectstatic->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_end,'day');
|
||||
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->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($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if($conf->categorie->enabled) {
|
||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($projectstatic->id,'project',1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
@ -203,7 +236,7 @@ if ($object->id > 0)
|
||||
|
||||
print '<br>';
|
||||
|
||||
$colwidth=30;
|
||||
$cssclass='titlefield';
|
||||
$moreparam=$param;
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
|
||||
|
||||
|
||||
@ -224,52 +224,86 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td class="titlefield">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td>';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($projectstatic,'project_ref',$linkback,1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_start,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_end,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
// Project card
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Title
|
||||
$morehtmlref.=$projectstatic->title;
|
||||
// Thirdparty
|
||||
if ($projectstatic->thirdparty->id > 0)
|
||||
{
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $projectstatic->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);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, '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%">';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_start,'day');
|
||||
$end=dol_print_date($projectstatic->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
print '</td></tr>';
|
||||
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->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($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if($conf->categorie->enabled) {
|
||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($projectstatic->id,'project',1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
@ -301,69 +301,85 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
||||
|
||||
$param=($mode=='mine'?'&mode=mine':'');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
// Ref
|
||||
print '<tr><td class="titlefield">';
|
||||
print $langs->trans("Ref");
|
||||
print '</td><td>';
|
||||
// Define a complementary filter for search of next/prev ref.
|
||||
if (! $user->rights->projet->all->lire)
|
||||
{
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,0);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||
}
|
||||
print $form->showrefnav($projectstatic,'project_ref',$linkback,1,'ref','ref','',$param.'&withproject=1');
|
||||
print '</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projectstatic->title.'</td></tr>';
|
||||
|
||||
// Thirdparty
|
||||
print '<tr><td>'.$langs->trans("ThirdParty").'</td><td>';
|
||||
if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1);
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td>'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Statut
|
||||
print '<tr><td>'.$langs->trans("Status").'</td><td>'.$projectstatic->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Date start
|
||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_start,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date end
|
||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_end,'day');
|
||||
print '</td></tr>';
|
||||
|
||||
if ((! $id && ! $ref) || ! empty($projectidforalltimes)) // Not a dedicated task
|
||||
{
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->budget_amount,'',$langs,0,0,0,$conf->currency);
|
||||
print '</td></tr>';
|
||||
|
||||
// Other options
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$projectstatic,$action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook) && ! empty($extrafields_project->attribute_label))
|
||||
{
|
||||
print $projectstatic->showOptionals($extrafields_project);
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
// Project card
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Title
|
||||
$morehtmlref.=$projectstatic->title;
|
||||
// Thirdparty
|
||||
if ($projectstatic->thirdparty->id > 0)
|
||||
{
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $projectstatic->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);
|
||||
$projectstatic->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, '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%">';
|
||||
|
||||
// Visibility
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
|
||||
if ($projectstatic->public) print $langs->trans('SharedProject');
|
||||
else print $langs->trans('PrivateProject');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date start - end
|
||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
||||
print dol_print_date($projectstatic->date_start,'day');
|
||||
$end=dol_print_date($projectstatic->date_end,'day');
|
||||
if ($end) print ' - '.$end;
|
||||
print '</td></tr>';
|
||||
|
||||
// Budget
|
||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||
if (strcmp($projectstatic->budget_amount, '')) print price($projectstatic->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($projectstatic->description);
|
||||
print '</td></tr>';
|
||||
|
||||
// Categories
|
||||
if($conf->categorie->enabled) {
|
||||
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td>';
|
||||
print $form->showCategories($projectstatic->id,'project',1);
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user