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
|
10
(3) |
11
|
12
(1) |
13
|
14
|
15
(3) |
16
(3) |
17
|
18
|
19
(2) |
20
|
21
(4) |
22
(1) |
23
(6) |
24
(10) |
25
|
26
(2) |
27
(6) |
28
(2) |
29
(4) |
30
(4) |
|
From: <gok...@us...> - 2011-09-30 14:35:04
|
Revision: 312 http://tutos.svn.sourceforge.net/tutos/?rev=312&view=rev Author: gokohnert Date: 2011-09-30 14:34:58 +0000 (Fri, 30 Sep 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/acl.pinc trunk/php/base.pinc Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2011-09-30 14:34:38 UTC (rev 311) +++ trunk/php/acl.pinc 2011-09-30 14:34:58 UTC (rev 312) @@ -247,7 +247,7 @@ if($tutos['memcache'] != null) { $memid = $obj->dbconn->db->systemid.'_acl'.$obj->id; - $tutos['memcache']->delete($memid); + $tutos['memcache']->delete($memid,0); } return $msg; Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2011-09-30 14:34:38 UTC (rev 311) +++ trunk/php/base.pinc 2011-09-30 14:34:58 UTC (rev 312) @@ -1184,7 +1184,7 @@ } if($tutos['memcache'] != null) { $memid = $this->dbconn->db->systemid.'_'.$this->id; - $tutos['memcache']->delete($memid); + $tutos['memcache']->delete($memid,0); } // save generic relations @@ -1278,7 +1278,7 @@ } if($tutos['memcache'] != null) { $memid = $this->dbconn->db->systemid.'_'.$this->id; - $tutos['memcache']->delete($memid); + $tutos['memcache']->delete($memid,0); } $msg .= $this->run_postdel_hook(); return $msg; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-30 14:34:44
|
Revision: 311 http://tutos.svn.sourceforge.net/tutos/?rev=311&view=rev Author: gokohnert Date: 2011-09-30 14:34:38 +0000 (Fri, 30 Sep 2011) Log Message: ----------- virtuell role for all project related people Modified Paths: -------------- trunk/php/bugtracking/bug.pinc trunk/php/product.pinc Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2011-09-30 14:33:26 UTC (rev 310) +++ trunk/php/bugtracking/bug.pinc 2011-09-30 14:34:38 UTC (rev 311) @@ -1143,8 +1143,10 @@ // solver may mod acl_raise($this,$this->getObjectGroupId(2),$tutos[modok]); - // reporter my use + // reporter may use acl_raise($this,$this->getObjectGroupId(3),$tutos[useok]); + // all roles in a project + acl_raise($this,$this->getObjectGroupId(8),$tutos[useok]); // Prepare the history $this->modified[] = array ( "field" => "BugCreate" , @@ -1470,6 +1472,7 @@ $x[$stc->getTypeId()][7] = $lang[$stc->getType()].':'.$lang['Bug'].' '.$lang['BugReference'].' '.$lang['Installation'].' - '.$lang['InstalledBy']; } + $x[$stc->getTypeId()][8] = $lang[$stc->getType()].':'.$lang['Bug'].' '.$lang['BugReference'].' '.$lang['ProductRoles']; foreach ($lang['ProdRole'] as $role => $f) { if ( $tutos[rolecheck][$role] != "p") { $x[$stc->getTypeId()][10+$role] = $lang[$stc->getType()].':'.$lang['Bug'].' '.$lang['BugReference'].' '.$lang['Product'].' - '.$f; @@ -1494,6 +1497,7 @@ $x[$this->getTypeId()][6] = $lang[$this->getType()].':'.$lang['Bug'].' '.$lang['BugReference'].' '.$lang['Installation'].' - '.$lang['SoldBy']; $x[$this->getTypeId()][7] = $lang[$this->getType()].':'.$lang['Bug'].' '.$lang['BugReference'].' '.$lang['Installation'].' - '.$lang['InstalledBy']; } + $x[$this->getTypeId()][8] = $lang[$this->getType()].':'.$lang['BugReference'].' '.$lang['ProdRoles']; foreach ($lang['ProdRole'] as $role => $f) { if ( $tutos[rolecheck][$role] != "p") { $x[$this->getTypeId()][10+$role] = $lang[$this->getType()].':'.$lang['BugReference'].' '.$f; @@ -1553,6 +1557,9 @@ if (is_object($this->parent) && ($this->parent->getTypeId() == useprojects) ) { $this->parent->readroles(); + if ($id2 == 8) { + $x = $this->parent->getObjectGroupList(8); + } foreach ($lang['ProdRole'] as $role => $f) { if ( $tutos[rolecheck][$role] == "p") continue; if ($role+10 == $id2) { Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2011-09-30 14:33:26 UTC (rev 310) +++ trunk/php/product.pinc 2011-09-30 14:34:38 UTC (rev 311) @@ -1434,6 +1434,7 @@ $x = parent::getObjectGroups(); // one virt group for every role + $x[$this->getTypeId()][8] = $lang[$this->getType()].':'.$lang['ProdRoles']; foreach ($lang['ProdRole'] as $role => $f) { if ( $tutos[rolecheck][$role] != "p") { $x[$this->getTypeId()][$role +128] = $lang[$this->getType()].':'.$f; @@ -1446,7 +1447,7 @@ * get a array with virtual groups members */ function getObjectGroupList($id) { - global $lang; + global $lang,$tutos; if ($id < 0) { $id2 = -($id - ($this->getTypeId() << ACLSHIFT)); @@ -1457,13 +1458,22 @@ $x = parent::getObjectGroupList($id); $this->readroles(); + if ($id2 == 8) { + foreach($this->role as $idx => $rx) { + if ( $tutos[rolecheck][$idx] == "p") continue; + foreach($this->role[$idx] as $i => $f) { + $x[$i] = &$f; + } + } + return $x; + } + $id2 -= 128; // calc the offset if (!isset($this->role[$id2])) return $x; foreach($this->role[$id2] as $i => $f) { $x[$i] = &$f; } - return $x; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-30 14:33:32
|
Revision: 310 http://tutos.svn.sourceforge.net/tutos/?rev=310&view=rev Author: gokohnert Date: 2011-09-30 14:33:26 +0000 (Fri, 30 Sep 2011) Log Message: ----------- task state colors / extended select Modified Paths: -------------- trunk/php/task.pinc trunk/php/task_select.php Modified: trunk/php/task.pinc =================================================================== --- trunk/php/task.pinc 2011-09-30 06:12:26 UTC (rev 309) +++ trunk/php/task.pinc 2011-09-30 14:33:26 UTC (rev 310) @@ -24,7 +24,8 @@ $stc = getObject($current_user->dbconn,$tutos['task_state_stc']); if (!is_object($stc)) { $stc = new Stc(null); - $stc->initByArray('TaskStates',null); + $x = new Task($current_user->dbconn); + $stc->initByArray('TaskStates',$x->c_state); } $r = "<select id=\"state\" name=\"state\">\n"; @@ -468,6 +469,12 @@ */ protected $showurl = 'task_show.php'; + public $c_state = array(TASK_PRE => "yellow", + TASK_RUNNING => "orange", + TASK_FINISH => "lightgreen", + TASK_OVERDUE => "red" + ); + /** * */ @@ -878,6 +885,33 @@ } /** + * get current state color of this task + */ + function getStateColor ($s = '') { + global $tutos,$lang; + + $r = ''; + if ( empty($s) ) { + $s = $this->state; + } + + $stc = getObject($this->dbconn,$tutos['task_state_stc']); + if (!is_object($stc)) { + $stc = new stc(null); + $stc->initByArray('TaskStates',$this->c_state); + } + $r .= $stc->states[$s]->color; + return $r; + } + + /** + * get a state color block + */ + function getStateColorBlock($s = '') { + return '<span style="font-size:0.8em;background:'.$this->getStateColor($s).';"> </span> '; + } + + /** * get start for display */ function getStart ($html = true) { @@ -916,17 +950,14 @@ $s = $this->state; } if ($html) { - $r .= '<span class="taskstate'. $s .'">'; + $r .= $this->getStateColorBlock($s); } $stc = getObject($this->dbconn,$tutos['task_state_stc']); if (!is_object($stc)) { $stc = new stc(null); - $stc->initByArray('TaskStates',null); + $stc->initByArray('TaskStates',$this->c_state); } $r .= $stc->getState($s); - if ($html) { - $r .= '</span>'; - } return $r; } @@ -940,7 +971,7 @@ $stc = getObject($this->dbconn,$tutos['task_state_stc']); if (!is_object($stc)) { $stc = new stc(null); - $stc->initByArray('TaskStates',null); + $stc->initByArray('TaskStates',$this->c_state); } $stc->stateowner = $this; $r .= $stc->getStateSelection($this->state,'state'); @@ -1265,7 +1296,7 @@ $stc = getObject($this->dbconn,$tutos['task_state_stc']); if (!is_object($stc)) { $stc = new stc(null); - $stc->initByArray('TaskStates',null); + $stc->initByArray('TaskStates',$this->c_state); } // set the real start @@ -1555,7 +1586,7 @@ } else { $autoname = ''; } - $r .= ' <td class="task'. $this->state ."\" valign=\"top\" colspan=\"2\" nowrap=\"nowrap\"> ". + $r .= ' <td style="background:'. $this->getStateColor() .';" valign="top" colspan="2" nowrap="nowrap"> '. (is_object($project) ? $project->getLink() : "DTC") ." → ". $this->getLink($name.$autoname) ." </td>\n"; } @@ -1568,17 +1599,17 @@ } else { $autoname = ''; } - $r .= ' <td class="task'. $this->state ."\" valign=\"top\" colspan=\"2\" nowrap=\"nowrap\"> ". + $r .= ' <td style="background:'. $this->getStateColor() .';" valign="top" colspan="2" nowrap="nowrap"> '. $this->parent->getLink() ." → ". $this->getLink($name . $autoname)." </td>\n"; break; } default: { - $r .= ' <td class="task'. $this->state .'" align="right" valign="top"> '. ($recursive ? $depth:'') ." </td>\n"; + $r .= ' <td style="background:'. $this->getStateColor() .';" align="right" valign="top"> '. ($recursive ? $depth:'') ." </td>\n"; if ($this->autoname != "") { - $r .= " <td valign=\"top\" nowrap=\"nowrap\"> "; + $r .= ' <td valign="top" nowrap="nowrap"> '; for ($i = 0; $i <= $depth; $i++) { - $r .= " "; + $r .= ' '; } $r .= $autoname .":<br /> "; } else { @@ -1594,7 +1625,7 @@ switch( $fld ) { case "worker": - $r .= "<p align=\"right\" />".$lang['TaskWorker']; + $r .= '<p align="right" />'.$lang['TaskWorker']; $w = 0; foreach ($this->worker as $i => $x) { $r .= ($w %2 ? "<br />":" ").($w >0 ? ",":""). @@ -1605,7 +1636,7 @@ case "product": $project = $this->getProject($projects_tasks); - $r .= "<p align=\"right\" />".$lang['Product']." ".$project->getLink(); + $r .= '<p align="right" />'.$lang['Product'].' '.$project->getLink(); break; default: @@ -2372,7 +2403,7 @@ foreach ($tasklist as $f) { if (!($a++ < 2 * $tutos['maxshort'])) break; $r .= " <tr>\n"; - $r .= ' <td>' . $f->getLink() ."</td>\n"; + $r .= ' <td>' . $f->getStateColorBlock().' '.$f->getLink() ."</td>\n"; $r .= ' <td align="right">'. $f->getStart() ."</td>\n"; $r .= ' <td align="right">'. $f->getEnd() ."</td>\n"; $r .= " </tr>\n"; Modified: trunk/php/task_select.php =================================================================== --- trunk/php/task_select.php 2011-09-30 06:12:26 UTC (rev 309) +++ trunk/php/task_select.php 2011-09-30 14:33:26 UTC (rev 310) @@ -33,73 +33,82 @@ $r .= "<form id=\"tasksearch\" name=\"tasksearch\" action=\"task_overview.php\" method=\"get\">\n"; $r .= DoubleTableStart(); + $this->addHidden('ext',$this->ext); + $r .= "<tr>\n"; - if ( $this->ext == 0 ) { - $r .= "<th colspan=\"3\">". $lang['SearchForTask'] ."</th>\n"; - $r .= "</tr><tr>\n"; - $r .= $this->showfieldc($lang['AdrName']); - $r .= " <td align=\"center\"><input type=\"text\" value=\"\" name=\"name\"></td>\n"; - $r .= " <td align=\"center\">\n"; - $r .= " <input type=\"submit\" value=\"". $lang['Search'] ."\" title=\"". $lang['SearchForTask'] ."\"></td>\n"; - $r .= "</tr><tr>\n"; - $r .= " <td colspan=\"2\" align=\"center\"></td>\n"; - $r .= ' <td align="center">'. makelink('task_select.php?ext=1',$lang['extended']) ."</td>\n"; - } else { - $r .= '<th colspan="3">'. $lang['SearchForTaskExt'] ."</th>\n"; + $r .= "<th colspan=\"3\">". $lang['SearchForTask'] ."</th>\n"; + $r .= "</tr><tr>\n"; - $r .= "</tr><tr>\n"; - $r .= $this->showfieldc($lang['AdrName']); - $r .= " <td><input type=\"text\" value=\"\" name=\"name\">"; - $r .= " </td>\n"; - $r .= " <td align=\"center\"><input type=\"submit\" value=\"". $lang['Search'] ."\" title=\"". $lang['SearchForTaskExt'] ."\"></td>\n"; + $r .= $this->showfieldc($lang['AdrName']); + $r .= " <td align=\"center\"><input type=\"text\" value=\"\" name=\"name\"></td>\n"; + $r .= " <td align=\"center\">\n"; + $r .= " <input type=\"submit\" value=\"". $lang['Search'] ."\" title=\"". $lang['SearchForTask'] ."\"></td>\n"; + $r .= "</tr><tr>\n"; + $r .= ' <td colspan="3" align="right"><span id="toggler">'. $lang['extended'] ."</span></td>\n"; - $r .= "</tr><tr>\n"; - $r .= ' <td rowspan="2" class="desc">'. $lang['TaskBetween'] ."</td>\n"; - $r .= " <td colspan=\"2\">"; - $r .= $this->fd->EnterDate("start",1); - $r .= "</td>\n"; + $tutos['pagescript'] .= " +$( \"#toggler\" ).click(function() { + $(\".ext\").toggle(); + if ( $(\"#h_ext\").val() == 0 ) { + $(\"#h_ext\").val(1); + } else { + $(\"#h_ext\").val(0); + } + return; + }); +\n"; + if ( $this->ext == 0 ) { + $tutos['pagescript'] .= " + $(\".ext\").hide(); +\n"; + } - $r .= "</tr><tr>\n"; - $r .= " <td colspan=\"2\">"; - $r .= $this->td->EnterDate("end",1); - $r .= "</td>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= ' <td rowspan="2" class="desc">'. $lang['TaskBetween'] ."</td>\n"; + $r .= " <td colspan=\"2\">"; + $r .= $this->fd->EnterDate("start",1); + $r .= "</td>\n"; - $r .= "</tr><tr>\n"; - $r .= $this->showfieldc($lang['TaskState']); - $r .= " <td colspan=\"2\">"; - $r .= TaskAskState($this->state,true); - $r .= "</td>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= " <td colspan=\"2\">"; + $r .= $this->td->EnterDate("end",1); + $r .= "</td>\n"; - $r .= "</tr><tr>\n"; - $r .= $this->showfieldc($lang['TaskWorker']); - $r .= " <td colspan=\"2\">\n"; - $w_arr = array(); - if (isset($_SESSION[usetaskmanagement.'__worker'])) { - $w_arr = $_SESSION[usetaskmanagement.'__worker']; - } - $r .= $this->user->askPeople("worker",$w_arr,0,-1,true); - $r .= " </td>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['TaskState']); + $r .= " <td colspan=\"2\">"; + $r .= TaskAskState($this->state,true); + $r .= "</td>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['TaskWorker']); + $r .= " <td colspan=\"2\">\n"; + $w_arr = array(); + if (isset($_SESSION[usetaskmanagement.'__worker'])) { + $w_arr = $_SESSION[usetaskmanagement.'__worker']; + } + $r .= $this->user->askPeople("worker",$w_arr,0,-1,true); + $r .= " </td>\n"; - // add custom selectors - $x = get_custom_selectors('task'); - foreach ($x as $s) { - $r .= "</tr><tr>\n"; - $r .= $this->showfieldc($s[0]); - $r .= " <td colspan=\"2\">\n"; - $r .= $s[1]; - $r .= " </td>\n"; - } - $r .= "</tr><tr>\n"; - $r .= $this->showfieldc($lang['TaskViewSmall']); + // add custom selectors + $x = get_custom_selectors('task'); + foreach ($x as $s) { + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($s[0]); $r .= " <td colspan=\"2\">\n"; - $r .= "<input type=\"checkbox\" name=\"small\" value=\"1\"></input>\n"; + $r .= $s[1]; $r .= " </td>\n"; + } - } // extended + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['TaskViewSmall']); + $r .= " <td colspan=\"2\">\n"; + $r .= "<input type=\"checkbox\" name=\"small\" value=\"1\"></input>\n"; + $r .= " </td>\n"; + $r .= "</tr>\n"; $r .= DoubleTableEnd(); $r .= hiddenFormElements(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-30 06:12:32
|
Revision: 309 http://tutos.svn.sourceforge.net/tutos/?rev=309&view=rev Author: gokohnert Date: 2011-09-30 06:12:26 +0000 (Fri, 30 Sep 2011) Log Message: ----------- no line break Modified Paths: -------------- trunk/php/bugtracking/bug_overview.php Modified: trunk/php/bugtracking/bug_overview.php =================================================================== --- trunk/php/bugtracking/bug_overview.php 2011-09-29 18:55:48 UTC (rev 308) +++ trunk/php/bugtracking/bug_overview.php 2011-09-30 06:12:26 UTC (rev 309) @@ -143,7 +143,7 @@ $font = jpgraph_init($graph); $graph->title->Set($lang['BugBurndown']); $graph->SetScale("datlin"); - $graph->img->SetMargin(50,160,20,120); + $graph->img->SetMargin(50,180,20,120); foreach ($this->stc->states as $f) { if (!isset($data[$f->stc_state])) continue; @@ -415,7 +415,7 @@ if ($this->head['state']) { - $r .= ' <td> '.$b->getStateColorBlock().' '.$b->getState() ."</td>\n"; + $r .= ' <td> '.$b->getStateColorBlock().' '.$b->getState() ."</td>\n"; } if ($this->head['class']) { @@ -1072,4 +1072,4 @@ $l = new Bug_overview($current_user); $l->display(); $dbconn->Close(); -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-29 18:55:54
|
Revision: 308 http://tutos.svn.sourceforge.net/tutos/?rev=308&view=rev Author: gokohnert Date: 2011-09-29 18:55:48 +0000 (Thu, 29 Sep 2011) Log Message: ----------- open bugs in own window Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2011-09-29 18:55:04 UTC (rev 307) +++ trunk/php/testmanager/testmanager.pinc 2011-09-29 18:55:48 UTC (rev 308) @@ -598,7 +598,7 @@ case 'TestSuiteCopy': case 'TestcaseRef': $x = resolve_history_obj($f,$this->dbconn); - break; + break; } return $x; } @@ -828,7 +828,9 @@ if ($this->activ == 1) { foreach($baseobj->list[usebugtracking][1] as $b) { if (is_object($b->_fld_testcase) && ($b->_fld_testcase->id == $this->id)) { - $r .= $pre.makelink($b->getUrl(),$b->getFullName(),'','','bug'); + $r .= $pre; + $r .= $b->getStateColorBlock(); + $r .= makelink($b->getUrl(),$b->getFullName(),'',$b->getPopInfo(),'bug'); $pre = '<br />'; } } @@ -840,7 +842,9 @@ $x->read_reference(); foreach($baseobj->list[usebugtracking][1] as $b) { if (is_object($b->_fld_testcase) && ($b->_fld_testcase->id == $x->prev_id)) { - $r .= $pre.$p1.$b->getLink().$p2; + $r .= $pre.$p1; + $r .= $b->getStateColorBlock(); + $r .= makelink($b->getUrl(),$b->getFullName(),'',$b->getPopInfo(),'bug').$p2; $pre = '<br />'; } } @@ -1711,12 +1715,12 @@ case 'TestcaseCreate': case 'TestsuiteCreate': $f['old'] = ''; - $x = resolve_history_obj($f,$this->dbconn); - break; + $x = resolve_history_obj($f,$this->dbconn); + break; case 'TestSuiteCopy': case 'TestsuiteRef': $x = resolve_history_obj($f,$this->dbconn); - break; + break; case 'TestsuiteState': $x = resolve_history_lgarr ($f,'TestsuiteStates'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-29 18:55:10
|
Revision: 307 http://tutos.svn.sourceforge.net/tutos/?rev=307&view=rev Author: gokohnert Date: 2011-09-29 18:55:04 +0000 (Thu, 29 Sep 2011) Log Message: ----------- use colors for states where usefull Modified Paths: -------------- trunk/php/bugtracking/bug.pinc trunk/php/bugtracking/bug_overview.php trunk/php/bugtracking/bug_show.php Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2011-09-29 06:22:20 UTC (rev 306) +++ trunk/php/bugtracking/bug.pinc 2011-09-29 18:55:04 UTC (rev 307) @@ -32,7 +32,8 @@ $stc = getObject($current_user->dbconn,$tutos['bug_state_stc']); if (!is_object($stc)) { $stc = new stc(null); - $stc->initByArray('BugStates',null); + $x = new Bug($current_user->dbconn); + $stc->initByArray('BugStates',$x->c_state); } $additional = array(); @@ -255,6 +256,17 @@ */ protected $showurl = 'bugtracking/bug_show.php'; + public $c_state = array(BUG_STATE_OPEN => "red", + BUG_STATE_WORK => "blue", + BUG_STATE_SOLVED => "green", + BUG_STATE_CLOSED => "gray" + ); + + public $c_class = array(BUG_CLASS_LIGHT => "blue", + BUG_CLASS_HEAVY => "red", + BUG_CLASS_DANGER => "red", + BUG_CLASS_HINT => "green" + ); /** * */ @@ -274,14 +286,8 @@ } } // colors in statistics if not stc - $this->c_state[BUG_STATE_OPEN] = "red"; - $this->c_state[BUG_STATE_WORK] = "blue"; - $this->c_state[BUG_STATE_SOLVED] = "green"; - $this->c_state[BUG_STATE_CLOSED] = "gray"; - $this->c_class[BUG_CLASS_LIGHT] = "blue"; - $this->c_class[BUG_CLASS_HEAVY] = "red"; - $this->c_class[BUG_CLASS_DANGER] = "red"; - $this->c_class[BUG_CLASS_HINT] = "green"; + // $this->c_state[BUG_STATE_OPEN] = "red"; + // $this->c_state[BUG_STATE_WORK] = "blue"; $this->solver = new tutos_address($this->dbconn); $this->reporter = new tutos_address($this->dbconn); $this->parent = -1; @@ -636,7 +642,7 @@ /** * get current state color of this bug */ - function getStateColor ($s = "") { + function getStateColor ($s = '') { global $tutos,$lang; $r = ''; @@ -658,6 +664,13 @@ } /** + * get a state color block + */ + function getStateColorBlock($s = '') { + return '<span style="font-size:0.8em;background:'.$this->getStateColor($s).';"> </span> '; + } + + /** * get current medium of this bug (default) as HTML */ function getMedium ($m = "") { @@ -741,7 +754,7 @@ $info = ''; $info .= '<table class="popupinfo">'; $info .= '<tr><th>'. $lang[$this->getType()] .' '. $t .'</th></tr>'; - $info .= '<tr><td>'. $s .'</td></tr>'; + $info .= '<tr><td><span style="background:'.$this->getStateColor().';"> </span> '. $s .'</td></tr>'; $info .= '<tr><td><pre>'; $info .= $n; $info .= '</pre></td></tr>'; @@ -764,7 +777,7 @@ global $lang; if ( empty($text) ) { - $text = myentities($this->getFullName()); + $text .= myentities($this->getFullName()); } if ( $this->see_ok() ) { return makelink($this->getURL($arg),$text,sprintf($lang['BugShow'],$this->getFullName()),$this->getPopInfo()); @@ -1314,7 +1327,7 @@ $stc = getObject($this->dbconn,$tutos['bug_state_stc']); if (!is_object($stc)) { $stc = new Stc($this->dbconn); - $stc->initByArray('BugStates',null); + $stc->initByArray('BugStates',$this->c_state); } if ($this->mod_ok() && $stc->check_trans($this->state,$tutos['bug_finish_state'])) { $this->setState($tutos['bug_finish_state']); @@ -1397,7 +1410,7 @@ case 'BugFollowup': case 'BugReportedFrom': $x = resolve_history_obj($f,$this->dbconn); - break; + break; case 'BugAssignedTo': $x = $f; if ($f['old'] < 0) @@ -2000,7 +2013,7 @@ $f->read_result($res,$a); if ( $f->see_ok() ) { $r .= " <tr>\n"; - $r .= ' <td>' . $f->getLink() ."</td>\n"; + $r .= ' <td>' .$f->getStateColorBlock().$f->getLink() ."</td>\n"; $r .= ' <td>' . ($f->parent->id > 0 ? $f->parent->getLink():$lang['HistoryDeleted']) ."</td>\n"; $r .= ' <td>' . $f->getClass() ."</td>\n"; $r .= ' <td>' . $f->getState() ."</td>\n"; Modified: trunk/php/bugtracking/bug_overview.php =================================================================== --- trunk/php/bugtracking/bug_overview.php 2011-09-29 06:22:20 UTC (rev 306) +++ trunk/php/bugtracking/bug_overview.php 2011-09-29 18:55:04 UTC (rev 307) @@ -405,9 +405,9 @@ if ($this->head['product_id']) { if ( $b->parent->id > 0 ) { $x = $this->mark_filter(myentities($b->parent->getFullName()),'product_id'); - $r .= " <td> ". $b->parent->getLink($x) ."</td>\n"; + $r .= ' <td> '. $b->parent->getLink($x) ."</td>\n"; } else { - $r .= " <td> ". $lang['HistoryDeleted'] ."</td>\n"; + $r .= ' <td> '. $lang['HistoryDeleted'] ."</td>\n"; } } $x = $this->mark_filter(myentities($b->short),'name'); @@ -415,7 +415,7 @@ if ($this->head['state']) { - $r .= " <td> ". $b->getState() ."</td>\n"; + $r .= ' <td> '.$b->getStateColorBlock().' '.$b->getState() ."</td>\n"; } if ($this->head['class']) { @@ -475,7 +475,7 @@ } foreach ($this->stc->states as $f) { if ($f->stc_state == STC_NOT_EXISTANT) continue; - $r .= " <option value=\"S". $f->stc_state ."\">". sprintf($lang['SetTo'],$lang['BugState'],$f->getFullName()) ."</option>\n"; + $r .= " <option value=\"S". $f->stc_state .'" style="background:'.$f->color.';">'. sprintf($lang['SetTo'],$lang['BugState'],$f->getFullName()) ."</option>\n"; } $r .= " <option value=\"-4\">". $lang['AclModify'] ."</option>\n"; if (class_exists('watchlist')) { @@ -673,7 +673,8 @@ $this->stc = getObject($this->user->dbconn,$tutos['bug_state_stc']); if (!is_object($this->stc)) { $this->stc = new stc(null); - $this->stc->initByArray('BugStates',null); + $x = new Bug(); + $this->stc->initByArray('BugStates',$x->c_state); } if ( $_GET['action'] == -2 ) { @@ -775,7 +776,8 @@ $this->stc = getObject($this->user->dbconn,$tutos['bug_state_stc']); if (!is_object($this->stc)) { $this->stc = new stc(null); - $this->stc->initByArray('BugStates',null); + $x = new Bug($this->dbconn); + $this->stc->initByArray('BugStates',$x->c_state); } if ( $this->format == "stat") { Modified: trunk/php/bugtracking/bug_show.php =================================================================== --- trunk/php/bugtracking/bug_show.php 2011-09-29 06:22:20 UTC (rev 306) +++ trunk/php/bugtracking/bug_show.php 2011-09-29 18:55:04 UTC (rev 307) @@ -61,7 +61,7 @@ $r .= $this->showfield($lang['BugState']); $diff = $this->obj->getStateAge(); - $x = $this->obj->getState(); + $x = $this->obj->getStateColorBlock().$this->obj->getState(); if ($diff[0] > 0) $x .= '<br />'.TUTOS_Date_Time::duration($diff[0],false); $r .= $this->showdata($x,1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-29 06:22:26
|
Revision: 306 http://tutos.svn.sourceforge.net/tutos/?rev=306&view=rev Author: gokohnert Date: 2011-09-29 06:22:20 +0000 (Thu, 29 Sep 2011) Log Message: ----------- show diff only if useful Modified Paths: -------------- trunk/php/base.pinc Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2011-09-29 05:49:57 UTC (rev 305) +++ trunk/php/base.pinc 2011-09-29 06:22:20 UTC (rev 306) @@ -601,7 +601,10 @@ // echo "Internal Error: Unknown field in '". $this->gettype() ."' Object :|". $fld ."| Value:|". $value ."|<br />\n"; } if ( $this->$fld != $value ) { - $this->modified[] = array ( "field" => $histfield , "old" => $this->$fld , "new" => "DIFF:\r\n".PHPDiff($this->$fld,$value) ); + if (!empty($this->fld)) + $this->modified[] = array ( "field" => $histfield , "old" => $this->$fld , "new" => "DIFF:\r\n".PHPDiff($this->$fld,$value) ); + else + $this->modified[] = array ( "field" => $histfield , "old" => $this->$fld , "new" => $value ); $this->$fld = $value; return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-29 05:50:03
|
Revision: 305 http://tutos.svn.sourceforge.net/tutos/?rev=305&view=rev Author: gokohnert Date: 2011-09-29 05:49:57 +0000 (Thu, 29 Sep 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/acl.pinc Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2011-09-28 13:44:06 UTC (rev 304) +++ trunk/php/acl.pinc 2011-09-29 05:49:57 UTC (rev 305) @@ -777,7 +777,7 @@ * copy acl of another object * nofeatures == true is "do not copy feature bits" */ -function copy_acl(tutos_object $obj,$nofeatures = false) { +function copy_acl(tutos_base $obj,$nofeatures = false) { $acl = array(); if (!isset($obj->acl)) return $acl; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-28 13:44:13
|
Revision: 304 http://tutos.svn.sourceforge.net/tutos/?rev=304&view=rev Author: gokohnert Date: 2011-09-28 13:44:06 +0000 (Wed, 28 Sep 2011) Log Message: ----------- fix usage of parent acl Modified Paths: -------------- trunk/php/acl.pinc trunk/php/bugtracking/bug.pinc Modified: trunk/php/acl.pinc =================================================================== --- trunk/php/acl.pinc 2011-09-28 13:43:33 UTC (rev 303) +++ trunk/php/acl.pinc 2011-09-28 13:44:06 UTC (rev 304) @@ -772,4 +772,19 @@ } return $url; } + +/** + * copy acl of another object + * nofeatures == true is "do not copy feature bits" + */ +function copy_acl(tutos_object $obj,$nofeatures = false) { + $acl = array(); + if (!isset($obj->acl)) return $acl; + + foreach ($obj->acl as $i => $p) { + if (($i == 0) || ($nofeatures = false)) + $acl[$i] = $p; + } + return $acl; +} ?> \ No newline at end of file Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2011-09-28 13:43:33 UTC (rev 303) +++ trunk/php/bugtracking/bug.pinc 2011-09-28 13:44:06 UTC (rev 304) @@ -1124,13 +1124,14 @@ } else { $this->id = $q->addFV("id",-1,"NEXTID"); + acl_default($this,$current_user); // Defaut Access Control inherit from parent - $this->acl = $this->parent->acl; + $this->acl = copy_acl($this->parent,true); + // solver may mod acl_raise($this,$this->getObjectGroupId(2),$tutos[modok]); // reporter my use acl_raise($this,$this->getObjectGroupId(3),$tutos[useok]); - acl_default($this,$current_user); // Prepare the history $this->modified[] = array ( "field" => "BugCreate" , @@ -1396,7 +1397,7 @@ case 'BugFollowup': case 'BugReportedFrom': $x = resolve_history_obj($f,$this->dbconn); - break; + break; case 'BugAssignedTo': $x = $f; if ($f['old'] < 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-28 13:43:42
|
Revision: 303 http://tutos.svn.sourceforge.net/tutos/?rev=303&view=rev Author: gokohnert Date: 2011-09-28 13:43:33 +0000 (Wed, 28 Sep 2011) Log Message: ----------- fix a problem with testing csv inputs Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2011-09-27 18:19:43 UTC (rev 302) +++ trunk/php/testmanager/testmanager.pinc 2011-09-28 13:43:33 UTC (rev 303) @@ -693,7 +693,7 @@ /** * a inputrow to enter a tc */ - function printinputrow(layout_base $ly,tutos_base $baseobj,$prefix,$cnt,$ss = '') { + function printinputrow(layout_base $ly,$baseobj,$prefix,$cnt,$ss = '') { global $lang,$current_user; if ($this->activ != 1) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-27 18:19:49
|
Revision: 302 http://tutos.svn.sourceforge.net/tutos/?rev=302&view=rev Author: gokohnert Date: 2011-09-27 18:19:43 +0000 (Tue, 27 Sep 2011) Log Message: ----------- show selectlist on ObjectRel . Show objecttypes where neccessary Modified Paths: -------------- trunk/php/custom.pinc trunk/php/webelements.p3 Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2011-09-27 17:56:06 UTC (rev 301) +++ trunk/php/custom.pinc 2011-09-27 18:19:43 UTC (rev 302) @@ -182,6 +182,7 @@ if (!isset($tx['searchable'])) continue; if (!$tx['searchable']) continue; if (!isset($x['required'])) $x['required'] = false; + if (!isset($x['showtype'])) $x['showtype'] = false; $parsename = $section ."_". $ti; // Text @@ -199,13 +200,13 @@ // ajax // a project based search is not possible without a object if ($tx['otype'] == 'H') { - $x[1] .= select_from_array_or_input($current_user,$parsename,null,1,$tx['olist'],$tx[size]); + $x[1] .= select_from_array_or_input($current_user,$parsename,null,1,$tx['olist'],$tx[size],$x['showtype']); } else { $tx['otype'] = str_replace('R','atdc',$tx['otype']); - $x[1] .= select_from_array_or_input($current_user,$parsename,null,1,$tx['otype'],$tx[size]); + $x[1] .= select_from_array_or_input($current_user,$parsename,null,1,$tx['otype'],$tx[size],$x['showtype']); } } else if ($tx['ftype'] == 'ObjectRel') { - $x[1] .= select_from_array_or_input($current_user,$parsename,null,1,$tx['otype'],$tx[size]); + $x[1] .= select_from_array_or_input($current_user,$parsename,null,1,$tx['otype'],$tx[size],$x['showtype']); } else if ($tx['ftype'] == 'ObjectRelBack') { continue; } else if ($tx['ftype'] == 'Date') { @@ -648,6 +649,7 @@ if (!isset($x['hideempty'])) $x['hideempty'] = false; if (!isset($x['ftype'])) $x['ftype'] = ''; if (!isset($x['hlang'])) $x['hlang'] = ''; + if (!isset($x['showtype'])) $x['showtype'] = false; $h = myentities(getLang($x['hlang'])); @@ -701,7 +703,7 @@ if ($x['otype'] != 'H') { // normal $r .= ' <td colspan="'.($cols-1)."\">\n"; - $r .= select_from_array_or_input($obj,$parsename,$xx,($x['required']? 1:0),$x['otype'],$x[size]); + $r .= select_from_array_or_input($obj,$parsename,$xx,($x['required']? 1:0),$x['otype'],$x[size],$x['showtype']); $r .= " </td>\n"; } else { // hidden @@ -763,7 +765,7 @@ $r .= ' </select>'."\n"; } else if (isset($x['otype'])) { // otype allows ajax based input - $r .= select_from_array_or_input($obj,$parsename,current($xx),($x['required']? 1:0),$x['otype'],$x[size]); + $r .= select_from_array_or_input($obj,$parsename,current($xx),($x['required']? 1:0),$x['otype'],$x[size],$x['showtype']); foreach ($xx as $i => $o) { # $r .= $o.' '; } @@ -1003,12 +1005,16 @@ } } else if ($x['ftype'] == 'ObjectRel') { // set the base list - if (isset($_GET[$parsename]) && is_array($_GET[$parsename])) - foreach($_GET[$parsename] as $i) { - $xx = getObject($obj->dbconn,$i); - $obj->relations[$x['rel_id']][$i] = &$xx; - unset($xx); - } + if (isset($x['otype'])) { + preset_from_array_or_input($obj,$fld,$parsename); + } else { + if (isset($_GET[$parsename]) && is_array($_GET[$parsename])) + foreach($_GET[$parsename] as $i) { + $xx = getObject($obj->dbconn,$i); + $obj->relations[$x['rel_id']][$i] = &$xx; + unset($xx); + } + } } else if ($x['ftype'] == 'Object') { preset_from_array_or_input($obj,$fld,$parsename); } else if (isset($_GET[$parsename])) { Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2011-09-27 17:56:06 UTC (rev 301) +++ trunk/php/webelements.p3 2011-09-27 18:19:43 UTC (rev 302) @@ -436,7 +436,7 @@ case 'integer': case 'double': $msg .= $a; - break; + break; case 'boolean': if (true === $a){ $msg .= 'T'; @@ -1477,11 +1477,7 @@ if ($cnt == 0) { $nullmsg .= sprintf($lang['Err0012'],$lang['department'],$name) ."<br />"; } - } - if (!isset($tutos['classes'][$c])) { - loadmodule($c); - } - if (isset($tutos['classes'][$c])) { + } else { $x = new $tutos['classes'][$c]($dbconn); $cnt = $x->search_by_name($res,$current_user,$name,1); if ($cnt == 0) { @@ -1492,8 +1488,6 @@ $nullmsg .= sprintf($lang['Err0012'],$lang[$x->getType()],$name) ."<br />"; } } - } else { - die ('do not know how to handle '.$c); } # echo ' = '.$cnt."<br />"; @@ -1847,11 +1841,13 @@ /** * make a selection list by given array of form [id] = $obj - * obj == Object holding the lists - * sobj == Object giving default name - * grp == Group of allowed content (a = addr , t= team , p = proj) + * obj == Object holding the lists + * name == Fieldname in Form + * sobj == Object giving default name + * grp == Group of allowed content (a = addr , t= team , p = proj) + * showtype == show type of object in selection list */ -Function select_from_array_or_input(&$obj,$name,$sobj,$none,$grp,$size = 25) { +Function select_from_array_or_input(&$obj,$name,$sobj,$none,$grp,$size = 25,$showtype = false) { global $lang,$tutos; $ma = array(); @@ -1913,12 +1909,11 @@ foreach($obj->xl[$name] as $x => $f) { if (! $f->use_ok()) continue; - if ( $f->getType() == "department" ) { + if ( $showtype || + $f->getType() == "department" || + $f->getType() == "company" || + $f->getType() == "team" ) { $fn = $lang[$f->getType()] ." ". $f->getFullname(); - } else if ( $f->getType() == "company" ) { - $fn = $lang[$f->getType()] ." ". $f->getFullname(); - } else if ( $f->getType() == "team" ) { - $fn = $lang[$f->getType()] ." ". $f->getFullname(); } else { $fn = $f->getFullname(); } @@ -2931,7 +2926,7 @@ foreach($t2 as $i=>$x) if ($x>'') $r2[$x][]=$i; $a1=0; $a2=0; # start at beginning of each list - $actions=array(); + $actions=array(); // walk this loop until we reach the end of one of the lists while ($a1<count($t1) && $a2<count($t2)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-27 17:56:12
|
Revision: 301 http://tutos.svn.sourceforge.net/tutos/?rev=301&view=rev Author: gokohnert Date: 2011-09-27 17:56:06 +0000 (Tue, 27 Sep 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/custom.pinc Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2011-09-27 17:55:56 UTC (rev 300) +++ trunk/php/custom.pinc 2011-09-27 17:56:06 UTC (rev 301) @@ -740,7 +740,7 @@ } } - if (count($xx) == 0 && isset($x['hideempty']) && ($x['hideempty'] == true)) return ''; +# if (count($xx) == 0 && isset($x['hideempty']) && ($x['hideempty'] == true)) return ''; $r .= ' <td colspan="'.($cols-1)."\">\n"; if (isset($x['method']) || isset($x['function']) ) { @@ -765,7 +765,7 @@ // otype allows ajax based input $r .= select_from_array_or_input($obj,$parsename,current($xx),($x['required']? 1:0),$x['otype'],$x[size]); foreach ($xx as $i => $o) { - $r .= $o.' '; + # $r .= $o.' '; } } $r .= " </td>\n"; @@ -885,10 +885,12 @@ if (isset($x['otype'])) { if ( isset($_POST[$parsename.'fn']) ) { $m = check_field($_POST[$parsename.'fn'],$parsename."fn",$parsename."l",$x['otype'],$obj); - $obj->add_relation_id($m->id,$x['rel_id'],'',$x['lang']); + if (is_object($m)) + $obj->add_relation_id($m->id,$x['rel_id'],'',$x['lang']); } else if ( isset($_POST[$parsename.'id']) ) { $m = getObject($obj->dbconn,$_POST[$parsename.'id']); - $obj->add_relation_id($m->id,$x['rel_id'],'',$x['lang']); + if (is_object($m)) + $obj->add_relation_id($m->id,$x['rel_id'],'',$x['lang']); } else { echo 'MISSING: '.$parsename; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-27 17:56:02
|
Revision: 300 http://tutos.svn.sourceforge.net/tutos/?rev=300&view=rev Author: gokohnert Date: 2011-09-27 17:55:56 +0000 (Tue, 27 Sep 2011) Log Message: ----------- bugs show age of state Modified Paths: -------------- trunk/php/bugtracking/bug.pinc trunk/php/bugtracking/bug_select.php trunk/php/bugtracking/bug_show.php Modified: trunk/php/bugtracking/bug.pinc =================================================================== --- trunk/php/bugtracking/bug.pinc 2011-09-27 14:17:40 UTC (rev 299) +++ trunk/php/bugtracking/bug.pinc 2011-09-27 17:55:56 UTC (rev 300) @@ -603,7 +603,37 @@ return $r; } + /** + * get current states age and timestamp + */ + function getStateAge () { + global $tutos,$lang; + + $this->read_last_mod(); + if (!isset($this->lastmod[0])) { + // create a lastmod that represents the creation + $l['date'] = $this->creation; + $l['old'] = -1; + $l['new'] = $this->state; + } else { + $l['date'] = $this->creation; + $l['old'] = -1; + $l['new'] = $this->lastmod[count($this->lastmod)-1]['old']; + } + $l = array($l); + $this->lastmod = array_merge($this->lastmod,$l); + $now = new TUTOS_Date_Time(); + $r = ''; + $diff = 0; + foreach ($this->lastmod as $i => $j) { + if ($j['new'] != $this->state) continue; + $diff = $now->getTimeStamp() - $j['date']->getTimestamp(); + } + return array($diff,$j['date']); + } + + /** * get current state color of this bug */ function getStateColor ($s = "") { @@ -704,9 +734,14 @@ $t =str_replace("\\","\\\\",$t); $t =str_replace("'","\'",$t); + $s =myentities($this->short); + $s =str_replace("\\","\\\\",$s); + $s =str_replace("'","\'",$s); + $info = ''; $info .= '<table class="popupinfo">'; $info .= '<tr><th>'. $lang[$this->getType()] .' '. $t .'</th></tr>'; + $info .= '<tr><td>'. $s .'</td></tr>'; $info .= '<tr><td><pre>'; $info .= $n; $info .= '</pre></td></tr>'; @@ -1361,7 +1396,7 @@ case 'BugFollowup': case 'BugReportedFrom': $x = resolve_history_obj($f,$this->dbconn); - break; + break; case 'BugAssignedTo': $x = $f; if ($f['old'] < 0) Modified: trunk/php/bugtracking/bug_select.php =================================================================== --- trunk/php/bugtracking/bug_select.php 2011-09-27 14:17:40 UTC (rev 299) +++ trunk/php/bugtracking/bug_select.php 2011-09-27 17:55:56 UTC (rev 300) @@ -47,6 +47,7 @@ $r .= " <td align=\"center\"><input id=\"name\" type=\"text\" value=\"\" name=\"name\" /></td>\n"; $r .= " <td>\n"; $r .= " <input type=\"submit\" value=\"". $lang['Search'] ."\" title=\"". $lang['SearchForBug'] ."\" /></td>\n"; + $r .= "</tr><tr>\n"; $r .= ' <td colspan="3" align="right"><span id="toggler">'. $lang['extended'] ."</span></td>\n"; $tutos['pagescript'] .= " Modified: trunk/php/bugtracking/bug_show.php =================================================================== --- trunk/php/bugtracking/bug_show.php 2011-09-27 14:17:40 UTC (rev 299) +++ trunk/php/bugtracking/bug_show.php 2011-09-27 17:55:56 UTC (rev 300) @@ -57,8 +57,14 @@ $r .= "</tr><tr>\n"; + + $r .= $this->showfield($lang['BugState']); - $r .= $this->showdata($this->obj->getState(),1); + $diff = $this->obj->getStateAge(); + $x = $this->obj->getState(); + if ($diff[0] > 0) + $x .= '<br />'.TUTOS_Date_Time::duration($diff[0],false); + $r .= $this->showdata($x,1); $r .= $this->showfield($lang['BugClass']); $r .= $this->showdata($this->obj->getClass(),1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-27 14:17:46
|
Revision: 299 http://tutos.svn.sourceforge.net/tutos/?rev=299&view=rev Author: gokohnert Date: 2011-09-27 14:17:40 +0000 (Tue, 27 Sep 2011) Log Message: ----------- update Modified Paths: -------------- trunk/php/bugtracking/bug_select.php trunk/php/custom.pinc trunk/php/webelements.p3 Modified: trunk/php/bugtracking/bug_select.php =================================================================== --- trunk/php/bugtracking/bug_select.php 2011-09-27 14:17:10 UTC (rev 298) +++ trunk/php/bugtracking/bug_select.php 2011-09-27 14:17:40 UTC (rev 299) @@ -39,9 +39,6 @@ $this->addHidden('ext',$this->ext); $r .= "<tr>\n"; - if ( $this->ext == 0 ) { - } else { - } $r .= "<th colspan=\"3\">". $lang['SearchForBug'] ."</th>\n"; $r .= "</tr><tr>\n"; @@ -51,8 +48,6 @@ $r .= " <td>\n"; $r .= " <input type=\"submit\" value=\"". $lang['Search'] ."\" title=\"". $lang['SearchForBug'] ."\" /></td>\n"; $r .= "</tr><tr>\n"; - # $r .= ' <td colspan="2" align="center"><span class="small">'. $lang['BugSelInfo'] ."</span></td>\n"; - # $r .= " <td align=\"center\">". makelink("bugtracking/bug_select.php?ext=1",$lang['extended']) ."</td>\n"; $r .= ' <td colspan="3" align="right"><span id="toggler">'. $lang['extended'] ."</span></td>\n"; $tutos['pagescript'] .= " $( \"#toggler\" ).click(function() { Modified: trunk/php/custom.pinc =================================================================== --- trunk/php/custom.pinc 2011-09-27 14:17:10 UTC (rev 298) +++ trunk/php/custom.pinc 2011-09-27 14:17:40 UTC (rev 299) @@ -715,7 +715,7 @@ } } } else if ($x['ftype'] == 'ObjectRel') { - if (!isset($x['method']) && !isset($x['function']) ) return ''; + if (!isset($x['method']) && !isset($x['function']) && !isset($x['otype'])) return ''; if (!isset($x['multi'])) $x['multi'] = false; if (!isset($x['showtype'])) $x['showtype'] = true; if (!isset($x['rel_id'])) return ''; @@ -743,23 +743,31 @@ if (count($xx) == 0 && isset($x['hideempty']) && ($x['hideempty'] == true)) return ''; $r .= ' <td colspan="'.($cols-1)."\">\n"; - $r .= ' <select id="'.$parsename.'" name="'.$parsename.'[]"'.($x['multi'] ? ' multiple="multiple"':'').'>'."\n"; - foreach ($xx as $i => $o) { - $r .= ' <option value="'.$i.'"'; - $r .= (isset($obj->relations[$x['rel_id']][$i]) ? 'selected="selected"':''); - $r .= '>'; - // show list content custom formatted - if (isset($x['display_list']) && function_exists($x['display_list'])) { - $r .= $x['display_list']($o); - } else { - if ($x['showtype']) { - $r .= $lang[$o->getType()].' '; + if (isset($x['method']) || isset($x['function']) ) { + $r .= ' <select id="'.$parsename.'" name="'.$parsename.'[]"'.($x['multi'] ? ' multiple="multiple"':'').'>'."\n"; + foreach ($xx as $i => $o) { + $r .= ' <option value="'.$i.'"'; + $r .= (isset($obj->relations[$x['rel_id']][$i]) ? 'selected="selected"':''); + $r .= '>'; + // show list content custom formatted + if (isset($x['display_list']) && function_exists($x['display_list'])) { + $r .= $x['display_list']($o); + } else { + if ($x['showtype']) { + $r .= $lang[$o->getType()].' '; + } + $r .= $o->getFullName(); } - $r .= $o->getFullName(); + $r .= '</option>'."\n"; } - $r .= '</option>'."\n"; + $r .= ' </select>'."\n"; + } else if (isset($x['otype'])) { + // otype allows ajax based input + $r .= select_from_array_or_input($obj,$parsename,current($xx),($x['required']? 1:0),$x['otype'],$x[size]); + foreach ($xx as $i => $o) { + $r .= $o.' '; + } } - $r .= ' </select>'."\n"; $r .= " </td>\n"; } else if ($x['ftype'] == 'ObjectRelBack') { return ''; @@ -873,10 +881,23 @@ $obj->del_relation_id($i,$x['rel_id'],'',$x['lang']); } } - if (isset($_POST[$parsename])) - foreach($_POST[$parsename] as $xx) { - $obj->add_relation_id($xx,$x['rel_id'],'',$x['lang']); + // otype variant + if (isset($x['otype'])) { + if ( isset($_POST[$parsename.'fn']) ) { + $m = check_field($_POST[$parsename.'fn'],$parsename."fn",$parsename."l",$x['otype'],$obj); + $obj->add_relation_id($m->id,$x['rel_id'],'',$x['lang']); + } else if ( isset($_POST[$parsename.'id']) ) { + $m = getObject($obj->dbconn,$_POST[$parsename.'id']); + $obj->add_relation_id($m->id,$x['rel_id'],'',$x['lang']); + } else { + echo 'MISSING: '.$parsename; } + } else { + if (isset($_POST[$parsename])) + foreach($_POST[$parsename] as $xx) { + $obj->add_relation_id($xx,$x['rel_id'],'',$x['lang']); + } + } if ($x['required'] && (!isset($obj->relations[$x['rel_id']]) || count($obj->relations[$x['rel_id']]) == 0 )) { $r .= sprintf($lang['Err0009'],myentities(getLang($x['lang']))) .'<br />'; $gotourl = addBadField($gotourl,$parsename,true); Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2011-09-27 14:17:10 UTC (rev 298) +++ trunk/php/webelements.p3 2011-09-27 14:17:40 UTC (rev 299) @@ -436,7 +436,7 @@ case 'integer': case 'double': $msg .= $a; - break; + break; case 'boolean': if (true === $a){ $msg .= 'T'; @@ -1477,7 +1477,11 @@ if ($cnt == 0) { $nullmsg .= sprintf($lang['Err0012'],$lang['department'],$name) ."<br />"; } - } else { + } + if (!isset($tutos['classes'][$c])) { + loadmodule($c); + } + if (isset($tutos['classes'][$c])) { $x = new $tutos['classes'][$c]($dbconn); $cnt = $x->search_by_name($res,$current_user,$name,1); if ($cnt == 0) { @@ -1488,6 +1492,8 @@ $nullmsg .= sprintf($lang['Err0012'],$lang[$x->getType()],$name) ."<br />"; } } + } else { + die ('do not know how to handle '.$c); } # echo ' = '.$cnt."<br />"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-27 14:17:17
|
Revision: 298 http://tutos.svn.sourceforge.net/tutos/?rev=298&view=rev Author: gokohnert Date: 2011-09-27 14:17:10 +0000 (Tue, 27 Sep 2011) Log Message: ----------- added outdated state Modified Paths: -------------- trunk/php/testmanager/de.p3 trunk/php/testmanager/en.p3 trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/tw.p3 trunk/php/testmanager/zh.p3 Modified: trunk/php/testmanager/de.p3 =================================================================== --- trunk/php/testmanager/de.p3 2011-09-27 14:16:14 UTC (rev 297) +++ trunk/php/testmanager/de.p3 2011-09-27 14:17:10 UTC (rev 298) @@ -72,6 +72,7 @@ $lang['TestsuiteStates'][0] = 'undefined'; $lang['TestsuiteStates'][1] = 'in Arbeit'; $lang['TestsuiteStates'][2] = 'freigegeben'; +$lang['TestsuiteStates'][3] = 'outdated'; $lang['TestsuiteImport'] = 'import aus einer CSV Datei '; $lang['TestsuiteTest'] = 'nur Vorabansicht aus CSV'; Modified: trunk/php/testmanager/en.p3 =================================================================== --- trunk/php/testmanager/en.p3 2011-09-27 14:16:14 UTC (rev 297) +++ trunk/php/testmanager/en.p3 2011-09-27 14:17:10 UTC (rev 298) @@ -72,6 +72,7 @@ $lang['TestsuiteStates'][0] = 'undefined'; $lang['TestsuiteStates'][1] = 'in work'; $lang['TestsuiteStates'][2] = 'released'; +$lang['TestsuiteStates'][3] = 'outdated'; $lang['TestsuiteImport'] = 'import from a CSV file'; $lang['TestsuiteTest'] = 'only preview CSV'; Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2011-09-27 14:16:14 UTC (rev 297) +++ trunk/php/testmanager/testmanager.pinc 2011-09-27 14:17:10 UTC (rev 298) @@ -1255,6 +1255,8 @@ * Return a fullname of testsuite incl. version */ function getFullname() { + if (empty($this->version)) + return $this->name; return $this->name.' v'.$this->version; } @@ -2340,7 +2342,7 @@ $r .= '<input id="N'.$obj->id."t\" style=\"display:none;\" "enableTextEdit('N".$obj->id."');\" "disableTextEdit('N".$obj->id."');\" value=\"" . $obj->name. '" />'; $r .= '<div id="N'.$obj->id."p\" "enableTextEdit('N".$obj->id."');\">".$obj->name."</div>"; } else { - $r .= makelink($url,myentities($obj->getFullName())); + $r .= makelink($url,myentities($obj->name)); } $r .= ' </th>'."\n"; $r .= '</tr>'."\n"; Modified: trunk/php/testmanager/tw.p3 =================================================================== --- trunk/php/testmanager/tw.p3 2011-09-27 14:16:14 UTC (rev 297) +++ trunk/php/testmanager/tw.p3 2011-09-27 14:17:10 UTC (rev 298) @@ -70,6 +70,7 @@ $lang['TestsuiteStates'][0] = '未定義'; $lang['TestsuiteStates'][1] = '工作中'; $lang['TestsuiteStates'][2] = '發布'; +$lang['TestsuiteStates'][3] = 'outdated'; $lang['TestsuiteImport'] = '以 CSV 格式導入測試套件式'; $lang['TestsuiteTest'] = '只預覽 CSV 文件'; @@ -125,4 +126,4 @@ $lang['testsuite'] = &$lang['Testsuite']; $lang['testcase'] = &$lang['Testcase']; $lang['testrun'] = &$lang['Testrun']; -?> +?> \ No newline at end of file Modified: trunk/php/testmanager/zh.p3 =================================================================== --- trunk/php/testmanager/zh.p3 2011-09-27 14:16:14 UTC (rev 297) +++ trunk/php/testmanager/zh.p3 2011-09-27 14:17:10 UTC (rev 298) @@ -70,6 +70,7 @@ $lang['TestsuiteStates'][0] = '未定义'; $lang['TestsuiteStates'][1] = '工作中'; $lang['TestsuiteStates'][2] = '发布'; +$lang['TestsuiteStates'][3] = 'outdated'; $lang['TestsuiteImport'] = '以 CSV 格式导入测试套件式'; $lang['TestsuiteTest'] = '只预览 CSV 文件'; @@ -125,4 +126,4 @@ $lang['testsuite'] = &$lang['Testsuite']; $lang['testcase'] = &$lang['Testcase']; $lang['testrun'] = &$lang['Testrun']; -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-27 14:16:25
|
Revision: 297 http://tutos.svn.sourceforge.net/tutos/?rev=297&view=rev Author: gokohnert Date: 2011-09-27 14:16:14 +0000 (Tue, 27 Sep 2011) Log Message: ----------- update search Modified Paths: -------------- trunk/php/scrum/log_select.php trunk/php/scrum/sprint_select.php Modified: trunk/php/scrum/log_select.php =================================================================== --- trunk/php/scrum/log_select.php 2011-09-26 16:47:28 UTC (rev 296) +++ trunk/php/scrum/log_select.php 2011-09-27 14:16:14 UTC (rev 297) @@ -19,6 +19,7 @@ check_user(); loadmodules('scrumlog','select'); loadmodule('scrumlog'); +loadmodule('scrumsprint'); loadlayout(); /** @@ -34,6 +35,7 @@ $r = ''; $r .= "<form id=\"logsearch\" name=\"logsearch\" method=\"get\" action=\"log_overview.php\">\n"; $r .= DoubleTableStart(); + $this->addHidden('ext',$this->ext); $r .= "<tr>\n"; $r .= '<th colspan="3">'. $lang['SearchForLog'] ."</th>\n"; @@ -44,62 +46,76 @@ $r .= " <input type=\"submit\" value=\"". $lang['Search'] ."\" /></td>\n"; $r .= "</tr>\n"; - if ( $this->ext == false ) { - $r .= "<tr>\n"; - $this->addHidden('ext',0); - $r .= ' <td colspan=3" align="right">'. makelink("scrum/log_select.php?ext=1",$lang['extended']) ."</td>\n"; - } else { - $this->addHidden('ext',1); - $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['ScrumLogSprint'],0,"s_id"); - $r .= ' <td>'; - $r .= select_from_array_or_input($this->obj,"s_",null,1,array(USESCRUMSPRINT)); - $r .= '</td><td>'; - $r .= '<input type="checkbox" name="nos" id="nos" value="1"><strike>'.$lang['Sprint'].'</strike></input>'; - $r .= "</td></tr>\n"; + $r .= "<tr>\n"; + $r .= ' <td colspan="3" align="right"><span id="toggler">'. $lang['extended'] ."</span></td>\n"; + $tutos['pagescript'] .= " +$( \"#toggler\" ).click(function() { + $(\".ext\").toggle(); + if ( $(\"#h_ext\").val() == 0 ) { + $(\"#h_ext\").val(1); + } else { + $(\"#h_ext\").val(0); + } + return; + }); +\n"; + if ( $this->ext == 0 ) { + $tutos['pagescript'] .= " + $(\".ext\").hide(); +\n"; + } - $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['ScrumLogPref'],0,"p_id"); - $r .= ' <td colspan="2">'; - $r .= select_from_array_or_input($this->obj,"p_",null,1,array(useprojects)); - $r .= "</td></tr>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['ScrumLogSprint'],0,"s_id"); + $r .= ' <td>'; + $r .= select_from_array_or_input($this->obj,"s_",null,1,array(USESCRUMSPRINT)); + $r .= '</td><td>'; + $r .= '<input type="checkbox" name="nos" id="nos" value="1"><strike>'.$lang['Sprint'].'</strike></input>'; + $r .= "</td>\n"; - $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['ScrumLogWorker'],0,"w_id"); - $r .= ' <td colspan="2">'; - $r .= select_from_array_or_input($this->obj,"w_",null,1,array(useaddressbook)); - $r .= "</td></tr>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['ScrumLogPref'],0,"p_id"); + $r .= ' <td colspan="2">'; + $r .= select_from_array_or_input($this->obj,"p_",null,1,array(useprojects)); + $r .= "</td>\n"; - $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['ScrumLogState'],0,"state"); - $r .= ' <td colspan="2">'; - $r .= '<select size="4" id="state" name="state[]" multiple="multiple">'."\n"; - foreach($lang['ScrumLogStates'] as $i => $j) { - $r .= '<option value="'.$i.'">'.$lang['ScrumLogStates'][$i]."</option>\n"; - } - $r .= "</select></td></tr>\n"; - $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['ScrumLogPrio'],0,"prio"); - $r .= ' <td colspan="2">'; - $r .= '<select size="6" id="prio" name="prio[]" multiple="multiple">'."\n"; - for ($i = 0; $i<SCRUMLOG_MAXPRIO; $i++) { - $r .= ' <option value="'.$i.'" style="'.ScrumLog::getPrioColor($i).'">'; - $r .= $i; - $r .= '</option>'."\n"; - } - $r .= "</select></td></tr>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['ScrumLogWorker'],0,"w_id"); + $r .= ' <td colspan="2">'; + $r .= select_from_array_or_input($this->obj,"w_",null,1,array(useaddressbook)); + $r .= "</td>\n"; - // add custom selectors - $x = get_custom_selectors(ScrumLog::getType()); - foreach ($x as $s) { - $r .= "<tr>\n"; - $r .= $this->showfieldc($s[0]); - $r .= " <td colspan=\"2\">\n"; - $r .= $s[1]; - $r .= " </td></tr>\n"; - } + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['ScrumLogState'],0,"state"); + $r .= ' <td colspan="2">'; + $r .= '<select size="4" id="state" name="state[]" multiple="multiple">'."\n"; + foreach($lang['ScrumLogStates'] as $i => $j) { + $r .= '<option value="'.$i.'">'.$lang['ScrumLogStates'][$i]."</option>\n"; } + $r .= "</select></td>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['ScrumLogPrio'],0,"prio"); + $r .= ' <td colspan="2">'; + $r .= '<select size="6" id="prio" name="prio[]" multiple="multiple">'."\n"; + for ($i = 0; $i<SCRUMLOG_MAXPRIO; $i++) { + $r .= ' <option value="'.$i.'" style="'.ScrumLog::getPrioColor($i).'">'; + $r .= $i; + $r .= '</option>'."\n"; + } + $r .= "</select></td>\n"; + + // add custom selectors + $x = get_custom_selectors(ScrumLog::getType()); + foreach ($x as $s) { + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($s[0]); + $r .= " <td colspan=\"2\">\n"; + $r .= $s[1]; + $r .= " </td>\n"; + } + $r .= "</tr>\n"; + $r .= DoubleTableEnd(); $r .= hiddenFormElements(); $r .= $this->getHidden(); @@ -134,6 +150,12 @@ } else { $this->ext = $_GET['ext']; } + + $m = ScrumSprint::getSelectLink($this->user); + + if ( is_array($m)) { + $this->addMenu($m); + } } } Modified: trunk/php/scrum/sprint_select.php =================================================================== --- trunk/php/scrum/sprint_select.php 2011-09-26 16:47:28 UTC (rev 296) +++ trunk/php/scrum/sprint_select.php 2011-09-27 14:16:14 UTC (rev 297) @@ -35,7 +35,9 @@ $r = ''; $r .= "<form id=\"sprintsearch\" name=\"sprintsearch\" method=\"get\" action=\"sprint_overview.php\">\n"; $r .= DoubleTableStart(); + $this->addHidden('ext',$this->ext); + $r .= "<tr>\n"; $r .= '<th colspan="3">'. $lang['SearchForSprint'] ."</th>\n"; $r .= "</tr><tr>\n"; @@ -43,40 +45,53 @@ $r .= " <td ><input type=\"text\" value=\"\" name=\"name\" /></td>\n"; $r .= " <td align=\"center\">\n"; $r .= " <input type=\"submit\" value=\"". $lang['Search'] ."\" /></td>\n"; - $r .= "</tr>\n"; - if ( $this->ext == false ) { - $this->addHidden('ext',0); - $r .= "<tr>\n"; - $r .= ' <td colspan=3" align="right">'. makelink("scrum/sprint_select.php?ext=1",$lang['extended']) ."</td>\n"; - } else { - $this->addHidden('ext',1); - $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['SprintRef'],0,"p_id"); - $r .= ' <td colspan="2">'; - $r .= select_from_array_or_input($this->obj,"p_",null,1,array(useprojects)); - $r .= "</td></tr>\n"; + $r .= "</tr><tr>\n"; - $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['SprintState'],0,"state"); - $r .= ' <td colspan="2">'; - $r .= '<select size="4" id="state" name="state[]" multiple="multiple">'."\n"; - foreach($lang['SprintStates'] as $i => $j) { - $r .= '<option value="'.$i.'">'.$lang['SprintStates'][$i]."</option>\n"; + $r .= ' <td colspan="3" align="right"><span id="toggler">'. $lang['extended'] ."</span></td>\n"; + $tutos['pagescript'] .= " +$( \"#toggler\" ).click(function() { + $(\".ext\").toggle(); + if ( $(\"#h_ext\").val() == 0 ) { + $(\"#h_ext\").val(1); + } else { + $(\"#h_ext\").val(0); } - $r .= "</select></td></tr>\n"; + return; + }); +\n"; + if ( $this->ext == 0 ) { + $tutos['pagescript'] .= " + $(\".ext\").hide(); +\n"; + } - // add custom selectors - $x = get_custom_selectors(ScrumSprint::getType()); - foreach ($x as $s) { - $r .= "<tr>\n"; - $r .= $this->showfieldc($s[0]); - $r .= " <td colspan=\"2\">\n"; - $r .= $s[1]; - $r .= " </td></tr>\n"; - } + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['SprintRef'],0,"p_id"); + $r .= ' <td colspan="2">'; + $r .= select_from_array_or_input($this->obj,"p_",null,1,array(useprojects)); + $r .= "</td>\n"; + + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($lang['SprintState'],0,"state"); + $r .= ' <td colspan="2">'; + $r .= '<select size="4" id="state" name="state[]" multiple="multiple">'."\n"; + foreach($lang['SprintStates'] as $i => $j) { + $r .= '<option value="'.$i.'">'.$lang['SprintStates'][$i]."</option>\n"; } + $r .= "</select></td></tr>\n"; + // add custom selectors + $x = get_custom_selectors(ScrumSprint::getType()); + foreach ($x as $s) { + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($s[0]); + $r .= " <td colspan=\"2\">\n"; + $r .= $s[1]; + $r .= " </td>\n"; + } + $r .= "</tr>\n"; + $r .= DoubleTableEnd(); $r .= hiddenFormElements(); $r .= $this->getHidden(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-26 16:47:34
|
Revision: 296 http://tutos.svn.sourceforge.net/tutos/?rev=296&view=rev Author: gokohnert Date: 2011-09-26 16:47:28 +0000 (Mon, 26 Sep 2011) Log Message: ----------- file search with more extensions / see and mark search filters Modified Paths: -------------- trunk/php/db/table_custom_example.pinc trunk/php/file/file_overview.php trunk/php/file/file_select.php Modified: trunk/php/db/table_custom_example.pinc =================================================================== --- trunk/php/db/table_custom_example.pinc 2011-09-26 13:27:32 UTC (rev 295) +++ trunk/php/db/table_custom_example.pinc 2011-09-26 16:47:28 UTC (rev 296) @@ -269,6 +269,7 @@ 'lang' => "DOCSTATUS", 'overview' => true, # show in overview 'sortable' => true, # show in overview as sortable + 'searchable' => true, # show in select page 'required' => true ); @@ -292,6 +293,7 @@ 'lang' => "DOC_REVIEW", 'overview' => true, # show in overview 'sortable' => true, # show in overview as sortable + 'searchable' => true, # show in select page 'required' => false, ); $lang['DOC_REVIEW'] = "Review by"; Modified: trunk/php/file/file_overview.php =================================================================== --- trunk/php/file/file_overview.php 2011-09-26 13:27:32 UTC (rev 295) +++ trunk/php/file/file_overview.php 2011-09-26 16:47:28 UTC (rev 296) @@ -34,6 +34,11 @@ $r = ''; + if (isset($this->head['f.link_id'])) + $this->head['link_id'] = $this->head['f.link_id']; + if (isset($this->filter['f.link_id'])) + $this->filter['link_id'] = $this->filter['f.link_id']; + // Make a big array of all visible files $x = 0; $np = array(); @@ -76,19 +81,29 @@ $nav['link'] = $this->link1; $nav['list'] = $np; $ss = $this->putSubSession($nav); - $r .= $this->actionformStart("file_overview.php"); $r .= $this->header; + $this->flds = 5; $r .= $this->OverviewTableStart(); $r .= "<thead>\n"; $r .= "<tr>\n"; $r .= $this->orderHeader("name",$lang['FileNameDoc'],$this->link2); $r .= $this->orderHeader("version",$lang['FileVersion'],$this->link2); $r .= $this->orderHeader("filename",$lang['FileName'],$this->link2); - $r .= $this->orderHeader("",$lang['FileReference'],$this->link2); + if ($this->head['link_id']) { + $r .= $this->orderHeader("",$lang['FileReference'],$this->link2); + $this->flds++; + } + if ($this->head['type']) { + $r .= $this->orderHeader("",$lang['FileType'],$this->link2); + $this->flds++; + } + if ($this->head['author']) { + $r .= $this->orderHeader("",$lang['FileAuthor'],$this->link2); + $this->flds++; + } $r .= $this->orderHeader("f_size",$lang['FileSize'],$this->link2); $r .= $this->orderHeader("creation",$lang['created'],$this->link2); - $this->flds = 6; $r .= show_custom_overview_headers($this,'file',$this->link2); if ( $tutos[massupdate] == 1 ) { $r .= " <th nowrap=\"nowrap\"><input type=\"checkbox\" name=\"checkit\" "CheckAll2();\" /></th>\n"; @@ -118,15 +133,32 @@ $icon = get_icon($this,$f->filename); $r .= ' <td valign="top">'.$icon.$x ."</td>\n"; - $r .= ' <td valign="top" align="right">'; - if ( count($f->links) ) { - foreach ($f->links as $ref) { - $r .= $ref->getLink()."<br />"; + if ($this->head['link_id']) { + $r .= ' <td valign="top" align="right">'; + if ( count($f->links) ) { + foreach ($f->links as $ref) { + $x = $this->mark_filter(myentities($ref->getFullName()),'link_id'); + $r .= $ref->getLink($x)."<br />"; + } + } else { + $r .= '--'; } - } else { - $r .= '--'; + $r .= "</td>\n"; } - $r .= "</td>\n"; + if ($this->head['type']) { + $r .= ' <td valign="top" align="right">'; + $x = $this->mark_filter(myentities($f->filetype),'type'); + $r .= $x; + $r .= "</td>\n"; + } + if ($this->head['author']) { + $r .= ' <td valign="top" align="right"> '; + if (is_object($f->author)) { + $x = $this->mark_filter(myentities($f->author->getFullName()),'author'); + $r .= $f->author->getLink($x); + } + $r .= "</td>\n"; + } $r .= ' <td valign="top" align="right">'. $f->filesize ."</td>\n"; $r .= ' <td valign="top" align="right">'. $f->creation->getDateTime() ." </td>\n"; @@ -220,94 +252,58 @@ $this->link1 = "file/file_overview.php"; // TODO: Optimize HERE !!! - - if ( isset($_GET['link_id']) && is_numeric($_GET['link_id']) ) { + if ( (isset($_GET['link_id']) && is_numeric($_GET['link_id'])) || (isset($_GET['link_fn']) && !empty($_GET['link_fn'])) ) { $this->q = 'SELECT distinct f.* FROM '. $this->dbconn->prefix .'files f,'. $this->dbconn->prefix .'filelink l'; - // if(! $this->user->isadmin()) { - // $this->q .= ",".$this->dbconn->prefix ."acl a"; - // } - $pre = " WHERE " ; - $this->q .= $pre . "(f.id = l.f_id) and (f.link_id = ".$_GET['link_id'].' or l.link_id = '. $_GET['link_id'] .')'; - $pre = " AND " ; - $this->link1 = addUrlParameter($this->link1,"link_id=". $_GET['link_id']); + $this->q .=' WHERE (f.id = l.f_id)'; + $this->qpre = " AND " ; } else { $this->q = 'SELECT distinct f.* FROM '. $this->dbconn->prefix .'files f'; - if(! $this->user->isadmin()) { - # $this->q .= ",".$this->dbconn->prefix ."acl a"; - } - $pre = " WHERE " ; + $this->qpre = " WHERE " ; } - if ( isset($_GET['author']) ) { - $this->q .= $pre . " f.author = ". $_GET['author']; - $pre = " AND " ; - $this->link1 = addUrlParameter($this->link1,"author=". $_GET['author']); - } + if ( isset($_GET['creator']) ) { - $this->q .= $pre . " f.creator = ". $_GET['creator']; - $pre = " AND " ; + $this->q .= $this->pre . " f.creator = ". $_GET['creator']; + $this->qpre = " AND " ; $this->link1 = addUrlParameter($this->link1,"creator=". $_GET['creator']); } - if ( isset($_GET['type']) ) { - $this->q .= $pre . $this->dbconn->Like("f.type",$_GET['type']); - $pre = " AND " ; - $this->link1 = addUrlParameter($this->link1,"type=". UrlEncode($_GET['type'])); + + overview_arg($this,'link_id',OVERVIEW_ARG_OBJID,'file',array('f.link_id','l.link_id'),array('FileReference'),''); + overview_arg($this,'link_fn',OVERVIEW_ARG_FN,'file',array('f.link_id','l.link_id'),array('FileReference'),'',get_parent_classes('file')); + // Search Author + overview_arg($this,'authorid',OVERVIEW_ARG_OBJID,'file',array('author'),'FileAuthor','f.'); + overview_arg($this,'authorfn',OVERVIEW_ARG_FN,'file',array('author'),'FileAuthor','f.','a'); + + // Textual search + overview_arg($this,'type',OVERVIEW_ARG_STRING,'file',array('type'),array('FileType'),'f.'); + // show onnly if in search + if (!isset($_GET['type']) || empty($_GET['type'])) { + $this->head['type'] = false; } - if ( isset($_GET['name']) && ($_GET['name'] != "") ) { - $this->q .= $pre . "("; - $this->q .= $this->dbconn->Like("f.name",$_GET['name']); - $this->q .= " OR ". $this->dbconn->Like("filename",$_GET['name']); - $this->q .= " OR ". $this->dbconn->Like("version",$_GET['name']); - # $this->q .= " OR ". $this->dbconn->Like("logtxt",$name); - $this->q .= ")"; - $pre = " AND " ; - $this->link1 = addUrlParameter($this->link1,"name=". UrlEncode($_GET['name'])); - $this->filter['name'] = $_GET['name']; - } else { - $this->filter['name'] = ""; - } + // Textual search + overview_arg($this,'name',OVERVIEW_ARG_STRING,'file',array('name','filename','version'),array('FileName','FileNameDoc','FileVersion'),'f.'); // Start Date for search - $from = new TUTOS_Date_Time(0); - if ( isset($_GET['fd']) ) { - $from->setDateTime($_GET['fd']); - } else { - $from->setDateTimeF("f"); - // remember this - $_SESSION['filesearchfrom'] = $from->getYYYYMMDD(); - } - if ( $from->notime != 1 ) { - $this->q .= $pre ."(creation >= ". $this->dbconn->Date($from) .")"; - $pre = " AND "; + overview_arg($this,'f',OVERVIEW_ARG_D_FROM,'file',array('creation'),'created','f.'); - $this->link1 = addUrlParameter($this->link1,"fd=".$from->getYYYYMMDD()); - $this->filter['from'] = $from; - } // End Date for search - $to = new TUTOS_Date_Time(0); - if ( isset($_GET['td']) ) { - $to->setDateTime($_GET['td']); - } else { - $to->setDateTimeF("t"); - // remember this - $_SESSION['filesearchto'] = $to->getYYYYMMDD(); - } - if ( $to->notime != 1 ) { - $this->q .= $pre ."(creation <= ". $this->dbconn->Date($to) .")"; - $pre = " AND "; + overview_arg($this,'t',OVERVIEW_ARG_D_TO,'file',array('creation'),'created','f.'); - $this->link1 = addUrlParameter($this->link1,"td=".$to->getYYYYMMDD()); - $this->filter['to'] = $to; + // custom selectors + // get customized non textual search fields + $custom = get_custom_sql_select($this,'file','f',$this->link1); + foreach ($custom[0] as $s) { + $this->q .= $this->qpre; + $this->q .= $s[0]; + $this->qpre = " AND "; + $this->header .= $this->hpre.$s[1]; + $this->hpre = '<br />'; } - - if(! $this->user->isadmin()) { - // $tq = ''; - // foreach ( $this->user->teamlist as $key => $val ) { - // $tq .= "OR ( a.adr_id = ".$key." ) "; - // } - // $this->q .= $pre."(( f.id = a.obj_id ) AND ( a.perm >= ".$tutos[seeok]." ) AND (( a.adr_id = ".$this->user->id.") OR (a.adr_id = ".EVERYBODY.") ".$tq.") )"; - // $pre = " AND "; + foreach ($custom[1] as $s) { + $this->q = preg_replace('# where#i',','.$s.' WHERE',$this->q); } + + check_dbacl($this->dbconn, $this->q, $this->user->id); // sorting @@ -319,6 +315,8 @@ $_GET['xf'] = "name"; $_GET['xo'] = 1; } + + // $msg .= $this->q; $this->result = $this->dbconn->Exec($this->q); //print_r( $this->user->acl); if ( 0 == $this->result->numrows()) { Modified: trunk/php/file/file_select.php =================================================================== --- trunk/php/file/file_select.php 2011-09-26 13:27:32 UTC (rev 295) +++ trunk/php/file/file_select.php 2011-09-26 16:47:28 UTC (rev 296) @@ -33,43 +33,76 @@ $r = ''; $r .= "<form id=\"filesearch\" name=\"filesearch\" method=\"get\" action=\"file_overview.php\">\n"; - $r .= hiddenFormElements(); $r .= DoubleTableStart(); + $this->addHidden('ext',$this->ext); $r .= "<tr>\n"; + $r .= "<th colspan=\"3\">". $lang['SearchForFile'] ."</th>\n"; + + $r .= "</tr><tr>\n"; + + $r .= $this->showfieldc($lang['AdrName']); + $r .= " <td align=\"center\"><input type=\"text\" value=\"\" name=\"name\"></td>\n"; + $r .= " <td align=\"center\">\n"; + $r .= " <input type=\"submit\" value=\"". $lang['Search'] ."\" title=\"". $lang['SearchForFile'] ."\"></td>\n"; + $r .= "</tr><tr>\n"; + $r .= " <td colspan=\"2\" align=\"center\"></td>\n"; + $r .= ' <td colspan="3" align="right"><span id="toggler">'. $lang['extended'] ."</span></td>\n"; + $tutos['pagescript'] .= " +$( \"#toggler\" ).click(function() { + $(\".ext\").toggle(); + if ( $(\"#h_ext\").val() == 0 ) { + $(\"#h_ext\").val(1); + } else { + $(\"#h_ext\").val(0); + } + return; + }); +\n"; + if ( $this->ext == 0 ) { - $r .= "<th colspan=\"3\">". $lang['SearchForFile'] ."</th>\n"; + $tutos['pagescript'] .= " + $(\".ext\").hide(); +\n"; + } - $r .= "</tr><tr>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc(sprintf($lang['FileReference'],''),0,"link_"); + $r .= '<td colspan="2">'; + $r .= select_from_array_or_input($this->obj,"link_",null,1,get_parent_classes('file')); + $r .= "</td>\n"; - $r .= $this->showfieldc($lang['AdrName']); - $r .= " <td align=\"center\"><input type=\"text\" value=\"\" name=\"name\"></td>\n"; - $r .= " <td align=\"center\">\n"; - $r .= " <input type=\"submit\" value=\"". $lang['Search'] ."\" title=\"". $lang['SearchForFile'] ."\"></td>\n"; - $r .= "</tr><tr>\n"; - $r .= " <td colspan=\"2\" align=\"center\"></td>\n"; - $r .= " <td align=\"center\">". makelink("file/file_select.php?ext=1",$lang['extended']) ."</td>\n"; - } else { - $r .= "<th colspan=\"3\">". $lang['SearchForFileExt'] ."</th>\n"; - $r .= "</tr><tr>\n"; - $r .= $this->showfieldc($lang['AdrName']); - $r .= " <td><input type=\"text\" value=\"\" name=\"name\">"; - $r .= " </td>\n"; - $r .= " <td align=\"center\"><input type=\"submit\" value=\"". $lang['Search'] ."\" title=\"". $lang['SearchForFileExt'] ."\"></td>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc(sprintf($lang['FileAuthor'],''),0,"author"); + $r .= '<td colspan="2">'; + $r .= select_from_array_or_input($this->obj,"author",null,1,'a'); + $r .= "</td>\n"; - $r .= "</tr><tr>\n"; - $r .= " <td rowspan=\"2\" class=\"desc\">". $lang['TaskBetween'] ."</td>\n"; - $r .= " <td colspan=\"2\">"; - $r .= $this->fd->EnterDate("f",1); - $r .= "</td>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= " <td rowspan=\"2\" class=\"desc\">". $lang['TaskBetween'] ."</td>\n"; + $r .= " <td colspan=\"2\">"; + $r .= $this->fd->EnterDate("f",1); + $r .= "</td>\n"; - $r .= "</tr><tr>\n"; - $r .= " <td colspan=\"2\">"; - $r .= $this->td->EnterDate("t",1); - $r .= "</td>\n"; + $r .= "</tr><tr class=\"ext\">\n"; + $r .= " <td colspan=\"2\">"; + $r .= $this->td->EnterDate("t",1); + $r .= "</td>\n"; + + // add custom selectors + $x = get_custom_selectors('file'); + foreach ($x as $s) { + $r .= "</tr><tr class=\"ext\">\n"; + $r .= $this->showfieldc($s[0]); + $r .= " <td colspan=\"2\">\n"; + $r .= $s[1]; + $r .= " </td>\n"; } + $r .= "</tr>\n"; $r .= DoubleTableEnd(); + $r .= hiddenFormElements(); + $r .= $this->getHidden(); $r .= "</form>\n"; // shortcuts with urls This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-26 13:27:43
|
Revision: 295 http://tutos.svn.sourceforge.net/tutos/?rev=295&view=rev Author: gokohnert Date: 2011-09-26 13:27:32 +0000 (Mon, 26 Sep 2011) Log Message: ----------- memchache mode fixed Modified Paths: -------------- trunk/php/base.pinc trunk/php/db/db.pinc trunk/php/db/db_mysqli.pinc trunk/php/layout/new2_layout.pinc trunk/php/webelements.p3 Modified: trunk/php/base.pinc =================================================================== --- trunk/php/base.pinc 2011-09-24 13:15:44 UTC (rev 294) +++ trunk/php/base.pinc 2011-09-26 13:27:32 UTC (rev 295) @@ -162,7 +162,7 @@ if($tutos['memcache'] != null) { $memid = $obj->dbconn->db->systemid.'_'.$id; $x = $tutos['memcache']->get($memid); - if ($x !== false) { + if ($x !== false && count($x)) { $r = new result_mem($obj->dbconn); $r->putall($x); $g_hash['hits3']++; Modified: trunk/php/db/db.pinc =================================================================== --- trunk/php/db/db.pinc 2011-09-24 13:15:44 UTC (rev 294) +++ trunk/php/db/db.pinc 2011-09-26 13:27:32 UTC (rev 295) @@ -313,6 +313,13 @@ return 'TUTOS DB Connection:'.$this->db->getFullName().' '.$this->moreinfo(); } + + /** + * Type + */ + function getType() { + return 'DB'; + } } /** @@ -431,6 +438,13 @@ return 'TUTOS DB Resultset:'.$this->dbconn->db->getFullName().' '.$this->dbconn->moreinfo(); } + + /** + * Type + */ + function getType() { + return 'result'; + } } /** @@ -716,6 +730,7 @@ function free() { $this->all = array(); } + /** * String Representation */ @@ -724,6 +739,13 @@ return 'TUTOS DB MEM-Resultset: '.count($this->rs); } + + /** + * Type + */ + function getType() { + return 'memresultset'; + } } ?> \ No newline at end of file Modified: trunk/php/db/db_mysqli.pinc =================================================================== --- trunk/php/db/db_mysqli.pinc 2011-09-24 13:15:44 UTC (rev 294) +++ trunk/php/db/db_mysqli.pinc 2011-09-26 13:27:32 UTC (rev 295) @@ -708,7 +708,7 @@ * get for serialize */ function getall($pos) { - return mysql_fetch_assoc($this->rs); + return mysqli_fetch_assoc($this->rs); } /** @@ -756,5 +756,11 @@ return $this->rs->free(); } + /** + */ + function getType() { + return 'mysqli_result'; + } + } ?> \ No newline at end of file Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2011-09-24 13:15:44 UTC (rev 294) +++ trunk/php/layout/new2_layout.pinc 2011-09-26 13:27:32 UTC (rev 295) @@ -1260,10 +1260,10 @@ $tutos['pagescript'] .= "$('#tutosversion').bt('".addslashes($pinfo)."');\n"; } $r .= ' cacheinfo '. (count($g_hash) - 6)."\n"; - $r .= ' / '. $g_hash['hits'].':'.$g_hash['fail']."\n"; + $r .= ' / H:'. $g_hash['hits'].':'.$g_hash['fail']."\n"; $r .= ' / '. $g_hash['hits2'].':'.$g_hash['fail2']."\n"; if($tutos['memcache'] != null) { - $r .= ' / '. $g_hash['hits3'].':'.$g_hash['fail3']."\n"; + $r .= ' / M:'. $g_hash['hits3'].':'.$g_hash['fail3']."\n"; } $r .= '"'; } Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2011-09-24 13:15:44 UTC (rev 294) +++ trunk/php/webelements.p3 2011-09-26 13:27:32 UTC (rev 295) @@ -453,6 +453,14 @@ $msg .= '#'.$a->id; break; } + if ($a instanceof result) { + $msg .= '<'.$a->getType().'>'; + break; + } + if ($a instanceof tutos_db) { + $msg .= '<'.$a->getType().'>'; + break; + } default: $msg .= "<". $t .">"; break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-24 13:15:51
|
Revision: 294 http://tutos.svn.sourceforge.net/tutos/?rev=294&view=rev Author: gokohnert Date: 2011-09-24 13:15:44 +0000 (Sat, 24 Sep 2011) Log Message: ----------- use a better after deletion url Modified Paths: -------------- trunk/php/file/file.pinc trunk/php/file/file_del.php trunk/php/file/file_overview.php Modified: trunk/php/file/file.pinc =================================================================== --- trunk/php/file/file.pinc 2011-09-24 13:14:51 UTC (rev 293) +++ trunk/php/file/file.pinc 2011-09-24 13:15:44 UTC (rev 294) @@ -377,6 +377,16 @@ } /** + * the url where we go after deleting this object + */ + function get_after_del_url () { + if (count($this->links) == 0) return 'file/file_select.php'; + foreach($this->links as $i => $f) { + return '../'.$f->getUrl(); + } + } + + /** * Return a link to this file */ function getLink($text = '',$arg = '') { Modified: trunk/php/file/file_del.php =================================================================== --- trunk/php/file/file_del.php 2011-09-24 13:14:51 UTC (rev 293) +++ trunk/php/file/file_del.php 2011-09-24 13:15:44 UTC (rev 294) @@ -2,8 +2,8 @@ /** * Copyright 1999 - 2007 by Gero Kohnert * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the * Free Software Foundation; version 2 of the License. * * @modulegroup file @@ -39,13 +39,13 @@ } if ( $msg == "" ) { + $gotourl = $f->get_after_del_url(); $dbconn->Begin("WORK"); $msg = $f->delete(); $dbconn->Commit("WORK"); if ($msg == '') { $msg = sprintf($lang['FileDelSuccess'],$f->getFullname()); } - $gotourl = "file_select.php"; } leave_insert($dbconn,$gotourl,$msg); Modified: trunk/php/file/file_overview.php =================================================================== --- trunk/php/file/file_overview.php 2011-09-24 13:14:51 UTC (rev 293) +++ trunk/php/file/file_overview.php 2011-09-24 13:15:44 UTC (rev 294) @@ -78,6 +78,7 @@ $ss = $this->putSubSession($nav); $r .= $this->actionformStart("file_overview.php"); + $r .= $this->header; $r .= $this->OverviewTableStart(); $r .= "<thead>\n"; $r .= "<tr>\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-24 13:14:57
|
Revision: 293 http://tutos.svn.sourceforge.net/tutos/?rev=293&view=rev Author: gokohnert Date: 2011-09-24 13:14:51 +0000 (Sat, 24 Sep 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/stc/stc_new.php Modified: trunk/php/stc/stc_new.php =================================================================== --- trunk/php/stc/stc_new.php 2011-09-24 13:14:38 UTC (rev 292) +++ trunk/php/stc/stc_new.php 2011-09-24 13:14:51 UTC (rev 293) @@ -87,7 +87,7 @@ } $r .= '></input> <label for="trans'.$j->id.'">'.$j->getFullName().'</label>'; $r .= '<span style="text-align:right;"> '; - $r .= makelink('acl_new.php?id='. $j->id ,$this->theme->getImage(perm,'list'),$lang['ACLnew'],acl_popup($j)); + $r .= makelink('acl_new.php?id='. $j->id ,$this->theme->getImage(perm,'list'),$lang['ACLmod'],acl_popup($j)); $r .= '</span><br/>'; } $r .= ' </td>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-24 13:14:44
|
Revision: 292 http://tutos.svn.sourceforge.net/tutos/?rev=292&view=rev Author: gokohnert Date: 2011-09-24 13:14:38 +0000 (Sat, 24 Sep 2011) Log Message: ----------- keep sorting on massupdate Modified Paths: -------------- trunk/php/layout/new2_layout.pinc trunk/php/layout/new_layout.pinc Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2011-09-24 11:46:18 UTC (rev 291) +++ trunk/php/layout/new2_layout.pinc 2011-09-24 13:14:38 UTC (rev 292) @@ -204,6 +204,13 @@ $r = ''; if ( $tutos[massupdate] == 1 ) { $r .= '<form id="actionform" method="get" action="'. $url ."\">\n"; + // keep sort and order + if (isset($_GET['xo'])) + $this->addHidden('xo',$_GET['xo']); + if (isset($_GET['xf'])) + $this->addHidden('xf',$_GET['xf']); + if (isset($_GET['start'])) + $this->addHidden('start',$_GET['start']); } return $r; } Modified: trunk/php/layout/new_layout.pinc =================================================================== --- trunk/php/layout/new_layout.pinc 2011-09-24 11:46:18 UTC (rev 291) +++ trunk/php/layout/new_layout.pinc 2011-09-24 13:14:38 UTC (rev 292) @@ -224,6 +224,12 @@ $r = ''; if ( $tutos[massupdate] == 1 ) { $r .= '<form id="actionform" name="actionform" method="get" action="'. $url ."\">\n"; + if (isset($_GET['xo'])) + $this->addHidden('xo',$_GET['xo']); + if (isset($_GET['xf'])) + $this->addHidden('xf',$_GET['xf']); + if (isset($_GET['start'])) + $this->addHidden('start',$_GET['start']); } return $r; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-24 11:46:24
|
Revision: 291 http://tutos.svn.sourceforge.net/tutos/?rev=291&view=rev Author: gokohnert Date: 2011-09-24 11:46:18 +0000 (Sat, 24 Sep 2011) Log Message: ----------- allow ajax for popups Modified Paths: -------------- trunk/php/webelements.p3 Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2011-09-24 11:45:44 UTC (rev 290) +++ trunk/php/webelements.p3 2011-09-24 11:46:18 UTC (rev 291) @@ -1163,7 +1163,11 @@ $id = 'bt_'.uniqid(); } $r .= sprintf ('<a id="'.$id.'" href="%s" '.$target." title=\"%s\">%s</a>",$href,myentities($info),$text); - $tutos['pagescript'] .= "$('#".$id."').bt('".addslashes($plus)."');\n"; + if (is_array($plus)) { + $tutos['pagescript'] .= "$('#".$id."').bt(".$plus[0].");\n"; + } else { + $tutos['pagescript'] .= "$('#".$id."').bt('".addslashes($plus)."');\n"; + } return $r; } else { if ($tag != '') { @@ -2913,7 +2917,7 @@ foreach($t2 as $i=>$x) if ($x>'') $r2[$x][]=$i; $a1=0; $a2=0; # start at beginning of each list - $actions=array(); + $actions=array(); // walk this loop until we reach the end of one of the lists while ($a1<count($t1) && $a2<count($t2)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-24 11:45:55
|
Revision: 290 http://tutos.svn.sourceforge.net/tutos/?rev=290&view=rev Author: gokohnert Date: 2011-09-24 11:45:44 +0000 (Sat, 24 Sep 2011) Log Message: ----------- more check Modified Paths: -------------- trunk/php/showobject.php Modified: trunk/php/showobject.php =================================================================== --- trunk/php/showobject.php 2011-09-24 11:45:08 UTC (rev 289) +++ trunk/php/showobject.php 2011-09-24 11:45:44 UTC (rev 290) @@ -18,12 +18,14 @@ check_user(); $gotourl = ''; +if (!isset($_GET['id'])) { + die('Missing arguement !'); +} $obj = getObject($dbconn,$_GET['id']); if ( is_object($obj) ) { $gotourl = $obj->getURL(); } else { - echo "ID:". $_GET['id'] ." not found.<br />\n"; - exit; + die('ID:'. $_GET['id'] ." not found.<br />\n"); } if (isset($_GET['format']) && ($_GET['format'] == "xml") ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-24 11:45:14
|
Revision: 289 http://tutos.svn.sourceforge.net/tutos/?rev=289&view=rev Author: gokohnert Date: 2011-09-24 11:45:08 +0000 (Sat, 24 Sep 2011) Log Message: ----------- format times in mytutos Modified Paths: -------------- trunk/php/task.pinc Modified: trunk/php/task.pinc =================================================================== --- trunk/php/task.pinc 2011-09-24 11:44:24 UTC (rev 288) +++ trunk/php/task.pinc 2011-09-24 11:45:08 UTC (rev 289) @@ -2247,9 +2247,9 @@ $x1 = $obj->dbconn->DateTime($from); $x2 = $obj->dbconn->DateTime($to); # - # - # - $q = 'SELECT c.* FROM '. $obj->dbconn->prefix .$table['task'][name].' c '; + # + # + $q = 'SELECT c.* FROM '. $obj->dbconn->prefix .$table['task'][name].' c '; $pre = " WHERE"; if ( ($obj->getType() == "address") || ($obj->getType() == "user") ) { // Select the workers and all his teams tasks @@ -2259,7 +2259,7 @@ } $q .= ")"; # - $qq = 'SELECT DISTINCT t_id FROM '. $obj->dbconn->prefix .$table['taskworker'][name]. " WHERE w_id in (".$obj->id; + $qq = 'SELECT DISTINCT t_id FROM '. $obj->dbconn->prefix .$table['taskworker'][name]. " WHERE w_id in (".$obj->id; foreach ($obj->teamlist as $i => $f) { $qq .= "," . $i; } @@ -2280,7 +2280,7 @@ } $r->free(); # - $q .= ")"; + $q .= ")"; $pre = " AND"; } $q .= $pre. "("; @@ -2373,8 +2373,8 @@ if (!($a++ < 2 * $tutos['maxshort'])) break; $r .= " <tr>\n"; $r .= ' <td>' . $f->getLink() ."</td>\n"; - $r .= ' <td>'. $f->getStart() ."</td>\n"; - $r .= ' <td>'. $f->getEnd() ."</td>\n"; + $r .= ' <td align="right">'. $f->getStart() ."</td>\n"; + $r .= ' <td align="right">'. $f->getEnd() ."</td>\n"; $r .= " </tr>\n"; unset($f); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-09-24 11:44:30
|
Revision: 288 http://tutos.svn.sourceforge.net/tutos/?rev=288&view=rev Author: gokohnert Date: 2011-09-24 11:44:24 +0000 (Sat, 24 Sep 2011) Log Message: ----------- show all roles on an project in mytutos Modified Paths: -------------- trunk/php/product.pinc Modified: trunk/php/product.pinc =================================================================== --- trunk/php/product.pinc 2011-09-24 11:43:47 UTC (rev 287) +++ trunk/php/product.pinc 2011-09-24 11:44:24 UTC (rev 288) @@ -1719,11 +1719,20 @@ unset($f); continue; } + $f->readroles(); $r .= " <tr>\n"; - $r .= ' <td>' . $f->getLink() ."</td>\n"; + $r .= ' <td valign="top">' . $f->getLink() ."</td>\n"; $role = $res->get($a, "role_id"); - $r .= ' <td>' . $lang['ProdRole'][$role] ."</td>\n"; - $r .= ' <td align="right">' . $f->creation->getDateTime() ."</td>\n"; + $r .= ' <td>'; + $pre = ''; + foreach($f->role as $i => $rr) { + if (array_key_exists($user->id,$rr)) { + $r .= $pre.$lang['ProdRole'][$i]; + $pre = '<br />'; + } + } + $r .= "</td>\n"; + $r .= ' <td align="right" valign="top">' . $f->creation->getDateTime() ."</td>\n"; $r .= " </tr>\n"; $s[$f->id] = 1; $a++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |