* Fix bug #3262.
This commit is contained in:
@@ -113,6 +113,7 @@ $lang->resource->todo->batchEdit = 'batchEdit';
|
||||
$lang->resource->todo->view = 'view';
|
||||
$lang->resource->todo->delete = 'delete';
|
||||
$lang->resource->todo->export = 'export';
|
||||
$lang->resource->todo->start = 'start';
|
||||
$lang->resource->todo->finish = 'finish';
|
||||
$lang->resource->todo->batchFinish = 'batchFinish';
|
||||
$lang->resource->todo->import2Today = 'import2Today';
|
||||
@@ -129,13 +130,14 @@ $lang->todo->methodOrder[25] = 'batchEdit';
|
||||
$lang->todo->methodOrder[30] = 'view';
|
||||
$lang->todo->methodOrder[35] = 'delete';
|
||||
$lang->todo->methodOrder[40] = 'export';
|
||||
$lang->todo->methodOrder[45] = 'finish';
|
||||
$lang->todo->methodOrder[50] = 'batchFinish';
|
||||
$lang->todo->methodOrder[55] = 'import2Today';
|
||||
$lang->todo->methodOrder[60] = 'assignTo';
|
||||
$lang->todo->methodOrder[65] = 'activate';
|
||||
$lang->todo->methodOrder[70] = 'close';
|
||||
$lang->todo->methodOrder[75] = 'batchClose';
|
||||
$lang->todo->methodOrder[45] = 'start';
|
||||
$lang->todo->methodOrder[50] = 'finish';
|
||||
$lang->todo->methodOrder[55] = 'batchFinish';
|
||||
$lang->todo->methodOrder[60] = 'import2Today';
|
||||
$lang->todo->methodOrder[65] = 'assignTo';
|
||||
$lang->todo->methodOrder[70] = 'activate';
|
||||
$lang->todo->methodOrder[75] = 'close';
|
||||
$lang->todo->methodOrder[80] = 'batchClose';
|
||||
|
||||
/* Product. */
|
||||
$lang->resource->product = new stdclass();
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<th class="c-begin"> <?php common::printOrderLink('begin', $orderBy, $vars, $lang->todo->beginAB);?></th>
|
||||
<th class="c-end"> <?php common::printOrderLink('end', $orderBy, $vars, $lang->todo->endAB);?></th>
|
||||
<th class="c-status"><?php common::printOrderLink('status', $orderBy, $vars, $lang->todo->status);?></th>
|
||||
<th class="c-actions"><?php echo $lang->actions;?></th>
|
||||
<th class="c-actions-5"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -96,6 +96,7 @@
|
||||
<td class="c-status"><span class="status-todo status-<?php echo $todo->status;?>"><?php echo $lang->todo->statusList[$todo->status];?></span></td>
|
||||
<td class="c-actions">
|
||||
<?php
|
||||
common::printIcon('todo', 'start', "id=$todo->id", $todo, 'list', 'play', 'hiddenwin');
|
||||
if($todo->status == 'done' or $todo->status == 'closed')
|
||||
{
|
||||
common::printIcon('todo', 'activate', "id=$todo->id", $todo, 'list', 'magic', 'hiddenwin');
|
||||
|
||||
@@ -245,6 +245,28 @@ class todo extends control
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a todo.
|
||||
*
|
||||
* @param int $todoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function start($todoID)
|
||||
{
|
||||
$todo = $this->todo->getById($todoID);
|
||||
if($todo->status == 'wait') $this->todo->start($todoID);
|
||||
if(in_array($todo->type, array('bug', 'task', 'story')))
|
||||
{
|
||||
$confirmNote = 'confirm' . ucfirst($todo->type);
|
||||
$confirmURL = $this->createLink($todo->type, 'view', "id=$todo->idvalue");
|
||||
$cancelURL = $this->server->HTTP_REFERER;
|
||||
die(js::confirm(sprintf($this->lang->todo->$confirmNote, $todo->idvalue), $confirmURL, $cancelURL, 'parent', 'parent'));
|
||||
}
|
||||
if(isonlybody())die(js::reload('parent.parent'));
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Activated todo.
|
||||
*
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->todo->createCycle = "Wiederkehrenden Todo hinzufügen";
|
||||
$lang->todo->assignTo = "Zuordnen";
|
||||
$lang->todo->assignedDate = "Assigned Date";
|
||||
$lang->todo->assignAction = "Assign Todo";
|
||||
$lang->todo->start = "Start Todo";
|
||||
$lang->todo->activate = "Aktivieren";
|
||||
$lang->todo->batchCreate = "Mehrere hinzufügen";
|
||||
$lang->todo->edit = "Bearbeiten";
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->todo->createCycle = "Add Recurred Todo";
|
||||
$lang->todo->assignTo = "Assigned To";
|
||||
$lang->todo->assignedDate = "Assigned Date";
|
||||
$lang->todo->assignAction = "Assign Todo";
|
||||
$lang->todo->start = "Start Todo";
|
||||
$lang->todo->activate = "Activate Todo";
|
||||
$lang->todo->batchCreate = "Batch Add ";
|
||||
$lang->todo->edit = "Edit Todo";
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->todo->createCycle = "Ajout Tâche récurrente";
|
||||
$lang->todo->assignTo = "Affecter à";
|
||||
$lang->todo->assignedDate = "Date Affectation";
|
||||
$lang->todo->assignAction = "Affacter Action";
|
||||
$lang->todo->start = "Start Todo";
|
||||
$lang->todo->activate = "Activer Entrée";
|
||||
$lang->todo->batchCreate = "Ajout par lot ";
|
||||
$lang->todo->edit = "Editer Agenda";
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->todo->createCycle = "Thêm việc lặp lại";
|
||||
$lang->todo->assignTo = "Giao cho";
|
||||
$lang->todo->assignedDate = "Ngày giao";
|
||||
$lang->todo->assignAction = "Giao việc";
|
||||
$lang->todo->start = "Start Todo";
|
||||
$lang->todo->activate = "Kích hoạt việc";
|
||||
$lang->todo->batchCreate = "Thêm hàng loạt";
|
||||
$lang->todo->edit = "Sửa việc";
|
||||
|
||||
@@ -16,6 +16,7 @@ $lang->todo->createCycle = "创建周期待办";
|
||||
$lang->todo->assignTo = "指派给";
|
||||
$lang->todo->assignedDate = "指派日期";
|
||||
$lang->todo->assignAction = "指派待办";
|
||||
$lang->todo->start = "开始待办";
|
||||
$lang->todo->activate = "激活待办";
|
||||
$lang->todo->batchCreate = "批量添加";
|
||||
$lang->todo->edit = "编辑待办";
|
||||
|
||||
@@ -288,6 +288,20 @@ class todoModel extends model
|
||||
return $allChanges;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start one todo.
|
||||
*
|
||||
* @param string $todoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function start($todoID)
|
||||
{
|
||||
$this->dao->update(TABLE_TODO)->set('status')->eq('doing')->where('id')->eq((int)$todoID)->exec();
|
||||
$this->loadModel('action')->create('todo', $todoID, 'started');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Change the status of a todo.
|
||||
*
|
||||
@@ -478,6 +492,12 @@ class todoModel extends model
|
||||
return $todo->status != 'done';
|
||||
}
|
||||
|
||||
if($action == 'start')
|
||||
{
|
||||
if(!empty($todo->cycle)) return false;
|
||||
return $todo->status == 'wait';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<div class='main-actions'>
|
||||
<div class="btn-toolbar">
|
||||
<?php
|
||||
if($todo->status == 'wait') common::printLink('todo', 'start', "todoID=$todo->id", "<i class='icon icon-play'></i>", 'hiddenwin', "title='{$lang->todo->start}' class='btn showinonlybody'");
|
||||
if($todo->status == 'done' || $todo->status == 'closed') common::printLink('todo', 'activate', "todoID=$todo->id", "<i class='icon icon-magic'></i>", 'hiddenwin', "title='{$lang->todo->activate}' class='btn showinonlybody'");
|
||||
if($todo->status == 'done') common::printLink('todo', 'close', "todoID=$todo->id", "<i class='icon icon-off'></i>", 'hiddenwin', "title='{$lang->todo->close}' class='btn showinonlybody'");
|
||||
common::printLink('todo', 'edit', "todoID=$todo->id", "<i class='icon icon-edit'></i>", '', "title='{$lang->todo->edit}' class='btn showinonlybody'");
|
||||
|
||||
Reference in New Issue
Block a user