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
a780f79e
Commit
a780f79e
authored
13 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: W3C
parent
f680dc7d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/core/lib/project.lib.php
+4
-1
4 additions, 1 deletion
htdocs/core/lib/project.lib.php
htdocs/projet/activity/list.php
+10
-4
10 additions, 4 deletions
htdocs/projet/activity/list.php
with
14 additions
and
5 deletions
htdocs/core/lib/project.lib.php
+
4
−
1
View file @
a780f79e
...
@@ -252,6 +252,7 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid')
...
@@ -252,6 +252,7 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid')
/**
/**
* Output a task line
* Output a task line
*
* @param $inc
* @param $inc
* @param $parent
* @param $parent
* @param $lines
* @param $lines
...
@@ -287,7 +288,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $
...
@@ -287,7 +288,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $
$lastprojectid
=
$lines
[
$i
]
->
fk_project
;
$lastprojectid
=
$lines
[
$i
]
->
fk_project
;
}
}
print
"<tr
$bc[$var]
>
\n
"
;
print
"<tr
"
.
$bc
[
$var
]
.
"
>
\n
"
;
// Project
// Project
print
"<td>"
;
print
"<td>"
;
...
@@ -366,6 +367,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $
...
@@ -366,6 +367,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $
/**
/**
* Show task lines with a particular parent
* Show task lines with a particular parent
*
* @param $inc Counter that count number of lines legitimate to show (for return)
* @param $inc Counter that count number of lines legitimate to show (for return)
* @param $parent Id of parent task to start
* @param $parent Id of parent task to start
* @param $lines Array of all tasks
* @param $lines Array of all tasks
...
@@ -512,6 +514,7 @@ function PLines(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole
...
@@ -512,6 +514,7 @@ function PLines(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole
if
(
$total
>
0
)
if
(
$total
>
0
)
{
{
print
'<tr class="liste_total"><td class="liste_total">'
.
$langs
->
trans
(
"Total"
)
.
'</td>'
;
print
'<tr class="liste_total"><td class="liste_total">'
.
$langs
->
trans
(
"Total"
)
.
'</td>'
;
if
(
$showproject
)
print
'<td></td>'
;
print
'<td></td>'
;
print
'<td></td>'
;
print
'<td></td>'
;
print
'<td></td>'
;
print
'<td align="right" nowrap="nowrap" class="liste_total">'
.
ConvertSecondToTime
(
$total
)
.
'</td></tr>'
;
print
'<td align="right" nowrap="nowrap" class="liste_total">'
.
ConvertSecondToTime
(
$total
)
.
'</td></tr>'
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/projet/activity/list.php
+
10
−
4
View file @
a780f79e
...
@@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php");
...
@@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php");
$langs
->
load
(
'projects'
);
$langs
->
load
(
'projects'
);
$mode
=
$_REQUE
ST
[
"mode"
]
;
$mode
=
GETPO
ST
(
"mode"
)
;
$mine
=
0
;
$mine
=
0
;
if
(
$mode
==
'mine'
)
$mine
=
1
;
if
(
$mode
==
'mine'
)
$mine
=
1
;
...
@@ -45,6 +45,7 @@ $socid=0;
...
@@ -45,6 +45,7 @@ $socid=0;
if
(
$user
->
societe_id
>
0
)
$socid
=
$user
->
societe_id
;
if
(
$user
->
societe_id
>
0
)
$socid
=
$user
->
societe_id
;
$result
=
restrictedArea
(
$user
,
'projet'
,
$projectid
);
$result
=
restrictedArea
(
$user
,
'projet'
,
$projectid
);
/*
/*
* Actions
* Actions
*/
*/
...
@@ -80,6 +81,10 @@ if ($_POST["action"] == 'addtime' && $user->rights->projet->creer)
...
@@ -80,6 +81,10 @@ if ($_POST["action"] == 'addtime' && $user->rights->projet->creer)
$task
->
timespent_fk_user
=
$user
->
id
;
$task
->
timespent_fk_user
=
$user
->
id
;
$task
->
timespent_date
=
dol_mktime
(
12
,
0
,
0
,
$_POST
[
"
{
$id
}
month"
],
$_POST
[
"
{
$id
}
day"
],
$_POST
[
"
{
$id
}
year"
]);
$task
->
timespent_date
=
dol_mktime
(
12
,
0
,
0
,
$_POST
[
"
{
$id
}
month"
],
$_POST
[
"
{
$id
}
day"
],
$_POST
[
"
{
$id
}
year"
]);
$task
->
addTimeSpent
(
$user
);
$task
->
addTimeSpent
(
$user
);
// header to avoid submit twice on back
header
(
'Location: '
.
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$projectid
);
exit
;
}
}
else
else
{
{
...
@@ -121,7 +126,8 @@ $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$pr
...
@@ -121,7 +126,8 @@ $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$pr
print_barre_liste
(
$title
,
$page
,
$_SERVER
[
"PHP_SELF"
],
""
,
$sortfield
,
$sortorder
,
""
,
$num
);
print_barre_liste
(
$title
,
$page
,
$_SERVER
[
"PHP_SELF"
],
""
,
$sortfield
,
$sortorder
,
""
,
$num
);
if
(
$mesg
)
print
$mesg
;
dol_htmloutput_mesg
(
$mesg
);
print
'<form name="addtime" method="POST" action="'
.
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$project
->
id
.
'">'
;
print
'<form name="addtime" method="POST" action="'
.
$_SERVER
[
"PHP_SELF"
]
.
'?id='
.
$project
->
id
.
'">'
;
...
@@ -143,7 +149,7 @@ print '</form>';
...
@@ -143,7 +149,7 @@ print '</form>';
print
"</table>"
;
print
"</table>"
;
print
'</div>'
;
print
'</div>'
;
$db
->
close
();
llxFooter
();
llxFooter
();
$db
->
close
();
?>
?>
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