* rewrite the task module.

This commit is contained in:
wangchunsheng
2010-11-28 13:10:34 +00:00
parent 175a61ee2e
commit cfca2eed59
12 changed files with 238 additions and 116 deletions
+2 -1
View File
@@ -3,7 +3,8 @@ global $lang;
$config->task->create->requiredFields = 'name,estimate,type,pri';
$config->task->edit->requiredFields = $config->task->create->requiredFields;
$config->task->start->requiredFields = 'estimate';
$config->task->complete->requiredFields = $config->task->start->requiredFields;
$config->task->finish->requiredFields = 'consumed';
$config->task->activate->requiredFields = 'left';
$config->task->search['module'] = 'task';
$config->task->search['fields']['name'] = $lang->task->name;
+46 -19
View File
@@ -203,13 +203,12 @@ class task extends control
if(!empty($_POST))
{
$this->loadModel('action');
$changes = $this->task->changeStatus($taskID);
$changes = $this->task->start($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
$action = !empty($changes) ? 'Started' : 'Commented';
$actionID = $this->action->create('task', $taskID, $action, $this->post->comment);
$actionID = $this->action->create('task', $taskID, 'Started', $this->post->comment);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
}
@@ -222,38 +221,70 @@ class task extends control
}
/**
* Complete a task.
* Finish a task.
*
* @param int $taskID
* @access public
* @return void
*/
public function complete($taskID)
public function finish($taskID)
{
$this->commonAction($taskID);
if(!empty($_POST))
{
$this->loadModel('action');
$changes = $this->task->changeStatus($taskID);
$changes = $this->task->finish($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
$action = !empty($changes) ? 'Finished' : 'Commented';
$actionID = $this->action->create('task', $taskID, $action, $this->post->comment);
$actionID = $this->action->create('task', $taskID, 'Finished', $this->post->comment);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
}
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$this->view->header->title = $this->view->project->name . $this->lang->colon .$this->lang->task->complete;
$this->view->position[] = $this->lang->task->complete;
$this->view->header->title = $this->view->project->name . $this->lang->colon .$this->lang->task->finish;
$this->view->position[] = $this->lang->task->finish;
$this->display();
}
/**
* Close a task.
*
* @param int $taskID
* @access public
* @return void
*/
public function close($taskID)
{
$this->commonAction($taskID);
if(!empty($_POST))
{
$this->loadModel('action');
$changes = $this->task->close($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
$actionID = $this->action->create('task', $taskID, 'Closed', $this->post->comment);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
}
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$this->view->header->title = $this->view->project->name . $this->lang->colon .$this->lang->task->finish;
$this->view->position[] = $this->lang->task->finish;
$this->display();
}
/**
* Cancel a task.
*
@@ -268,13 +299,12 @@ class task extends control
if(!empty($_POST))
{
$this->loadModel('action');
$changes = $this->task->changeStatus($taskID);
$changes = $this->task->cancel($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
$action = !empty($changes) ? 'Canceled' : 'Commented';
$actionID = $this->action->create('task', $taskID, $action, $this->post->comment);
$actionID = $this->action->create('task', $taskID, 'Canceled', $this->post->comment);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
}
@@ -301,25 +331,22 @@ class task extends control
if(!empty($_POST))
{
$this->loadModel('action');
$changes = $this->task->changeStatus($taskID);
$changes = $this->task->activate($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
$action = !empty($changes) ? 'Started' : 'Commented';
$actionID = $this->action->create('task', $taskID, $action, $this->post->comment);
$actionID = $this->action->create('task', $taskID, 'Activated', $this->post->comment);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
}
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$this->view->header->title = $this->view->project->name . $this->lang->colon .$this->lang->task->start;
$this->view->header->title = $this->view->project->name . $this->lang->colon .$this->lang->task->activate;
$this->view->position[] = $this->lang->task->activate;
$this->display();
}
/**
* Delete a task.
+1 -1
View File
@@ -17,7 +17,7 @@ $lang->task->delete = "Delete";
$lang->task->view = "Info";
$lang->task->logEfforts= "Efforts";
$lang->task->start = "Start";
$lang->task->complete = "Complete";
$lang->task->finish = "Finish";
$lang->task->close = "Close";
$lang->task->cancel = "Cancel";
$lang->task->activate = "Activate";
+1 -1
View File
@@ -17,7 +17,7 @@ $lang->task->delete = "删除任务";
$lang->task->view = "查看任务";
$lang->task->logEfforts= "记录工时";
$lang->task->start = "开始任务";
$lang->task->complete = "完成任务";
$lang->task->finish = "完成任务";
$lang->task->close = "关闭任务";
$lang->task->cancel = "取消任务";
$lang->task->activate = "激活任务";
+140 -21
View File
@@ -35,9 +35,11 @@ class taskModel extends model
->setIF($this->post->estimate != false, 'left', $this->post->estimate)
->setForce('assignedTo', $assignedTo)
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
->setDefault('statusCustom', strpos(self::CUSTOM_STATUS_ORDER, $this->post->status) + 1)
->setDefault('openedBy', $this->app->user->account)
->setDefault('openedDate', helper::now())
->remove('after,files,labels')
->get();
$this->setStatus($task);
$this->dao->insert(TABLE_TASK)->data($task)
->autoCheck()
@@ -79,15 +81,15 @@ class taskModel extends model
->setIF($this->post->status == 'cancel' and !$this->post->canceledBy, 'canceledBy', $this->app->user->account)
->setIF($this->post->status == 'cancel' and !$this->post->canceledDate, 'canceledDate', $now)
->setIF($this->post->status == 'cancel', 'closedBy', $this->post->canceledBy ? $this->post->canceledBy : $this->app->user->account)
->setIF($this->post->status == 'cancel', 'closedDate', $this->post->canceledDate? $this->post->canceledDate : $now)
->setIF($this->post->status == 'cancel', 'closedReason', 'cancel')
->setIF($this->post->status == 'cancel', 'status', 'closed')
->setIF($this->post->status == 'cancel', 'assignedTo', $oldTask->openedBy)
->setIF($this->post->status == 'cancel', 'assignedDate', $now)
->setIF($this->post->status == 'closed' and !$this->post->closedBy, 'closedBy', $this->app->user->account)
->setIF($this->post->status == 'closed' and !$this->post->closedDate, 'closedDate', $now)
->setIF($this->post->consumed > 0 and $this->post->left > 0 and $this->post->status == 'wait', 'status', 'doing')
->setIF($this->post->assignedTo != $oldTask->assignedTo, 'assignedDate', $now)
->add('lastEditedBy', $this->app->user->account)
->add('lastEditedDate', $now)
->remove('comment,files,labels')
@@ -116,36 +118,140 @@ class taskModel extends model
if($this->post->story != false) $this->loadModel('story')->setStage($this->post->story);
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
/**
* Change status of a task and return the diff info.
* Start a task.
*
* @param int $taskID
* @param int $taskID
* @access public
* @return array the diff info.
* @return void
*/
public function changeStatus($taskID)
public function start($taskID)
{
$oldTask = $this->getById($taskID);
$now = helper::now();
$task = fixer::input('post')
->setDefault('estimate, left, consumed', 0)
->setIF($this->post->consumed > 0 and $this->post->left > 0 and $this->post->status == 'wait', 'status', 'doing')
->remove('comment')
->get();
$task->statusCustom = strpos(self::CUSTOM_STATUS_ORDER, $task->status) + 1;
->setDefault('status', 'doing')
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', $now)
->remove('comment')->get();
$this->setStatus($task);
$this->dao->update(TABLE_TASK)->data($task)
->autoCheck()
->batchCheckIF($task->status != 'cancel', $this->config->task->start->requiredFields, 'notempty')
->checkIF($task->estimate != false, 'estimate', 'float')
->checkIF($task->left != false, 'left', 'float')
->checkIF($task->consumed != false, 'consumed', 'float')
->checkIF($task->status == 'done', 'consumed', 'notempty')
->checkIF($task->left == 0 and $task->status != 'cancel', 'status', 'equal', 'done')
->check('consumed,left', 'float')
->where('id')->eq((int)$taskID)->exec();
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
/**
* Finish a task.
*
* @param int $taskID
* @access public
* @return void
*/
public function finish($taskID)
{
$oldTask = $this->getById($taskID);
$now = helper::now();
$task = fixer::input('post')
->setDefault('left', 0)
->setDefault('assignedTo', $oldTask->openedBy)
->setDefault('assignedDate', $now)
->setDefault('status', 'done')
->setDefault('finishedBy, lastEditedBy', $this->app->user->account)
->setDefault('finishedDate, lastEditedDate', $now)
->remove('comment')->get();
$this->setStatus($task);
$this->dao->update(TABLE_TASK)->data($task)
->autoCheck()
->check('consumed', 'notempty')
->where('id')->eq((int)$taskID)->exec();
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
/**
* Close a task.
*
* @param int $taskID
* @access public
* @return void
*/
public function close($taskID)
{
$oldTask = $this->getById($taskID);
$now = helper::now();
$task = fixer::input('post')
->setDefault('status', 'closed')
->setDefault('assignedTo', 'closed')
->setDefault('assignedDate', $now)
->setDefault('closedBy, lastEditedBy', $this->app->user->account)
->setDefault('closedDate, lastEditedDate', $now)
->setDefault('closedReason', 'done')
->remove('comment')->get();
$this->setStatus($task);
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('id')->eq((int)$taskID)->exec();
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
/**
* Cancel a task.
*
* @param int $taskID
* @access public
* @return void
*/
public function cancel($taskID)
{
$oldTask = $this->getById($taskID);
$now = helper::now();
$task = fixer::input('post')
->setDefault('status', 'cancel')
->setDefault('assignedTo', $oldTask->openedBy)
->setDefault('assignedDate', $now)
->setDefault('finishedBy', '')
->setDefault('finishedDate', '0000-00-00')
->setDefault('canceledBy, lastEditedBy', $this->app->user->account)
->setDefault('canceledDate, lastEditedDate', $now)
->remove('comment')->get();
$this->setStatus($task);
$this->dao->update(TABLE_TASK)->data($task)->autoCheck()->where('id')->eq((int)$taskID)->exec();
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
/**
* Activate a task.
*
* @param int $taskID
* @access public
* @return void
*/
public function activate($taskID)
{
$oldTask = $this->getById($taskID);
$task = fixer::input('post')
->setDefault('left', 0)
->setDefault('status', 'doing')
->setDefault('finishedBy, canceledBy, closedBy, closedReason', '')
->setDefault('finishedDate, canceledDate, closedDate', '0000-00-00')
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', helper::now())
->remove('comment')->get();
$this->setStatus($task);
$this->dao->update(TABLE_TASK)->data($task)
->autoCheck()
->check('left', 'notempty')
->where('id')->eq((int)$taskID)->exec();
if(!dao::isError()) return common::createChanges($oldTask, $task);
}
/**
* Get task info by Id.
*
@@ -164,6 +270,7 @@ class taskModel extends model
->where('t1.id')->eq((int)$taskID)
->fetch();
if(!$task) return false;
if($task->assignedTo == 'closed') $task->assignedToRealName = 'Closed';
foreach($task as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $task->$key = '';
if($task->mailto)
{
@@ -377,4 +484,16 @@ class taskModel extends model
}
return $task;
}
/**
* Set the status field of a task.
*
* @param object $task
* @access private
* @return void
*/
private function setStatus($task)
{
$task->statusCustom = strpos(self::CUSTOM_STATUS_ORDER, $task->status) + 1;
}
}
+7 -13
View File
@@ -16,16 +16,12 @@
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
<tr>
<td class='rowhead'><?php echo $lang->task->estimate;?></td>
<td><?php echo html::input('estimate', $task->estimate, "class='text-3'");?></td>
<th class='rowhead'><?php echo $lang->task->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $members, $task->finishedBy, "class='select-3'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->consumed;?></th>
<td><?php echo html::input('consumed', $task->consumed, "class='text-3'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->left;?></th>
<td><?php echo html::input('left', $task->left, "class='text-3'");?></td>
<td><?php echo html::input('left', '', "class='text-3'");?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
@@ -33,12 +29,10 @@
</tr>
<tr>
<td colspan='2' class='a-center'>
<?php
echo html::submitButton();
echo html::hidden('status', 'doing');
?>
<input type='button' value='<?php echo $lang->task->buttonBackToList;?>' class='button-s'
onclick='location.href="<?php echo $this->session->taskList;?>"' />
<?php
echo html::submitButton();
echo html::linkButton($lang->goback, $this->session->taskList);
?>
</td>
</tr>
</table>
+1 -20
View File
@@ -15,31 +15,12 @@
<div class='yui-d0'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
<tr>
<td class='rowhead'><?php echo $lang->task->estimate;?></td>
<td><?php echo html::input('estimate', $task->estimate, "class='text-3'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->consumed;?></th>
<td><?php echo html::input('consumed', $task->consumed, "class='text-3'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->left;?></th>
<td><?php echo html::input('left', $task->left, "class='text-3'");?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'>
<?php
echo html::submitButton();
echo html::hidden('status', 'cancel');
?>
<input type='button' value='<?php echo $lang->task->buttonBackToList;?>' class='button-s'
onclick='location.href="<?php echo $this->session->taskList;?>"' />
</td>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList);?>;</td>
</tr>
</table>
<?php include '../../common/view/action.html.php';?>
+28
View File
@@ -0,0 +1,28 @@
<?php
/**
* The close file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author chunsheng wang <chunsheng@cnezsoft.com>
* @package task
* @version $Id: cancel.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<form method='post' target='hiddenwin'>
<div class='yui-d0'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList);?></td>
</tr>
</table>
<?php include '../../common/view/action.html.php';?>
</div>
<?php include '../../common/view/footer.html.php';?>
-4
View File
@@ -85,10 +85,6 @@ $(document).ready(function()
<th class='rowhead'><?php echo $lang->task->type;?></th>
<td><?php echo html::select('type', $lang->task->typeList, '', 'class=select-3 onchange="setOwners(this.value)"');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->status;?></th>
<td><?php echo html::select('status', $lang->task->statusList, 'wait', 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->assignedTo;?></th>
<td><?php echo html::select('assignedTo[]', $members, '', 'class=select-3');?></td>
@@ -15,10 +15,6 @@
<div class='yui-d0'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
<tr>
<td class='rowhead'><?php echo $lang->task->estimate;?></td>
<td><?php echo html::input('estimate', $task->estimate, "class='text-3'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->consumed;?></th>
<td><?php echo html::input('consumed', $task->consumed, "class='text-3'");?></td>
@@ -28,15 +24,7 @@
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'>
<?php
echo html::submitButton();
echo html::hidden('status', 'done');
echo html::hidden('left', 0);
?>
<input type='button' value='<?php echo $lang->task->buttonBackToList;?>' class='button-s'
onclick='location.href="<?php echo $this->session->taskList;?>"' />
</td>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList);?></td>
</tr>
</table>
<?php include '../../common/view/action.html.php';?>
+1 -12
View File
@@ -15,10 +15,6 @@
<div class='yui-d0'>
<table class='table-1'>
<caption><?php echo $task->name;?></caption>
<tr>
<td class='rowhead'><?php echo $lang->task->estimate;?></td>
<td><?php echo html::input('estimate', $task->estimate, "class='text-3'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->consumed;?></th>
<td><?php echo html::input('consumed', $task->consumed, "class='text-3'");?></td>
@@ -32,14 +28,7 @@
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>
</tr>
<tr>
<td colspan='2' class='a-center'>
<?php
echo html::submitButton();
echo html::hidden('status', 'doing');
?>
<input type='button' value='<?php echo $lang->task->buttonBackToList;?>' class='button-s'
onclick='location.href="<?php echo $this->session->taskList;?>"' />
</td>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::linkButton($lang->goback, $this->session->taskList); ?></td>
</tr>
</table>
<?php include '../../common/view/action.html.php';?>
+10 -11
View File
@@ -22,11 +22,11 @@
if(!$task->deleted)
{
//if(!($task->status != 'closed' and $task->status != 'cancel' and common::printLink('task', 'logEfforts', "taskID=$task->id", $lang->task->buttonLogEfforts))) echo $lang->task->buttonLogEfforts . ' ';
if(!(($task->status == 'wait' or $task->status == 'cancel') and common::printLink('task', 'start', "taskID=$task->id", $lang->task->buttonStart))) echo $lang->task->buttonStart . ' ';
if(!(($task->status == 'wait' or $task->status == 'doing') and common::printLink('task', 'complete', "taskID=$task->id", $lang->task->buttonDone))) echo $lang->task->buttonDone . ' ';
if(!($task->status != 'closed' and $task->status != 'cancel' and common::printLink('task', 'close', "taskID=$task->id", $lang->task->buttonClose))) echo $lang->task->buttonClose . ' ';
if(!(($task->status == 'wait' or $task->status == 'doing') and common::printLink('task', 'cancel', "taskID=$task->id", $lang->task->buttonCancel))) echo $lang->task->buttonCancel . ' ';
if(!($task->status == 'closed' and common::printLink('task', 'activate', "taskID=$task->id", $lang->task->buttonActivate))) echo $lang->task->buttonActivate . ' ';
if(!(($task->status == 'wait' or $task->status == 'cancel') and common::printLink('task', 'start', "taskID=$task->id", $lang->task->buttonStart))) echo $lang->task->buttonStart . ' ';
if(!(($task->status == 'wait' or $task->status == 'doing') and common::printLink('task', 'finish', "taskID=$task->id", $lang->task->buttonDone))) echo $lang->task->buttonDone . ' ';
if(!(($task->status == 'done' or $task->status == 'cancel') and common::printLink('task', 'close', "taskID=$task->id", $lang->task->buttonClose))) echo $lang->task->buttonClose . ' ';
if(!(($task->status == 'wait' or $task->status == 'doing') and common::printLink('task', 'cancel', "taskID=$task->id", $lang->task->buttonCancel))) echo $lang->task->buttonCancel . ' ';
if(!(($task->status == 'closed' or $task->status == 'done' or $task->status == 'cancel') and common::printLink('task', 'activate', "taskID=$task->id", $lang->task->buttonActivate))) echo $lang->task->buttonActivate . ' ';
if(!common::printLink('task', 'edit', "taskID=$task->id", $lang->task->buttonEdit)) echo $lang->task->buttonEdit . ' ';
if(!common::printLink('task', 'delete',"projectID=$task->project&taskID=$task->id", $lang->task->buttonDelete, 'hiddenwin')) echo $lang->task->buttonDelete . ' ';
}
@@ -49,14 +49,13 @@
<?php
if(!$task->deleted)
{
if(!(($task->status == 'wait' or $task->status == 'cancel') and common::printLink('task', 'start', "taskID=$task->id", $lang->task->buttonStart))) echo $lang->task->buttonStart . ' ';
if(!(($task->status == 'wait' or $task->status == 'doing') and common::printLink('task', 'complete', "taskID=$task->id", $lang->task->buttonDone))) echo $lang->task->buttonDone . ' ';
if(!($task->status != 'closed' and $task->status != 'cancel' and common::printLink('task', 'close', "taskID=$task->id", $lang->task->buttonClose))) echo $lang->task->buttonClose . ' ';
if(!(($task->status == 'wait' or $task->status == 'doing') and common::printLink('task', 'cancel', "taskID=$task->id", $lang->task->buttonCancel))) echo $lang->task->buttonCancel . ' ';
if(!($task->status == 'closed' and common::printLink('task', 'activate', "taskID=$task->id", $lang->task->buttonActivate))) echo $lang->task->buttonActivate . ' ';
if(!(($task->status == 'wait' or $task->status == 'cancel') and common::printLink('task', 'start', "taskID=$task->id", $lang->task->buttonStart))) echo $lang->task->buttonStart . ' ';
if(!(($task->status == 'wait' or $task->status == 'doing') and common::printLink('task', 'finish', "taskID=$task->id", $lang->task->buttonDone))) echo $lang->task->buttonDone . ' ';
if(!(($task->status == 'done' or $task->status == 'cancel') and common::printLink('task', 'close', "taskID=$task->id", $lang->task->buttonClose))) echo $lang->task->buttonClose . ' ';
if(!(($task->status == 'wait' or $task->status == 'doing') and common::printLink('task', 'cancel', "taskID=$task->id", $lang->task->buttonCancel))) echo $lang->task->buttonCancel . ' ';
if(!(($task->status == 'closed' or $task->status == 'done' or $task->status == 'cancel') and common::printLink('task', 'activate', "taskID=$task->id", $lang->task->buttonActivate))) echo $lang->task->buttonActivate . ' ';
if(!common::printLink('task', 'edit', "taskID=$task->id", $lang->task->buttonEdit)) echo $lang->task->buttonEdit . ' ';
if(!common::printLink('task', 'delete',"projectID=$task->project&taskID=$task->id", $lang->task->buttonDelete, 'hiddenwin')) echo $lang->task->buttonDelete . ' ';
}
echo html::a($browseLink, $lang->goback);
?>