Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
840b0474
Commit
840b0474
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Work on new timesheet input pages.
parent
5d4d8151
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/core/lib/project.lib.php
+5
-17
5 additions, 17 deletions
htdocs/core/lib/project.lib.php
htdocs/projet/activity/perday.php
+7
-1
7 additions, 1 deletion
htdocs/projet/activity/perday.php
htdocs/projet/activity/perweek.php
+1
-1
1 addition, 1 deletion
htdocs/projet/activity/perweek.php
with
13 additions
and
19 deletions
htdocs/core/lib/project.lib.php
+
5
−
17
View file @
840b0474
...
...
@@ -506,17 +506,11 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
* @param int $restricteditformytask 0=No restriction, 1=Enable add time only if task is a task i am affected to
* @return $inc
*/
function
projectLinesPer
Time
(
&
$inc
,
$parent
,
$lines
,
&
$level
,
&
$projectsrole
,
&
$tasksrole
,
$mine
,
$restricteditformytask
=
0
)
function
projectLinesPer
Day
(
&
$inc
,
$parent
,
$lines
,
&
$level
,
&
$projectsrole
,
&
$tasksrole
,
$mine
,
$restricteditformytask
=
0
)
{
global
$db
,
$user
,
$bc
,
$langs
;
global
$form
,
$formother
,
$projectstatic
,
$taskstatic
;
if
(
!
is_object
(
$formother
))
{
require_once
DOL_DOCUMENT_ROOT
.
'/core/class/html.formother.class.php'
;
$formother
=
new
FormOther
(
$db
);
}
$lastprojectid
=
0
;
$var
=
true
;
...
...
@@ -625,7 +619,7 @@ function projectLinesPerTime(&$inc, $parent, $lines, &$level, &$projectsrole, &$
print
'</td><td align="right">'
;
//$s.=' ';
$s
=
$form
->
select_duration
(
$lines
[
$i
]
->
id
.
'duration'
,
''
,
$disabledtask
,
'text'
,
0
,
1
);
$s
.
=
' <input type="submit" class="button"'
.
(
$disabledtask
?
' disabled="disabled"'
:
''
)
.
' value="'
.
$langs
->
trans
(
"Add"
)
.
'">'
;
//
$s.=' <input type="submit" class="button"'.($disabledtask?' disabled="disabled"':'').' value="'.$langs->trans("Add").'">';
print
$s
;
print
'</td>'
;
...
...
@@ -639,7 +633,7 @@ function projectLinesPerTime(&$inc, $parent, $lines, &$level, &$projectsrole, &$
$inc
++
;
$level
++
;
if
(
$lines
[
$i
]
->
id
)
projectLinesPer
Time
(
$inc
,
$lines
[
$i
]
->
id
,
$lines
,
$level
,
$projectsrole
,
$tasksrole
,
$mine
,
$restricteditformytask
);
if
(
$lines
[
$i
]
->
id
)
projectLinesPer
Day
(
$inc
,
$lines
[
$i
]
->
id
,
$lines
,
$level
,
$projectsrole
,
$tasksrole
,
$mine
,
$restricteditformytask
);
$level
--
;
}
else
...
...
@@ -668,17 +662,11 @@ function projectLinesPerTime(&$inc, $parent, $lines, &$level, &$projectsrole, &$
* @param int $restricteditformytask 0=No restriction, 1=Enable add time only if task is a task i am affected to
* @return $inc
*/
function
projectLinesPer
Day
(
&
$inc
,
$firstdaytoshow
,
$fuser
,
$parent
,
$lines
,
&
$level
,
&
$projectsrole
,
&
$tasksrole
,
$mine
,
$restricteditformytask
=
0
)
function
projectLinesPer
Week
(
&
$inc
,
$firstdaytoshow
,
$fuser
,
$parent
,
$lines
,
&
$level
,
&
$projectsrole
,
&
$tasksrole
,
$mine
,
$restricteditformytask
=
0
)
{
global
$db
,
$user
,
$bc
,
$langs
;
global
$form
,
$formother
,
$projectstatic
,
$taskstatic
;
if
(
!
is_object
(
$formother
))
{
require_once
DOL_DOCUMENT_ROOT
.
'/core/class/html.formother.class.php'
;
$formother
=
new
FormOther
(
$db
);
}
$lastprojectid
=
0
;
$var
=
true
;
...
...
@@ -805,7 +793,7 @@ function projectLinesPerDay(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$l
$inc
++
;
$level
++
;
if
(
$lines
[
$i
]
->
id
)
projectLinesPer
Day
(
$inc
,
$firstdaytoshow
,
$lines
[
$i
]
->
id
,
$lines
,
$level
,
$projectsrole
,
$tasksrole
,
$mine
,
$restricteditformytask
);
if
(
$lines
[
$i
]
->
id
)
projectLinesPer
Week
(
$inc
,
$firstdaytoshow
,
$fuser
,
$lines
[
$i
]
->
id
,
$lines
,
$level
,
$projectsrole
,
$tasksrole
,
$mine
,
$restricteditformytask
);
$level
--
;
}
else
...
...
This diff is collapsed.
Click to expand it.
htdocs/projet/activity/perday.php
+
7
−
1
View file @
840b0474
...
...
@@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once
DOL_DOCUMENT_ROOT
.
'/projet/class/task.class.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/project.lib.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/lib/date.lib.php'
;
require_once
DOL_DOCUMENT_ROOT
.
'/core/class/html.formother.class.php'
;
$langs
->
load
(
'projects'
);
...
...
@@ -127,6 +128,7 @@ if ($action == 'addtime' && $user->rights->projet->creer)
*/
$form
=
new
Form
(
$db
);
$formother
=
new
FormOther
(
$db
);
$projectstatic
=
new
Project
(
$db
);
$project
=
new
Project
(
$db
);
$taskstatic
=
new
Task
(
$db
);
...
...
@@ -215,7 +217,7 @@ $restricteditformytask=(empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJEC
if
(
count
(
$tasksarray
)
>
0
)
{
$j
=
0
;
projectLinesPer
Time
(
$j
,
0
,
$tasksarray
,
$level
,
$projectsrole
,
$tasksrole
,
$mine
,
$restricteditformytask
);
projectLinesPer
Day
(
$j
,
0
,
$tasksarray
,
$level
,
$projectsrole
,
$tasksrole
,
$mine
,
$restricteditformytask
);
}
else
{
...
...
@@ -225,6 +227,10 @@ print "</table>";
dol_fiche_end
();
print
'<div class="center">'
;
print
'<input type="submit" class="button"'
.
(
$disabledtask
?
' disabled="disabled"'
:
''
)
.
' value="'
.
$langs
->
trans
(
"Save"
)
.
'">'
;
print
'</div>'
;
print
'</form>'
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/projet/activity/perweek.php
+
1
−
1
View file @
840b0474
...
...
@@ -210,7 +210,7 @@ $restricteditformytask=(empty($conf->global->PROJECT_TIME_ON_ALL_TASKS_MY_PROJEC
if
(
count
(
$tasksarray
)
>
0
)
{
$j
=
0
;
projectLinesPer
Day
(
$j
,
$firstdaytoshow
,
$usertoprocess
,
0
,
$tasksarray
,
$level
,
$projectsrole
,
$tasksrole
,
$mine
,
$restricteditformytask
);
projectLinesPer
Week
(
$j
,
$firstdaytoshow
,
$usertoprocess
,
0
,
$tasksarray
,
$level
,
$projectsrole
,
$tasksrole
,
$mine
,
$restricteditformytask
);
print
'<tr class="liste_total">
<td class="liste_total" colspan="7" align="right">'
.
$langs
->
trans
(
"Total"
)
.
'</td>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment