This commit is contained in:
chujilu
2014-08-22 15:25:48 +08:00
13 changed files with 80 additions and 13 deletions

View File

@@ -1197,13 +1197,20 @@ class sql
*/
public function data($data)
{
$this->data = $data;
$data = (object) $data;
foreach($data as $field => $value)
{
$field = str_replace(array('`', ',', ' '), '', $field);
$this->sql .= "`$field` = " . $this->quote($value) . ',';
}
$this->sql = rtrim($this->sql, ','); // Remove the last ','.
{
if(!preg_match('|^\w+$|', $field))
{
unset($data->$field);
continue;
}
$this->sql .= "`$field` = " . $this->quote($value) . ',';
}
$this->data = $data;
$this->sql = rtrim($this->sql, ','); // Remove the last ','.
return $this;
}

View File

@@ -82,6 +82,7 @@ $lang->action->desc->caseconfirmed = '$date, confirmed by <strong>$actor</stron
$lang->action->desc->bugconfirmed = '$date, confirmed by <strong>$actor</strong>.';
$lang->action->desc->frombug = '$date, from Bug by <strong>$actor</strong> BugID:<strong>$extra</strong>.';
$lang->action->desc->started = '$date, started by <strong>$actor</strong>.';
$lang->action->desc->restarted = '$date, continued by <strong>$actor</strong>' . "\n";
$lang->action->desc->delayed = '$date, delayed by <strong>$actor</strong>.';
$lang->action->desc->suspended = '$date, suspended by <strong>$actor</strong>.';
$lang->action->desc->recordestimate = '$date, <strong>$actor</strong> recorded <strong>$extra</strong> hours.';
@@ -133,6 +134,7 @@ $lang->action->label->marked = 'edited';
$lang->action->label->linked2project = 'link to project';
$lang->action->label->unlinkedfromproject = 'unlik from project';
$lang->action->label->started = 'started';
$lang->action->label->restarted = 'continued';
$lang->action->label->recordestimate = 'Hours';
$lang->action->label->editestimate = 'edit hour';
$lang->action->label->canceled = 'canceled';
@@ -210,6 +212,7 @@ $lang->action->search->label['marked'] = $lang->action->label->mark
$lang->action->search->label['linked2project'] = $lang->action->label->linked2project;
$lang->action->search->label['unlinkedfromproject'] = $lang->action->label->unlinkedfromproject;
$lang->action->search->label['started'] = $lang->action->label->started;
$lang->action->search->label['restarted'] = $lang->action->label->restarted;
$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate;
$lang->action->search->label['editestimate'] = $lang->action->label->editestimate;
$lang->action->search->label['canceled'] = $lang->action->label->canceled;

View File

@@ -82,6 +82,7 @@ $lang->action->desc->caseconfirmed = '$date, 由 <strong>$actor</strong> 确认
$lang->action->desc->bugconfirmed = '$date, 由 <strong>$actor</strong> 确认Bug。' . "\n";
$lang->action->desc->frombug = '$date, 由 <strong>$actor</strong> Bug转化而来Bug编号为 <strong>$extra</strong>。';
$lang->action->desc->started = '$date, 由 <strong>$actor</strong> 启动。' . "\n";
$lang->action->desc->restarted = '$date, 由 <strong>$actor</strong> 继续。' . "\n";
$lang->action->desc->delayed = '$date, 由 <strong>$actor</strong> 延期。' . "\n";
$lang->action->desc->suspended = '$date, 由 <strong>$actor</strong> 挂起。' . "\n";
$lang->action->desc->recordestimate = '$date, 由 <strong>$actor</strong> 记录工时,消耗 <strong>$extra</strong> 小时。';
@@ -133,6 +134,7 @@ $lang->action->label->marked = '编辑了';
$lang->action->label->linked2project = '关联项目';
$lang->action->label->unlinkedfromproject = '移除项目';
$lang->action->label->started = '开始';
$lang->action->label->restarted = '继续';
$lang->action->label->recordestimate = '记录了工时';
$lang->action->label->editestimate = '编辑了工时';
$lang->action->label->canceled = '取消了';
@@ -210,6 +212,7 @@ $lang->action->search->label['marked'] = $lang->action->label->mark
$lang->action->search->label['linked2project'] = $lang->action->label->linked2project;
$lang->action->search->label['unlinkedfromproject'] = $lang->action->label->unlinkedfromproject;
$lang->action->search->label['started'] = $lang->action->label->started;
$lang->action->search->label['restarted'] = $lang->action->label->restarted;
$lang->action->search->label['recordestimate'] = $lang->action->label->recordestimate;
$lang->action->search->label['editestimate'] = $lang->action->label->editestimate;
$lang->action->search->label['canceled'] = $lang->action->label->canceled;

View File

@@ -355,7 +355,7 @@ $lang->zentaoSite = "Official Site";
$lang->chinaScrum = "<a href='http://api.zentao.net/goto.php?item=chinascrum' target='_blank'>Scrum community</a> ";
$lang->agileTraining = "<a href='http://api.zentao.net/goto.php?item=agiletrain' target='_blank'>Training</a> ";
$lang->donate = "<a href='http://api.zentao.net/goto.php?item=donate' target='_blank'>Donate</a> ";
$lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&from=footer' target='_blank' class='text-important'><i class='text-danger icon-reply icon-rotate-90'></i> zentaoPRO!</a> &nbsp; ";
$lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&from=footer' target='_blank' class='text-important'><i class='text-danger icon-reply icon-rotate-90'></i> PRO</a> &nbsp; ";
$lang->downNotify = "Down notify";
$lang->suhosinInfo = "Warming:data is too large! Please enlarge the setting of <font color=red>sohusin.post.max_vars</font> and <font color=red>sohusin.request.max_vars</font> in php.ini. Otherwise partial data can't be saved.";
@@ -447,6 +447,7 @@ $lang->icons['import'] = 'upload-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'play';
$lang->icons['runCase'] = 'play';
$lang->icons['batchRun'] = 'play-sign';
@@ -466,5 +467,4 @@ $lang->icons['recordEstimate'] = 'time';
$lang->icons['customFields'] = 'cogs';
$lang->icons['manage'] = 'cog';
include (dirname(__FILE__) . '/menuOrder.php');

View File

@@ -17,7 +17,7 @@ $lang->at = ' 于 ';
$lang->downArrow = '↓';
$lang->null = '空';
$lang->zentaoPMS = '禅道项目';
$lang->zentaoPMS = '禅道';
$lang->welcome = "%s项目管理系统";
$lang->myControl = "我的地盘";
$lang->currentPos = '当前位置:';
@@ -355,7 +355,7 @@ $lang->zentaoSite = "官方网站";
$lang->chinaScrum = "<a href='http://api.zentao.net/goto.php?item=chinascrum' target='_blank'>Scrum社区</a>&nbsp; ";
$lang->agileTraining = "<a href='http://api.zentao.net/goto.php?item=agiletrain' target='_blank'>培训</a> ";
$lang->donate = "<a href='http://api.zentao.net/goto.php?item=donate' target='_blank'>捐赠 </a>";
$lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&from=footer' target='_blank' id='proLink' class='text-important'><i class='text-danger icon-reply icon-rotate-90'></i> 升至专业版!</a> &nbsp; ";
$lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&from=footer' target='_blank' id='proLink' class='text-important'><i class='text-danger icon-reply icon-rotate-90'></i> 专业版!</a> &nbsp; ";
$lang->downNotify = "下载桌面提醒";
$lang->suhosinInfo = "警告数据太多请在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(设置更大的数)。 保存并重新启动apache否则会造成部分数据无法保存。";
@@ -447,6 +447,7 @@ $lang->icons['import'] = 'upload-alt';
$lang->icons['finish'] = 'ok-sign';
$lang->icons['resolve'] = 'ok-sign';
$lang->icons['start'] = 'play';
$lang->icons['restart'] = 'play';
$lang->icons['run'] = 'play';
$lang->icons['runCase'] = 'play';
$lang->icons['batchRun'] = 'play-sign';

View File

@@ -23,6 +23,7 @@ $config->task->editor->edit = array('id' => 'desc,comment', 'tools' => 'simp
$config->task->editor->view = array('id' => 'comment,lastComment', 'tools' => 'simpleTools');
$config->task->editor->assignto = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->start = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->restart = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->finish = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
$config->task->editor->activate = array('id' => 'comment', 'tools' => 'simpleTools');

View File

@@ -631,6 +631,40 @@ class task extends control
$this->display();
}
/**
* Restart task
*
* @param int $taskID
* @access public
* @return void
*/
public function restart($taskID)
{
$this->commonAction($taskID);
if(!empty($_POST))
{
$this->loadModel('action');
$changes = $this->task->start($taskID);
if(dao::isError()) die(js::error(dao::getError()));
if($this->post->comment != '' or !empty($changes))
{
$act = $this->post->left == 0 ? 'Finished' : 'Restarted';
$actionID = $this->action->create('task', $taskID, $act, $this->post->comment);
$this->action->logHistory($actionID, $changes);
$this->sendmail($taskID, $actionID);
}
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
}
$this->view->title = $this->view->project->name . $this->lang->colon .$this->lang->task->restart;
$this->view->position[] = $this->lang->task->restart;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->display();
}
/**
* Close a task.
*

View File

@@ -21,6 +21,7 @@ $lang->task->view = "Info";
$lang->task->logEfforts = "Log working hours";
$lang->task->record = "Estimate";
$lang->task->start = "Start";
$lang->task->restart = "Continue";
$lang->task->finish = "Finish";
$lang->task->pause = "Pause";
$lang->task->close = "Close";

View File

@@ -21,6 +21,7 @@ $lang->task->view = "查看任务";
$lang->task->logEfforts = "记录工时";
$lang->task->record = "工时";
$lang->task->start = "开始";
$lang->task->restart = "继续";
$lang->task->finish = "完成";
$lang->task->pause = "暂停";
$lang->task->close = "关闭";

View File

@@ -1362,12 +1362,13 @@ class taskModel extends model
$action = strtolower($action);
if($action == 'assignto') return $task->status != 'closed' and $task->status != 'cancel';
if($action == 'start') return $task->status != 'doing' and $task->status != 'closed' and $task->status != 'cancel';
if($action == 'start') return $task->status != 'doing' and $task->status != 'closed' and $task->status != 'cancel' and $task->status != 'pause';
if($action == 'restart') return $task->status == 'pause';
if($action == 'finish') return $task->status != 'done' and $task->status != 'closed' and $task->status != 'cancel';
if($action == 'close') return $task->status == 'done' or $task->status == 'cancel';
if($action == 'activate') return $task->status == 'done' or $task->status == 'closed' or $task->status == 'cancel' ;
if($action == 'cancel') return $task->status != 'done' and $task->status != 'closed' and $task->status != 'cancel';
if($action == 'pause') return $task->status != 'done' and $task->status != 'closed' and $task->status != 'cancel' and $task->status != 'wait' and $task->status != 'pause';
if($action == 'pause') return $task->status == 'doing';
return true;
}

View File

@@ -0,0 +1,14 @@
<?php
/**
* The start file of task module of ZenTaoPMS.
*
* @copyright Copyright 2009-2013 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @license LGPL (http://www.gnu.org/licenses/lgpl.html)
* @author Jia Fu <fujia@cnezsoft.com>
* @package task
* @version $Id: start.html.php 935 2010-07-06 07:49:24Z jajacn@126.com $
* @link http://www.zentao.net
*/
?>
<?php $lang->task->start = $lang->task->restart;?>
<?php include 'start.html.php';?>

View File

@@ -33,6 +33,7 @@
echo "<div class='btn-group'>";
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'button', '', '', 'iframe', true);
common::printIcon('task', 'start', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
common::printIcon('task', 'restart', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
common::printIcon('task', 'pause', "taskID=$task->id", $task, 'button', '', '', 'iframe', true);
common::printIcon('task', 'finish', "taskID=$task->id", $task, 'button', '', '', 'iframe showinonlybody text-success', true);

View File

@@ -38,7 +38,7 @@ $lang->upgrade->toVersion = '升级到';
$lang->upgrade->confirm = '确认要执行的SQL语句';
$lang->upgrade->sureExecute = '确认执行';
$lang->upgrade->forbiddenExt = '以下插件与新版本不兼容,已经自动禁用:';
$lang->upgrade->checkExtension = '正在检查插件的兼容性,请稍 ...';
$lang->upgrade->checkExtension = '正在检查插件的兼容性,请稍 ...';
$lang->upgrade->fromVersions['0_3beta'] = '0.3 BETA';
$lang->upgrade->fromVersions['0_4beta'] = '0.4 BETA';