forked from Wavyzz/dolibarr
Add timespent entry into HR top menu too
Faster update of total of timespent
This commit is contained in:
@@ -971,7 +971,8 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||||||
}
|
}
|
||||||
$tableCell.='<input type="text" alt="'.($disabledtask?'':$alttitle).'" title="'.($disabledtask?'':$alttitle).'" '.($disabledtask?'disabled':$placeholder).' class="center smallpadd" size="2" id="timeadded['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="" cols="2" maxlength="5"';
|
$tableCell.='<input type="text" alt="'.($disabledtask?'':$alttitle).'" title="'.($disabledtask?'':$alttitle).'" '.($disabledtask?'disabled':$placeholder).' class="center smallpadd" size="2" id="timeadded['.$inc.']['.$idw.']" name="task['.$lines[$i]->id.']['.$idw.']" value="" cols="2" maxlength="5"';
|
||||||
$tableCell.=' onkeypress="return regexEvent(this,event,\'timeChar\')"';
|
$tableCell.=' onkeypress="return regexEvent(this,event,\'timeChar\')"';
|
||||||
$tableCell.= 'onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$idw.',\''.$modeinput.'\')" />';
|
$tableCell.=' onkeyup="updateTotal('.$idw.',\''.$modeinput.'\')"';
|
||||||
|
$tableCell.=' onblur="regexEvent(this,event,\''.$modeinput.'\'); updateTotal('.$idw.',\''.$modeinput.'\')" />';
|
||||||
$tableCell.='</td>';
|
$tableCell.='</td>';
|
||||||
print $tableCell;
|
print $tableCell;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1382,6 +1382,18 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->expensereport->approve);
|
$newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("ListToApprove"), 2, $user->rights->expensereport->approve);
|
||||||
$newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->expensereport->lire);
|
$newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->rights->expensereport->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($conf->projet->enabled))
|
||||||
|
{
|
||||||
|
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||||
|
{
|
||||||
|
$langs->load("projects");
|
||||||
|
|
||||||
|
$search_project_user = GETPOST('search_project_user','int');
|
||||||
|
|
||||||
|
$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user?'&search_project_user='.$search_project_user:''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user