tutos-commits Mailing List for TUTOS
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
(4) |
10
|
11
|
12
|
13
|
14
|
15
|
16
|
17
(2) |
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
(4) |
28
(2) |
29
|
30
|
31
|
|
From: Emmanuel D. <ede...@us...> - 2006-03-28 13:54:48
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9590/php Modified Files: Tag: BRANCH-2-0 timetrack_synthesis.php Log Message: - bugfix on default end date of period Index: timetrack_synthesis.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/Attic/timetrack_synthesis.php,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- timetrack_synthesis.php 27 Mar 2006 15:23:36 -0000 1.1.2.2 +++ timetrack_synthesis.php 28 Mar 2006 13:54:43 -0000 1.1.2.3 @@ -759,14 +759,14 @@ if ( isDateOk($_REQUEST['startDate']) ) { $this->startDate = strtotime($_REQUEST['startDate']); } else { - $this->startDate = strtotime("-7 days"); //firstDayOfWeek(time()); + $this->startDate = zeroHour(strtotime("-7 days")); //firstDayOfWeek(time()); } /* EndDate */ if ( isDateOk($_REQUEST['endDate']) ) { $this->endDate = strtotime($_REQUEST['endDate']); } else { - $this->endDate = strtotime("-1 days"); //lastDayOfWeek(time()); + $this->endDate = zeroHour(strtotime("-1 day")); //lastDayOfWeek(time()); if ($this->endDate < $this->startDate) $this->endDate = $this->startDate; } |
From: Emmanuel D. <ede...@us...> - 2006-03-28 12:51:23
|
Update of /cvsroot/tutos/tutos/templates/classic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30710/templates/classic Modified Files: Tag: BRANCH-2-0 timetrack_synthesis.tpl Log Message: - add total hour in title of histo bar Index: timetrack_synthesis.tpl =================================================================== RCS file: /cvsroot/tutos/tutos/templates/classic/Attic/timetrack_synthesis.tpl,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- timetrack_synthesis.tpl 27 Mar 2006 15:23:37 -0000 1.1.2.2 +++ timetrack_synthesis.tpl 28 Mar 2006 12:51:16 -0000 1.1.2.3 @@ -187,10 +187,10 @@ {math assign=rest equation="100 - t" t=$tthisto.total.scr} <td> {if $rest > 0}<div style="height:{$rest}%;" title="{$tthisto.lib}"></div>{/if} - {if $tthisto.user.scr}<div style="height:{$tthisto.user.scr}%;" class="ttsynt-histo-user" title="{$tthisto.lib} {$tthisto.user.name}: {$tthisto.user.hour}h"></div>{/if} - {if $tthisto.bug.scr} <div style="height:{$tthisto.bug.scr}%;" class="ttsynt-histo-bug" title="{$tthisto.lib} {$tthisto.bug.name}: {$tthisto.bug.hour}h"></div>{/if} - {if $tthisto.proj.scr}<div style="height:{$tthisto.proj.scr}%;" class="ttsynt-histo-proj" title="{$tthisto.lib} {$tthisto.proj.name}: {$tthisto.proj.hour}h"></div>{/if} - {if $tthisto.task.scr}<div style="height:{$tthisto.task.scr}%;" class="ttsynt-histo-task" title="{$tthisto.lib} {$tthisto.task.name}: {$tthisto.task.hour}h"></div>{/if} + {if $tthisto.user.scr}<div style="height:{$tthisto.user.scr}%;" class="ttsynt-histo-user" title="{$tthisto.lib} {$tthisto.user.name}: {$tthisto.user.hour}h/{$tthisto.total.hour}h"></div>{/if} + {if $tthisto.bug.scr} <div style="height:{$tthisto.bug.scr}%;" class="ttsynt-histo-bug" title="{$tthisto.lib} {$tthisto.bug.name}: {$tthisto.bug.hour}h/{$tthisto.total.hour}h"></div>{/if} + {if $tthisto.proj.scr}<div style="height:{$tthisto.proj.scr}%;" class="ttsynt-histo-proj" title="{$tthisto.lib} {$tthisto.proj.name}: {$tthisto.proj.hour}h/{$tthisto.total.hour}h"></div>{/if} + {if $tthisto.task.scr}<div style="height:{$tthisto.task.scr}%;" class="ttsynt-histo-task" title="{$tthisto.lib} {$tthisto.task.name}: {$tthisto.task.hour}h/{$tthisto.total.hour}h"></div>{/if} </td> {/foreach} </tr> @@ -260,10 +260,10 @@ {strip} <td> {if $rest > 0}<div style="height:{$rest}%;" title="{$tthisto.lib}"></div>{/if} - {if $tthisto.user.scr}<div style="height:{$tthisto.user.scr}%;" class="ttsynt-histo-user" title="{$tthisto.lib} {$tthisto.user.name}: {$tthisto.user.hour}h"></div>{/if} - {if $tthisto.bug.scr} <div style="height:{$tthisto.bug.scr}%;" class="ttsynt-histo-bug" title="{$tthisto.lib} {$tthisto.bug.name}: {$tthisto.bug.hour}h"></div>{/if} - {if $tthisto.proj.scr}<div style="height:{$tthisto.proj.scr}%;" class="ttsynt-histo-proj" title="{$tthisto.lib} {$tthisto.proj.name}: {$tthisto.proj.hour}h"></div>{/if} - {if $tthisto.task.scr}<div style="height:{$tthisto.task.scr}%;" class="ttsynt-histo-task" title="{$tthisto.lib} {$tthisto.task.name}: {$tthisto.task.hour}h"></div>{/if} + {if $tthisto.user.scr}<div style="height:{$tthisto.user.scr}%;" class="ttsynt-histo-user" title="{$tthisto.lib} {$tthisto.user.name}: {$tthisto.user.hour}h/{$tthisto.total.hour}h"></div>{/if} + {if $tthisto.bug.scr} <div style="height:{$tthisto.bug.scr}%;" class="ttsynt-histo-bug" title="{$tthisto.lib} {$tthisto.bug.name}: {$tthisto.bug.hour}h/{$tthisto.total.hour}h"></div>{/if} + {if $tthisto.proj.scr}<div style="height:{$tthisto.proj.scr}%;" class="ttsynt-histo-proj" title="{$tthisto.lib} {$tthisto.proj.name}: {$tthisto.proj.hour}h/{$tthisto.total.hour}h"></div>{/if} + {if $tthisto.task.scr}<div style="height:{$tthisto.task.scr}%;" class="ttsynt-histo-task" title="{$tthisto.lib} {$tthisto.task.name}: {$tthisto.task.hour}h/{$tthisto.total.hour}h"></div>{/if} </td> {/strip} {/foreach} |
From: Emmanuel D. <ede...@us...> - 2006-03-27 15:23:45
|
Update of /cvsroot/tutos/tutos/templates/classic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9266/templates/classic Modified Files: Tag: BRANCH-2-0 timetrack_synthesis.tpl Log Message: - add timetrack synthesis for product - add "by user" view in tt synthesis for team Index: timetrack_synthesis.tpl =================================================================== RCS file: /cvsroot/tutos/tutos/templates/classic/Attic/timetrack_synthesis.tpl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- timetrack_synthesis.tpl 9 Mar 2006 14:59:05 -0000 1.1.2.1 +++ timetrack_synthesis.tpl 27 Mar 2006 15:23:37 -0000 1.1.2.2 @@ -20,6 +20,7 @@ function presetDates(start,end) { document.actionform.startDate.value = start; document.actionform.endDate.value = end; + document.actionform.submit(); } function setOrder(val) { document.actionform.order.value = val; @@ -42,7 +43,7 @@ <table class="ttsynt-tb" border="0" cellpadding="0" cellspacing="0"> <thead> <tr> - {if $teamlinks.type == 'team'} + {if $teamlinks.type == 'team' || $teamlinks.type == 'product'} <th colspan="3">{$lang.Team}: {$teamlinks.name} ({$teamlinks.count} {$lang.Users})</th> {/if} {if $teamlinks.type == 'address'} @@ -94,7 +95,7 @@ <img src="{$base}/html/classic/appointments.png" alt="" style="cursor: pointer;" title="{$lang.MiniCal2}" /> <iframe id="calStart" class="ttsynt-cal" src="minical2.php?{$date.start|date_format:"annee=%Y&mois=%m"}"></iframe> </td> - <td rowspan="3" valign="top" align="center"> + <td rowspan="4" valign="top" align="center"> <p>{$lang.TTPeriodPreset}</p> {foreach from=$presetPeriod item=preset} <p><a style="cursor: pointer;" %Y-%m-%d"}','{$preset.end|date_format:"%Y-%m-%d"}');" title="{$preset.title}">{$preset.name}</a></p> @@ -118,7 +119,16 @@ <input type="radio" name="histoDiv" value="A" {if $date.histoDiv == 'A'}checked="checked"{/if} />{$lang.TTHistoBy.A}<br /> </td> </tr> - <tr><td colspan="4" style="text-align:center;"><input type="submit" value="{$date.submit}" /></td></tr> + <tr> + {if $ref.type == 'team'} + <td>{$lang.TTSynthBy}</td> + <td colspan="2" nowrap> + <input type="radio" name="cutby" value="user" {if $cutby == 'user'}checked="checked"{/if} />{$lang.Users}<br /> + <input type="radio" name="cutby" value="product" {if $cutby == 'product'}checked="checked"{/if} />{$lang.Projects}<br /> + </td> + {/if} + </tr> + <tr><td colspan="4" style="text-align:center;"><input type="submit" name="go" value="{$date.submit}" /></td></tr> </tbody> </table> </td> @@ -126,7 +136,6 @@ </table> <!-- User TimeTrack Synthesis --> -{if $utts} <input type="hidden" name="order" value="{$order}" /> <table class="ttsynt-tb" border="0" cellpadding="0" cellspacing="0" style="width:100%;"> <thead> @@ -154,19 +163,21 @@ </tr> </thead> <tbody> - {foreach from=$utts.byprj item=ttsum key=pid} + {foreach from=$tts.$ttsitem item=ttsum key=pid} {if $ttsum.total.hour > 0} <tr> <td class="ttsynt-proj"> - <!-- Project Links --> - <a href="product_show.php?id={$ttsum.id}" title="{$lang.Project}: {$ttsum.name}"> - <img src="{$base}/html/classic/projects.png" alt="projects" /></a> - <a href="task_overview.php?id={$ttsum.id}" title="{$lang.TaskOverview}: {$ttsum.name}"> - <img src="{$base}/html/classic/task_overview.png" alt="task_overview" /></a> + <!-- Item Links --> + {if $ttsum.type == 'product'} + <a href="product_show.php?id={$ttsum.id}" title="{$lang.Project}: {$ttsum.name}"><img src="{$base}/html/classic/projects.png" alt="projects" /></a> + {elseif $ttsum.type == 'address'} + <a href="address_show.php?id={$ttsum.id}" title="{$ttsum.name}"><img src="{$base}/html/classic/user.png" alt="user" /></a> + {/if} + <a href="task_overview.php?id={$ttsum.id}" title="{$lang.TaskOverview}: {$ttsum.name}"><img src="{$base}/html/classic/task_overview.png" alt="task_overview" /></a> <a href="timetrack_synthesis.php?id={$ttsum.id}&startDate={$date.start|date_format:"%Y-%m-%d"}&endDate={$date.end|date_format:"%Y-%m-%d"}&histoDiv={$date.histoDiv}" title="{$lang.TimetrackSynthesis}: {$ttsum.name}">{$ttsum.name}</a> </td> <td> - <!-- Project Histogram --> + <!-- Item Histogram --> <img src="{$base}/html/classic/search.png" alt="zoom" style="cursor:pointer;" title="{$lang.TTHistogramPrj}" /> <div id="histo{$pid}" class="ttsynt-histo" > <p class="ttsynt-histo-title">{$ttsum.name}</p> @@ -176,7 +187,8 @@ {math assign=rest equation="100 - t" t=$tthisto.total.scr} <td> {if $rest > 0}<div style="height:{$rest}%;" title="{$tthisto.lib}"></div>{/if} - {if $tthisto.bug.scr} <div style="height:{$tthisto.bug.scr}%;" class="ttsynt-histo-bug" title="{$tthisto.lib} {$tthisto.bug.name}: {$tthisto.bug.hour}h"></div>{/if} + {if $tthisto.user.scr}<div style="height:{$tthisto.user.scr}%;" class="ttsynt-histo-user" title="{$tthisto.lib} {$tthisto.user.name}: {$tthisto.user.hour}h"></div>{/if} + {if $tthisto.bug.scr} <div style="height:{$tthisto.bug.scr}%;" class="ttsynt-histo-bug" title="{$tthisto.lib} {$tthisto.bug.name}: {$tthisto.bug.hour}h"></div>{/if} {if $tthisto.proj.scr}<div style="height:{$tthisto.proj.scr}%;" class="ttsynt-histo-proj" title="{$tthisto.lib} {$tthisto.proj.name}: {$tthisto.proj.hour}h"></div>{/if} {if $tthisto.task.scr}<div style="height:{$tthisto.task.scr}%;" class="ttsynt-histo-task" title="{$tthisto.lib} {$tthisto.task.name}: {$tthisto.task.hour}h"></div>{/if} </td> @@ -191,7 +203,7 @@ </div> </td> <td> - <!-- Project Bar by Type --> + <!-- Item Bar by Type --> <table class="ttsynt-bar" cellpadding="0" cellspacing="0" border="0"><tr> {if $ttsum.task.scr > 0} <td class="ttsynt-bar-task" style="width:{$ttsum.task.scr}%;" title="{$lang.Timetracks} {$lang.Tasks} {$ttsum.task.hour}h ({$ttsum.task.pcent}%)"></td> @@ -202,6 +214,9 @@ {if $ttsum.bug.scr > 0} <td class="ttsynt-bar-bug" style="width:{$ttsum.bug.scr}%;" title="{$lang.Timetracks} {$lang.Bugs} {$ttsum.bug.hour}h ({$ttsum.bug.pcent}%)"></td> {/if} + {if $ttsum.user.scr > 0} + <td class="ttsynt-bar-user" style="width:{$ttsum.user.scr}%;" title="{$lang.Timetracks} {$lang.Address} {$ttsum.user.hour}h ({$ttsum.user.pcent}%)"></td> + {/if} {if $ttsum.total.scr < 100} <td class="ttsynt-bar-none"></td> {/if} @@ -225,12 +240,14 @@ </tr> </thead> <tbody> - {foreach from=$utts.bytyp item=typval key=typkey} + {foreach from=$tts.bytyp item=typval key=typkey} + {if $typkey == 'user' && $ttsmod == 'P'} + {else} <tr> <td class="ttsynt-proj">{$typval.name}</td> - {if $typkey == 'total'} + {if $typkey == 'total'} <td> <!-- Total Histogram --> <img src="{$base}/html/classic/search.png" alt="zoom" style="cursor:pointer;" title="{$lang.TTHistogramPrj}" /> @@ -240,13 +257,15 @@ <tr> {foreach from=$typval.histo item=tthisto key=histodate} {math assign=rest equation="100 - t" t=$tthisto.total.scr} + {strip} <td> {if $rest > 0}<div style="height:{$rest}%;" title="{$tthisto.lib}"></div>{/if} + {if $tthisto.user.scr}<div style="height:{$tthisto.user.scr}%;" class="ttsynt-histo-user" title="{$tthisto.lib} {$tthisto.user.name}: {$tthisto.user.hour}h"></div>{/if} {if $tthisto.bug.scr} <div style="height:{$tthisto.bug.scr}%;" class="ttsynt-histo-bug" title="{$tthisto.lib} {$tthisto.bug.name}: {$tthisto.bug.hour}h"></div>{/if} {if $tthisto.proj.scr}<div style="height:{$tthisto.proj.scr}%;" class="ttsynt-histo-proj" title="{$tthisto.lib} {$tthisto.proj.name}: {$tthisto.proj.hour}h"></div>{/if} {if $tthisto.task.scr}<div style="height:{$tthisto.task.scr}%;" class="ttsynt-histo-task" title="{$tthisto.lib} {$tthisto.task.name}: {$tthisto.task.hour}h"></div>{/if} - {if $tthisto.user.scr}<div style="height:{$tthisto.user.scr}%;" class="ttsynt-histo-user" title="{$tthisto.lib} {$tthisto.user.name}: {$tthisto.user.hour}h"></div>{/if} </td> + {/strip} {/foreach} </tr> <tr> @@ -257,7 +276,7 @@ </table> </div> </td> - {else} + {else} <td> @@ -270,14 +289,14 @@ {/if} </tr></table> </td> - {/if} + {/if} <td style="text-align:right;">{$typval.hour|default:"0"|string_format:"%.2f"}h</td> <td style="text-align:right;">{$typval.pcent|default:"0"|string_format:"%.1f"}%</td> </tr> + {/if} {/foreach} </tbody> </table> -{/if} </form> </div> <!-- timetrack synthesis stop --> \ No newline at end of file |
From: Emmanuel D. <ede...@us...> - 2006-03-27 15:23:42
|
Update of /cvsroot/tutos/tutos/php/localization In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9266/php/localization Modified Files: Tag: BRANCH-2-0 fr.p3 Log Message: - add timetrack synthesis for product - add "by user" view in tt synthesis for team Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/fr.p3,v retrieving revision 1.40.2.32 retrieving revision 1.40.2.33 diff -u -r1.40.2.32 -r1.40.2.33 --- fr.p3 9 Mar 2006 14:59:05 -0000 1.40.2.32 +++ fr.p3 27 Mar 2006 15:23:37 -0000 1.40.2.33 @@ -652,10 +652,13 @@ $lang['TTPeriodThisWeek'] = "Semaine courante"; $lang['TTPeriodLastWeek'] = "Semaine dernière"; $lang['TTPeriod7Days'] = "7 derniers jours"; +$lang['TTPeriodThis15'] = "Quinzaine courante"; +$lang['TTPeriodLast15'] = "Quinzaine précédente"; $lang['TTPeriodThisMonth'] = "Mois courant"; $lang['TTPeriodLastMonth'] = "Mois dernier"; $lang['Order'] = "Tri croissant"; $lang['RevOrder'] = "Tri décroissant"; +$lang['TTSynthBy'] = "Découpage par"; # Fax |
From: Emmanuel D. <ede...@us...> - 2006-03-27 15:23:42
|
Update of /cvsroot/tutos/tutos/php/bugtracking In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9266/php/bugtracking Modified Files: Tag: BRANCH-2-0 bug.pinc Log Message: - add timetrack synthesis for product - add "by user" view in tt synthesis for team Index: bug.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/bugtracking/bug.pinc,v retrieving revision 1.13.2.33 retrieving revision 1.13.2.34 diff -u -r1.13.2.33 -r1.13.2.34 --- bug.pinc 25 Jan 2006 09:48:28 -0000 1.13.2.33 +++ bug.pinc 27 Mar 2006 15:23:37 -0000 1.13.2.34 @@ -25,8 +25,6 @@ function bugSummary(&$obj) { global $lang; - error_log("IN BUGSUMMARY"); - foreach ($lang['BugStates'] as $i => $f) { $b[$i] = 0; $t[$i] = 0; |
From: Emmanuel D. <ede...@us...> - 2006-03-27 15:23:42
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9266/php Modified Files: Tag: BRANCH-2-0 product_show.php timetrack_synthesis.php Log Message: - add timetrack synthesis for product - add "by user" view in tt synthesis for team Index: product_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/product_show.php,v retrieving revision 1.90.2.26 retrieving revision 1.90.2.27 diff -u -r1.90.2.26 -r1.90.2.27 --- product_show.php 22 Feb 2006 15:52:42 -0000 1.90.2.26 +++ product_show.php 27 Mar 2006 15:23:36 -0000 1.90.2.27 @@ -488,6 +488,14 @@ ); $this->addMenu($x); + $x = array('url' => "timetrack_synthesis.php?id=".$this->obj->id, + 'text' => $lang['TimetrackSynthesis'], + 'image' => 'timetrack', + 'info' => sprintf($lang['TimetrackSynthesisI'], + $this->obj->getFullName()), + 'category' => array("timetrack", "synthesis") + ); + $this->addMenu($x); $x= task::getaddlink($this->user,$this->obj); $x['image'] = 'new'; Index: timetrack_synthesis.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/Attic/timetrack_synthesis.php,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- timetrack_synthesis.php 9 Mar 2006 14:59:05 -0000 1.1.2.1 +++ timetrack_synthesis.php 27 Mar 2006 15:23:36 -0000 1.1.2.2 @@ -12,6 +12,7 @@ include_once 'webelements.p3'; include_once 'permission.p3'; include_once 'timetrack.pinc'; +include_once 'task.pinc'; include_once 'layout/layout.pinc'; @@ -19,10 +20,21 @@ check_user(); loadmodules('timetrack','synthesis'); +/** + * compare fonction for sorting by name + * @param a first element to compare + * @param b second element to compare + * @return -1 0 or 1 + */ function cmpName($a, $b){ return strcmp($a['name'], $b['name']); } +/** + * verify an input date format + * @param date input string date + * @return true or false + */ function isDateOk ($date) { if ($date && preg_match("/^\d{4}-\d{2}-\d{2}$/", $date)) { list ($y,$m,$d) = split ("-",$date); @@ -31,31 +43,45 @@ return false; } +/** + * get the first day of a week + * @param timestamp the base of search + * @return unix timestamp of the monday 00h00 + */ function firstDayOfWeek($timestamp) { -// $result = $timestamp; -// strtotime("last Monday",$timestamp) -// $day = getDate($timestamp); -// $wday = $day['wday']; -// if ($wday == 0) -// $wday = 7; -// $result -= ($wday - 1) * 86400; - $result = strtotime("last Monday",$timestamp); + $result = $timestamp; + $day = getDate($timestamp); + $wday = $day['wday']; + if ($wday == 0) + $wday = 7; + $result -= ($wday - 1) * 86400; +// $result = strtotime("last Monday",$timestamp); return zeroHour($result); } +/** + * get the first day of a week + * @param timestamp the base of search + * @return unix timestamp of the monday 00h00 + */ function lastDayOfWeek($timestamp) { -// $result = $timestamp; -// $day = getDate($timestamp); -// $wday = $day['wday']; -// if ($wday == 0) -// $wday = 7; -// $result += (7 - $wday) * 86400; - $result = strtotime("next Sunday",$timestamp); + $result = $timestamp; + $day = getDate($timestamp); + $wday = $day['wday']; + if ($wday == 0) + $wday = 7; + $result += (7 - $wday) * 86400; +// $result = strtotime("next Sunday",$timestamp); return zeroHour($result); } +/** + * get the day at 00h00 + * @param timestamp the date in unix timestamp + * @return day unix timestamp at 00h00 + */ function zeroHour($timestamp) { $day = getDate($timestamp); return mktime(0, 0, 0, $day['mon'], $day['mday'], $day['year']); @@ -65,16 +91,66 @@ * show a synthesis of timetracks */ class timetrack_synthesis extends layout { + /** + * reference object for all timetracks + */ var $ref; + + /** + * name of reference + */ var $name; + + /** + * begin of period in unix timestamp format + */ var $startDate; + + /** + * end of period in unix timestamp format + */ var $endDate; + + /** + * type of division for histogram + */ var $histoDiv; + + /** + * type of division for histogram selected in form + */ var $formHistoDiv; - var $utts = null; - var $ptts = null; + + + /** + * tree data in User / Team mode / Product mode + */ + var $tts = null; + + /** + * tree data mode U / P + */ + var $ttsmod = null; + + /** + * tree data byprj / byusr + */ + var $ttsitem = null; + + + /** + * team list for the reference + */ var $team = null; + + /** + * list of preset period selectable + */ var $presetPeriod; + + /** + * type of sort + */ var $order; /** @@ -87,7 +163,8 @@ $this->assign('action', "timetrack_synthesis.php"); $this->assign('ref', array('id' => $this->ref->id, - 'name' => $this->ref->getFullName() + 'name' => $this->ref->getFullName(), + 'type' => $this->ref->getType() )); $this->assign('date', array('title' => $lang['Period'], @@ -102,19 +179,24 @@ $this->assign('presetPeriod', $this->presetPeriod); $this->assign('order', $this->order); - if (isset($this->utts)) { - $this->manageUTTS(); - $this->assign('utts', $this->utts); - if (isset($this->team)) { - $this->assign('teamlinks', $this->team); - } - } elseif (isset($this->ptts)) { - $this->assign('ptts', $this->ptts); + if ($this->ttsitem == 'byusr') { + $this->assign('cutby', 'user'); + } elseif ($this->ttsitem == 'byprj') { + $this->assign('cutby', 'product'); } + if (isset($this->team)) { + $this->assign('teamlinks', $this->team); + } + + $this->manageTTS(); + $this->assign('ttsmod', $this->ttsmod); + $this->assign('ttsitem', $this->ttsitem); + $this->assign('tts', $this->tts); + $this->template('timetrack_synthesis'); - //$this->debug($this->utts); + // $this->debug($this->tts); } /** @@ -148,6 +230,14 @@ 'category' => array("obj") ); $this->addMenu($x); + $x = array('url' => "timetrack_overview.php?worker=".$this->ref->id, + 'text' => $lang['TimetrackOverview'], + 'info' => sprintf($lang['TimetrackBookedI'],$this->ref->getFullName()), + 'image' => 'timetrack', + 'category' => array("obj") + ); + $this->addMenu($x); + } elseif ($this->ref->getType() == 'team') { $x = array('url' => "team_show.php?id=".$this->ref->id, @@ -157,6 +247,14 @@ 'category' => array("obj") ); $this->addMenu($x); + $x = array('url' => "timetrack_overview.php?worker=".$this->ref->id, + 'text' => $lang['TimetrackOverview'], + 'info' => sprintf($lang['TimetrackBookedI'],$this->ref->getFullName()), + 'image' => 'timetrack', + 'category' => array("obj") + ); + $this->addMenu($x); + } elseif ($this->ref->getType() == 'product') { $x = array('url' => "product_show.php?id=".$this->ref->id, @@ -166,6 +264,13 @@ 'category' => array("obj") ); $this->addMenu($x); + $x = array('url' => "timetrack_overview.php?show=all&link_id=".$this->ref->id, + 'text' => $lang['TimetrackOverview'], + 'info' => sprintf($lang['TimetrackBookedI'],$this->ref->getFullName()), + 'image' => 'timetrack', + 'category' => array("obj") + ); + $this->addMenu($x); } $x = array('url' => "task_overview.php?id=".$this->ref->id, @@ -176,14 +281,6 @@ ); $this->addMenu($x); - $x = array('url' => "timetrack_overview.php?worker=".$this->ref->id, - 'text' => $lang['TimetrackOverview'], - 'info' => sprintf($lang['TimetrackBookedI'],$this->ref->getFullName()), - 'image' => 'timetrack', - 'category' => array("obj") - ); - $this->addMenu($x); - $x = array('url' => "timetrack_synthesis.php?format=paper&id=".$this->ref->id. "&startDate=".strftime("%Y-%m-%d",$this->startDate). "&endDate=".strftime("%Y-%m-%d",$this->endDate). @@ -195,6 +292,11 @@ $this->addMenu($x); } + /** + * get TimeTrack for a user + * @param user address tutos object + * @return add uttlist to the user object + */ Function userTTList(&$user) { if ( ! isset($user->id) ) return; @@ -222,6 +324,76 @@ return; } + /** + * get TimeTrack for linked to object + * @param obj tutos object + * @return add ottlist to the object + */ + Function objectTTList(&$obj) { + if ( ! isset($obj->id) ) return; + + $sd = strftime("%Y-%m-%d %T", $this->startDate); + $ed = strftime("%Y-%m-%d %T", $this->endDate); + + $obj->ottlist = array(); + $q = "SELECT * FROM ". $obj->dbconn->prefix ."timetrack WHERE link_id = ". $obj->id; + $q .= " AND vtime >= '$sd'"; + $q .= " AND vtime <= '$ed'"; + + $r = $obj->dbconn->Exec($q); + $n = $r->numrows(); + $a = 0; + while ($a < $n) { + $tt = new timetrack($obj->dbconn); + $tt->read_result($r,$a); + if ( $tt->see_ok() ) { + $obj->ottlist[$tt->id] = &$tt; + } + $a++; + unset($tt); + } + $r->free(); + return; + } + + /** + * Add volum to sum dispatch by user and is histogram + * @param ttsum base array of data + * @param type type of volume [proj|task|bug] + * @param usr the user object + * @param vol the volum of hour + * @param day the day of the volum work + */ + Function cumulByUser(&$ttsum, $type, $usr, $vol, $day){ + global $lang; + + if (!isset($ttsum['byusr'])) { + $ttsum['byusr'] = array(); + } + if (!isset($ttsum['byusr'][$usr->id])) { + $ttsum['byusr'][$usr->id] = array('id' => $usr->id, + 'name' => $usr->getFullName(), + 'type' => 'address', + 'task' => array('name' => $lang['Tasks']), + 'proj' => array('name' => $lang['Projects']), + 'bug' => array('name' => $lang['Bugs']), + 'total' => array('name' => $lang['TTtotal']), + 'histo' => $this->initHisto() + ); + } + $this->subCumul($ttsum['byusr'][$usr->id][$type], 'hour', $vol); + $this->subCumul($ttsum['byusr'][$usr->id]['total'], 'hour', $vol); + $this->subCumulHisto($ttsum['byusr'][$usr->id]['histo'], $type, 'hour', $vol, $day); + } + + /** + * Add volum to sum dispatch by product and is histogram + * @param ttsum base array of data + * @param type type of volume [proj|task|bug] + * @param prj the product object + * @param vol the volum of hour + * @param day the day of the volum work + */ Function cumulByPrj(&$ttsum, $type, $prj, $vol, $day){ global $lang; @@ -231,6 +403,7 @@ if (!isset($ttsum['byprj'][$prj->id])) { $ttsum['byprj'][$prj->id] = array('id' => $prj->id, 'name' => $prj->getFullName(), + 'type' => 'product', 'task' => array('name' => $lang['Tasks']), 'proj' => array('name' => $lang['Projects']), 'bug' => array('name' => $lang['Bugs']), @@ -243,6 +416,13 @@ $this->subCumulHisto($ttsum['byprj'][$prj->id]['histo'], $type, 'hour', $vol, $day); } + /** + * Add volum to sum dispatch by type and is total histogram + * @param ttsum base array of data + * @param type type of volume [proj|task|bug|user] + * @param vol the volum of hour + * @param day the day of the volum work + */ Function cumulByTyp(&$ttsum, $type, $vol, $day){ global $lang; @@ -261,6 +441,12 @@ $this->subCumulHisto($ttsum['bytyp']['total']['histo'], $type, 'hour', $vol, $day); } + /** + * Add volum to a type + * @param elt element where to cumul volum + * @param key key of volume to add like hour, pcent, scr + * @param vol the volum to add + */ Function subCumul(&$elt, $key, $vol) { if (!isset($elt[$key])) { $elt[$key] = 0; @@ -268,6 +454,10 @@ $elt[$key] += $vol; } + /** + * get an Init histogram + * @return a new histogram + */ Function initHisto() { global $lang; @@ -288,12 +478,26 @@ return $histo; } + /** + * Add volum to the histogram of element + * @param elt basic element + * @param type type of volume [proj|task|bug] + * @param key key of volume to add like hour, pcent, scr + * @param vol the volum of hour + * @param day the day of the volum work + */ Function subCumulHisto(&$elt, $type, $key, $vol, $day) { $keyDay = $this->getHistoKeyDay($day->getTimestamp()); $this->subCumul($elt[$keyDay][$type], $key, $vol); $this->subCumul($elt[$keyDay]['total'], $key, $vol); } + /** + * Get the histogram key of day depend of histodiv input form + * @param tsday unix timestamp of searching key + * @param lib a result name of key + * @return the date key + */ Function getHistoKeyDay($tsday, &$lib) { $keyDay; if ($this->histoDiv == 'D') { @@ -310,6 +514,59 @@ return $keyDay; } + /** + * Get the Product Timetracks + * @param tasks array of task of project + * @param pbugs array of bug of project + * @param tbugs array of bug of tasks project + * @return array data of timetracks + */ + Function getProductTT(&$tasks, &$pbugs, &$tbugs) { + error_log ("getProductTT"); + $ttsum = array(); + + /* read each timetrack from product */ + $this->objectTTList($this->ref); + foreach ($this->ref->ottlist as $tt) { + $this->cumulByUser($ttsum, 'proj', $tt->worker, $tt->volume, $tt->wday); + $this->cumulByTyp ($ttsum, 'proj', $tt->volume, $tt->wday); + } + + /* read each timetrack from tasks */ + foreach ($tasks as $task) { + $this->objectTTList($task); + foreach ($task->ottlist as $tt) { + $this->cumulByUser($ttsum, 'task', $tt->worker, $tt->volume, $tt->wday); + $this->cumulByTyp ($ttsum, 'task', $tt->volume, $tt->wday); + } + } + + /* read each timetrack from product bugs */ + foreach ($pbugs as $bug) { + $this->objectTTList($bug); + foreach ($bug->ottlist as $tt) { + $this->cumulByUser($ttsum, 'bug', $tt->worker, $tt->volume, $tt->wday); + $this->cumulByTyp ($ttsum, 'bug', $tt->volume, $tt->wday); + } + } + + /* read each timetrack from tasks bugs */ + foreach ($tbugs as $bug) { + $this->objectTTList($bug); + foreach ($bug->ottlist as $tt) { + $this->cumulByUser($ttsum, 'bug', $tt->worker, $tt->volume, $tt->wday); + $this->cumulByTyp ($ttsum, 'bug', $tt->volume, $tt->wday); + } + } + + return $ttsum; + } + + /** + * Get the Users Timetracks + * @param users array of user + * @return array data of timetracks + */ Function getUsersTT(&$users) { error_log ("getUsersTT"); $ttsum = array(); @@ -327,36 +584,51 @@ case 'task': //error_log("task timetrack"); $ptasks = array(); - $prj = $tt->ref->getProject($ptasks); - $this->cumulByPrj($ttsum, 'task', $prj, $tt->volume, $tt->wday); + if ($this->ttsitem == 'byprj') { + $prj = $tt->ref->getProject($ptasks); + $this->cumulByPrj($ttsum, 'task', $prj, $tt->volume, $tt->wday); + } elseif ($this->ttsitem == 'byusr') { + $this->cumulByUser($ttsum, 'task', $tt->worker, $tt->volume, $tt->wday); + } $this->cumulByTyp($ttsum, 'task', $tt->volume, $tt->wday); break; case 'product': //error_log("product timetrack"); - $prj = $tt->ref; - $this->cumulByPrj($ttsum, 'proj', $prj, $tt->volume, $tt->wday); + if ($this->ttsitem == 'byprj') { + $prj = $tt->ref; + $this->cumulByPrj($ttsum, 'proj', $prj, $tt->volume, $tt->wday); + } elseif ($this->ttsitem == 'byusr') { + $this->cumulByUser($ttsum, 'proj', $tt->worker, $tt->volume, $tt->wday); + } $this->cumulByTyp($ttsum, 'proj', $tt->volume, $tt->wday); break; case 'bug': //error_log("bug timetrack"); - $prj = null; - $bug = &$tt->ref; - if ($bug->parent->getType() == 'product') - $prj = $bug->parent; - elseif ($bug->parent->getType() == 'task') { - $ptasks = array(); - $prj = $bug->parent->getProject($ptasks); - } - if (isset($prj)) { - $this->cumulByPrj($ttsum, 'bug', $prj, $tt->volume, $tt->wday); + if ($this->ttsitem == 'byprj') { + $prj = null; + $bug = &$tt->ref; + if ($bug->parent->getType() == 'product') + $prj = $bug->parent; + elseif ($bug->parent->getType() == 'task') { + $ptasks = array(); + $prj = $bug->parent->getProject($ptasks); + } + if (isset($prj)) { + $this->cumulByPrj($ttsum, 'bug', $prj, $tt->volume, $tt->wday); + } + } elseif ($this->ttsitem == 'byusr') { + $this->cumulByUser($ttsum, 'bug', $tt->worker, $tt->volume, $tt->wday); } $this->cumulByTyp($ttsum, 'bug', $tt->volume, $tt->wday); break; default: //error_log("other timetrack"); + if ($this->ttsitem == 'byusr') { + $this->cumulByUser($ttsum, 'user', $tt->worker, $tt->volume, $tt->wday); + } $this->cumulByTyp($ttsum, 'user', $tt->volume, $tt->wday); break; } @@ -365,23 +637,39 @@ return $ttsum; } + /** + * transform hour to sreen bar value for each type + * @param elt base element to manage + * @param max top value for calculating pourcent + */ Function manageHour2Scr(&$elt, $max) { - foreach (array('proj', 'task', 'bug', 'user', 'total') as $key) { - if ( isset($elt[$key]) ) - $elt[$key]['scr'] = round($elt[$key]['hour'] / $max * 100, 1); + foreach (array('proj', 'task', 'bug', 'user', 'total') as $type) { + if ( isset($elt[$type]) ) + $elt[$type]['scr'] = round($elt[$type]['hour'] / $max * 100, 1); } } + /** + * transform hour to pourcent information for each type + * @param elt base element to manage + * @param max top value for calculating pourcent + */ Function manageHour2Pcent(&$elt, $total) { - foreach (array('proj', 'task', 'bug', 'user', 'total') as $key) { - if ( isset($elt[$key]) ) - $elt[$key]['pcent'] = round($elt[$key]['hour'] / $total * 100, 1); + foreach (array('proj', 'task', 'bug', 'user', 'total') as $type) { + if ( isset($elt[$type]) ) + $elt[$type]['pcent'] = round($elt[$type]['hour'] / $total * 100, 1); } } - Function cmpPrj($a, $b) { - $prja = $this->utts['byprj'][$a]; - $prjb = $this->utts['byprj'][$b]; + /** + * compare fonction for sorting input order + * @param a first element to compare + * @param b second element to compare + * @return -1 0 or 1 + */ + Function cmpItem($a, $b) { + $prja = $this->tts[$this->ttsitem][$a]; + $prjb = $this->tts[$this->ttsitem][$b]; $namea = strtolower($prja['name']); $nameb = strtolower($prjb['name']); $suma = $prja['total']['hour']; @@ -405,40 +693,46 @@ } } - Function manageUTTS() { - /* search for max total by project */ + /** + * Transform all data for the template + */ + Function manageTTS() { + $tts = &$this->tts; + $keyby = $this->ttsitem; + + /* search for max total by item (project or user) */ $max = 0; - foreach (array_keys($this->utts['byprj']) as $pid) { + foreach (array_keys($tts[$keyby]) as $pid) { if ($pid == 'total') continue; - $ttprj = &$this->utts['byprj'][$pid]; - if ($ttprj['total']['hour'] > $max) - $max = $ttprj['total']['hour']; + $ttitem = &$tts[$keyby][$pid]; + if ($ttitem['total']['hour'] > $max) + $max = $ttitem['total']['hour']; } - /* compute pourcent value for projects */ - foreach (array_keys($this->utts['byprj']) as $pid) { + /* compute pourcent value for items (project or user) */ + foreach (array_keys($tts[$keyby]) as $pid) { if ($pid == 'total') continue; - $ttprj = &$this->utts['byprj'][$pid]; - $this->manageHour2Scr($ttprj, $max); - $this->manageHour2Pcent($ttprj, $this->utts['bytyp']['total']['hour']); + $ttitem = &$tts[$keyby][$pid]; + $this->manageHour2Scr($ttitem, $max); + $this->manageHour2Pcent($ttitem, $tts['bytyp']['total']['hour']); /* compute histogram data for a project */ $hmax = 0; - foreach (array_keys($ttprj['histo']) as $histoKey) { - $hmax = max($hmax, $ttprj['histo'][$histoKey]['total']['hour']); + foreach (array_keys($ttitem['histo']) as $histoKey) { + $hmax = max($hmax, $ttitem['histo'][$histoKey]['total']['hour']); } - foreach (array_keys($ttprj['histo']) as $histoKey) { - $ttprjhist = &$ttprj['histo'][$histoKey]; - $this->manageHour2Scr($ttprjhist, $hmax); + foreach (array_keys($ttitem['histo']) as $histoKey) { + $ttitemhist = &$ttitem['histo'][$histoKey]; + $this->manageHour2Scr($ttitemhist, $hmax); } - ksort($ttprj['histo']); + ksort($ttitem['histo']); } - uksort($this->utts['byprj'], array($this,'cmpPrj')); + uksort($tts[$keyby], array($this, 'cmpItem')); /* compute pourcent value for types */ - $bytyp = &$this->utts['bytyp']; + $bytyp = &$tts['bytyp']; $tmax = max($bytyp['proj']['hour'], $bytyp['task']['hour'], $bytyp['bug']['hour'], $bytyp['user']['hour']); $this->manageHour2Scr($bytyp, $tmax); $this->manageHour2Pcent($bytyp, $bytyp['total']['hour']); @@ -455,19 +749,24 @@ ksort($bytyp['total']['histo']); } + /** + * Read the input period selection and treat + * @param msg message result + * @return true if ok or false if not + */ Function preparePeriod (&$msg) { /* StartDate */ if ( isDateOk($_REQUEST['startDate']) ) { $this->startDate = strtotime($_REQUEST['startDate']); } else { - $this->startDate = firstDayOfWeek(time()); + $this->startDate = strtotime("-7 days"); //firstDayOfWeek(time()); } /* EndDate */ if ( isDateOk($_REQUEST['endDate']) ) { $this->endDate = strtotime($_REQUEST['endDate']); } else { - $this->endDate = lastDayOfWeek(time()); + $this->endDate = strtotime("-1 days"); //lastDayOfWeek(time()); if ($this->endDate < $this->startDate) $this->endDate = $this->startDate; } @@ -516,6 +815,9 @@ return true; } + /** + * Calculate the presets period for the template + */ Function preparePresetPeriod() { global $lang; @@ -544,6 +846,39 @@ $this->presetPeriod[] = $x; $d = getdate(); + + /* This 15 */ + $s15; + $e15; + if ($d['mday'] <= 15) { + $s15 = strtotime("-".($d['mday']-1)." days"); + $e15 = strtotime("+".(15 - $d['mday'])." days"); + } else { + $s15 = strtotime("-".($d['mday']-16)." days"); + $e15 = strtotime("-".$d['mday']." days +1month"); + } + $x = array('name' => $lang['TTPeriodThis15'], + 'start' => $s15, + 'end' => $e15, + 'title' => "" + ); + $this->presetPeriod[] = $x; + + /* Last 15 */ + if ($d['mday'] <= 15) { + $s15 = strtotime("-".($d['mday']-16)." days -1 month"); + $e15 = strtotime("-".$d['mday']." days"); + } else { + $s15 = strtotime("-".($d['mday']-1)." days"); + $e15 = strtotime("-".($d['mday']-15)." days"); + } + $x = array('name' => $lang['TTPeriodLast15'], + 'start' => $s15, + 'end' => $e15, + 'title' => "" + ); + $this->presetPeriod[] = $x; + /* This Month */ $x = array('name' => $lang['TTPeriodThisMonth'], 'start' => strtotime("-".($d['mday']-1)." days"), @@ -561,6 +896,64 @@ } /** + * Get the team list depend of reference object + */ + Function prepareTeamList() { + $type = $this->ref->getType(); + + if ($type == 'address') { + /* teams who is member */ + team::obj_read($this->ref); + $this->team = array('name' => $this->ref->getFullName(), + 'id' => $this->ref->id, + 'type' => $type, + 'count' => 0, + 'list' => array()); + foreach ($this->ref->teamlist as $tid => $team) { + $this->team['list'][] = array('id' => $tid, + 'name' => $team, + 'type' => 'team' + ); + } + + } elseif ($type == 'team') { + /* members of team */ + $this->team = array('name' => $this->ref->name, + 'id' => $this->ref->id, + 'type' => $type, + 'count' => 0, + 'list' => array()); + foreach ($this->ref->member as $uid => $user) { + $this->team['list'][] = array('id' => $uid, + 'name' => $user->getFullName(), + 'type' => $user->getType() + ); + } + + } elseif ($type == 'product') { + error_log("READROLES FOR PRODUCT"); + /* members of project */ + $this->ref->readroles(); + $this->team = array('name' => $this->ref->name, + 'id' => $this->ref->id, + 'type' => $type, + 'count' => 0, + 'list' => array()); + foreach ($this->ref->role as $role) { + foreach ($role as $uid => $user) { + error_log("ROLE FOR $uid"); + $this->team['list'][] = array('id' => $uid, + 'name' => $user->getFullName(), + 'type' => $user->getType() + ); + } + } + } + $this->team['count'] = count($this->team['list']); + usort($this->team['list'], 'cmpName'); + } + + /** * prepare */ Function prepare() { @@ -598,56 +991,58 @@ $this->order = 'DSum'; } + /* --- Item Cut ---*/ + if ( isset($_REQUEST['cutby']) ) { + $this->cutby = $_REQUEST['cutby']; + } + $type = $this->ref->getType(); - /* --- Timetrack by user(s) --- */ + /* --- Timetrack by user(s) --- + ---------------------------- */ if ( $type == 'address' || $type == 'team') { + $this->ttsmod = 'U'; + $this->ttsitem = 'byprj'; + if ($type == 'team' && $this->cutby == 'user') { + $this->ttsitem = 'byusr'; + } + $users = array(); if ($type == 'address') { $users[$this->ref->id] = &$this->ref; - /* teams who is member */ - team::obj_read($this->ref); - $this->team = array('name' => $this->ref->getFullName(), - 'id' => $this->ref->id, - 'type' => $type, - 'count' => 0, - 'list' => array()); - foreach ($this->ref->teamlist as $tid => $team) { - $this->team['list'][] = array('id' => $tid, - 'name' => $team, - 'type' => 'team' - ); - $this->team['count'] = count($this->team['list']); - } - usort($this->team['list'], 'cmpName'); - } else { $this->ref->read_member(); $users = &$this->ref->member; - /* members of team */ - $this->team = array('name' => $this->ref->name, - 'id' => $this->ref->id, - 'type' => $type, - 'count' => 0, - 'list' => array()); - foreach ($users as $uid => $user) { - $this->team['list'][] = array('id' => $uid, - 'name' => $user->getFullName(), - 'type' => $user->getType() - ); - $this->team['count'] = count($this->team['list']); - } - usort($this->team['list'], 'cmpName'); } - $this->utts = $this->getUsersTT($users); + $this->tts = $this->getUsersTT($users); - /* --- Timetrack by product --- */ - } else { - - - + /* --- Timetrack by product --- + ---------------------------- */ + } elseif ($type == 'product') { + $this->ttsmod = 'P'; + $this->ttsitem = 'byusr'; /* only in this cut item */ + + // read task for this product + task::obj_read($this->ref); + $tasks = &$this->ref->fulltasklist; + + // read bugs for this product + bug::obj_read($this->ref); + $pbugs = &$this->ref->list[usebugtracking]; + + // read bugs for each task + $tbugs = array(); + foreach ($tasks as $task) { + bug::obj_read($task); + foreach ($task->list[usebugtracking] as $bid => $bug) { + $tbugs[$bid] = $bug; + } + } + $this->tts = $this->getProductTT($tasks, $pbugs, $tbugs); } + + $this->prepareTeamList(); } } |
From: Gero K. <gok...@us...> - 2006-03-17 09:29:52
|
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv631 Modified Files: timetrack_new.php Log Message: small visual fixes Index: timetrack_new.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/timetrack_new.php,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- timetrack_new.php 22 Jan 2006 20:19:20 -0000 1.66 +++ timetrack_new.php 17 Mar 2006 09:29:35 -0000 1.67 @@ -53,9 +53,9 @@ $f->read_result($r,$a); $a++; echo $this->OverviewRowStart($line); - echo ' <td>'. $f->getLink() ."</td>"; - echo ' <td>'. $f->t_start->getDateTime() ."</td>"; - echo ' <td>'. $f->ref->getLink() ."</td>"; + echo ' <td>'. $f->getLink() ."</td>\n"; + echo ' <td>'. $f->t_start->getDateTime() ."</td>\n"; + echo ' <td>'. $f->ref->getLink() ."</td>\n"; echo ' <td>'. makelink("timetrack_new.php?mode=2&id=". $f->id,$lang['Modify'],$lang['TimetrackModify']) ."</td>"; echo ' <td>'. makelink("timetrack_finish.php?id=". $f->id,$lang['TTfinish'],$lang['TTfinish']) ."</td>"; echo $this->OverviewRowEnd($line++); @@ -74,21 +74,24 @@ echo ' '; echo "</th></tr>\n"; + if ( $this->obj->id > 0 ) { + echo '<tr><th colspan="6">'; + echo ' <td colspan="6" align="right">'. acl_link($this->obj) .'</td>'; + echo "\n</tr>\n"; $this->addHidden("id",$this->obj->id); } echo "<tr>\n"; echo $this->showfield($lang['TimetrackRef']); - echo " <td colspan=\"4\">\n"; + echo " <td colspan=\"5\">\n"; echo "<select id=\"lid\" name=\"lid\">\n"; foreach ($this->obj->plist as $i => $f) { - echo "<option value=\"". $i ."\"". ($i == $this->obj->ref->id ? ' selected="selected">* ':'>') . $lang[$f->getType()] .": ". myentities($f->getFullName()) ."</option>\n"; + echo '<option value="'. $i .'"'. ($i == $this->obj->ref->id ? ' selected="selected">* ':'>') . $lang[$f->getType()] .': '. myentities($f->getFullName()) ."</option>\n"; } echo "</select>\n"; echo " </td>\n"; - echo ' <td align="right">'. acl_link($this->obj) .'</td>'; - echo "\n</tr>\n"; + echo "</tr>\n"; echo "<tr>\n"; echo $this->showfieldc($lang['TimetrackWorker'],1,'w'); @@ -147,16 +150,16 @@ if (!isset($this->obj->ratelist) || (count($this->obj->ratelist) == 0) ) { echo "<tr>\n"; echo $this->showfieldc($lang['TTcph'],0,"cph"); - echo " <td colspan=\"1\"><input size=\"10\" maxlength=\"10\" id=\"cph\" name=\"cph\" value=\"". number_format($this->obj->cph,2,$lang['DecPoint'],$lang['ThousandPoint']) ."\" />\n"; + echo ' <td colspan="1"><input size="10" maxlength="10" id="cph" name="cph" value="'. number_format($this->obj->cph,2,$lang['DecPoint'],$lang['ThousandPoint']) ."\" />\n"; Currency_Select("currency",$this->obj->currency); echo "</td>\n"; echo $this->showfieldc($lang['TTState'],1,"state"); echo " <td colspan=\"1\"><select id=\"state\" name=\"state\">\n"; foreach($lang['TTStates'] as $s => $x) { - echo " <option value=\"". $s ."\"". ($this->obj->state == $s ? ' selected="selected"':'') .">". $lang['TTStates'][$s] ."</option>\n"; + echo ' <option value="'. $s .'"'. ($this->obj->state == $s ? ' selected="selected"':'') .">". $lang['TTStates'][$s] ."</option>\n"; } echo "</select></td>\n"; - echo " <td colspan=\"2\"> </td>\n"; + echo " <td colspan=\"2\"> </td>\n"; echo "</tr>\n"; } |
From: Gero K. <gok...@us...> - 2006-03-17 07:16:19
|
Update of /cvsroot/tutos/tutos/php/mailbox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1211/mailbox Modified Files: mailbox.pinc Log Message: fix Index: mailbox.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/mailbox/mailbox.pinc,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- mailbox.pinc 2 Jan 2006 08:36:26 -0000 1.23 +++ mailbox.pinc 17 Mar 2006 07:16:13 -0000 1.24 @@ -635,6 +635,7 @@ if (! is_object($obj) ) return; if ( ! $obj->mod_ok() ) return; + if ( $obj->id == -1 ) return; if ( ! $user->feature_ok(usemailboxes,PERM_NEW) ) return; $x = array( url => "mailbox/mailbox_new.php?parent=". $obj->id, |
Update of /cvsroot/tutos/tutos/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4688/php Modified Files: Tag: BRANCH-2-0 address_show.php mytutos.php team_show.php webelements.p3 Added Files: Tag: BRANCH-2-0 minical2.php timetrack_synthesis.php Log Message: - add TimeTrack Synthesis --- NEW FILE: minical2.php --- <?php /*-----------------*/ /*Calendrier pop up*/ /*-----------------*/ include_once 'webelements.p3'; include_once 'permission.p3'; include_once 'layout/layout.pinc'; /* Check if user is allowed to use it */ check_user(); session_write_close(); function calcul_joursferies($date) { //Recup de l'annee $splitDate = split("-",$date); $year = $splitDate[2]; //On force le format \340 YYYY $year = date("Y",mkTime(0,0,0,01,01,$year)); $dateCompare = $splitDate[0] . "-" . $splitDate[1] . "-" .$year; $jf1 = $year-1900; $jf2 = $jf1%19; $jf3 = intval((7*$jf2+1)/19); $jf4 = (11*$jf2+4-$jf3)%29; $jf5 = intval($jf1/4); $jf6 = ($jf1+$jf5+31-$jf4)%7; $jfj = 25-$jf4-$jf6; $jfm = 4; if ($jfj <= 0) { $jfm = 3; $jfj = $jfj + 31; } $jourDeLan = "01-01-" . $year; $paques = (($jfm < 10) ? "0".$jfm : $jfm)."/".(($jfj < 10) ? "0".$jfj : $jfj); $lundiDePaques = date("d-m-Y",mktime(12,0,0,$jfm,$jfj+1,$year)); $feteDuTravail = "01-05-" . $year; $victoire1945 = "08-05-" . $year; $ascension = date("d-m-Y",mktime(12,0,0,$jfm,$jfj+39,$year)); $lundiPentecote = date("d-m-Y",mktime(12,0,0,$jfm,$jfj+50,$year)); $feteNationale = "14-07-" . $year; $assomption = "15-08-" . $year; $toussaint = "01-11-" . $year; $armistice = "11-11-" . $year; $noel = "25-12-" . $year; $JourFerie = Array($jourDeLan, $lundiDePaques, $feteDuTravail, $victoire1945, $ascension, $lundiPentecote, $feteNationale, $assomption, $toussaint, $armistice, $noel); return in_array($dateCompare,$JourFerie); } function premier_jour_du_mois($argMois,$argAnnee) { $intPremierJour = date("w",mktime(0,0,0,$argMois,1,$argAnnee)); if($intPremierJour == 0) $intPremierJour = 7; // si c'est un dimanche return $intPremierJour; } function nb_jours_dans_mois($argMois,$argAnnee) { // par defaut, le mois comporte 31 jours $nb = 31; // si c'est un mois avant aout et qu'il est pair, on enleve 1 if ($argMois < 8 and !($argMois % 2) and $argMois != 2) $nb --; // sinon, si c'est un mois superieur a aout, et qu'il est impair, on enleve 1 elseif ($argMois > 8 and ($argMois % 2)) $nb --; // sinon, si c'est fvrier, on enleve 2 // et encore 1 si c'est une annee bisextile elseif ($argMois == 2) { if ((($argAnnee % 4 == 0) && ($argAnnee % 100 != 0)) || ($argAnnee % 400 == 0)) { $nb = 29; } else { $nb = 28; } } return $nb; } function main (&$l) { $annee = $_REQUEST['annee']; $mois = $_REQUEST['mois']; $jour = $_REQUEST['jour']; $aryDateMaintenant = explode("-",date("d-m-Y")); if(empty($annee)) $annee = $aryDateMaintenant[2]; if(empty($mois)) $mois = $aryDateMaintenant[1]; if(empty($jour)) $jour = $aryDateMaintenant[0]; // INITIALISATIONS $intPremierJour = premier_jour_du_mois($mois,$annee); $intNbJoursDansMois = nb_jours_dans_mois($mois,$annee); $aryMois = array(1=>"Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"); $url_previous = ''; $url_next = ''; if(intval($mois) == 1) { $url_previous ="$PHP_SELF?annee=".($annee - 1)."&mois=12&jour=$jour"; } else { $url_previous ="$PHP_SELF?annee=$annee&mois=".($mois - 1)."&jour=$jour"; } if(intval($mois) == 12) { $url_next ="$PHP_SELF?annee=".($annee + 1)."&mois=1&jour=$jour"; } else { $url_next ="$PHP_SELF?annee=$annee&mois=".($mois + 1)."&jour=$jour"; } $table_cal = array(); for( $i = 1; $i < $intPremierJour ; $i ++) array_push($table_cal, array('type' => '', 'val' => '', 'link' => '')); $j = $intPremierJour; for( $i = 1 ; $i <= $intNbJoursDansMois ; $i ++ ) { $selectDate = date("Y-m-d",mktime(0,0,0,$mois,$i,$annee)); if (calcul_joursferies(date("d-m-Y",mktime(0,0,0,$mois,$i,$annee)))) array_push($table_cal, array('type' => 'JF', 'val' => $i, 'link' => $selectDate)); elseif (date("d") == $i && date("m") == $mois && date("Y") == $annee) array_push($table_cal, array('type' => 'TODAY', 'val' => $i, 'link' => $selectDate)); else array_push($table_cal, array('type' => 'DAY', 'val' => $i, 'link' => $selectDate)); // dernier jour de la semaine if($j == 7) { // on change de ligne if($i < $intNbJoursDansMois) { $j = 1; } // sinon on avance d'un jour dans la semaine... } else { $j ++; } } // il reste a affiche les jours vides restant if ($j != 7) { for( $i = $j ; $i <= 7 ; $i ++) array_push($table_cal, array('type' => '', 'val' => '', 'link' => '')); } //$page = new staud_smarty; $l->assign("url_previous", $url_previous); $l->assign("url_next", $url_next); $l->assign("month_name", $aryMois[intval($mois)]." $annee"); $l->assign("table_cal", $table_cal); $l->template('minical2'); } $l = new layout($current_user); main($l); ?> --- NEW FILE: timetrack_synthesis.php --- <?php /** * CVS Info: $Id: timetrack_synthesis.php,v 1.1.2.1 2006/03/09 14:59:05 edeweerdt Exp $ * $Author: edeweerdt $ * * an synthesis of all booked times * * @modulegroup timetrack * @module timetrack_synthesis * @package timetrack */ include_once 'webelements.p3'; include_once 'permission.p3'; include_once 'timetrack.pinc'; include_once 'layout/layout.pinc'; /* Check if user is allowed to use it */ check_user(); loadmodules('timetrack','synthesis'); function cmpName($a, $b){ return strcmp($a['name'], $b['name']); } function isDateOk ($date) { if ($date && preg_match("/^\d{4}-\d{2}-\d{2}$/", $date)) { list ($y,$m,$d) = split ("-",$date); return checkDate($m,$d,$y); } return false; } function firstDayOfWeek($timestamp) { // $result = $timestamp; // strtotime("last Monday",$timestamp) // $day = getDate($timestamp); // $wday = $day['wday']; // if ($wday == 0) // $wday = 7; // $result -= ($wday - 1) * 86400; $result = strtotime("last Monday",$timestamp); return zeroHour($result); } function lastDayOfWeek($timestamp) { // $result = $timestamp; // $day = getDate($timestamp); // $wday = $day['wday']; // if ($wday == 0) // $wday = 7; // $result += (7 - $wday) * 86400; $result = strtotime("next Sunday",$timestamp); return zeroHour($result); } function zeroHour($timestamp) { $day = getDate($timestamp); return mktime(0, 0, 0, $day['mon'], $day['mday'], $day['year']); } /** * show a synthesis of timetracks */ class timetrack_synthesis extends layout { var $ref; var $name; var $startDate; var $endDate; var $histoDiv; var $formHistoDiv; var $utts = null; var $ptts = null; var $team = null; var $presetPeriod; var $order; /** * display the info */ Function info() { global $lang,$tutos; $this->assign('lang', &$lang); $this->assign('action', "timetrack_synthesis.php"); $this->assign('ref', array('id' => $this->ref->id, 'name' => $this->ref->getFullName() )); $this->assign('date', array('title' => $lang['Period'], 'from' => $lang['StartDate'], 'to' => $lang['EndDate'], 'submit'=> $lang['show'], 'start' => $this->startDate, 'end' => $this->endDate, 'histoDiv' => $this->formHistoDiv )); $this->assign('presetPeriod', $this->presetPeriod); $this->assign('order', $this->order); if (isset($this->utts)) { $this->manageUTTS(); $this->assign('utts', $this->utts); if (isset($this->team)) { $this->assign('teamlinks', $this->team); } } elseif (isset($this->ptts)) { $this->assign('ptts', $this->ptts); } $this->template('timetrack_synthesis'); //$this->debug($this->utts); } /** * action */ Function action() { } /** * navigate */ Function navigate() { global $tutos, $lang, $current_user; $this->menu_categories['obj'] = array('label' => $lang['Timetrack'], 'icon' => 'timetrack'); if ($this->ref->getType() == 'address') { $x = array('url' => "address_show.php?id=".$this->ref->id, 'text' => $lang['AddressDetail'], 'info' => $lang['AddressDetail'].": ".$this->ref->getFullName(), 'image' => 'user', 'category' => array("obj") ); $this->addMenu($x); $x = array('url' => "mytutos.php?adr=".$this->ref->id, 'text' => $this->ref->getFullName(), 'info' => sprintf($lang['PersonalPageFor'], $this->ref->getFullName()), 'image' => 'user', 'category' => array("obj") ); $this->addMenu($x); } elseif ($this->ref->getType() == 'team') { $x = array('url' => "team_show.php?id=".$this->ref->id, 'text' => $lang['TeamDetail'], 'info' => $lang['TeamDetail'].": ".$this->ref->getFullName(), 'image' => 'teams', 'category' => array("obj") ); $this->addMenu($x); } elseif ($this->ref->getType() == 'product') { $x = array('url' => "product_show.php?id=".$this->ref->id, 'text' => $lang['ProductsOverview'], 'info' => sprintf($lang['ProdLinkInfo'], $this->ref->getFullName()), 'image' => 'projects', 'category' => array("obj") ); $this->addMenu($x); } $x = array('url' => "task_overview.php?id=".$this->ref->id, 'text' => $lang['TaskOverview'], 'info' => sprintf($lang['TaskOverviewInfo'], $this->ref->getFullName()), 'image' => 'task_overview', 'category' => array("obj") ); $this->addMenu($x); $x = array('url' => "timetrack_overview.php?worker=".$this->ref->id, 'text' => $lang['TimetrackOverview'], 'info' => sprintf($lang['TimetrackBookedI'],$this->ref->getFullName()), 'image' => 'timetrack', 'category' => array("obj") ); $this->addMenu($x); $x = array('url' => "timetrack_synthesis.php?format=paper&id=".$this->ref->id. "&startDate=".strftime("%Y-%m-%d",$this->startDate). "&endDate=".strftime("%Y-%m-%d",$this->endDate). "&histoDiv=".$this->formHistoDiv, 'text' => $lang['Printable'], 'image' => 'format', 'info' => $lang['PrintableInfo'], 'category' => array("obj", "Timetrack_synthesis")); $this->addMenu($x); } Function userTTList(&$user) { if ( ! isset($user->id) ) return; $sd = strftime("%Y-%m-%d %T", $this->startDate); $ed = strftime("%Y-%m-%d %T", $this->endDate); $user->uttlist = array(); $q = "SELECT * FROM ". $user->dbconn->prefix ."timetrack WHERE adr_id = ". $user->id; $q .= " AND vtime >= '$sd'"; $q .= " AND vtime <= '$ed'"; $r = $user->dbconn->Exec($q); $n = $r->numrows(); $a = 0; while ($a < $n) { $tt = new timetrack($user->dbconn); $tt->read_result($r,$a); if ( $tt->see_ok() ) { $user->uttlist[$tt->id] = &$tt; } $a++; unset($tt); } $r->free(); return; } Function cumulByPrj(&$ttsum, $type, $prj, $vol, $day){ global $lang; if (!isset($ttsum['byprj'])) { $ttsum['byprj'] = array(); } if (!isset($ttsum['byprj'][$prj->id])) { $ttsum['byprj'][$prj->id] = array('id' => $prj->id, 'name' => $prj->getFullName(), 'task' => array('name' => $lang['Tasks']), 'proj' => array('name' => $lang['Projects']), 'bug' => array('name' => $lang['Bugs']), 'total' => array('name' => $lang['TTtotal']), 'histo' => $this->initHisto() ); } $this->subCumul($ttsum['byprj'][$prj->id][$type], 'hour', $vol); $this->subCumul($ttsum['byprj'][$prj->id]['total'], 'hour', $vol); $this->subCumulHisto($ttsum['byprj'][$prj->id]['histo'], $type, 'hour', $vol, $day); } Function cumulByTyp(&$ttsum, $type, $vol, $day){ global $lang; if (!isset($ttsum['bytyp'])) { $ttsum['bytyp'] = array('task' => array('name' => $lang['Tasks']), 'proj' => array('name' => $lang['Projects']), 'bug' => array('name' => $lang['Bugs']), 'user' => array('name' => $lang['Users']), 'total' => array('name' => $lang['TTtotal'], 'histo' => $this->initHisto() ) ); } $this->subCumul($ttsum['bytyp'][$type], 'hour', $vol); $this->subCumul($ttsum['bytyp']['total'], 'hour', $vol); $this->subCumulHisto($ttsum['bytyp']['total']['histo'], $type, 'hour', $vol, $day); } Function subCumul(&$elt, $key, $vol) { if (!isset($elt[$key])) { $elt[$key] = 0; } $elt[$key] += $vol; } Function initHisto() { global $lang; $histo = array(); for ($d = $this->startDate ; $d <= $this->endDate ; $d += 24 * 3600) { $libday; $keyDay = $this->getHistoKeyDay($d, $libday); if ( !isset($histo[$keyDay]) ) { $histo[$keyDay] = array('lib' => $libday, 'task' => array('name' => $lang['Tasks']), 'proj' => array('name' => $lang['Projects']), 'bug' => array('name' => $lang['Bugs']), 'user' => array('name' => $lang['Users']), 'total' => array('name' => $lang['TTtotal']) ); } } return $histo; } Function subCumulHisto(&$elt, $type, $key, $vol, $day) { $keyDay = $this->getHistoKeyDay($day->getTimestamp()); $this->subCumul($elt[$keyDay][$type], $key, $vol); $this->subCumul($elt[$keyDay]['total'], $key, $vol); } Function getHistoKeyDay($tsday, &$lib) { $keyDay; if ($this->histoDiv == 'D') { $keyDay = strftime("%Y-%m-%d", $tsday); $lib = strftime("%d %b %Y", $tsday); } elseif ($this->histoDiv == 'W') { $monday = firstDayOfWeek($tsday); $keyDay = strftime("%Y-%m-%d", $monday); $lib = strftime("%d %b %Y", $monday); } else { $keyDay = strftime("%Y-%m", $tsday); $lib = strftime("%b %Y", $tsday); } return $keyDay; } Function getUsersTT(&$users) { error_log ("getUsersTT"); $ttsum = array(); foreach ($users as $user) { $this->userTTList($user); //error_log ("user ".$user.id." task count: ".count($user->uttlist)); /* read each timetrack for each users */ foreach ($user->uttlist as $tt) { /* sum classification by reference type */ switch ($tt->ref->getType()) { case 'task': //error_log("task timetrack"); $ptasks = array(); $prj = $tt->ref->getProject($ptasks); $this->cumulByPrj($ttsum, 'task', $prj, $tt->volume, $tt->wday); $this->cumulByTyp($ttsum, 'task', $tt->volume, $tt->wday); break; case 'product': //error_log("product timetrack"); $prj = $tt->ref; $this->cumulByPrj($ttsum, 'proj', $prj, $tt->volume, $tt->wday); $this->cumulByTyp($ttsum, 'proj', $tt->volume, $tt->wday); break; case 'bug': //error_log("bug timetrack"); $prj = null; $bug = &$tt->ref; if ($bug->parent->getType() == 'product') $prj = $bug->parent; elseif ($bug->parent->getType() == 'task') { $ptasks = array(); $prj = $bug->parent->getProject($ptasks); } if (isset($prj)) { $this->cumulByPrj($ttsum, 'bug', $prj, $tt->volume, $tt->wday); } $this->cumulByTyp($ttsum, 'bug', $tt->volume, $tt->wday); break; default: //error_log("other timetrack"); $this->cumulByTyp($ttsum, 'user', $tt->volume, $tt->wday); break; } } } return $ttsum; } Function manageHour2Scr(&$elt, $max) { foreach (array('proj', 'task', 'bug', 'user', 'total') as $key) { if ( isset($elt[$key]) ) $elt[$key]['scr'] = round($elt[$key]['hour'] / $max * 100, 1); } } Function manageHour2Pcent(&$elt, $total) { foreach (array('proj', 'task', 'bug', 'user', 'total') as $key) { if ( isset($elt[$key]) ) $elt[$key]['pcent'] = round($elt[$key]['hour'] / $total * 100, 1); } } Function cmpPrj($a, $b) { $prja = $this->utts['byprj'][$a]; $prjb = $this->utts['byprj'][$b]; $namea = strtolower($prja['name']); $nameb = strtolower($prjb['name']); $suma = $prja['total']['hour']; $sumb = $prjb['total']['hour']; if ($this->order == 'AName') { if ($namea == $nameb) return 0; return ($namea > $nameb) ? 1 : -1; } elseif ($this->order == 'DName') { if ($namea == $nameb) return 0; return ($namea < $nameb) ? 1 : -1; } elseif ($this->order == 'ASum') { if ($suma == $sumb) return 0; return ($suma > $sumb) ? 1 : -1; } else { /* DSum */ if ($suma == $sumb) return 0; return ($suma < $sumb) ? 1 : -1; } } Function manageUTTS() { /* search for max total by project */ $max = 0; foreach (array_keys($this->utts['byprj']) as $pid) { if ($pid == 'total') continue; $ttprj = &$this->utts['byprj'][$pid]; if ($ttprj['total']['hour'] > $max) $max = $ttprj['total']['hour']; } /* compute pourcent value for projects */ foreach (array_keys($this->utts['byprj']) as $pid) { if ($pid == 'total') continue; $ttprj = &$this->utts['byprj'][$pid]; $this->manageHour2Scr($ttprj, $max); $this->manageHour2Pcent($ttprj, $this->utts['bytyp']['total']['hour']); /* compute histogram data for a project */ $hmax = 0; foreach (array_keys($ttprj['histo']) as $histoKey) { $hmax = max($hmax, $ttprj['histo'][$histoKey]['total']['hour']); } foreach (array_keys($ttprj['histo']) as $histoKey) { $ttprjhist = &$ttprj['histo'][$histoKey]; $this->manageHour2Scr($ttprjhist, $hmax); } ksort($ttprj['histo']); } uksort($this->utts['byprj'], array($this,'cmpPrj')); /* compute pourcent value for types */ $bytyp = &$this->utts['bytyp']; $tmax = max($bytyp['proj']['hour'], $bytyp['task']['hour'], $bytyp['bug']['hour'], $bytyp['user']['hour']); $this->manageHour2Scr($bytyp, $tmax); $this->manageHour2Pcent($bytyp, $bytyp['total']['hour']); /* compute histogram data for total */ $thmax = 0; foreach (array_keys($bytyp['total']['histo']) as $histoKey) { $thmax = max($thmax, $bytyp['total']['histo'][$histoKey]['total']['hour']); } foreach (array_keys($bytyp['total']['histo']) as $histoKey) { $tothist = &$bytyp['total']['histo'][$histoKey]; $this->manageHour2Scr($tothist, $thmax); } ksort($bytyp['total']['histo']); } Function preparePeriod (&$msg) { /* StartDate */ if ( isDateOk($_REQUEST['startDate']) ) { $this->startDate = strtotime($_REQUEST['startDate']); } else { $this->startDate = firstDayOfWeek(time()); } /* EndDate */ if ( isDateOk($_REQUEST['endDate']) ) { $this->endDate = strtotime($_REQUEST['endDate']); } else { $this->endDate = lastDayOfWeek(time()); if ($this->endDate < $this->startDate) $this->endDate = $this->startDate; } if (!$this->startDate || !$this->endDate) { $msg .= "pb de sélection de date"; return false; } $this->endDate += (24 * 3600) - 1; /* 23h59mn59s */ if ($this->endDate < $this->startDate) { $msg .= "PB de cohérence de dates"; return false; } /* HistoDiv */ $this->formHistoDiv = 'A'; // automatic if ( isset($_REQUEST['histoDiv']) ) { $div = $_REQUEST['histoDiv']; if ($div == 'D' || $div == 'W' || $div == 'M' || $div == 'A') { $this->formHistoDiv = $_REQUEST['histoDiv']; } else { $msg .= "Périodicité d'histogramme incorrect"; return false; } } $nb_days = ($this->endDate - $this->startDate) / 86400; $nb_week = $nb_days / 7; error_log ("PERIOD OF $nb_days DAYS, $nb_week WEEK, $nb_month MONTH"); if ($this->formHistoDiv == 'A') { if ($nb_days <= 31) { $this->histoDiv = 'D'; } elseif ($nb_week <= 26) { $this->histoDiv = 'W'; } else { $this->histoDiv = 'M'; } } else { if ($this->formHistoDiv == 'D' && $nb_days > 31) $this->formHistoDiv = 'W'; if ($this->formHistoDiv == 'W' && $nb_week > 26) $this->formHistoDiv = 'M'; $this->histoDiv = $this->formHistoDiv; } return true; } Function preparePresetPeriod() { global $lang; /* This Week */ $x = array('name' => $lang['TTPeriodThisWeek'], 'start' => firstDayOfWeek(time()), 'end' => lastDayOfWeek(time()), 'title' => "" ); $this->presetPeriod[] = $x; /* Last Week */ $x = array('name' => $lang['TTPeriodLastWeek'], 'start' => firstDayOfWeek(strtotime("-7 days")), 'end' => lastDayOfWeek(strtotime("-7 days")), 'title' => "" ); $this->presetPeriod[] = $x; /* Last 7 days */ $x = array('name' => $lang['TTPeriod7Days'], 'start' => strtotime("-7 days"), 'end' => strtotime("-1 day"), 'title' => "" ); $this->presetPeriod[] = $x; $d = getdate(); /* This Month */ $x = array('name' => $lang['TTPeriodThisMonth'], 'start' => strtotime("-".($d['mday']-1)." days"), 'end' => strtotime("-".$d['mday']." days +1month"), 'title' => "" ); $this->presetPeriod[] = $x; /* Last Month */ $x = array('name' => $lang['TTPeriodLastMonth'], 'start' => strtotime("-".($d['mday']-1)." days -1 month"), 'end' => strtotime("-".$d['mday']." days"), 'title' => "" ); $this->presetPeriod[] = $x; } /** * prepare */ Function prepare() { global $msg,$tutos,$lang,$current_user; /* --- reference --- */ if ( isset($_REQUEST['id']) ) { $obj = getObject($this->dbconn, $_REQUEST['id']); error_log("ID is ".$obj->id); if (!isset($obj) || ($obj->getType() != 'address' && $obj->getType() != 'team' && $obj->getType() != 'product')) { $msg .= $lang['Err0048']; $this->stop = true; return; } else { $this->ref = $obj; } } else { $this->ref = &$current_user; } $this->name = $lang['TimetrackSynthesis'].": ".$this->ref->getFullName(); /* --- Date Select --- */ if ( !$this->preparePeriod($msg) ) { $this->stop = true; return; } $this->preparePresetPeriod(); /* --- Order Choice --- */ if ( isset($_REQUEST['order']) ) { $this->order = $_REQUEST['order']; } else { $this->order = 'DSum'; } $type = $this->ref->getType(); /* --- Timetrack by user(s) --- */ if ( $type == 'address' || $type == 'team') { $users = array(); if ($type == 'address') { $users[$this->ref->id] = &$this->ref; /* teams who is member */ team::obj_read($this->ref); $this->team = array('name' => $this->ref->getFullName(), 'id' => $this->ref->id, 'type' => $type, 'count' => 0, 'list' => array()); foreach ($this->ref->teamlist as $tid => $team) { $this->team['list'][] = array('id' => $tid, 'name' => $team, 'type' => 'team' ); $this->team['count'] = count($this->team['list']); } usort($this->team['list'], 'cmpName'); } else { $this->ref->read_member(); $users = &$this->ref->member; /* members of team */ $this->team = array('name' => $this->ref->name, 'id' => $this->ref->id, 'type' => $type, 'count' => 0, 'list' => array()); foreach ($users as $uid => $user) { $this->team['list'][] = array('id' => $uid, 'name' => $user->getFullName(), 'type' => $user->getType() ); $this->team['count'] = count($this->team['list']); } usort($this->team['list'], 'cmpName'); } $this->utts = $this->getUsersTT($users); /* --- Timetrack by product --- */ } else { } } } $l = new timetrack_synthesis($current_user); $l->display(); $dbconn->Close(); ?> Index: address_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/address_show.php,v retrieving revision 1.85.2.11 retrieving revision 1.85.2.12 diff -u -r1.85.2.11 -r1.85.2.12 --- address_show.php 20 May 2005 15:17:43 -0000 1.85.2.11 +++ address_show.php 9 Mar 2006 14:59:05 -0000 1.85.2.12 @@ -346,6 +346,17 @@ ); $this->addMenu($x); } + if ( $this->user->feature_ok(usetimetrack,PERM_SEE) ) { + $x = array('url' => + "timetrack_synthesis.php?id=".$this->obj->id, + 'text' => $lang['TimetrackSynthesis'], + 'image' => 'timetrack', + 'info' => sprintf($lang['TimetrackSynthesisI'], + $this->obj->getFullName()), + 'category' => array("timetrack", "task", "module") + ); + $this->addMenu($x); + } if ( $this->user->feature_ok(usetaskmanagement, PERM_SEE) && $this->user->feature_ok(usecalendar,PERM_SEE) ) { Index: mytutos.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/mytutos.php,v retrieving revision 1.84.2.27 retrieving revision 1.84.2.28 diff -u -r1.84.2.27 -r1.84.2.28 --- mytutos.php 19 Jan 2006 18:09:18 -0000 1.84.2.27 +++ mytutos.php 9 Mar 2006 14:59:05 -0000 1.84.2.28 @@ -121,6 +121,17 @@ ); $this->addMenu($x); } + if ( $this->user->feature_ok(usetimetrack,PERM_SEE) ) { + $x = array('url' => + "timetrack_synthesis.php?id=".$this->adr->id, + 'text' => $lang['TimetrackSynthesis'], + 'image' => 'timetrack', + 'info' => sprintf($lang['TimetrackSynthesisI'], + $this->adr->getFullName()), + 'category' => array("mytutos", "obj") + ); + $this->addMenu($x); + } if ( $this->adr->mod_ok() ) { $x = array('url' => "user_new.php?id=".$this->adr->id, Index: team_show.php =================================================================== RCS file: /cvsroot/tutos/tutos/php/team_show.php,v retrieving revision 1.51.2.5 retrieving revision 1.51.2.6 diff -u -r1.51.2.5 -r1.51.2.6 --- team_show.php 23 May 2005 16:00:01 -0000 1.51.2.5 +++ team_show.php 9 Mar 2006 14:59:05 -0000 1.51.2.6 @@ -172,13 +172,22 @@ if ( ($this->obj->id > 0) && $this->user->feature_ok(usetimetrack,PERM_SEE) ) { $x = array('url' => "timetrack_overview.php?worker=".$this->obj->id, - 'text' => $lang['TimetrackBooked'], + 'text' => $lang['TimetrackOverview'], 'info' => sprintf($lang['TimetrackBookedI'], $this->obj->getFullName()), 'image' => 'timetrack', - 'category' => array("timetrack","module") + 'category' => array("task","module") ); $this->addMenu($x); + $x = array('url' => + "timetrack_synthesis.php?id=".$this->obj->id, + 'text' => $lang['TimetrackSynthesis'], + 'image' => 'timetrack', + 'info' => sprintf($lang['TimetrackSynthesisI'], + $this->obj->getFullName()), + 'category' => array("task", "module") + ); + $this->addMenu($x); } if ( ($this->obj->id > 0) && $this->user->feature_ok(usetaskmanagement,PERM_SEE) ) { Index: webelements.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/webelements.p3,v retrieving revision 1.243.2.9 retrieving revision 1.243.2.10 diff -u -r1.243.2.9 -r1.243.2.10 --- webelements.p3 5 Jan 2006 11:09:20 -0000 1.243.2.9 +++ webelements.p3 9 Mar 2006 14:59:05 -0000 1.243.2.10 @@ -378,11 +378,11 @@ $b = eregi_replace("(<BR>)","<br>",$b); $b = eregi_replace("<([BIU])>","<\\1>",$b); $b = eregi_replace("</([BIU])>","</\\1>",$b); - $b = eregi_replace("(ftp://[a-z,0-9:/?&=_.+-]*)","<a href=\"\\1\" target=\"_blank\">\\1</a>",$b); - $b = eregi_replace("(file:/[a-z,0-9:/?&=_.+-]*)","<a href=\"\\1\" target=\"_blank\">\\1</a>",$b); - $b = eregi_replace("(http://[a-z,0-9:/?&=_.+-]*)","<a href=\"\\1\" target=\"_blank\">\\1</a>",$b); - $b = eregi_replace("(https://[a-z,0-9:/?&=_.+-]*)","<a href=\"\\1\" target=\"_blank\">\\1</a>",$b); - $b = eregi_replace("(mailto:[a-z,0-9:/?&=_.@-]*)","<a href=\"\\1\">\\1</a>",$b); + $b = eregi_replace("(ftp://[a-z,0-9:/?&%=_.+-]*)","<a href=\"\\1\" target=\"_blank\">\\1</a>",$b); + $b = eregi_replace("(file:/[a-z,0-9:/?&%=_.+-]*)","<a href=\"\\1\" target=\"_blank\">\\1</a>",$b); + $b = eregi_replace("(http://[a-z,0-9:/?&%=_.+-]*)","<a href=\"\\1\" target=\"_blank\">\\1</a>",$b); + $b = eregi_replace("(https://[a-z,0-9:/?&%=_.+-]*)","<a href=\"\\1\" target=\"_blank\">\\1</a>",$b); + $b = eregi_replace("(mailto:[a-z,0-9:/?&%=_.@-]*)","<a href=\"\\1\">\\1</a>",$b); return $b; } |
From: Emmanuel D. <ede...@us...> - 2006-03-09 14:59:10
|
Update of /cvsroot/tutos/tutos/templates/classic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4688/templates/classic Added Files: Tag: BRANCH-2-0 minical2.tpl timetrack_synthesis.tpl Log Message: - add TimeTrack Synthesis --- NEW FILE: minical2.tpl --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "" rel="nofollow">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="" rel="nofollow">http://www.w3.org/1999/xhtml"> <head> <title>Calendrier</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> {literal} <style type="text/css" media="screen"> <!-- html body { background-color: transparent; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; } table { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; width: 135px; } .mainTable { border-collapse: collapse; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; border: 1px solid #505050; width: 135px; background-color: #e4e4e4; } a { text-decoration: none; color: #526d9c; } .fond { background-color:#d4d4d4; text-align: center; font-weight: bold; margin: 0; padding: 0; } .jours { background-color:#f4f4f4; text-align: center; font-weight: bold; } .other { text-align:center; } .now { border: 1px dashed #848484; text-align: center; background: #90EE90; font-weight: bold; } .joursWE { background: silver; /*border: 1px solid black;*/ text-align: center; } .joursFeries { background: silver; /*border: 1px solid black;*/ text-align: center; font-weight: bold; } .joursFeries a { color: #526d9c; } --> </style> <script type="text/javascript"> function hideCalendar() { this.frameElement.style.display = 'none'; // this.frameElement.src = 'minical2.php'; } function setDate(selectDate) { this.frameElement.calField.value=selectDate; hideCalendar(); } </script> {/literal} </head> <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0"> <table class="mainTable"> <tr> <td colspan="7" class="fond"> <table> <tr> <td align="center"> <a href="{$url_previous}">< </a> <b>{$month_name}</b> <a href="{$url_next}"> > </a> </td> <td align="right"> <a href="javascript:hideCalendar();"><font color="red"><b>X</b></font></a> </td> </tr> </table> </td> </tr> <tr class="jours"> <td>L</td> <td>M</td> <td>M</td> <td>J</td> <td>V</td> <td>S</td> <td>D</td> </tr> {strip} {foreach item=day from=$table_cal} {cycle assign=week values="1,2,3,4,5,6,7" print=false} {if $week == 1} <tr> {/if} {if $day.type eq "JF"} <td class="joursFeries"><a href="javascript:setDate('{$day.link}');" title="Férié">{$day.val}</a></td> {elseif $day.type eq "TODAY"} <td class="now"><a href="javascript:setDate('{$day.link}');" title="Aujourd'hui">{$day.val}</a></td> {elseif $day.type eq "DAY"} {if $week >= 6} <td class="joursWE"> {else} <td class="other"> {/if} <a href="javascript:setDate('{$day.link}');">{$day.val}</a></td> {else} <td> </td> {/if} {/foreach} {/strip} {if $week == 7} </tr> {/if} </table> </body> </html> --- NEW FILE: timetrack_synthesis.tpl --- {* Timetrack Synthesis *} {* $Id: timetrack_synthesis.tpl,v 1.1.2.1 2006/03/09 14:59:05 edeweerdt Exp $ *} <!-- timetrack synthesis start --> {literal} <script type="text/javascript" language="JavaScript"> <!-- function toggleDisplay(elt) { if ( elt.style.display != 'block') { elt.style.display = 'block'; } else { elt.style.display = 'none'; } } function showCalendar(field,frame) { frame.calField = field; frame.calFrame = frame; toggleDisplay(frame); } function presetDates(start,end) { document.actionform.startDate.value = start; document.actionform.endDate.value = end; } function setOrder(val) { document.actionform.order.value = val; document.actionform.submit(); } //--> </script> {/literal} <div> <form name="actionform" method="GET" action="{$action}"> <input type="hidden" name="id" value="{$ref.id}" /> <p class="ttsynt-title">{$lang.TimetrackSynthesis}: {$ref.name}</p> <table border="0" cellpadding="0" cellspacing="0" style="width:100%"> <tr> <td valign="top"> <!-- Team List Box --> {if $teamlinks} <table class="ttsynt-tb" border="0" cellpadding="0" cellspacing="0"> <thead> <tr> {if $teamlinks.type == 'team'} <th colspan="3">{$lang.Team}: {$teamlinks.name} ({$teamlinks.count} {$lang.Users})</th> {/if} {if $teamlinks.type == 'address'} <th colspan="3">{$lang.User}: {$teamlinks.name} ({$teamlinks.count} {$lang.Teams})</th> {/if} </tr> </thead> <tbody> <r> {foreach from=$teamlinks.list item=elt} {if $newline}<tr>{/if} {cycle assign=newline values="0,0,1"} <td> {if $elt.type == 'address'} <a href="address_show.php?id={$elt.id}" title="{$elt.name}"><img src="{$base}/html/classic/user.png" alt="user" /></a> {/if} {if $elt.type == 'team'} <a href="team_show.php?id={$elt.id}" title="{$elt.name}"><img src="{$base}/html/classic/teams.png" alt="team" /></a> {/if} <a href="timetrack_overview.php?worker={$elt.id}" title="{$lang.TimetrackOverview}: {$elt.name}"><img src="{$base}/html/classic/timetrack.png" alt="timetrack" /></a> <a href="timetrack_synthesis.php?id={$elt.id}&startDate={$date.start|date_format:"%Y-%m-%d"}&endDate={$date.end|date_format:"%Y-%m-%d"}&histoDiv={$date.histoDiv}" title="{$lang.TimetrackSynthesis}: {$elt.name}">{$elt.name}</a> </td> {if $newline}</tr>{/if} {/foreach} </tr> </tbody> </table> {/if} </td> <!-- Period Selector Box --> <td valign="top"> <table class="ttsynt-days" border="0" cellpadding="0" cellspacing="0" align="right"> <thead> <tr> <th colspan="4">{$date.title}</th> </tr> </thead> <tbody> <tr> <td>{$date.from}</td> <td><input type="text" name="startDate" size="10" maxlength="10" value="{$date.start|date_format:"%Y-%m-%d"}" /></td> <td> <img src="{$base}/html/classic/appointments.png" alt="" style="cursor: pointer;" title="{$lang.MiniCal2}" /> <iframe id="calStart" class="ttsynt-cal" src="minical2.php?{$date.start|date_format:"annee=%Y&mois=%m"}"></iframe> </td> <td rowspan="3" valign="top" align="center"> <p>{$lang.TTPeriodPreset}</p> {foreach from=$presetPeriod item=preset} <p><a style="cursor: pointer;" %Y-%m-%d"}','{$preset.end|date_format:"%Y-%m-%d"}');" title="{$preset.title}">{$preset.name}</a></p> {/foreach} </td> </tr> <tr> <td>{$date.to}</td> <td><input type="text" name="endDate" size="10" maxlength="10" value="{$date.end|date_format:"%Y-%m-%d"}" /></td> <td> <img src="{$base}/html/classic/appointments.png" alt="" style="cursor: pointer;" title="{$lang.MiniCal2}" /> <iframe id="calEnd" class="ttsynt-cal" src="minical2.php?{$date.end|date_format:"annee=%Y&mois=%m"}"></iframe> </td> </tr> <tr> <td>{$lang.TTHistoPrecision}</td> <td colspan="2" nowrap> <input type="radio" name="histoDiv" value="D" {if $date.histoDiv == 'D'}checked="checked"{/if} />{$lang.TTHistoBy.D}<br /> <input type="radio" name="histoDiv" value="W" {if $date.histoDiv == 'W'}checked="checked"{/if} />{$lang.TTHistoBy.W}<br /> <input type="radio" name="histoDiv" value="M" {if $date.histoDiv == 'M'}checked="checked"{/if} />{$lang.TTHistoBy.M}<br /> <input type="radio" name="histoDiv" value="A" {if $date.histoDiv == 'A'}checked="checked"{/if} />{$lang.TTHistoBy.A}<br /> </td> </tr> <tr><td colspan="4" style="text-align:center;"><input type="submit" value="{$date.submit}" /></td></tr> </tbody> </table> </td> </tr> </table> <!-- User TimeTrack Synthesis --> {if $utts} <input type="hidden" name="order" value="{$order}" /> <table class="ttsynt-tb" border="0" cellpadding="0" cellspacing="0" style="width:100%;"> <thead> <tr> <th width="28%"> <a style="cursor:pointer;"> {if $order == 'AName'}<img src="{$base}/html/classic/no-up.png" title="{$lang.Order}" />{else} <img src="{$base}/html/classic/up.png" title="{$lang.Order}" />{/if}</a> <a style="cursor:pointer;"> {if $order == 'DName'}<img src="{$base}/html/classic/no-down.png" title="{$lang.RevOrder}" />{else} <img src="{$base}/html/classic/down.png" title="{$lang.RevOrder}" />{/if}</a> {$lang.Projects} </th> <th width="1%"></th> <th>{$lang.Timetracks}</th> <th width="15%" colspan="2"> <a style="cursor:pointer;"> {if $order == 'ASum'}<img src="{$base}/html/classic/no-up.png" title="{$lang.Order}" />{else} <img src="{$base}/html/classic/up.png" title="{$lang.Order}" />{/if}</a> <a style="cursor:pointer;"> {if $order == 'DSum'}<img src="{$base}/html/classic/no-down.png" title="{$lang.Order}" />{else} <img src="{$base}/html/classic/down.png" title="{$lang.Order}" />{/if}</a> {$lang.TTSum} </th> </tr> </thead> <tbody> {foreach from=$utts.byprj item=ttsum key=pid} {if $ttsum.total.hour > 0} <tr> <td class="ttsynt-proj"> <!-- Project Links --> <a href="product_show.php?id={$ttsum.id}" title="{$lang.Project}: {$ttsum.name}"> <img src="{$base}/html/classic/projects.png" alt="projects" /></a> <a href="task_overview.php?id={$ttsum.id}" title="{$lang.TaskOverview}: {$ttsum.name}"> <img src="{$base}/html/classic/task_overview.png" alt="task_overview" /></a> <a href="timetrack_synthesis.php?id={$ttsum.id}&startDate={$date.start|date_format:"%Y-%m-%d"}&endDate={$date.end|date_format:"%Y-%m-%d"}&histoDiv={$date.histoDiv}" title="{$lang.TimetrackSynthesis}: {$ttsum.name}">{$ttsum.name}</a> </td> <td> <!-- Project Histogram --> <img src="{$base}/html/classic/search.png" alt="zoom" style="cursor:pointer;" title="{$lang.TTHistogramPrj}" /> <div id="histo{$pid}" class="ttsynt-histo" > <p class="ttsynt-histo-title">{$ttsum.name}</p> <table border="0" cellpadding="0" cellspacing="0" class="ttsynt-tb-histo"> <tr> {foreach from=$ttsum.histo item=tthisto key=histodate} {math assign=rest equation="100 - t" t=$tthisto.total.scr} <td> {if $rest > 0}<div style="height:{$rest}%;" title="{$tthisto.lib}"></div>{/if} {if $tthisto.bug.scr} <div style="height:{$tthisto.bug.scr}%;" class="ttsynt-histo-bug" title="{$tthisto.lib} {$tthisto.bug.name}: {$tthisto.bug.hour}h"></div>{/if} {if $tthisto.proj.scr}<div style="height:{$tthisto.proj.scr}%;" class="ttsynt-histo-proj" title="{$tthisto.lib} {$tthisto.proj.name}: {$tthisto.proj.hour}h"></div>{/if} {if $tthisto.task.scr}<div style="height:{$tthisto.task.scr}%;" class="ttsynt-histo-task" title="{$tthisto.lib} {$tthisto.task.name}: {$tthisto.task.hour}h"></div>{/if} </td> {/foreach} </tr> <tr> {foreach from=$ttsum.histo item=tthisto key=histodate} <th>{$tthisto.lib}</th> {/foreach} </tr> </table> </div> </td> <td> <!-- Project Bar by Type --> <table class="ttsynt-bar" cellpadding="0" cellspacing="0" border="0"><tr> {if $ttsum.task.scr > 0} <td class="ttsynt-bar-task" style="width:{$ttsum.task.scr}%;" title="{$lang.Timetracks} {$lang.Tasks} {$ttsum.task.hour}h ({$ttsum.task.pcent}%)"></td> {/if} {if $ttsum.proj.scr > 0} <td class="ttsynt-bar-proj" style="width:{$ttsum.proj.scr}%;" title="{$lang.Timetracks} {$lang.Projects} {$ttsum.proj.hour}h ({$ttsum.proj.pcent}%)"></td> {/if} {if $ttsum.bug.scr > 0} <td class="ttsynt-bar-bug" style="width:{$ttsum.bug.scr}%;" title="{$lang.Timetracks} {$lang.Bugs} {$ttsum.bug.hour}h ({$ttsum.bug.pcent}%)"></td> {/if} {if $ttsum.total.scr < 100} <td class="ttsynt-bar-none"></td> {/if} </tr></table> </td> <td style="text-align:right;">{$ttsum.total.hour|default:"0"|string_format:"%.2f"}h</td> <td style="text-align:right;">{$ttsum.total.pcent|default:"0"|string_format:"%.1f"}%</td> </tr> {/if} {/foreach} </tbody> </table> <!-- Sum by Type --> <table class="ttsynt-tb" border="0" cellpadding="0" cellspacing="0" style="width:100%;"> <thead> <tr> <th width="15%">{$lang.TTSum} {$lang.Timetracks}</th> <th></th> <th width="12%" colspan="2"></th> </tr> </thead> <tbody> {foreach from=$utts.bytyp item=typval key=typkey} <tr> <td class="ttsynt-proj">{$typval.name}</td> {if $typkey == 'total'} <td> <!-- Total Histogram --> <img src="{$base}/html/classic/search.png" alt="zoom" style="cursor:pointer;" title="{$lang.TTHistogramPrj}" /> <div id="histotal" class="ttsynt-histo" > <p class="ttsynt-histo-title">{$typval.name}</p> <table border="0" cellpadding="0" cellspacing="0" class="ttsynt-tb-histo"> <tr> {foreach from=$typval.histo item=tthisto key=histodate} {math assign=rest equation="100 - t" t=$tthisto.total.scr} <td> {if $rest > 0}<div style="height:{$rest}%;" title="{$tthisto.lib}"></div>{/if} {if $tthisto.bug.scr} <div style="height:{$tthisto.bug.scr}%;" class="ttsynt-histo-bug" title="{$tthisto.lib} {$tthisto.bug.name}: {$tthisto.bug.hour}h"></div>{/if} {if $tthisto.proj.scr}<div style="height:{$tthisto.proj.scr}%;" class="ttsynt-histo-proj" title="{$tthisto.lib} {$tthisto.proj.name}: {$tthisto.proj.hour}h"></div>{/if} {if $tthisto.task.scr}<div style="height:{$tthisto.task.scr}%;" class="ttsynt-histo-task" title="{$tthisto.lib} {$tthisto.task.name}: {$tthisto.task.hour}h"></div>{/if} {if $tthisto.user.scr}<div style="height:{$tthisto.user.scr}%;" class="ttsynt-histo-user" title="{$tthisto.lib} {$tthisto.user.name}: {$tthisto.user.hour}h"></div>{/if} </td> {/foreach} </tr> <tr> {foreach from=$ttsum.histo item=tthisto key=histodate} <th>{$tthisto.lib}</th> {/foreach} </tr> </table> </div> </td> {else} <td> <table class="ttsynt-bar" cellpadding="0" cellspacing="0" border="0"><tr> {if $typval.scr > 0} <td class="ttsynt-bar-{$typkey}" style="width:{$typval.scr}%;" title="{$lang.Timetracks} {$typval.name} {$typval.hour}h"></td> {/if} {if $typval.scr < 100} <td class="ttsynt-bar-none"></td> {/if} </tr></table> </td> {/if} <td style="text-align:right;">{$typval.hour|default:"0"|string_format:"%.2f"}h</td> <td style="text-align:right;">{$typval.pcent|default:"0"|string_format:"%.1f"}%</td> </tr> {/foreach} </tbody> </table> {/if} </form> </div> <!-- timetrack synthesis stop --> |
From: Emmanuel D. <ede...@us...> - 2006-03-09 14:59:09
|
Update of /cvsroot/tutos/tutos/php/localization In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4688/php/localization Modified Files: Tag: BRANCH-2-0 fr.p3 Log Message: - add TimeTrack Synthesis Index: fr.p3 =================================================================== RCS file: /cvsroot/tutos/tutos/php/localization/fr.p3,v retrieving revision 1.40.2.31 retrieving revision 1.40.2.32 diff -u -r1.40.2.31 -r1.40.2.32 --- fr.p3 24 Nov 2005 15:01:41 -0000 1.40.2.31 +++ fr.p3 9 Mar 2006 14:59:05 -0000 1.40.2.32 @@ -627,6 +627,8 @@ $lang['TimetrackBetween'] = "Entre"; $lang['TimetrackBooked'] = "Mes activités"; $lang['TimetrackBookedI'] = "Journal d'activités de %s"; +$lang['TimetrackSynthesis'] = "Synthèse d'activités"; +$lang['TimetrackSynthesisI'] = "Synthèse d'activités de %s"; $lang['TTStatsTitle'] = "Statistiques"; $lang['TTcph'] = "Coût horaire"; $lang['TTState'] = "État"; @@ -637,6 +639,24 @@ $lang['TTStates'][4] = "Non facturable"; $lang['TTRecord'] = "Nouvel évènement (activité)"; $lang['TTfinish'] = "Fini"; +$lang['TTSum'] = "Cumul"; +$lang['TTtotal'] = "Total"; +$lang['MiniCal2'] = "Cliquez pour sélectionner une date"; +$lang['TTHistogramPrj'] = "Histogramme par Projet"; +$lang['TTHistoPrecision'] = "Précision histo"; +$lang['TTHistoBy']['D'] = "par jour"; +$lang['TTHistoBy']['W'] = "par semaine"; +$lang['TTHistoBy']['M'] = "par mois"; +$lang['TTHistoBy']['A'] = "automatique"; +$lang['TTPeriodPreset'] = "Présélections"; +$lang['TTPeriodThisWeek'] = "Semaine courante"; +$lang['TTPeriodLastWeek'] = "Semaine dernière"; +$lang['TTPeriod7Days'] = "7 derniers jours"; +$lang['TTPeriodThisMonth'] = "Mois courant"; +$lang['TTPeriodLastMonth'] = "Mois dernier"; +$lang['Order'] = "Tri croissant"; +$lang['RevOrder'] = "Tri décroissant"; + # Fax $lang['FaxCreate'] = "Nouveau FAX"; |
From: Emmanuel D. <ede...@us...> - 2006-03-09 14:58:09
|
Update of /cvsroot/tutos/tutos/html/classic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4036/html/classic Modified Files: Tag: BRANCH-2-0 style.css Log Message: - add TimeTrack Synthesis Index: style.css =================================================================== RCS file: /cvsroot/tutos/tutos/html/classic/Attic/style.css,v retrieving revision 1.1.2.39 retrieving revision 1.1.2.40 diff -u -r1.1.2.39 -r1.1.2.40 --- style.css 20 Sep 2005 12:47:35 -0000 1.1.2.39 +++ style.css 9 Mar 2006 14:57:58 -0000 1.1.2.40 @@ -1,3 +1,4 @@ + /* * Copyright 2002 by Antonio Romero * ant...@ma... @@ -8,27 +9,27 @@ * $Author$ * */ -img { - border: 0px; -} [...1664 lines suppressed...] + margin:0px; + font-weight:normal; + font-size:8px; + text-align:center; +} + +.ttsynt-histo-task { + background-color:#66CDAA; +} +.ttsynt-histo-proj { + background-color:#8080f0; +} +.ttsynt-histo-bug { + background-color:#f08080; +} +.ttsynt-histo-user { + background-color:#ffa07a; +} /* EOF */ \ No newline at end of file |