commit
279e00a793
@ -90,6 +90,14 @@ var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
|
|||||||
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
|
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
|
||||||
vTmpNode.setAttribute('href',vTaskList[i].getLink());
|
vTmpNode.setAttribute('href',vTaskList[i].getLink());
|
||||||
|
|
||||||
|
* Replace '% Comp.' to have a smaller text column header
|
||||||
|
'comp':'% Comp.'
|
||||||
|
with
|
||||||
|
'comp':'%'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JCROP:
|
JCROP:
|
||||||
------
|
------
|
||||||
|
|||||||
@ -104,10 +104,10 @@ function project_prepare_head($object)
|
|||||||
$head[$h][2] = 'tasks';
|
$head[$h][2] = 'tasks';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Gantt");
|
$head[$h][1] = $langs->trans("TimeSpent");
|
||||||
if ($nbTasks > 0) $head[$h][1].= ' <span class="badge">'.($nbTasks).'</span>';
|
//if ($nbTasks > 0) $head[$h][1].= ' <span class="badge">'.($nbTasks).'</span>';
|
||||||
$head[$h][2] = 'gantt';
|
$head[$h][2] = 'timespent';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -331,7 +331,7 @@ JSGantt.GanttChart=function(pDiv, pFormat)
|
|||||||
var vLangs={'en':
|
var vLangs={'en':
|
||||||
{'format':'Format','hour':'Hour','day':'Day','week':'Week','month':'Month','quarter':'Quarter','hours':'Hours','days':'Days',
|
{'format':'Format','hour':'Hour','day':'Day','week':'Week','month':'Month','quarter':'Quarter','hours':'Hours','days':'Days',
|
||||||
'weeks':'Weeks','months':'Months','quarters':'Quarters','hr':'Hr','dy':'Day','wk':'Wk','mth':'Mth','qtr':'Qtr','hrs':'Hrs',
|
'weeks':'Weeks','months':'Months','quarters':'Quarters','hr':'Hr','dy':'Day','wk':'Wk','mth':'Mth','qtr':'Qtr','hrs':'Hrs',
|
||||||
'dys':'Days','wks':'Wks','mths':'Mths','qtrs':'Qtrs','resource':'Resource','duration':'Duration','comp':'% Comp.',
|
'dys':'Days','wks':'Wks','mths':'Mths','qtrs':'Qtrs','resource':'Resource','duration':'Duration','comp':'%',
|
||||||
'completion':'Completion','startdate':'Start Date','enddate':'End Date','moreinfo':'More Information','notes':'Notes',
|
'completion':'Completion','startdate':'Start Date','enddate':'End Date','moreinfo':'More Information','notes':'Notes',
|
||||||
'january':'January','february':'February','march':'March','april':'April','maylong':'May','june':'June','july':'July',
|
'january':'January','february':'February','march':'March','april':'April','maylong':'May','june':'June','july':'July',
|
||||||
'august':'August','september':'September','october':'October','november':'November','december':'December','jan':'Jan',
|
'august':'August','september':'September','october':'October','november':'November','december':'December','jan':'Jan',
|
||||||
|
|||||||
@ -77,6 +77,7 @@ Time=Time
|
|||||||
ListOfTasks=List of tasks
|
ListOfTasks=List of tasks
|
||||||
GoToListOfTimeConsumed=Go to list of time consumed
|
GoToListOfTimeConsumed=Go to list of time consumed
|
||||||
GoToListOfTasks=Go to list of tasks
|
GoToListOfTasks=Go to list of tasks
|
||||||
|
GoToGanttView=Go to Gantt view
|
||||||
GanttView=Gantt View
|
GanttView=Gantt View
|
||||||
ListProposalsAssociatedProject=List of the commercial proposals associated with the project
|
ListProposalsAssociatedProject=List of the commercial proposals associated with the project
|
||||||
ListOrdersAssociatedProject=List of customer orders associated with the project
|
ListOrdersAssociatedProject=List of customer orders associated with the project
|
||||||
|
|||||||
@ -80,7 +80,8 @@ if (! empty($conf->use_javascript_ajax))
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$title=$langs->trans("Project").' - '.$langs->trans("Gantt").($object->ref?' - '.$object->ref.' '.$object->name:'');
|
//$title=$langs->trans("Gantt").($object->ref?' - '.$object->ref.' '.$object->name:'');
|
||||||
|
$title=$langs->trans("Gantt");
|
||||||
if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=($object->ref?$object->ref.' '.$object->name.' - ':'').$langs->trans("Gantt");
|
if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=($object->ref?$object->ref.' '.$object->name.' - ':'').$langs->trans("Gantt");
|
||||||
$help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
$help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||||
llxHeader("",$title,$help_url,'',0,0,$arrayofjs,$arrayofcss);
|
llxHeader("",$title,$help_url,'',0,0,$arrayofjs,$arrayofcss);
|
||||||
@ -93,7 +94,7 @@ if (($id > 0 && is_numeric($id)) || ! empty($ref))
|
|||||||
//$userDelete = $object->restrictedProjectArea($user,'delete');
|
//$userDelete = $object->restrictedProjectArea($user,'delete');
|
||||||
//print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
|
//print "userAccess=".$userAccess." userWrite=".$userWrite." userDelete=".$userDelete;
|
||||||
|
|
||||||
$tab='gantt';
|
$tab='tasks';
|
||||||
|
|
||||||
$head=project_prepare_head($object);
|
$head=project_prepare_head($object);
|
||||||
dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($object->public?'projectpub':'project'));
|
dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($object->public?'projectpub':'project'));
|
||||||
@ -187,43 +188,32 @@ if (($id > 0 && is_numeric($id)) || ! empty($ref))
|
|||||||
print '<div class="clearboth"></div>';
|
print '<div class="clearboth"></div>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Link to create task
|
||||||
/*
|
if ($user->rights->projet->all->creer || $user->rights->projet->creer)
|
||||||
* Buttons actions
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($id > 0 && is_numeric($id))
|
|
||||||
{
|
{
|
||||||
|
if ($object->public || $userWrite > 0)
|
||||||
print '<div class="tabsAction">';
|
|
||||||
|
|
||||||
if ($user->rights->projet->all->creer || $user->rights->projet->creer)
|
|
||||||
{
|
{
|
||||||
if ($object->public || $userWrite > 0)
|
$linktocreatetask = '<a class="butActionNew" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=create'.$param.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id).'">'.$langs->trans('AddTask').'<span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id.'&action=create'.$param.'&tab=gantt&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.$object->id).'">'.$langs->trans('AddTask').'</a>';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('AddTask').'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('AddTask').'</a>';
|
$linktocreatetask = '<a class="butActionNewRefused" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('AddTask').'<span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_fiche_titre($langs->trans("GanttView"));
|
$linktocreatetask = '<a class="butActionNewRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans('AddTask').'<span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$linktolist='<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id.'">'.$langs->trans("GoToListOfTasks").' <span class="fa fa-list-ul valignmiddle"></span></a>';
|
||||||
|
|
||||||
|
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
|
||||||
|
print load_fiche_titre($title, $linktolist.' '.$linktocreatetask, 'title_generic.png');
|
||||||
|
|
||||||
|
|
||||||
// Get list of tasks in tasksarray and taskarrayfiltered
|
// Get list of tasks in tasksarray and taskarrayfiltered
|
||||||
// We need all tasks (even not limited to a user because a task to user
|
// We need all tasks (even not limited to a user because a task to user
|
||||||
|
|||||||
@ -31,8 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
|
||||||
$langs->load("users");
|
$langs->loadLangs(array("users", "projects"));
|
||||||
$langs->load("projects");
|
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
@ -489,7 +488,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
|
||||||
$title=$langs->trans("ListOfTasks");
|
$title=$langs->trans("ListOfTasks");
|
||||||
$linktotasks='<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?projectid='.$object->id.'&withproject=1">'.$langs->trans("GoToListOfTimeConsumed").'</a>';
|
$linktotasks='<a href="'.DOL_URL_ROOT.'/projet/ganttview.php?id='.$object->id.'&withproject=1">'.$langs->trans("GoToGanttView").' <span class="fa fa-calendar-minus-o valignmiddle"></span></a>';
|
||||||
|
|
||||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
|
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
|
||||||
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'title_generic.png');
|
print load_fiche_titre($title, $linktotasks.' '.$linktocreatetask, 'title_generic.png');
|
||||||
|
|||||||
@ -320,7 +320,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
if ($withproject)
|
if ($withproject)
|
||||||
{
|
{
|
||||||
// Tabs for project
|
// Tabs for project
|
||||||
$tab='tasks';
|
if (empty($id)) $tab='timespent';
|
||||||
|
else $tab='tasks';
|
||||||
$head=project_prepare_head($projectstatic);
|
$head=project_prepare_head($projectstatic);
|
||||||
dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project'));
|
dol_fiche_head($head, $tab, $langs->trans("Project"), -1, ($projectstatic->public?'projectpub':'project'));
|
||||||
|
|
||||||
@ -695,9 +696,9 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
print '<!-- List of time spent for project -->'."\n";
|
print '<!-- List of time spent for project -->'."\n";
|
||||||
|
|
||||||
$title=$langs->trans("ListTaskTimeUserProject");
|
$title=$langs->trans("ListTaskTimeUserProject");
|
||||||
$linktotasks='<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("GoToListOfTasks").'</a>';
|
//$linktotasks='<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("GoToListOfTasks").'</a>';
|
||||||
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
|
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
|
||||||
print load_fiche_titre($title,$linktotasks.' '.$linktocreatetime, 'title_generic.png');
|
print load_fiche_titre($title, $linktocreatetime, 'title_generic.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -868,8 +869,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
|||||||
if (! empty($arrayfields['t.task_date']['checked']))
|
if (! empty($arrayfields['t.task_date']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||||
$formother->select_year($search_year,'search_year',1, 20, 5);
|
$formother->select_year($search_year,'search_year',1, 20, 5);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -822,6 +822,9 @@ select.flat.selectlimit {
|
|||||||
.fa-trash, .fa-crop, .fa-pencil {
|
.fa-trash, .fa-crop, .fa-pencil {
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
}
|
}
|
||||||
|
.fa-15 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
/* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */
|
/* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */
|
||||||
/*.table-responsive {
|
/*.table-responsive {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user