* fix the bug when import tasks.

This commit is contained in:
wangchunsheng
2010-11-24 13:58:33 +00:00
parent 1a8594a4c7
commit e9e28f418d
3 changed files with 5 additions and 3 deletions
+1
View File
@@ -221,6 +221,7 @@ class project extends control
$this->view->position[] = html::a(inlink('browse', "projectID=$projectID"), $project->name);
$this->view->position[] = $this->lang->project->importTask;
$this->view->tasks2Imported = $this->project->getTasks2Imported($projectID);
$this->view->projects = $this->project->getPairs('all');
$this->display();
}
+3 -2
View File
@@ -180,12 +180,13 @@ class projectModel extends model
/**
* Get project pairs.
*
* @param string $mode all|noclosed or empty
* @access public
* @return array
*/
public function getPairs()
public function getPairs($mode = '')
{
$mode = $this->cookie->projectMode ? $this->cookie->projectMode : 'noclosed';
if($mode == '') $mode = $this->cookie->projectMode ? $this->cookie->projectMode : 'noclosed';
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
->where('iscat')->eq(0)
->andWhere('deleted')->eq(0)
+1 -1
View File
@@ -37,7 +37,7 @@
<?php foreach($groupTasks as $task):?>
<?php $assignedToClass = $task->assignedTo == $app->user->account ? 'style=color:red' : '';?>
<tr id='<?php echo $task->id;?>' class='a-center child-of-node-<?php echo $groupKey;?>'>
<td class='<?php echo $groupClass;?>' style='border:none'></td>
<td class='<?php echo $groupClass;?>'></td>
<td class='a-left'>&nbsp;<?php echo $task->id . $lang->colon; if(common::hasPriv('task', 'view')) echo html::a($this->createLink('task', 'view', "task=$task->id"), $task->name); else echo $task->name;?></td>
<td><?php echo $task->pri;?></td>
<td <?php echo $assignedToClass;?>><?php echo $task->assignedToRealName;?></td>