This commit is contained in:
Catouse
2017-04-06 14:36:26 +08:00
259 changed files with 5189 additions and 4187 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ $config->action->objectNameFields['todo'] = 'name';
$config->action->objectNameFields['branch'] = 'name';
$config->action->objectNameFields['module'] = 'name';
$config->action->objectNameFields['testsuite'] = 'name';
$config->action->objectNameFields['testlib'] = 'name';
$config->action->objectNameFields['caselib'] = 'name';
$config->action->objectNameFields['testreport'] = 'title';
$config->action->commonImgSize = 870;
+13
View File
@@ -61,6 +61,9 @@ $lang->action->objectTypes['doclib'] = 'Doc Lib';
$lang->action->objectTypes['todo'] = 'To-Dos';
$lang->action->objectTypes['branch'] = 'Branch';
$lang->action->objectTypes['module'] = 'Module';
$lang->action->objectTypes['testsuite'] = 'Suite';
$lang->action->objectTypes['caselib'] = 'Library';
$lang->action->objectTypes['testreport'] = 'Report';
/* 用来描述操作历史记录。*/
$lang->action->desc = new stdclass();
@@ -80,6 +83,7 @@ $lang->action->desc->undeleted = '$date, restored by <strong>$actor</strong
$lang->action->desc->hidden = '$date, hidden by <strong>$actor</strong> .' . "\n";
$lang->action->desc->commented = '$date, added by <strong>$actor</strong>.' . "\n";
$lang->action->desc->activated = '$date, activated by <strong>$actor</strong> .' . "\n";
$lang->action->desc->blocked = '$date, blocked by <strong>$actor</strong> .' . "\n";
$lang->action->desc->moved = '$date, moved by <strong>$actor</strong> , which was "$extra".' . "\n";
$lang->action->desc->confirmed = '$date, <strong>$actor</strong> confirmed the change of Story. The latest version is <strong>#$extra</strong>.' . "\n";
$lang->action->desc->caseconfirmed = '$date, <strong>$actor</strong> confirmed the change of Case. The latest version is <strong>#$extra</strong>' . "\n";
@@ -121,6 +125,7 @@ $lang->action->label->undeleted = 'Restored';
$lang->action->label->hidden = 'Hidden';
$lang->action->label->commented = 'Commented';
$lang->action->label->activated = 'Activated';
$lang->action->label->blocked = 'Blocked';
$lang->action->label->resolved = 'Resolved';
$lang->action->label->reviewed = 'Reviewed';
$lang->action->label->moved = 'Moved';
@@ -128,6 +133,7 @@ $lang->action->label->confirmed = 'Confirm a Story, ';
$lang->action->label->bugconfirmed = 'Confirmed';
$lang->action->label->tostory = 'Convert to Story';
$lang->action->label->frombug = 'Converted from Bug';
$lang->action->label->fromlib = 'Import from library';
$lang->action->label->totask = 'Convert to Task';
$lang->action->label->svncommited = 'SVN Commit';
$lang->action->label->gitcommited = 'Git Commit';
@@ -171,10 +177,13 @@ $lang->action->label->build = 'Build|build|view|buildID=%s';
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
$lang->action->label->case = 'Case|testcase|view|caseID=%s';
$lang->action->label->testtask = 'Test Task|testtask|view|caseID=%s';
$lang->action->label->testsuite = 'Test Suite|testsuite|view|suiteID=%s';
$lang->action->label->caselib = 'Case Library|testsuite|libview|libID=%s';
$lang->action->label->todo = 'To-Dos|todo|view|todoID=%s';
$lang->action->label->doclib = 'Doc Lib|doc|browse|libID=%s';
$lang->action->label->doc = 'Document|doc|view|docID=%s';
$lang->action->label->user = 'User|user|view|account=%s';
$lang->action->label->testreport = 'Report|testreport|view|report=%s';
$lang->action->label->space = ' ';
/* Object type. */
@@ -196,6 +205,9 @@ $lang->action->search->objectTypeList['build'] = 'Build';
$lang->action->search->objectTypeList['release'] = 'Release';
$lang->action->search->objectTypeList['productplan'] = 'Plan';
$lang->action->search->objectTypeList['branch'] = 'Branch';
$lang->action->search->objectTypeList['testsuite'] = 'Suite';
$lang->action->search->objectTypeList['caselib'] = 'Library';
$lang->action->search->objectTypeList['testreport'] = 'Report';
/* 用来在动态显示中显示动作 */
$lang->action->search->label[''] = '';
@@ -213,6 +225,7 @@ $lang->action->search->label['undeleted'] = $lang->action->label->unde
$lang->action->search->label['hidden'] = $lang->action->label->hidden;
$lang->action->search->label['commented'] = $lang->action->label->commented;
$lang->action->search->label['activated'] = $lang->action->label->activated;
$lang->action->search->label['blocked'] = $lang->action->label->blocked;
$lang->action->search->label['resolved'] = $lang->action->label->resolved;
$lang->action->search->label['reviewed'] = $lang->action->label->reviewed;
$lang->action->search->label['moved'] = $lang->action->label->moved;
+11 -2
View File
@@ -62,7 +62,8 @@ $lang->action->objectTypes['todo'] = '待办';
$lang->action->objectTypes['branch'] = '分支';
$lang->action->objectTypes['module'] = '模块';
$lang->action->objectTypes['testsuite'] = '套件';
$lang->action->objectTypes['testlib'] = '公共库';
$lang->action->objectTypes['caselib'] = '用例库';
$lang->action->objectTypes['testreport'] = '报告';
/* 用来描述操作历史记录。*/
$lang->action->desc = new stdclass();
@@ -82,6 +83,7 @@ $lang->action->desc->undeleted = '$date, 由 <strong>$actor</strong> 还原
$lang->action->desc->hidden = '$date, 由 <strong>$actor</strong> 隐藏。' . "\n";
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 添加备注。' . "\n";
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。' . "\n";
$lang->action->desc->blocked = '$date, 由 <strong>$actor</strong> 阻塞。' . "\n";
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移动,之前为 "$extra"。' . "\n";
$lang->action->desc->confirmed = '$date, 由 <strong>$actor</strong> 确认需求变动,最新版本为<strong>#$extra</strong>。' . "\n";
$lang->action->desc->caseconfirmed = '$date, 由 <strong>$actor</strong> 确认用例变动,最新版本为<strong>#$extra</strong>。' . "\n";
@@ -123,6 +125,7 @@ $lang->action->label->undeleted = '还原了';
$lang->action->label->hidden = '隐藏了';
$lang->action->label->commented = '评论了';
$lang->action->label->activated = '激活了';
$lang->action->label->blocked = '阻塞了';
$lang->action->label->resolved = '解决了';
$lang->action->label->reviewed = '评审了';
$lang->action->label->moved = '移动了';
@@ -130,6 +133,7 @@ $lang->action->label->confirmed = '确认了需求,';
$lang->action->label->bugconfirmed = '确认了';
$lang->action->label->tostory = '转需求';
$lang->action->label->frombug = '转需求';
$lang->action->label->fromlib = '从用例库导入';
$lang->action->label->totask = '转任务';
$lang->action->label->svncommited = '提交代码';
$lang->action->label->gitcommited = '提交代码';
@@ -173,10 +177,13 @@ $lang->action->label->build = 'Build|build|view|buildID=%s';
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
$lang->action->label->case = '用例|testcase|view|caseID=%s';
$lang->action->label->testtask = '测试任务|testtask|view|caseID=%s';
$lang->action->label->testsuite = '测试套件|testsuite|view|suiteID=%s';
$lang->action->label->caselib = '测试库|testsuite|libview|libID=%s';
$lang->action->label->todo = 'todo|todo|view|todoID=%s';
$lang->action->label->doclib = '文档库|doc|browse|libID=%s';
$lang->action->label->doc = '文档|doc|view|docID=%s';
$lang->action->label->user = '用户|user|view|account=%s';
$lang->action->label->testreport = '报告|testreport|view|report=%s';
$lang->action->label->space = ' ';
/* Object type. */
@@ -199,7 +206,8 @@ $lang->action->search->objectTypeList['release'] = '发布';
$lang->action->search->objectTypeList['productplan'] = '计划';
$lang->action->search->objectTypeList['branch'] = '分支';
$lang->action->search->objectTypeList['testsuite'] = '套件';
$lang->action->search->objectTypeList['testlib'] = '公共库';
$lang->action->search->objectTypeList['caselib'] = '公共库';
$lang->action->search->objectTypeList['testreport'] = '报告';
/* 用来在动态显示中显示动作 */
$lang->action->search->label[''] = '';
@@ -217,6 +225,7 @@ $lang->action->search->label['undeleted'] = $lang->action->label->unde
$lang->action->search->label['hidden'] = $lang->action->label->hidden;
$lang->action->search->label['commented'] = $lang->action->label->commented;
$lang->action->search->label['activated'] = $lang->action->label->activated;
$lang->action->search->label['blocked'] = $lang->action->label->blocked;
$lang->action->search->label['resolved'] = $lang->action->label->resolved;
$lang->action->search->label['reviewed'] = $lang->action->label->reviewed;
$lang->action->search->label['moved'] = $lang->action->label->moved;
+13
View File
@@ -61,6 +61,9 @@ $lang->action->objectTypes['doclib'] = '文檔庫';
$lang->action->objectTypes['todo'] = '待辦';
$lang->action->objectTypes['branch'] = '分支';
$lang->action->objectTypes['module'] = '模組';
$lang->action->objectTypes['testsuite'] = '套件';
$lang->action->objectTypes['caselib'] = '用例庫';
$lang->action->objectTypes['testreport'] = '報告';
/* 用來描述操作歷史記錄。*/
$lang->action->desc = new stdclass();
@@ -80,6 +83,7 @@ $lang->action->desc->undeleted = '$date, 由 <strong>$actor</strong> 還原
$lang->action->desc->hidden = '$date, 由 <strong>$actor</strong> 隱藏。' . "\n";
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 添加備註。' . "\n";
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。' . "\n";
$lang->action->desc->blocked = '$date, 由 <strong>$actor</strong> 阻塞。' . "\n";
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移動,之前為 "$extra"。' . "\n";
$lang->action->desc->confirmed = '$date, 由 <strong>$actor</strong> 確認需求變動,最新版本為<strong>#$extra</strong>。' . "\n";
$lang->action->desc->caseconfirmed = '$date, 由 <strong>$actor</strong> 確認用例變動,最新版本為<strong>#$extra</strong>。' . "\n";
@@ -121,6 +125,7 @@ $lang->action->label->undeleted = '還原了';
$lang->action->label->hidden = '隱藏了';
$lang->action->label->commented = '評論了';
$lang->action->label->activated = '激活了';
$lang->action->label->blocked = '阻塞了';
$lang->action->label->resolved = '解決了';
$lang->action->label->reviewed = '評審了';
$lang->action->label->moved = '移動了';
@@ -128,6 +133,7 @@ $lang->action->label->confirmed = '確認了需求,';
$lang->action->label->bugconfirmed = '確認了';
$lang->action->label->tostory = '轉需求';
$lang->action->label->frombug = '轉需求';
$lang->action->label->fromlib = '從用例庫導入';
$lang->action->label->totask = '轉任務';
$lang->action->label->svncommited = '提交代碼';
$lang->action->label->gitcommited = '提交代碼';
@@ -171,10 +177,13 @@ $lang->action->label->build = 'Build|build|view|buildID=%s';
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
$lang->action->label->case = '用例|testcase|view|caseID=%s';
$lang->action->label->testtask = '測試任務|testtask|view|caseID=%s';
$lang->action->label->testsuite = '測試套件|testsuite|view|suiteID=%s';
$lang->action->label->caselib = '測試庫|testsuite|libview|libID=%s';
$lang->action->label->todo = 'todo|todo|view|todoID=%s';
$lang->action->label->doclib = '文檔庫|doc|browse|libID=%s';
$lang->action->label->doc = '文檔|doc|view|docID=%s';
$lang->action->label->user = '用戶|user|view|account=%s';
$lang->action->label->testreport = '報告|testreport|view|report=%s';
$lang->action->label->space = ' ';
/* Object type. */
@@ -196,6 +205,9 @@ $lang->action->search->objectTypeList['build'] = 'Build';
$lang->action->search->objectTypeList['release'] = '發佈';
$lang->action->search->objectTypeList['productplan'] = '計劃';
$lang->action->search->objectTypeList['branch'] = '分支';
$lang->action->search->objectTypeList['testsuite'] = '套件';
$lang->action->search->objectTypeList['caselib'] = '公共庫';
$lang->action->search->objectTypeList['testreport'] = '報告';
/* 用來在動態顯示中顯示動作 */
$lang->action->search->label[''] = '';
@@ -213,6 +225,7 @@ $lang->action->search->label['undeleted'] = $lang->action->label->unde
$lang->action->search->label['hidden'] = $lang->action->label->hidden;
$lang->action->search->label['commented'] = $lang->action->label->commented;
$lang->action->search->label['activated'] = $lang->action->label->activated;
$lang->action->search->label['blocked'] = $lang->action->label->blocked;
$lang->action->search->label['resolved'] = $lang->action->label->resolved;
$lang->action->search->label['reviewed'] = $lang->action->label->reviewed;
$lang->action->search->label['moved'] = $lang->action->label->moved;
+12 -6
View File
@@ -52,8 +52,11 @@ class actionModel extends model
$action->project = $productAndProject['project'];
$this->dao->insert(TABLE_ACTION)->data($action)->autoCheck()->exec();
$actionID = $this->dbh->lastInsertID();
$this->file->updateObjectID($this->post->uid, $objectID, $objectType);
return $this->dbh->lastInsertID();
return $actionID;
}
/**
@@ -373,7 +376,7 @@ class actionModel extends model
->andWhere('extra')->eq($extra)
->orderBy($orderBy)->page($pager)->fetchAll();
if(!$trashes) return array();
/* Group trashes by objectType, and get there name field. */
foreach($trashes as $object)
{
@@ -418,6 +421,7 @@ class actionModel extends model
*/
public function logHistory($actionID, $changes)
{
if(empty($actionID)) return false;
foreach($changes as $change)
{
$change['action'] = $actionID;
@@ -434,6 +438,8 @@ class actionModel extends model
*/
public function printAction($action)
{
if(!isset($action->objectType) or !isset($action->action)) return false;
$objectType = $action->objectType;
$actionType = strtolower($action->action);
@@ -529,7 +535,7 @@ class actionModel extends model
$condition = "(product =',0,' AND project = '0')";
if($projectCondition) $condition .= ' OR ' . $projectCondition;
if($productCondition) $condition .= ' OR ' . $productCondition;
if(strpos($this->app->company->admins, ',' . $this->app->user->account . ',') !== false) $condition = 1;
if($this->app->user->admin) $condition = 1;
}
$this->loadModel('doc');
@@ -627,7 +633,7 @@ class actionModel extends model
*/
public function getBySQL($sql, $orderBy, $pager = null)
{
return $actions = $this->dao->select('*')->from(TABLE_ACTION)
return $actions = $this->dao->select('*')->from(TABLE_ACTION)
->where($sql)
->orderBy($orderBy)
->page($pager)
@@ -669,11 +675,11 @@ class actionModel extends model
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
if($todo->private == 1 and $todo->account != $this->app->user->account)
{
$objectNames[$objectType][$id] = $this->lang->todo->thisIsPrivate;
$objectNames[$objectType][$id] = $this->lang->todo->thisIsPrivate;
}
else
{
$objectNames[$objectType][$id] = $todo->name;
$objectNames[$objectType][$id] = $todo->name;
}
}
}
+14 -1
View File
@@ -37,7 +37,20 @@
<tr class='text-center'>
<td><?php echo zget($lang->action->objectTypes, $action->objectType, '');?></td>
<td><?php echo $action->objectID;?></td>
<td class='text-left'><?php echo html::a($this->createLink($module, $module == 'testlib' ? 'libview' : 'view', $action->objectType == 'user' ? "account={$action->objectName}" : "id={$action->objectID}"), $action->objectName);?></td>
<td class='text-left'>
<?php
$methodName = $module == 'caselib' ? 'libview' : 'view';
$params = $action->objectType == 'user' ? "account={$action->objectName}" : "id={$action->objectID}";
if($module == 'doclib')
{
echo $action->objectName;
}
else
{
echo html::a($this->createLink($module, $methodName, $params), $action->objectName);
}
?>
</td>
<td><?php echo $users[$action->actor];?></td>
<td><?php echo $action->date;?></td>
<td>
+1 -1
View File
@@ -22,7 +22,7 @@ $lang->admin->captcha = 'Verification Code';
$lang->admin->getCaptcha = 'Get Verification Code';
$lang->admin->info = new stdclass();
$lang->admin->info->version = 'Current Version is %s,';
$lang->admin->info->version = 'Current Version is %s. ';
$lang->admin->info->links = 'You can visit ';
$lang->admin->info->account = "Your ZenTao account is %s.";
+28 -8
View File
@@ -49,9 +49,10 @@ class block extends control
if(!common::hasPriv($moduleKey, 'index')) unset($modules[$moduleKey]);
}
$modules['dynamic'] = $this->lang->block->dynamic;
$modules['flowchart'] = $this->lang->block->lblFlowchart;
$modules['html'] = 'HTML';
$closedBlock = isset($this->config->block->closed) ? $this->config->block->closed : '';
if(strpos(",$closedBlock,", ",|dynamic,") === false) $modules['dynamic'] = $this->lang->block->dynamic;
if(strpos(",$closedBlock,", ",|flowchart,") === false) $modules['flowchart'] = $this->lang->block->lblFlowchart;
if(strpos(",$closedBlock,", ",|html,") === false) $modules['html'] = 'HTML';
$modules = array('' => '') + $modules;
$hiddenBlocks = $this->block->getHiddenBlocks();
@@ -261,6 +262,7 @@ class block extends control
elseif($block->source != '')
{
$this->get->set('mode', 'getblockdata');
$this->get->set('blockTitle', $block->title);
$this->get->set('module', $block->module);
$this->get->set('source', $block->source);
$this->get->set('blockid', $block->block);
@@ -289,7 +291,7 @@ class block extends control
{
if(!$this->selfCall)
{
$lang = $this->get->lang;
$lang = str_replace('_', '-', $this->get->lang);
$this->app->setClientLang($lang);
$this->app->loadLang('common');
$this->app->loadLang('block');
@@ -341,9 +343,10 @@ class block extends control
$this->view->sign = strpos($sso, '?') === false ? '?' : '&';
}
$this->viewType = (isset($params->viewType) and $params->viewType == 'json') ? 'json' : 'html';
$this->params = $params;
$this->view->code = $this->get->blockid;
$this->viewType = (isset($params->viewType) and $params->viewType == 'json') ? 'json' : 'html';
$this->params = $params;
$this->view->code = $this->get->blockid;
$this->view->title = $this->get->blockTitle;
$func = 'print' . ucfirst($code) . 'Block';
if(method_exists('block', $func))
@@ -586,8 +589,9 @@ class block extends control
{
$this->app->loadClass('pager', $static = true);
$num = isset($this->params->num) ? $this->params->num : 0;
$type = isset($this->params->type) ? $this->params->type : '';
$pager = pager::init(0, $num , 1);
$this->view->productStats = $this->loadModel('product')->getStats('order_desc', $this->viewType != 'json' ? $pager : '', $this->params->type);
$this->view->productStats = $this->loadModel('product')->getStats('order_desc', $this->viewType != 'json' ? $pager : '', $type);
}
/**
@@ -614,4 +618,20 @@ class block extends control
{
$this->display();
}
/**
* Close block forever.
*
* @param int $blockID
* @access public
* @return void
*/
public function close($blockID)
{
$block = $this->block->getByID($blockID);
$closedBlock = isset($this->config->block->closed) ? $this->config->block->closed : '';
$this->dao->delete()->from(TABLE_BLOCK)->where('source')->eq($block->source)->andWhere('block')->eq($block->block)->exec();
$this->loadModel('setting')->setItem('system.block.closed', $closedBlock . ",{$block->source}|{$block->block}");
die(js::reload('parent'));
}
}
+10 -5
View File
@@ -31,6 +31,9 @@ $lang->block->createBlock = 'Create Widget';
$lang->block->editBlock = 'Edit';
$lang->block->ordersSaved = 'Ranking is saved.';
$lang->block->confirmRemoveBlock = 'Do you want to remove Widget【{0}】?';
$lang->block->closeForever = 'Permanent Close';
$lang->block->confirmClose = 'Do you want to permanently close this block? Once done, it is not available to anyone. It can be switched on at Admin->Custom.';
$lang->block->remove = 'Remove';
$lang->block->refresh = 'Refresh';
$lang->block->hidden = 'Hide';
$lang->block->dynamicInfo = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>.";
@@ -82,7 +85,7 @@ $lang->block->default['qa']['2']['params']['num'] = 15;
$lang->block->default['qa']['2']['params']['orderBy'] = 'id_desc';
$lang->block->default['qa']['2']['params']['type'] = 'assigntome';
$lang->block->default['qa']['3']['title'] = 'Pending Versions';
$lang->block->default['qa']['3']['title'] = 'Pending Builds';
$lang->block->default['qa']['3']['block'] = 'testtask';
$lang->block->default['qa']['3']['grid'] = 4;
@@ -226,9 +229,11 @@ $lang->block->typeList->project['undone'] = 'Undone';
$lang->block->typeList->project['isdoing'] = 'Doing';
$lang->block->typeList->project['all'] = 'All';
$lang->block->typeList->testtask['wait'] = 'Testing Pending';
$lang->block->typeList->testtask['done'] = 'Tested';
$lang->block->typeList->testtask['all'] = 'All';
$lang->block->typeList->testtask['wait'] = 'Testing Pending';
$lang->block->typeList->testtask['doing'] = 'Testing';
$lang->block->typeList->testtask['blocked'] = 'Blocked';
$lang->block->typeList->testtask['done'] = 'Tested';
$lang->block->typeList->testtask['all'] = 'All';
$lang->block->modules['product']->moreLinkList = new stdclass();
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&status=%s';
@@ -250,5 +255,5 @@ $lang->block->flowchart = array();
$lang->block->flowchart[] = array('Administration', 'Manage a Company', 'Add Users', 'Maintain Privileges');
$lang->block->flowchart[] = array($lang->productCommon . ' Manager', 'Add ' . $lang->productCommon, 'Maintain Modules', 'Maintain Plans', 'Maintain Stories', 'Create Release');
$lang->block->flowchart[] = array($lang->projectCommon . ' Manager', 'Add ' . $lang->projectCommon, 'Maintain Teams', 'Link ' . $lang->productCommon . 's', 'Link Stories', 'Decompose Tasks');
$lang->block->flowchart[] = array('DEV Team', 'Claim TaskS/Bugs', 'Update Status', 'Finish Tasks/Bugs');
$lang->block->flowchart[] = array('DEV Team', 'Claim Tasks/Bugs', 'Update Status', 'Finish Tasks/Bugs');
$lang->block->flowchart[] = array('Testing Team', 'Write Cases', 'Implement Cases', 'Report Bugs', 'Fix Bugs', 'Close Bugs');
+8 -3
View File
@@ -31,6 +31,9 @@ $lang->block->createBlock = '添加区块';
$lang->block->editBlock = '编辑区块';
$lang->block->ordersSaved = '排序已保存';
$lang->block->confirmRemoveBlock = '确定移除区块【{0}】吗?';
$lang->block->closeForever = '永久关闭';
$lang->block->confirmClose = '确定永久关闭该区块吗?闭后所有人都将无法使用该区块,可以在后台自定义中打开';
$lang->block->remove = '移除';
$lang->block->refresh = '刷新';
$lang->block->hidden = '隐藏';
$lang->block->dynamicInfo = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>。";
@@ -226,9 +229,11 @@ $lang->block->typeList->project['undone'] = '未完成';
$lang->block->typeList->project['isdoing'] = '进行中';
$lang->block->typeList->project['all'] = '全部';
$lang->block->typeList->testtask['wait'] = '待测版本';
$lang->block->typeList->testtask['done'] = '已测版本';
$lang->block->typeList->testtask['all'] = '全部';
$lang->block->typeList->testtask['wait'] = '待测版本';
$lang->block->typeList->testtask['doing'] = '测试中版本';
$lang->block->typeList->testtask['blocked'] = '阻塞版本';
$lang->block->typeList->testtask['done'] = '已测版本';
$lang->block->typeList->testtask['all'] = '全部';
$lang->block->modules['product']->moreLinkList = new stdclass();
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&status=%s';
+8 -3
View File
@@ -31,6 +31,9 @@ $lang->block->createBlock = '添加區塊';
$lang->block->editBlock = '編輯區塊';
$lang->block->ordersSaved = '排序已保存';
$lang->block->confirmRemoveBlock = '確定移除區塊【{0}】嗎?';
$lang->block->closeForever = '永久關閉';
$lang->block->confirmClose = '確定永久關閉該區塊嗎?閉後所有人都將無法使用該區塊,可以在後台自定義中打開';
$lang->block->remove = '移除';
$lang->block->refresh = '刷新';
$lang->block->hidden = '隱藏';
$lang->block->dynamicInfo = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>。";
@@ -226,9 +229,11 @@ $lang->block->typeList->project['undone'] = '未完成';
$lang->block->typeList->project['isdoing'] = '進行中';
$lang->block->typeList->project['all'] = '全部';
$lang->block->typeList->testtask['wait'] = '待測版本';
$lang->block->typeList->testtask['done'] = '已測版本';
$lang->block->typeList->testtask['all'] = '全部';
$lang->block->typeList->testtask['wait'] = '待測版本';
$lang->block->typeList->testtask['doing'] = '測試中版本';
$lang->block->typeList->testtask['blocked'] = '阻塞版本';
$lang->block->typeList->testtask['done'] = '已測版本';
$lang->block->typeList->testtask['all'] = '全部';
$lang->block->modules['product']->moreLinkList = new stdclass();
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&status=%s';
+53 -12
View File
@@ -173,8 +173,16 @@ class blockModel extends model
*/
public function getAvailableBlocks($module = '')
{
if($module and isset($this->lang->block->modules[$module]))return json_encode($this->lang->block->modules[$module]->availableBlocks);
return json_encode($this->lang->block->availableBlocks);
$blocks = $this->lang->block->availableBlocks;
if($module and isset($this->lang->block->modules[$module])) $blocks = $this->lang->block->modules[$module]->availableBlocks;
if(isset($this->config->block->closed))
{
foreach($blocks as $blockKey => $blockName)
{
if(strpos(",{$this->config->block->closed},", ",{$module}|{$blockKey},") !== false) unset($blocks->$blockKey);
}
}
return json_encode($blocks);
}
/**
@@ -187,14 +195,6 @@ class blockModel extends model
public function getListParams($module = '')
{
$params = new stdclass();
if($module == 'project' or $module == 'product')
{
$params->type['name'] = $this->lang->block->type;
$params->type['options'] = $this->lang->block->typeList->$module;
$params->type['control'] = 'select';
}
$params = $this->onlyNumParams($module, $params);
return json_encode($params);
}
@@ -375,7 +375,11 @@ class blockModel extends model
*/
public function getProductParams($module = '')
{
return $this->getListParams($module);
$params->type['name'] = $this->lang->block->type;
$params->type['options'] = $this->lang->block->typeList->product;
$params->type['control'] = 'select';
return json_encode($this->onlyNumParams($module, $params));
}
/**
@@ -386,7 +390,44 @@ class blockModel extends model
*/
public function getProjectParams($module = '')
{
return $this->getListParams($module);
$params->type['name'] = $this->lang->block->type;
$params->type['options'] = $this->lang->block->typeList->project;
$params->type['control'] = 'select';
return json_encode($this->onlyNumParams($module, $params));
}
/**
* Get closed block pairs.
*
* @param string $closedBlock
* @access public
* @return array
*/
public function getClosedBlockPairs($closedBlock)
{
$blockPairs = array();
if(empty($closedBlock)) return $blockPairs;
foreach(explode(',', $closedBlock) as $block)
{
$block = trim($block);
if(empty($block)) continue;
list($moduleName, $blockKey) = explode('|', $block);
if(empty($moduleName))
{
if($blockKey == 'html') $blockPairs[$block] = 'HTML';
if($blockKey == 'flowchart') $blockPairs[$block] = $this->lang->block->lblFlowchart;
if($blockKey == 'dynamic') $blockPairs[$block] = $this->lang->block->dynamic;
}
else
{
$blockPairs[$block] = "{$this->lang->block->moduleList[$moduleName]}|{$this->lang->block->modules[$moduleName]->availableBlocks->$blockKey}";
}
}
return $blockPairs;
}
/**
+7 -1
View File
@@ -18,12 +18,15 @@ $useGuest = $this->app->user->account == 'guest';
?>
<?php include '../../common/view/tablesorter.html.php';?>
<div class='dashboard' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
<?php if(!$useGuest):?>
<div class='dashboard-actions'><a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='700' data-title='<?php echo $lang->block->createBlock?>'><i class='icon icon-plus' title='<?php echo $lang->block->createBlock?>' data-toggle='tooltip' data-placement='left'></i></a></div>
<div class='dashboard-empty-message hide'>
<a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='700' class='btn btn-primary'><i class='icon icon-plus'></i> <?php echo $lang->block->createBlock?></a>
</div>
<?php endif;?>
<div class='row'>
<?php foreach($blocks as $index => $block):?>
<?php if(isset($config->block->closed) and strpos(",{$config->block->closed},", ",{$block->source}|{$block->block},") !== false) continue;?>
<div class='col-sm-6 col-md-<?php echo $block->grid;?>'>
<div class='panel panel-block <?php if(isset($block->params->color)) echo 'panel-' . $block->params->color;?>' id='block<?php echo $block->id?>' data-id='<?php echo $block->id?>' data-name='<?php echo $block->title?>' data-url='<?php echo $block->blockLink?>'>
<div class='panel-heading'>
@@ -40,7 +43,10 @@ $useGuest = $this->app->user->account == 'guest';
<?php if(!$block->source and $block->block == 'html'):?>
<li><a href="javascript:hiddenBlock(<?php echo $index;?>)" class="hidden-panel"><i class='icon-eye-close'></i><?php echo $lang->block->hidden; ?></a></li>
<?php endif;?>
<li><a href='javascript:;' class='remove-panel'><i class='icon-remove'></i> <?php echo $lang->delete; ?></a></li>
<li><a href='javascript:;' class='remove-panel'><i class='icon-remove'></i> <?php echo $lang->block->remove; ?></a></li>
<?php endif;?>
<?php if($this->app->user->admin):?>
<li><?php echo html::a($this->createLink('block', 'close', "blockID={$block->id}"), "<i class='icon-eye-close'></i> {$lang->block->closeForever}", 'hiddenwin', "class='close-block' onclick=\"return confirm('{$lang->block->confirmClose}')\"")?>
<?php endif;?>
</ul>
</div>
+3 -3
View File
@@ -64,7 +64,7 @@ $(function()
$sparks = $sparks.not('.sparked');
var rowHeight = $sparks.first().closest('tr').outerHeight() - ($.zui.browser.ie === 8 ? 0.3 : 0);
var scrollFn = false, scrollStart, i, id, $spark;
var scrollFn = false, scrollStart = 6, i, id, $spark;
$projectbox.parent().on('scroll.spark', function(e)
{
if(!$sparks.length)
@@ -76,8 +76,7 @@ $(function()
scrollFn = setTimeout(function()
{
scrollStart = Math.floor(($projectbox.scrollTop() - 30) / (rowHeight)) + 1;
for(i = scrollStart; i <= scrollStart + 7; i++)
for(i = scrollStart; i <= scrollStart + 10; i++)
{
id = '#spark-' + i;
$spark = $(id);
@@ -85,6 +84,7 @@ $(function()
$spark.addClass('sparked').projectLine();
$sparks = $sparks.not(id);
}
scrollStart += 10;
},100);
});
});
+3 -20
View File
@@ -66,27 +66,10 @@ class branch extends control
$this->view->module = $module;
$this->view->method = $method;
$this->view->extra = $extra;
$this->view->branches = $this->branch->getPairs($productID);
$this->display();
}
/**
* Ajax get matched items
*
* @param string $keywords
* @param string $module
* @param string $method
* @param string $extra
* @param int $objectID
* @access public
* @return void
*/
public function ajaxGetMatchedItems($keywords, $module, $method, $extra, $objectID)
{
$this->view->link = $this->loadModel('product')->getProductLink($module, $method, $extra, true);
$this->view->branches = $this->dao->select('*')->from(TABLE_BRANCH)->where('deleted')->eq(0)->andWhere('product')->eq($objectID)->andWhere('name')->like("%$keywords%")->orderBy('id desc')->fetchPairs('id', 'name');
$this->view->productID = $objectID;
$this->view->keywords = $keywords;
$branches = $this->branch->getPairs($productID);
$this->view->branches = $branches;
$this->view->branchesPinyin = common::convert2Pinyin($branches);
$this->display();
}
+1 -1
View File
@@ -9,7 +9,7 @@
<?php
foreach($branches as $branchID => $branch)
{
echo "<li>" . html::a(sprintf($link, $productID, $branchID), "<i class='icon-cube'></i> " . $branch, '', "class='text-important'"). "</li>";
echo "<li data-id='{$branchID}' data-key='{$branchesPinyin[$branch]}'>" . html::a(sprintf($link, $productID, $branchID), "<i class='icon-cube'></i> " . $branch, '', "class='text-important'"). "</li>";
}
?>
</ul>
@@ -1,11 +0,0 @@
<div class='search-list'>
<ul>
<?php if(!$branches) echo "<li class='no-result-tip'>" . sprintf($lang->product->noMatched, $keywords) . '</li>';?>
<?php
foreach($branches as $branchID => $branch)
{
echo "<li>" . html::a(sprintf($link, $productID, $branchID), "<i class='icon-cube'></i> " . $branch). "</li>";
}
?>
</ul>
</div>
+10 -3
View File
@@ -36,14 +36,14 @@ $config->bug->list->exportFields = 'id, product, branch, module, project, story,
lastEditedBy,
lastEditedDate, files';
$config->bug->list->customCreateFields = 'project,story,task,pri,severity,os,browser,mailto,keywords';
$config->bug->list->customCreateFields = 'project,story,task,pri,severity,os,browser,deadline,mailto,keywords';
$config->bug->list->customBatchCreateFields = 'module,project,steps,type,pri,severity,os,browser,keywords';
$config->bug->list->customBatchEditFields = 'type,severity,pri,productplan,assignedTo,status,resolvedBy,resolution,os,browser,keywords';
$config->bug->list->customBatchEditFields = 'type,severity,pri,productplan,assignedTo,deadline,status,resolvedBy,resolution,os,browser,keywords';
$config->bug->custom = new stdclass();
$config->bug->custom->createFields = $config->bug->list->customCreateFields;
$config->bug->custom->batchCreateFields = 'module,project,steps,type,severity,os,browser';
$config->bug->custom->batchEditFields = 'type,severity,pri,assignedTo,status,resolvedBy,resolution';
$config->bug->custom->batchEditFields = 'type,severity,pri,assignedTo,deadline,status,resolvedBy,resolution';
$config->bug->editor = new stdclass();
$config->bug->editor->create = array('id' => 'steps', 'tools' => 'bugTools');
@@ -99,6 +99,7 @@ $config->bug->search['fields']['assignedDate'] = $lang->bug->assignedDate;
$config->bug->search['fields']['resolvedDate'] = $lang->bug->resolvedDate;
$config->bug->search['fields']['closedDate'] = $lang->bug->closedDate;
$config->bug->search['fields']['lastEditedDate'] = $lang->bug->lastEditedDateAB;
$config->bug->search['fields']['deadline'] = $lang->bug->deadline;
$config->bug->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->bug->search['params']['keywords'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
@@ -141,6 +142,7 @@ $config->bug->search['params']['assignedDate'] = array('operator' => '=',
$config->bug->search['params']['resolvedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->bug->search['params']['closedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->bug->search['params']['lastEditedDate']= array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->bug->search['params']['deadline'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->bug->datatable = new stdclass();
$config->bug->datatable->defaultField = array('id', 'severity', 'pri', 'title', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolvedBy', 'resolution', 'resolvedDate', 'actions');
@@ -205,6 +207,11 @@ $config->bug->datatable->fieldList['assignedDate']['fixed'] = 'no';
$config->bug->datatable->fieldList['assignedDate']['width'] = '90';
$config->bug->datatable->fieldList['assignedDate']['required'] = 'no';
$config->bug->datatable->fieldList['deadline']['title'] = 'deadline';
$config->bug->datatable->fieldList['deadline']['fixed'] = 'no';
$config->bug->datatable->fieldList['deadline']['width'] = '90';
$config->bug->datatable->fieldList['deadline']['required'] = 'no';
$config->bug->datatable->fieldList['resolvedBy']['title'] = 'resolvedByAB';
$config->bug->datatable->fieldList['resolvedBy']['fixed'] = 'no';
$config->bug->datatable->fieldList['resolvedBy']['width'] = '80';
+22 -22
View File
@@ -250,6 +250,7 @@ class bug extends control
$os = '';
$browser = '';
$assignedTo = '';
$deadline = '';
$mailto = '';
$keywords = '';
$severity = 3;
@@ -259,16 +260,8 @@ class bug extends control
$extras = str_replace(array(',', ' '), array('&', ''), $extras);
parse_str($extras);
/* If set runID, get the last result info as the template. */
if(!empty($runID)) $resultID = $this->dao->select('id')->from(TABLE_TESTRESULT)->where('run')->eq($runID)->orderBy('id desc')->limit(1)->fetch('id');
if(isset($resultID) and $resultID > 0) extract($this->bug->getBugInfoFromResult($resultID));
/* If set caseID and runID='', get the last result info as the template. */
if($caseID && empty($runID))
{
$resultID = $this->dao->select('id')->from(TABLE_TESTRESULT)->where('`case`')->eq($caseID)->orderBy('date desc')->limit(1)->fetch('id');
if(isset($resultID) and $resultID > 0) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version));
}
if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID));// If set runID and resultID, get the result info by resultID as template.
if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version));// If not set runID but set caseID, get the result info by resultID and case info.
/* If bugID setted, use this bug as template. */
if(isset($bugID))
@@ -283,6 +276,7 @@ class bug extends control
$severity = $bug->severity;
$type = $bug->type;
$assignedTo = $bug->assignedTo;
$deadline = $bug->deadline;
}
/* If projectID is setted, get builds and stories of this project. */
@@ -338,6 +332,7 @@ class bug extends control
$this->view->browser = $browser;
$this->view->projectMembers = $projectMembers;
$this->view->assignedTo = $assignedTo;
$this->view->deadline = $deadline;
$this->view->mailto = $mailto;
$this->view->keywords = $keywords;
$this->view->severity = $severity;
@@ -650,10 +645,9 @@ class bug extends control
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id');
/* Judge whether the editedTasks is too large and set session. */
$showSuhosinInfo = false;
$showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting(count($bugs), count(explode(',', $this->config->bug->custom->batchEditFields)) + 2);
$this->app->session->set('showSuhosinInfo', $showSuhosinInfo);
if($showSuhosinInfo) $this->view->suhosinInfo = $this->lang->suhosinInfo;
$countInputVars = count($bugs) * (count(explode(',', $this->config->bug->custom->batchEditFields)) + 2);
$showSuhosinInfo = common::judgeSuhosinSetting($countInputVars);
if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars);
/* Set Custom*/
foreach(explode(',', $this->config->bug->list->customBatchEditFields) as $field) $customFields[$field] = $this->lang->bug->$field;
@@ -1281,6 +1275,7 @@ class bug extends control
if($_POST)
{
$this->loadModel('file');
$this->loadModel('branch');
$bugLang = $this->lang->bug;
$bugConfig = $this->config->bug;
@@ -1304,16 +1299,18 @@ class bug extends control
$projects = $this->loadModel('project')->getPairs('all|nocode');
/* Get related objects id lists. */
$relatedModuleIdList = array();
$relatedStoryIdList = array();
$relatedTaskIdList = array();
$relatedBugIdList = array();
$relatedCaseIdList = array();
$relatedBuildIdList = array();
$relatedBranchIdList = array();
$relatedProductIdList = array();
$relatedModuleIdList = array();
$relatedStoryIdList = array();
$relatedTaskIdList = array();
$relatedBugIdList = array();
$relatedCaseIdList = array();
$relatedBuildIdList = array();
$relatedBranchIdList = array();
foreach($bugs as $bug)
{
$relatedProductIdList[$bug->product] = $bug->product;
$relatedModuleIdList[$bug->module] = $bug->module;
$relatedStoryIdList[$bug->story] = $bug->story;
$relatedTaskIdList[$bug->task] = $bug->task;
@@ -1338,12 +1335,13 @@ class bug extends control
}
/* Get related objects title or names. */
$productsType = $this->dao->select('id, type')->from(TABLE_PRODUCT)->where('id')->in($relatedProductIdList)->fetchPairs();
$relatedModules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in($relatedModuleIdList)->fetchPairs();
$relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs();
$relatedTasks = $this->dao->select('id, name')->from(TABLE_TASK)->where('id')->in($relatedTaskIdList)->fetchPairs();
$relatedBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($relatedBugIdList)->fetchPairs();
$relatedCases = $this->dao->select('id, title')->from(TABLE_CASE)->where('id')->in($relatedCaseIdList)->fetchPairs();
$relatedBranch = $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($relatedBranchIdList)->fetchPairs();
$relatedBranch = array('0' => $this->lang->branch->all) + $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($relatedBranchIdList)->fetchPairs();
$relatedBuilds = array('trunk' => $this->lang->trunk) + $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($relatedBuildIdList)->fetchPairs();
$relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('bug')->andWhere('objectID')->in(@array_keys($bugs))->fetchGroup('objectID');
@@ -1440,6 +1438,8 @@ class bug extends control
unset($bug->deleted);
}
if(!(in_array('platform', $productsType) or in_array('branch', $productsType))) unset($fields['branch']);// If products's type are normal, unset branch field.
$this->post->set('fields', $fields);
$this->post->set('rows', $bugs);
$this->post->set('kind', 'bug');
+1 -1
View File
@@ -30,7 +30,7 @@
#contactListGroup .input-group-btn > .btn {margin-left: -1px!important;}
#contactListGroup .chosen-container-single a {border-left-width: 0px;}
.chosen-container {max-width: 533px;}
.chosen-container {max-width: 580px;}
.minw-80px {min-width: 80px;}
+8 -7
View File
@@ -75,22 +75,23 @@ function setTemplate(templateID)
function deleteTemplate(templateID)
{
if(!templateID) return;
if (confirm(TemplateDelete)){
if(confirm(confirmDeleteTemplate))
{
hiddenwin.location.href = createLink('bug', 'deleteTemplate', 'templateID=' + templateID);
$('#tplBox' + templateID).addClass('hidden');
}
}
/*visbile template x icon*/
function mouseOver(delTempID)
/* Display template x icon. */
function displayXIcon(templateID)
{
$('#delTemp'+delTempID).removeClass('hidden');
$('#templateID' + templateID).removeClass('hidden');
}
/*hidden template x icon*/
function mouseOut(delTempID)
/* Hide template x icon. */
function hideXIcon(templateID)
{
$('#delTemp'+delTempID).addClass('hidden');
$('#templateID' + templateID).addClass('hidden');
}
$(function()
+16 -7
View File
@@ -13,6 +13,7 @@
$lang->bug->common = 'Bug';
$lang->bug->id = 'ID';
$lang->bug->product = $lang->productCommon;
$lang->bug->branch = 'Branch/Platform';
$lang->bug->productplan = 'Plan';
$lang->bug->module = 'Module';
$lang->bug->moduleAB = 'Module';
@@ -48,6 +49,7 @@ $lang->bug->resolutionAB = 'Solution';
$lang->bug->resolvedBuild = 'Resolved Build';
$lang->bug->resolvedDate = 'Resolved On';
$lang->bug->resolvedDateAB = 'Resolved On';
$lang->bug->deadline = 'Deadline';
$lang->bug->closedBy = 'Closed By';
$lang->bug->closedDate = 'Closed On';
$lang->bug->duplicateBug = 'Duplicate';
@@ -99,11 +101,12 @@ $lang->bug->openedByMe = 'Created by Me';
$lang->bug->resolvedByMe = 'Resolved by Me';
$lang->bug->closedByMe = 'Closed by Me';
$lang->bug->assignToNull = 'Unassigned';
$lang->bug->unResolved = 'Unresolve';
$lang->bug->unResolved = 'Unresolved';
$lang->bug->toClosed = 'To Be Closed';
$lang->bug->unclosed = 'Open';
$lang->bug->longLifeBugs = 'Pending';
$lang->bug->postponedBugs = 'Postponed';
$lang->bug->overdueBugs = 'Overdue';
$lang->bug->allBugs = 'All';
$lang->bug->byQuery = 'Search';
$lang->bug->needConfirm = 'Story Change';
@@ -130,18 +133,19 @@ $lang->bug->lblSystemBrowserAndHardware = 'System/Browser';
$lang->bug->legendSteps = 'Repro Steps';
$lang->bug->legendComment = 'Note';
$lang->bug->legendLife = 'Lifecycle';
$lang->bug->legendMisc = 'Miscellaneous';
$lang->bug->legendMisc = 'Misc';
/* 功能按钮。*/
$lang->bug->buttonConfirm = 'Confirm';
/* 交互提示。*/
$lang->bug->confirmChangeProduct = "Modification on {$lang->productCommon} will cause linked {$lang->projectCommon},Story and Task change. Do you want to do this?";
$lang->bug->confirmDelete = 'Do you want to delete this bug?';
$lang->bug->setTemplateTitle = 'Please enter the title of template.';
$lang->bug->remindTask = 'This Bug has been converted to Task. Do you want to update Status of Task(ID %s)?';
$lang->bug->skipClose = 'Bug %s is not resolved. You cannot close it.';
$lang->bug->applyTemplate = 'Apply Template';
$lang->bug->confirmDelete = 'Do you want to delete this bug?';
$lang->bug->setTemplateTitle = 'Please enter the title of template.';
$lang->bug->remindTask = 'This Bug has been converted to Task. Do you want to update Status of Task(ID %s)?';
$lang->bug->skipClose = 'Bug %s is not resolved. You cannot close it.';
$lang->bug->applyTemplate = 'Apply Template';
$lang->bug->confirmDeleteTemplate = 'Do you want to delete this template?';
/* 模板。*/
$lang->bug->tplStep = "<p>[Steps]</p>\n";
@@ -257,6 +261,7 @@ $lang->bug->report->charts['bugsPerSeverity'] = 'Bug Priority Report';
$lang->bug->report->charts['bugsPerResolution'] = 'Bug Solution Report';
$lang->bug->report->charts['bugsPerStatus'] = 'Bug Status Report';
$lang->bug->report->charts['bugsPerActivatedCount'] = 'Bug Activation Report';
$lang->bug->report->charts['bugsPerPri'] = 'Bug Priority Report';
$lang->bug->report->charts['bugsPerType'] = 'Bug Type Report';
$lang->bug->report->charts['bugsPerAssignedTo'] = 'Bug Assignment Report';
//$lang->bug->report->charts['bugLiveDays'] = 'Bug Handling Time Report';
@@ -282,6 +287,7 @@ $lang->bug->report->bugsPerResolution = new stdclass();
$lang->bug->report->bugsPerStatus = new stdclass();
$lang->bug->report->bugsPerActivatedCount = new stdclass();
$lang->bug->report->bugsPerType = new stdclass();
$lang->bug->report->bugsPerPri = new stdclass();
$lang->bug->report->bugsPerAssignedTo = new stdclass();
$lang->bug->report->bugLiveDays = new stdclass();
$lang->bug->report->bugHistories = new stdclass();
@@ -300,6 +306,7 @@ $lang->bug->report->bugsPerResolution->graph = new stdclass();
$lang->bug->report->bugsPerStatus->graph = new stdclass();
$lang->bug->report->bugsPerActivatedCount->graph = new stdclass();
$lang->bug->report->bugsPerType->graph = new stdclass();
$lang->bug->report->bugsPerPri->graph = new stdclass();
$lang->bug->report->bugsPerAssignedTo->graph = new stdclass();
$lang->bug->report->bugLiveDays->graph = new stdclass();
$lang->bug->report->bugHistories->graph = new stdclass();
@@ -325,6 +332,7 @@ $lang->bug->report->bugsPerSeverity->graph->xAxisName = 'Priority';
$lang->bug->report->bugsPerResolution->graph->xAxisName = 'Solution';
$lang->bug->report->bugsPerStatus->graph->xAxisName = 'Status';
$lang->bug->report->bugsPerActivatedCount->graph->xAxisName = 'Activation Count';
$lang->bug->report->bugsPerPri->graph->xAxisName = 'Priority';
$lang->bug->report->bugsPerType->graph->xAxisName = 'Type';
$lang->bug->report->bugsPerAssignedTo->graph->xAxisName = 'Assigned To';
$lang->bug->report->bugLiveDays->graph->xAxisName = 'Handling Time';
@@ -359,4 +367,5 @@ $lang->bug->featureBar['browse']['unresolved'] = $lang->bug->unResolved;
$lang->bug->featureBar['browse']['toclosed'] = $lang->bug->toClosed;
$lang->bug->featureBar['browse']['longlifebugs'] = $lang->bug->longLifeBugs;
$lang->bug->featureBar['browse']['postponedbugs'] = $lang->bug->postponedBugs;
$lang->bug->featureBar['browse']['overduebugs'] = $lang->bug->overdueBugs;
$lang->bug->featureBar['browse']['needconfirm'] = $lang->bug->needConfirm;
+10 -7
View File
@@ -49,6 +49,7 @@ $lang->bug->resolutionAB = '方案';
$lang->bug->resolvedBuild = '解决版本';
$lang->bug->resolvedDate = '解决日期';
$lang->bug->resolvedDateAB = '解决日期';
$lang->bug->deadline = '截止日期';
$lang->bug->closedBy = '由谁关闭';
$lang->bug->closedDate = '关闭日期';
$lang->bug->duplicateBug = '重复ID';
@@ -105,6 +106,7 @@ $lang->bug->toClosed = '待关闭';
$lang->bug->unclosed = '未关闭';
$lang->bug->longLifeBugs = '久未处理';
$lang->bug->postponedBugs = '被延期';
$lang->bug->overdueBugs = '过期Bug';
$lang->bug->allBugs = '所有';
$lang->bug->byQuery = '搜索';
$lang->bug->needConfirm = '需求变动';
@@ -137,13 +139,13 @@ $lang->bug->legendMisc = '其他相关';
$lang->bug->buttonConfirm = '确认';
/* 交互提示。*/
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}会导致相应的{$lang->projectCommon}、需求和任务发生变化,确定吗?";
$lang->bug->confirmDelete = '您确认要删除该Bug吗?';
$lang->bug->setTemplateTitle = '请输入bug模板标题';
$lang->bug->remindTask = '该Bug已经转化为任务,是否更新任务(编号:%s)状态 ?';
$lang->bug->skipClose = 'Bug %s 不是已解决状态,不能关闭。';
$lang->bug->applyTemplate = '应用模板';
$lang->bug->TemplateDelete = '您确认要删除该模板吗?';
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}会导致相应的{$lang->projectCommon}、需求和任务发生变化,确定吗?";
$lang->bug->confirmDelete = '您确认要删除该Bug吗?';
$lang->bug->setTemplateTitle = '请输入bug模板标题';
$lang->bug->remindTask = '该Bug已经转化为任务,是否更新任务(编号:%s)状态 ?';
$lang->bug->skipClose = 'Bug %s 不是已解决状态,不能关闭。';
$lang->bug->applyTemplate = '应用模板';
$lang->bug->confirmDeleteTemplate = '您确认要删除该模板吗?';
/* 模板。*/
$lang->bug->tplStep = "<p>[步骤]</p>\n";
@@ -365,4 +367,5 @@ $lang->bug->featureBar['browse']['unresolved'] = $lang->bug->unResolved;
$lang->bug->featureBar['browse']['toclosed'] = $lang->bug->toClosed;
$lang->bug->featureBar['browse']['longlifebugs'] = $lang->bug->longLifeBugs;
$lang->bug->featureBar['browse']['postponedbugs'] = $lang->bug->postponedBugs;
$lang->bug->featureBar['browse']['overduebugs'] = $lang->bug->overdueBugs;
$lang->bug->featureBar['browse']['needconfirm'] = $lang->bug->needConfirm;
+15 -6
View File
@@ -13,6 +13,7 @@
$lang->bug->common = 'Bug';
$lang->bug->id = 'Bug編號';
$lang->bug->product = '所屬' . $lang->productCommon;
$lang->bug->branch = '分支/平台';
$lang->bug->productplan = '所屬計劃';
$lang->bug->module = '所屬模組';
$lang->bug->moduleAB = '模組';
@@ -48,6 +49,7 @@ $lang->bug->resolutionAB = '方案';
$lang->bug->resolvedBuild = '解決版本';
$lang->bug->resolvedDate = '解決日期';
$lang->bug->resolvedDateAB = '解決日期';
$lang->bug->deadline = '截止日期';
$lang->bug->closedBy = '由誰關閉';
$lang->bug->closedDate = '關閉日期';
$lang->bug->duplicateBug = '重複ID';
@@ -104,6 +106,7 @@ $lang->bug->toClosed = '待關閉';
$lang->bug->unclosed = '未關閉';
$lang->bug->longLifeBugs = '久未處理';
$lang->bug->postponedBugs = '被延期';
$lang->bug->overdueBugs = '過期Bug';
$lang->bug->allBugs = '所有';
$lang->bug->byQuery = '搜索';
$lang->bug->needConfirm = '需求變動';
@@ -136,12 +139,13 @@ $lang->bug->legendMisc = '其他相關';
$lang->bug->buttonConfirm = '確認';
/* 交互提示。*/
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}會導致相應的{$lang->projectCommon}、需求和任務發生變化,確定嗎?";
$lang->bug->confirmDelete = '您確認要刪除該Bug嗎?';
$lang->bug->setTemplateTitle = '請輸入bug模板標題';
$lang->bug->remindTask = '該Bug已經轉化為任務,是否更新任務(編號:%s)狀態 ?';
$lang->bug->skipClose = 'Bug %s 不是已解決狀態,不能關閉。';
$lang->bug->applyTemplate = '應用模板';
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}會導致相應的{$lang->projectCommon}、需求和任務發生變化,確定嗎?";
$lang->bug->confirmDelete = '您確認要刪除該Bug嗎?';
$lang->bug->setTemplateTitle = '請輸入bug模板標題';
$lang->bug->remindTask = '該Bug已經轉化為任務,是否更新任務(編號:%s)狀態 ?';
$lang->bug->skipClose = 'Bug %s 不是已解決狀態,不能關閉。';
$lang->bug->applyTemplate = '應用模板';
$lang->bug->confirmDeleteTemplate = '您確認要刪除該模板嗎?';
/* 模板。*/
$lang->bug->tplStep = "<p>[步驟]</p>\n";
@@ -257,6 +261,7 @@ $lang->bug->report->charts['bugsPerSeverity'] = 'Bug嚴重程度統計';
$lang->bug->report->charts['bugsPerResolution'] = 'Bug解決方案統計';
$lang->bug->report->charts['bugsPerStatus'] = 'Bug狀態統計';
$lang->bug->report->charts['bugsPerActivatedCount'] = 'Bug激活次數統計';
$lang->bug->report->charts['bugsPerPri'] = 'Bug優先順序統計';
$lang->bug->report->charts['bugsPerType'] = 'Bug類型統計';
$lang->bug->report->charts['bugsPerAssignedTo'] = '指派給統計';
//$lang->bug->report->charts['bugLiveDays'] = 'Bug處理時間統計';
@@ -282,6 +287,7 @@ $lang->bug->report->bugsPerResolution = new stdclass();
$lang->bug->report->bugsPerStatus = new stdclass();
$lang->bug->report->bugsPerActivatedCount = new stdclass();
$lang->bug->report->bugsPerType = new stdclass();
$lang->bug->report->bugsPerPri = new stdclass();
$lang->bug->report->bugsPerAssignedTo = new stdclass();
$lang->bug->report->bugLiveDays = new stdclass();
$lang->bug->report->bugHistories = new stdclass();
@@ -300,6 +306,7 @@ $lang->bug->report->bugsPerResolution->graph = new stdclass();
$lang->bug->report->bugsPerStatus->graph = new stdclass();
$lang->bug->report->bugsPerActivatedCount->graph = new stdclass();
$lang->bug->report->bugsPerType->graph = new stdclass();
$lang->bug->report->bugsPerPri->graph = new stdclass();
$lang->bug->report->bugsPerAssignedTo->graph = new stdclass();
$lang->bug->report->bugLiveDays->graph = new stdclass();
$lang->bug->report->bugHistories->graph = new stdclass();
@@ -325,6 +332,7 @@ $lang->bug->report->bugsPerSeverity->graph->xAxisName = '嚴重程度';
$lang->bug->report->bugsPerResolution->graph->xAxisName = '解決方案';
$lang->bug->report->bugsPerStatus->graph->xAxisName = '狀態';
$lang->bug->report->bugsPerActivatedCount->graph->xAxisName = '激活次數';
$lang->bug->report->bugsPerPri->graph->xAxisName = '優先順序';
$lang->bug->report->bugsPerType->graph->xAxisName = '類型';
$lang->bug->report->bugsPerAssignedTo->graph->xAxisName = '指派給';
$lang->bug->report->bugLiveDays->graph->xAxisName = '處理時間';
@@ -359,4 +367,5 @@ $lang->bug->featureBar['browse']['unresolved'] = $lang->bug->unResolved;
$lang->bug->featureBar['browse']['toclosed'] = $lang->bug->toClosed;
$lang->bug->featureBar['browse']['longlifebugs'] = $lang->bug->longLifeBugs;
$lang->bug->featureBar['browse']['postponedbugs'] = $lang->bug->postponedBugs;
$lang->bug->featureBar['browse']['overduebugs'] = $lang->bug->overdueBugs;
$lang->bug->featureBar['browse']['needconfirm'] = $lang->bug->needConfirm;
+86 -20
View File
@@ -46,6 +46,7 @@ class bugModel extends model
->add('openedDate', $now)
->setDefault('project,story,task', 0)
->setDefault('openedBuild', '')
->setDefault('deadline', '0000-00-00')
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
->stripTags($this->config->bug->editor->create['id'], $this->config->allowedTags)
@@ -244,6 +245,37 @@ class bugModel extends model
elseif($browseType == 'postponedbugs') $bugs = $this->getByPostponedbugs($productID, $branch, $modules, $projects, $sort, $pager);
elseif($browseType == 'needconfirm') $bugs = $this->getByNeedconfirm($productID, $branch, $modules, $projects, $sort, $pager);
elseif($browseType == 'bysearch') $bugs = $this->getBySearch($productID, $queryID, $sort, $pager, $branch);
elseif($browseType == 'overduebugs') $bugs = $this->getOverdueBugs($productID, $branch, $modules, $projects, $sort, $pager);
return $this->checkDelayBugs($bugs);
}
/**
* Check delay bug.
*
* @param array $bugs
* @access public
* @return array
*/
public function checkDelayBugs($bugs)
{
foreach ($bugs as $bug)
{
// Delayed or not?.
if($bug->deadline != '0000-00-00')
{
if(substr($bug->resolvedDate, 0, 10) != '0000-00-00')
{
$delay = helper::diffDate(substr($bug->resolvedDate, 0, 10), $bug->deadline);
}
elseif($bug->status == 'active')
{
$delay = helper::diffDate(helper::today(), $bug->deadline);
}
if(isset($delay) and $delay > 0) $bug->delay = $delay;
}
}
return $bugs;
}
@@ -454,6 +486,7 @@ class bugModel extends model
->setDefault('project,module,project,story,task,duplicateBug,branch', 0)
->setDefault('openedBuild', '')
->setDefault('plan', 0)
->setDefault('deadline', '0000-00-00')
->add('lastEditedBy', $this->app->user->account)
->add('lastEditedDate', $now)
->join('openedBuild', ',')
@@ -507,9 +540,6 @@ class bugModel extends model
$data = fixer::input('post')->get();
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : array();
/* Adjust whether the post data is complete, if not, remove the last element of $bugIDList. */
if($this->session->showSuhosinInfo) array_pop($bugIDList);
if(!empty($bugIDList))
{
/* Process the data if the value is 'ditto'. */
@@ -552,6 +582,7 @@ class bugModel extends model
$bug->title = $data->titles[$bugID];
$bug->plan = empty($data->plans[$bugID]) ? 0 : $data->plans[$bugID];
$bug->assignedTo = $data->assignedTos[$bugID];
$bug->deadline = $data->deadlines[$bugID];
$bug->resolvedBy = $data->resolvedBys[$bugID];
$bug->keywords = $data->keywords[$bugID];
$bug->os = $data->os[$bugID];
@@ -1177,6 +1208,7 @@ class bugModel extends model
$bugs = $this->dao->select('*')->from(TABLE_BUG)
->where($bugQuery)
->andWhere('project')->eq((int)$projectID)
->andWhere('deleted')->eq(0)
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
@@ -1319,15 +1351,17 @@ class bugModel extends model
* Get counts of some stories' bugs.
*
* @param array $stories
* @param int $projectID
* @access public
* @return int
*/
public function getStoryBugCounts($stories)
public function getStoryBugCounts($stories, $projectID = 0)
{
$bugCounts = $this->dao->select('story, COUNT(*) AS bugs')
->from(TABLE_BUG)
->where('story')->in($stories)
->andWhere('deleted')->eq(0)
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->groupBy('story')
->fetchPairs();
foreach($stories as $storyID) if(!isset($bugCounts[$storyID])) $bugCounts[$storyID] = 0;
@@ -1371,34 +1405,35 @@ class bugModel extends model
$bugSteps .= $this->lang->bug->tplStep;
if(!empty($stepResults))
{
$i = 0;
foreach($caseSteps as $key => $step)
$i = 1;
foreach($steps as $stepId)
{
if(!in_array($step->id, $steps)) continue;
$i++;
if(!isset($caseSteps[$stepId])) continue;
$step = $caseSteps[$stepId];
$bugSteps .= $i . '. ' . $step->desc . "<br />";
$i++;
}
$bugSteps .= $this->lang->bug->tplResult;
$i = 0;
foreach($caseSteps as $key => $step)
$i = 1;
foreach($steps as $stepId)
{
if(!in_array($step->id, $steps)) continue;
if(!isset($stepResults[$stepId]) or empty($stepResults[$stepId]['real'])) continue;
$bugSteps .= $i . '. ' . $stepResults[$stepId]['real'] . "<br />";
$i++;
if(empty($stepResults[$step->id]['real'])) continue;
$bugSteps .= $i . '. ' . $stepResults[$step->id]['real'] . "<br />";
}
$bugSteps .= $this->lang->bug->tplExpect;
$i = 0;
foreach($caseSteps as $key => $step)
$i = 1;
foreach($steps as $stepId)
{
if(!in_array($step->id, $steps)) continue;
$i++;
if(!$step->expect) continue;
$bugSteps .= $i . '. ' . $step->expect . "<br />";
}
if(!isset($caseSteps[$stepId])) continue;
$step = $caseSteps[$stepId];
if($step->expect) $bugSteps .= $i . '. ' . $step->expect . "<br />";
$i++;
}
}
return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version);
@@ -1896,6 +1931,33 @@ class bugModel extends model
->orderBy($orderBy)->page($pager)->fetchAll();
}
/**
* Get bugs the overdueBugs is active or unclosed.
*
* @param int $productID
* @param int $branch
* @param array $modules
* @param array $projects
* @param string $status
* @param string $orderBy
* @param object $pager
* @access public
* @return array
*/
public function getOverdueBugs($productID, $branch, $modules, $projects, $orderBy, $pager)
{
return $this->dao->select('*')->from(TABLE_BUG)
->where('project')->in(array_keys($projects))
->andWhere('product')->eq($productID)
->beginIF($branch)->andWhere('branch')->in($branch)->fi()
->beginIF($modules)->andWhere('module')->in($modules)->fi()
->andWhere('status')->eq('active')
->andWhere('deleted')->eq(0)
->andWhere('deadline')->ne('0000-00-00')
->andWhere('deadline')->lt(helper::today())
->orderBy($orderBy)->page($pager)->fetchAll();
}
/**
* Get bugs the status is active or unclosed.
*
@@ -2175,6 +2237,7 @@ class bugModel extends model
if($id == 'status') $class .= ' bug-' . $bug->status;
if($id == 'title') $class .= ' text-left';
if($id == 'assignedTo' && $bug->assignedTo == $account) $class .= ' red';
if($id == 'deadline' && isset($bug->delay)) $class .= ' delayed';
echo "<td class='" . $class . "'" . ($id=='title' ? " title='{$bug->title}'" : '') . ">";
switch ($id)
@@ -2226,6 +2289,9 @@ class bugModel extends model
case 'assignedDate':
echo substr($bug->assignedDate, 5, 11);
break;
case 'deadline':
echo $bug->deadline;
break;
case 'resolvedBy':
echo zget($users, $bug->resolvedBy, $bug->resolvedBy);
break;
+7 -3
View File
@@ -11,6 +11,7 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('dittoNotice', $this->lang->bug->dittoNotice);?>
<div id='titlebar'>
<div class='heading'>
@@ -21,6 +22,9 @@
</div>
</div>
</div>
<?php if(isset($suhosinInfo)):?>
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
<?php else:?>
<?php
$visibleFields = array();
foreach(explode(',', $showFields) as $field)
@@ -40,6 +44,7 @@ $columns = count($visibleFields) + 2;
<th <?php if(count($visibleFields) >= 10) echo "class='w-150px'"?>><?php echo $lang->bug->title;?> <span class='required'></span></th>
<th class='w-150px<?php echo zget($visibleFields, 'productplan', ' hidden')?>'><?php echo $lang->bug->productplan;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'><?php echo $lang->bug->assignedTo;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden')?>'><?php echo $lang->bug->deadline;?></th>
<th class='w-90px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->bug->status;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'os', ' hidden')?>'><?php echo $lang->bug->os;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden')?>'><?php echo $lang->bug->browser;?></th>
@@ -77,6 +82,7 @@ $columns = count($visibleFields) + 2;
</td>
<td class='text-left<?php echo zget($visibleFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $plans, $bugs[$bugID]->plan, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bugs[$bugID]->assignedTo, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'deadline', ' hidden')?>' style='overflow:visible'><?php echo html::input("deadlines[$bugID]", $bugs[$bugID]->deadline, "class='form-control form-date'");?></td>
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("statuses[$bugID]", $statusList, $bugs[$bugID]->status, 'class=form-control');?></td>
<td <?php echo zget($visibleFields, 'os', "class='hidden'")?>><?php echo html::select("os[$bugID]", $osList, $bugs[$bugID]->os, 'class=form-control');?></td>
<td <?php echo zget($visibleFields, 'browser', "class='hidden'")?>><?php echo html::select("browsers[$bugID]", $browserList, $bugs[$bugID]->browser, 'class=form-control');?></td>
@@ -96,15 +102,13 @@ $columns = count($visibleFields) + 2;
</td>
</tr>
<?php endforeach;?>
<?php if(isset($suhosinInfo)):?>
<tr><td colspan='<?php echo $columns;?>'><div class='alert alert-info'><?php echo $suhosinInfo;?></div></td></tr>
<?php endif;?>
</tbody>
<tfoot>
<tr><td colspan='<?php echo $columns;?>' class='text-center'><?php echo html::submitButton();?></td></tr>
</tfoot>
</table>
</form>
<?php endif;?>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=bug&section=custom&key=batchEditFields')?>
<?php include '../../common/view/customfield.html.php';?>
<?php include '../../common/view/footer.html.php';?>
+2 -2
View File
@@ -120,8 +120,8 @@ js::set('bugBrowseType', ($browseType == 'bymodule' and $this->session->bugBrows
<tfoot>
<tr>
<?php
$columns = $this->cookie->windowWidth >= $this->config->wideSize ? 12 : 10;
if($browseType == 'needconfirm') $columns = 7;
$columns = $this->cookie->windowWidth >= $this->config->wideSize ? 13 : 11;
if($browseType == 'needconfirm') $columns = 8;
?>
<td colspan='<?php echo $columns;?>'>
<?php if(!empty($bugs)):?>
+2 -1
View File
@@ -18,6 +18,7 @@
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-100px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->statusAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->bug->deadline);?></th>
<?php if($browseType == 'needconfirm'):?>
<th class='w-200px'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
@@ -76,7 +77,7 @@
}
?>
</td>
<td class="<?php if(isset($bug->delay)) echo 'delayed';?>"><?php if(substr($bug->deadline, 0, 4) > 0) echo substr($bug->deadline, 5, 6)?></td>
<?php if($browseType == 'needconfirm'):?>
<td class='text-left' title="<?php echo $bug->storyTitle?>"><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
<td><?php $lang->bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?></td>
+2 -2
View File
@@ -1,11 +1,11 @@
<?php
foreach($templates as $key => $template)
{
echo "<li id='tplBox$template->id' onmouseover='mouseOver($template->id)' onmouseout='mouseOut($template->id)'>";
echo "<li id='tplBox$template->id' onmouseover='displayXIcon($template->id)' onmouseout='hideXIcon($template->id)'>";
echo "<a title='{$lang->bug->applyTemplate}' class='tpl-name' id='tplTitleBox$template->id' href='javascript:setTemplate($template->id)'>";
if($template->public) echo "<span class='label label-info label-badge'>{$lang->public}</span> ";
echo $template->title . "</a>";
if(empty($template->public) or $template->account == $app->user->account)echo "<a href='###' onclick='deleteTemplate($template->id)' id='delTemp$template->id' class='btn-delete hidden'><i class='icon-remove'></i></a>";
if(empty($template->public) or $template->account == $app->user->account)echo "<a href='###' onclick='deleteTemplate($template->id)' id='templateID$template->id' class='btn-delete hidden'><i class='icon-remove'></i></a>";
echo "<span id='template$template->id' class='hidden'>$template->content</span>";
echo '</li>';
}
+11 -1
View File
@@ -14,12 +14,13 @@
include '../../common/view/header.html.php';
include '../../common/view/form.html.php';
include '../../common/view/kindeditor.html.php';
include '../../common/view/datepicker.html.php';
js::set('holders', $lang->bug->placeholder);
js::set('page', 'create');
js::set('createRelease', $lang->release->create);
js::set('createBuild', $lang->build->create);
js::set('refresh', $lang->refresh);
js::set('TemplateDelete',$lang->bug->TemplateDelete);
js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
?>
<div class='container mw-1400px'>
<div id='titlebar'>
@@ -84,6 +85,15 @@ js::set('TemplateDelete',$lang->bug->TemplateDelete);
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
</div>
</td>
<?php $showDeadline = strpos(",$showFields,", ',deadline,') !== false;?>
<?php if($showDeadline):?>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->bug->deadline?></span>
<span><?php echo html::input('deadline', $deadline, "class='form-control form-date'");?></span>
</div>
</td>
<?php endif;?>
</tr>
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
+5
View File
@@ -12,6 +12,7 @@
?>
<?php
include '../../common/view/header.html.php';
include '../../common/view/datepicker.html.php';
include '../../common/view/kindeditor.html.php';
js::set('page' , 'edit');
js::set('changeProductConfirmed' , false);
@@ -142,6 +143,10 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
<th><?php echo $lang->bug->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='form-control chosen'");?></td>
</tr>
<tr>
<th><?php echo $lang->bug->deadline;?></th>
<td><?php echo html::input('deadline', $bug->deadline, "class='form-control form-date'");?></td>
</tr>
<tr>
<th><?php echo $lang->bug->os;?></th>
<td><?php echo html::select('os', $lang->bug->osList, $bug->os, "class='form-control'");?></td>
-27
View File
@@ -1,27 +0,0 @@
<?php include '../../common/view/m.header.html.php';?>
</div>
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
<h3><?php echo "BUG#$bug->id $bug->title";?></h3>
<table class='table-1'>
<tr>
<td class='w-80px'><?php echo $lang->bug->assignedTo?></td>
<td><?php echo html::select('assignedTo', $users, $bug->resolvedBy, "class='form-control'");?></td>
</tr>
<tr>
<td><?php echo $lang->bug->openedBuild;?></td>
<td><?php echo html::select('openedBuild[]', $builds, $bug->openedBuild, 'size=4 multiple=multiple class=select-3');?></td>
</tr>
<tr>
<td><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '');?></td>
</tr>
<tr>
<td class='text-center' colspan='2'>
<?php echo html::submitButton($lang->bug->buttonConfirm, 'data-inline="true" data-theme="b"');?>
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/m.action.html.php';?>
<?php include '../../common/view/m.footer.html.php';?>
-1
View File
@@ -1 +0,0 @@
<?php include '../../common/view/m.action.html.php';?>
-23
View File
@@ -1,23 +0,0 @@
<?php include '../../common/view/m.header.html.php';?>
</div>
<form class='form-condensed' method='post' target='hiddenwin'>
<h3><?php echo "BUG#$bug->id " . $bug->title;?></h3>
<table class='table-1'>
<tr>
<td class='w-60px'><?php echo $lang->bug->assignedTo;?></td>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='form-control'");?></td>
</tr>
<tr>
<td class='w-60px'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "data-mini='true'");?></td>
</tr>
<tr>
<td class='text-center' colspan='2'>
<?php echo html::submitButton('', 'data-inline="true" data-theme="b"'); ?>
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/m.action.html.php';?>
<?php include '../../common/view/m.footer.html.php';?>
-39
View File
@@ -1,39 +0,0 @@
<?php
/**
* The browse view file of bug module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package bug
* @version $Id: browse.html.php 4660 2013-04-17 08:22:02Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/m.header.html.php';?>
</div>
<?php $this->session->set('bugType', '');?>
<?php foreach($bugs as $bug):?>
<?php if($bug->status == 'closed') continue;?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="<?php echo $this->session->bugID == $bug->id ? 'false' : 'true'?>" class='collapsible'>
<?php if($this->session->bugID == $bug->id) echo "<script>showDetail('bug', $bug->id);</script>";?>
<h1 onClick="showDetail('bug', <?php echo $bug->id;?>)"><?php echo $bug->title;?></h1>
<div><?php echo $bug->steps;?></div>
<div id='item<?php echo $bug->id;?>'><?php echo $bug->steps;?></div>
<div data-role='navbar'>
<ul>
<?php
common::printIcon('bug', 'confirmBug', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
common::printIcon('bug', 'assignTo', "bugID=$bug->id", '', 'button', '', '', 'iframe');
common::printIcon('bug', 'resolve', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
common::printIcon('bug', 'close', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
common::printIcon('bug', 'activate', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
?>
</ul>
</div>
</div>
</div>
<?php endforeach;?>
<?php $pager->show('left', 'mobile')?>
<?php include '../../common/view/m.footer.html.php';?>
-19
View File
@@ -1,19 +0,0 @@
<?php include '../../common/view/m.header.html.php';?>
</div>
<form class='form-condensed' method='post' target='hiddenwin'>
<h3><?php echo "BUG#$bug->id $bug->title";?></h3>
<table class='table-1'>
<tr>
<td class='w-60px'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '');?></td>
</tr>
<tr>
<td class='text-center' colspan='2'>
<?php echo html::submitButton('', 'data-inline="true" data-theme="b"');?>
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/m.action.html.php';?>
<?php include '../../common/view/m.footer.html.php';?>
-23
View File
@@ -1,23 +0,0 @@
<?php include '../../common/view/m.header.html.php';?>
</div>
<form class='form-condensed' method='post' target='hiddenwin'>
<h3><?php echo "BUG#$bug->id $bug->title";?></h3>
<table class='table-1'>
<tr>
<td class='w-60px'><?php echo $lang->bug->assignedTo;?></td>
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo);?></td>
</tr>
<tr>
<td class='w-60px'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '');?></td>
</tr>
<tr>
<td class='text-center' colspan='2'>
<?php echo html::submitButton($lang->bug->buttonConfirm, 'data-inline="true" data-theme="b"');?>
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/m.action.html.php';?>
<?php include '../../common/view/m.footer.html.php';?>
-39
View File
@@ -1,39 +0,0 @@
<?php include '../../common/view/m.header.html.php';?>
</div>
<form class='form-condensed' method='post' target='hiddenwin'>
<h3><?php echo "BUG#$bug->id $bug->title";?></h3>
<table class='table-1'>
<tr>
<td class='w-80px'><?php unset($lang->bug->resolutionList['tostory']); echo $lang->bug->resolution ;?></td>
<td><?php echo html::select('resolution', $lang->bug->resolutionList, '', 'class=form-control onchange=setDuplicate(this.value)');?></div>
</tr>
<tr id='duplicateBugBox' style='display:none'>
<td class='w-80px'><?php echo $lang->bug->duplicateBug;?></td>
<td><?php echo $lang->bug->duplicateBug . html::input('duplicateBug');?></div>
</tr>
<tr>
<td class='w-80px'><?php echo $lang->bug->resolvedBuild?></td>
<td><?php echo html::select('resolvedBuild', $builds);?></td>
</tr>
<tr>
<td><?php echo $lang->bug->resolvedDate?></div>
<td><?php echo html::input('resolvedDate', helper::now());?></div>
</tr>
<tr>
<td><?php echo $lang->bug->assignedTo?></div>
<td><?php echo html::select('assignedTo', $users, $assignedTo);?></div>
</tr>
<tr>
<td><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment');?></td>
</tr>
<tr>
<td class='text-center' colspan='2'>
<?php echo html::submitButton('', 'data-inline="true" data-theme="b"');?>
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
</td>
</tr>
</table>
</form>
<?php include '../../common/view/m.action.html.php';?>
<?php include '../../common/view/m.footer.html.php';?>
-2
View File
@@ -1,2 +0,0 @@
<?php
include "./sendmail.html.php";
-5
View File
@@ -1,5 +0,0 @@
<?php
$this->session->set('bugID', $bug->id);
if($this->session->bugType) die($this->locate($this->createLink('my', 'bug', "type={$this->session->bugType}")));
die($this->locate($this->createLink('bug', 'browse', "productID=$productID")));
?>
+4
View File
@@ -176,6 +176,10 @@
<th><?php echo $lang->bug->lblAssignedTo;?></th>
<td><?php if($bug->assignedTo) echo $users[$bug->assignedTo] . $lang->at . $bug->assignedDate;?></td>
</tr>
<tr>
<th><?php echo $lang->bug->deadline;?></th>
<td><?php if($bug->deadline) echo $bug->deadline;?></td>
</tr>
<tr>
<th><?php echo $lang->bug->os;?></th>
<td><?php echo $lang->bug->osList[$bug->os];?></td>
+12
View File
@@ -36,6 +36,18 @@ class buildModel extends model
return $build;
}
/**
* Get by ID list.
*
* @param array $idList
* @access public
* @return array
*/
public function getByList($idList)
{
return $this->dao->select('*')->from(TABLE_BUILD)->where('id')->in($idList)->fetchAll('id');
}
/**
* Get builds of a project.
*
+11
View File
@@ -13,6 +13,17 @@
<?php include '../../common/view/header.html.php';?>
<?php js::set('confirmUnlinkStory', $lang->build->confirmUnlinkStory)?>
<?php js::set('confirmUnlinkBug', $lang->build->confirmUnlinkBug)?>
<?php if(isonlybody()):?>
<style>
#stories .action{display:none;}
#bugs .action{display:none;}
tbody tr td:last-child a{display:none;}
tbody tr td:first-child input{display:none;}
tfoot tr td .table-actions .btn{display:none;}
#titlebar .actions{display:none}
.row-table .col-side{display:none;}
</style>
<?php endif;?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['build']);?> <strong><?php echo $build->id;?></strong></span>
+62 -26
View File
@@ -49,6 +49,8 @@ $lang->day = 'Day';
$lang->customConfig = 'Custom';
$lang->public = 'Public';
$lang->trunk = 'Trunk';
$lang->sort = 'Ranking';
$lang->required = 'Required';
$lang->actions = 'Actions';
$lang->comment = 'Note';
@@ -122,6 +124,8 @@ $lang->searchObjects['release'] = 'Release';
$lang->searchObjects['productplan'] = $lang->productCommon . 'Plan';
$lang->searchObjects['testtask'] = 'Test Task';
$lang->searchObjects['doc'] = 'Document';
$lang->searchObjects['caselib'] = 'Case Library';
$lang->searchObjects['testreport'] = 'Test Report';
$lang->searchTips = 'ID (ctrl+g)';
/* 导入支持的编码格式。*/
@@ -214,7 +218,7 @@ $lang->project->menu->story = array('link' => 'Story|project|story|projectID
$lang->project->menu->bug = 'Bug|project|bug|projectID=%s';
$lang->project->menu->dynamic = 'Dynamic|project|dynamic|projectID=%s';
$lang->project->menu->build = array('link' => 'Build|project|build|projectID=%s', 'subModule' => 'build');
$lang->project->menu->testtask = 'Test Task|project|testtask|projectID=%s';
$lang->project->menu->testtask = array('link' => 'Test Task|project|testtask|projectID=%s');
$lang->project->menu->team = array('link' => 'Team|project|team|projectID=%s', 'alias' => 'managemembers');
$lang->project->menu->doc = array('link' => 'Document|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
@@ -232,32 +236,57 @@ $lang->build->menu = $lang->project->menu;
$lang->qa = new stdclass();
$lang->qa->menu = new stdclass();
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->qa->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
$lang->qa->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->qa->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
$lang->qa->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
$lang->qa->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
$lang->qa->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
$lang->qa->menu->caselib = array('link' => 'Library|testsuite|library');
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->bug = new stdclass();
$lang->bug->menu = new stdclass();
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
$lang->bug->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
$lang->bug->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
$lang->bug->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
$lang->bug->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
$lang->bug->menu->caselib = array('link' => 'Library|testsuite|library');
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testcase = new stdclass();
$lang->testcase->menu = new stdclass();
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase', 'subModule' => 'tree');
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase');
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
$lang->testcase->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
$lang->testcase->menu->report = array('link' => 'Report|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
$lang->testcase->menu->caselib = array('link' => 'Library|testsuite|library');
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testtask = new stdclass();
$lang->testtask->menu = $lang->testcase->menu;
$lang->testsuite = new stdclass();
$lang->testsuite->menu = $lang->testcase->menu;
$lang->testreport = new stdclass();
$lang->testreport->menu = $lang->testcase->menu;
$lang->caselib = new stdclass();
$lang->caselib->menu = new stdclass();
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
$lang->caselib->menu->testcase = array('link' => 'Case|testcase|browse|');
$lang->caselib->menu->testtask = array('link' => 'Build|testtask|browse|');
$lang->caselib->menu->testsuite = array('link' => 'Suite|testsuite|browse|');
$lang->caselib->menu->report = array('link' => 'Report|testreport|browse|');
$lang->caselib->menu->caselib = array('link' => 'Library|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i>Create a Library|testsuite|createLib|", 'float' => 'right');
$lang->caselib->menu->index = array('link' => "<i class='icon-home'></i>Test Home|qa|index|locate=no&productID=%s", 'float' => 'right');
/* 文档视图菜单设置。*/
$lang->doc = new stdclass();
@@ -303,7 +332,7 @@ $lang->user->menu = $lang->company->menu;
/* 后台管理菜单设置。*/
$lang->admin = new stdclass();
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => 'Homepage|admin|index');
$lang->admin->menu->index = array('link' => 'Homepage|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
$lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->custom = array('link' => 'Custom|custom|set', 'subModule' => 'custom');
$lang->admin->menu->mail = array('link' => 'Email|mail|index', 'subModule' => 'mail');
@@ -352,6 +381,9 @@ $lang->menugroup->group = 'company';
$lang->menugroup->bug = 'qa';
$lang->menugroup->testcase = 'qa';
$lang->menugroup->testtask = 'qa';
$lang->menugroup->testsuite = 'qa';
$lang->menugroup->caselib = 'qa';
$lang->menugroup->testreport = 'qa';
$lang->menugroup->people = 'company';
$lang->menugroup->dept = 'company';
$lang->menugroup->todo = 'my';
@@ -390,19 +422,23 @@ $lang->error->tutorialData = 'No data can be imported in tutorial mode. Pleas
/* 分页信息。*/
$lang->pager = new stdclass();
$lang->pager->noRecord = "No History";
$lang->pager->digest = " <strong>%s</strong> in total. %s <strong>%s/%s</strong> &nbsp; ";
$lang->pager->recPerPage= " <strong>%s</strong> per page";
$lang->pager->first = "<i class='icon-step-backward' title='Homepage'></i>";
$lang->pager->pre = "<i class='icon-play icon-rotate-180' title='Previous Page'></i>";
$lang->pager->next = "<i class='icon-play' title='Next Page'></i>";
$lang->pager->last = "<i class='icon-step-forward' title='Last Page'></i>";
$lang->pager->locate = "GO!";
$lang->pager->noRecord = "No History";
$lang->pager->digest = " <strong>%s</strong> in total. %s <strong>%s/%s</strong> &nbsp; ";
$lang->pager->recPerPage = " <strong>%s</strong> per page";
$lang->pager->first = "<i class='icon-step-backward' title='Homepage'></i>";
$lang->pager->pre = "<i class='icon-play icon-rotate-180' title='Previous Page'></i>";
$lang->pager->next = "<i class='icon-play' title='Next Page'></i>";
$lang->pager->last = "<i class='icon-step-forward' title='Last Page'></i>";
$lang->pager->locate = "GO!";
$lang->pager->previousPage = "Previous";
$lang->pager->nextPage = "Next";
$lang->pager->summery = "<strong>%s-%s</strong> of <strong>%s</strong>.";
$lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&from=footer' target='_blank' id='proLink' class='text-important'>ZenTao Pro <i class='text-danger icon-pro-version'></i></a> &nbsp; ";
$lang->downNotify = "Download Desktop Notification";
$lang->suhosinInfo = "Warning! Data is reaching the limit. Please change <font color=red>sohusin.post.max_vars</font> and <font color=red>sohusin.request.max_vars</font> (set larger value) in php.ini, then save and restart Apache, or some data will not be saved.";
$lang->suhosinInfo = "Warning! Data is reaching the limit. Please change <font color=red>sohusin.post.max_vars</font> and <font color=red>sohusin.request.max_vars</font> (set larger %s value) in php.ini, then save and restart Apache or php-fpm, or some data will not be saved.";
$lang->maxVarsInfo = "Warning! Data is reaching the limit. Please change <font color=red>max_input_vars</font> (set larger %s value) in php.ini, then save and restart Apache or php-fpm, or some data will not be saved.";
$lang->pasteTextInfo = "Paste text into text field. Each line will be a header of each data record. ";
$lang->noticeImport = "<p style='font-size:14px'>Imported data contains data that has already existed in system. Please confirm you actions on the date </p><p><a href='javascript:submitForm(\"cover\")' class='btn btn-mini'>Override</a> <a href='javascript:submitForm(\"insert\")' class='btn btn-mini'>New Insertion</a></p>";
+12 -10
View File
@@ -66,16 +66,18 @@ $lang->task->menuOrder = $lang->project->menuOrder;
$lang->build->menuOrder = $lang->project->menuOrder;
/* qa menu order. */
$lang->qa->menuOrder[5] = 'product';
$lang->qa->menuOrder[10] = 'index';
$lang->qa->menuOrder[15] = 'bug';
$lang->qa->menuOrder[20] = 'testcase';
$lang->qa->menuOrder[25] = 'testtask';
$lang->qa->menuOrder[30] = 'testsuite';
$lang->bug->menuOrder = $lang->qa->menuOrder;
$lang->testcase->menuOrder = $lang->bug->menuOrder;
$lang->testtask->menuOrder = $lang->testcase->menuOrder;
$lang->testsuite->menuOrder = $lang->testcase->menuOrder;
$lang->qa->menuOrder[5] = 'product';
$lang->qa->menuOrder[10] = 'index';
$lang->qa->menuOrder[15] = 'bug';
$lang->qa->menuOrder[20] = 'testcase';
$lang->qa->menuOrder[25] = 'testtask';
$lang->qa->menuOrder[30] = 'testsuite';
$lang->qa->menuOrder[35] = 'testreport';
$lang->bug->menuOrder = $lang->qa->menuOrder;
$lang->testcase->menuOrder = $lang->bug->menuOrder;
$lang->testtask->menuOrder = $lang->testcase->menuOrder;
$lang->testsuite->menuOrder = $lang->testcase->menuOrder;
$lang->testreport->menuOrder = $lang->testcase->menuOrder;
/* doc menu order. */
$lang->doc->menuOrder[5] = 'list';
+42 -26
View File
@@ -49,6 +49,8 @@ $lang->day = '天';
$lang->customConfig = '自定义';
$lang->public = '公共';
$lang->trunk = '主干';
$lang->sort = '排序';
$lang->required = '必填';
$lang->actions = '操作';
$lang->comment = '备注';
@@ -122,6 +124,8 @@ $lang->searchObjects['release'] = '发布';
$lang->searchObjects['productplan'] = $lang->productCommon . '计划';
$lang->searchObjects['testtask'] = '测试版本';
$lang->searchObjects['doc'] = '文档';
$lang->searchObjects['caselib'] = '用例库';
$lang->searchObjects['testreport'] = '测试报告';
$lang->searchTips = '编号(ctrl+g)';
/* 导入支持的编码格式。*/
@@ -214,7 +218,7 @@ $lang->project->menu->story = array('link' => '需求|project|story|projectI
$lang->project->menu->bug = 'Bug|project|bug|projectID=%s';
$lang->project->menu->dynamic = '动态|project|dynamic|projectID=%s';
$lang->project->menu->build = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'build');
$lang->project->menu->testtask = '测试|project|testtask|projectID=%s';
$lang->project->menu->testtask = array('link' => '测试|project|testtask|projectID=%s');
$lang->project->menu->team = array('link' => '团队|project|team|projectID=%s', 'alias' => 'managemembers');
$lang->project->menu->doc = array('link' => '文档|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
@@ -237,7 +241,8 @@ $lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->qa->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->qa->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
$lang->qa->menu->testlib = array('link' => '公共库|testsuite|library');
$lang->qa->menu->report = array('link' => '报告|testreport|browse|productID=%s');
$lang->qa->menu->caselib = array('link' => '用例库|testsuite|library');
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->bug = new stdclass();
@@ -248,7 +253,8 @@ $lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'al
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->bug->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
$lang->bug->menu->testlib = array('link' => '公共库|testsuite|library');
$lang->bug->menu->report = array('link' => '报告|testreport|browse|productID=%s');
$lang->bug->menu->caselib = array('link' => '用例库|testsuite|library');
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testcase = new stdclass();
@@ -256,27 +262,31 @@ $lang->testcase->menu = new stdclass();
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importlib,report', 'subModule' => 'tree');
$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase');
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
$lang->testcase->menu->testlib = array('link' => '公共库|testsuite|library');
$lang->testcase->menu->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
$lang->testcase->menu->caselib = array('link' => '用例库|testsuite|library');
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testtask = new stdclass();
$lang->testtask->menu = $lang->testcase->menu;
$lang->testsuite = new stdclass();
$lang->testsuite->menu = $lang->testcase->menu;
$lang->testreport = new stdclass();
$lang->testreport->menu = $lang->testcase->menu;
$lang->testlib = new stdclass();
$lang->testlib->menu = new stdclass();
$lang->testlib->menu->lib = array('link' => '%s', 'fixed' => true);
$lang->testlib->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testlib->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->testlib->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->testlib->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
$lang->testlib->menu->testlib = array('link' => '公共库|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
$lang->testlib->menu->create = array('link' => "<i class='icon-plus'></i>创建库|testsuite|createLib|", 'float' => 'right');
$lang->testlib->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->caselib = new stdclass();
$lang->caselib->menu = new stdclass();
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|');
$lang->caselib->menu->testtask = array('link' => '版本|testtask|browse|');
$lang->caselib->menu->testsuite = array('link' => '套件|testsuite|browse|');
$lang->caselib->menu->report = array('link' => '报告|testreport|browse|');
$lang->caselib->menu->caselib = array('link' => '用例库|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i>创建库|testsuite|createLib|", 'float' => 'right');
$lang->caselib->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
/* 文档视图菜单设置。*/
$lang->doc = new stdclass();
@@ -322,7 +332,7 @@ $lang->user->menu = $lang->company->menu;
/* 后台管理菜单设置。*/
$lang->admin = new stdclass();
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => '首页|admin|index');
$lang->admin->menu->index = array('link' => '首页|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
$lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->custom = array('link' => '自定义|custom|set', 'subModule' => 'custom');
$lang->admin->menu->mail = array('link' => '发信|mail|index', 'subModule' => 'mail');
@@ -372,6 +382,8 @@ $lang->menugroup->bug = 'qa';
$lang->menugroup->testcase = 'qa';
$lang->menugroup->testtask = 'qa';
$lang->menugroup->testsuite = 'qa';
$lang->menugroup->caselib = 'qa';
$lang->menugroup->testreport = 'qa';
$lang->menugroup->people = 'company';
$lang->menugroup->dept = 'company';
$lang->menugroup->todo = 'my';
@@ -410,19 +422,23 @@ $lang->error->tutorialData = '新手模式下不会插入数据,请退出
/* 分页信息。*/
$lang->pager = new stdclass();
$lang->pager->noRecord = "暂时没有记录";
$lang->pager->digest = "共 <strong>%s</strong> 条记录,%s <strong>%s/%s</strong> &nbsp; ";
$lang->pager->recPerPage= "每页 <strong>%s</strong> 条";
$lang->pager->first = "<i class='icon-step-backward' title='首页'></i>";
$lang->pager->pre = "<i class='icon-play icon-rotate-180' title='上一页'></i>";
$lang->pager->next = "<i class='icon-play' title='下一页'></i>";
$lang->pager->last = "<i class='icon-step-forward' title='末页'></i>";
$lang->pager->locate = "GO!";
$lang->pager->noRecord = "暂时没有记录";
$lang->pager->digest = "共 <strong>%s</strong> 条记录,%s <strong>%s/%s</strong> &nbsp; ";
$lang->pager->recPerPage = "每页 <strong>%s</strong> 条";
$lang->pager->first = "<i class='icon-step-backward' title='首页'></i>";
$lang->pager->pre = "<i class='icon-play icon-rotate-180' title='上一页'></i>";
$lang->pager->next = "<i class='icon-play' title='下一页'></i>";
$lang->pager->last = "<i class='icon-step-forward' title='末页'></i>";
$lang->pager->locate = "GO!";
$lang->pager->previousPage = "上一页";
$lang->pager->nextPage = "下一页";
$lang->pager->summery = "第 <strong>%s-%s</strong> 项,共 <strong>%s</strong> 项";
$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-pro-version'></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,否则会造成部分数据无法保存。";
$lang->suhosinInfo = "警告:数据太多,请在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。";
$lang->maxVarsInfo = "警告:数据太多,请在php.ini中修改<font color=red>max_input_vars</font>(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。";
$lang->pasteTextInfo = "粘贴文本到文本域中,每行文字作为一条数据的标题。";
$lang->noticeImport = "<p style='font-size:14px'>导入数据中,含有已经存在系统的数据,请确认这些数据要覆盖或者全新插入</p><p><a href='javascript:submitForm(\"cover\")' class='btn btn-mini'>覆盖</a> <a href='javascript:submitForm(\"insert\")' class='btn btn-mini'>全新插入</a></p>";
+50 -18
View File
@@ -48,6 +48,7 @@ $lang->more = '更多';
$lang->day = '天';
$lang->customConfig = '自定義';
$lang->public = '公共';
$lang->trunk = '主幹';
$lang->actions = '操作';
$lang->comment = '備註';
@@ -121,6 +122,8 @@ $lang->searchObjects['release'] = '發佈';
$lang->searchObjects['productplan'] = $lang->productCommon . '計劃';
$lang->searchObjects['testtask'] = '測試版本';
$lang->searchObjects['doc'] = '文檔';
$lang->searchObjects['caselib'] = '用例庫';
$lang->searchObjects['testreport'] = '測試報告';
$lang->searchTips = '編號(ctrl+g)';
/* 導入支持的編碼格式。*/
@@ -213,7 +216,7 @@ $lang->project->menu->story = array('link' => '需求|project|story|projectI
$lang->project->menu->bug = 'Bug|project|bug|projectID=%s';
$lang->project->menu->dynamic = '動態|project|dynamic|projectID=%s';
$lang->project->menu->build = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'build');
$lang->project->menu->testtask = '測試|project|testtask|projectID=%s';
$lang->project->menu->testtask = array('link' => '測試|project|testtask|projectID=%s');
$lang->project->menu->team = array('link' => '團隊|project|team|projectID=%s', 'alias' => 'managemembers');
$lang->project->menu->doc = array('link' => '文檔|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
@@ -231,32 +234,57 @@ $lang->build->menu = $lang->project->menu;
$lang->qa = new stdclass();
$lang->qa->menu = new stdclass();
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->qa->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->qa->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->qa->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
$lang->qa->menu->report = array('link' => '報告|testreport|browse|productID=%s');
$lang->qa->menu->caselib = array('link' => '用例庫|testsuite|library');
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->bug = new stdclass();
$lang->bug->menu = new stdclass();
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
$lang->bug->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
$lang->bug->menu->report = array('link' => '報告|testreport|browse|productID=%s');
$lang->bug->menu->caselib = array('link' => '用例庫|testsuite|library');
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testcase = new stdclass();
$lang->testcase->menu = new stdclass();
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase', 'subModule' => 'tree');
$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase');
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
$lang->testcase->menu->report = array('link' => '報告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
$lang->testcase->menu->caselib = array('link' => '用例庫|testsuite|library');
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
$lang->testtask = new stdclass();
$lang->testtask->menu = $lang->testcase->menu;
$lang->testsuite = new stdclass();
$lang->testsuite->menu = $lang->testcase->menu;
$lang->testreport = new stdclass();
$lang->testreport->menu = $lang->testcase->menu;
$lang->caselib = new stdclass();
$lang->caselib->menu = new stdclass();
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|');
$lang->caselib->menu->testtask = array('link' => '版本|testtask|browse|');
$lang->caselib->menu->testsuite = array('link' => '套件|testsuite|browse|');
$lang->caselib->menu->report = array('link' => '報告|testreport|browse|');
$lang->caselib->menu->caselib = array('link' => '用例庫|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i>創建庫|testsuite|createLib|", 'float' => 'right');
$lang->caselib->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
/* 文檔視圖菜單設置。*/
$lang->doc = new stdclass();
@@ -302,7 +330,7 @@ $lang->user->menu = $lang->company->menu;
/* 後台管理菜單設置。*/
$lang->admin = new stdclass();
$lang->admin->menu = new stdclass();
$lang->admin->menu->index = array('link' => '首頁|admin|index');
$lang->admin->menu->index = array('link' => '首頁|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
$lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->custom = array('link' => '自定義|custom|set', 'subModule' => 'custom');
$lang->admin->menu->mail = array('link' => '發信|mail|index', 'subModule' => 'mail');
@@ -351,6 +379,9 @@ $lang->menugroup->group = 'company';
$lang->menugroup->bug = 'qa';
$lang->menugroup->testcase = 'qa';
$lang->menugroup->testtask = 'qa';
$lang->menugroup->testsuite = 'qa';
$lang->menugroup->caselib = 'qa';
$lang->menugroup->testreport = 'qa';
$lang->menugroup->people = 'company';
$lang->menugroup->dept = 'company';
$lang->menugroup->todo = 'my';
@@ -401,7 +432,8 @@ $lang->pager->locate = "GO!";
$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-pro-version'></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,否則會造成部分數據無法保存。";
$lang->suhosinInfo = "警告:數據太多,請在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(大於%s的數)。 保存並重新啟動apache或php-fpm,否則會造成部分數據無法保存。";
$lang->maxVarsInfo = "警告:數據太多,請在php.ini中修改<font color=red>max_input_vars</font>(大於%s的數)。 保存並重新啟動apache或php-fpm,否則會造成部分數據無法保存。";
$lang->pasteTextInfo = "粘貼文本到文本域中,每行文字作為一條數據的標題。";
$lang->noticeImport = "<p style='font-size:14px'>導入數據中,含有已經存在系統的數據,請確認這些數據要覆蓋或者全新插入</p><p><a href='javascript:submitForm(\"cover\")' class='btn btn-mini'>覆蓋</a> <a href='javascript:submitForm(\"insert\")' class='btn btn-mini'>全新插入</a></p>";
+73 -71
View File
@@ -30,7 +30,6 @@ class commonModel extends model
$this->loadConfigFromDB();
$this->loadCustomFromDB();
if(!$this->checkIP()) die($this->lang->ipLimited);
if($this->app->getViewType() == 'mhtml') $this->setMobileMenu();
$this->app->loadLang('company');
}
}
@@ -104,6 +103,7 @@ class commonModel extends model
$user->account = 'guest';
$user->realname = 'guest';
$user->role = 'guest';
$user->admin = false;
$user->rights = $this->loadModel('user')->authorize('guest');
$user->groups = array('group');
$this->session->set('user', $user);
@@ -305,49 +305,6 @@ class commonModel extends model
echo html::a(helper::createLink('misc', 'about'), $lang->aboutZenTao, '', "class='about iframe' data-width='900' data-headerless='true' data-backdrop='true' data-keyboard='true' data-class='modal-about'");
}
/**
* Set mobile menu.
*
* @access public
* @return void
*/
public function setMobileMenu()
{
$menu = new stdclass();
$role = isset($this->app->user->role) ? $this->app->user->role : '';
$this->config->locate = new stdclass();
$this->config->locate->module = 'my';
$this->config->locate->method = 'todo';
$this->config->locate->params = '';
$todo = $this->lang->my->menu->todo['link'];
$task = $this->lang->my->menu->task['link'];
$story = $this->lang->my->menu->story['link'];
$bug = $this->lang->my->menu->bug['link'];
$project = $this->lang->projectCommon . '|project|all|status=isdoing';
$product = $this->lang->productCommon . '|product|all';
$menu = array('todo' => $todo, 'task' => $task, 'bug' => $bug, 'project' => $project, 'product' => $product);
if($role and strpos('dev,td,pm', $role) !== false) $menu = array('todo' => $todo, 'task' => $task, 'bug' => $bug, 'product' => $product, 'project' => $project);
if($role and strpos('pd,po', $role) !== false) $menu = array('todo' => $todo, 'story' => $story, 'bug' => $bug, 'product' => $product, 'project' => $project);
if($role and strpos('qa,qd', $role) !== false) $menu = array('todo' => $todo, 'bug' => $bug, 'project' => $project, 'product' => $product);
if($role and strpos('top', $role) !== false) $menu = array('project' => $project, 'product' => $product, 'todo' => $todo);
if($role == 'top')
{
$this->config->locate->module = 'project';
$this->config->locate->method = 'all';
$this->config->locate->params = 'status=isdoing';
}
unset($this->lang->menuOrder);
unset($this->lang->menugroup);
$this->lang->menu = new stdclass();
$this->lang->menu = $menu;
}
/**
* Create menu item link
*
@@ -390,18 +347,10 @@ class commonModel extends model
/* Set the main main menu. */
$mainMenu = $moduleName;
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
if($app->getViewType() == 'mhtml')
{
if($moduleName == 'my') $mainMenu = $methodName;
if($moduleName == 'todo') $mainMenu = $moduleName;
if($moduleName == 'story' and !isset($lang->menu->story)) $mainMenu = 'product';
if($moduleName == 'bug' and !isset($lang->menu->bug)) $mainMenu = 'product';
if($moduleName == 'task' and !isset($lang->menu->task)) $mainMenu = 'project';
}
/* Print all main menus. */
$menu = customModel::getMainMenu();
$activeName = $app->getViewType() == 'mhtml' ? 'ui-btn-active' : 'active';
$menu = customModel::getMainMenu();
$activeName = 'active';
echo "<ul class='nav'>\n";
foreach($menu as $menuItem)
@@ -412,7 +361,7 @@ class commonModel extends model
echo "<li $active data-id='$menuItem->name'><a href='$link' $active>$menuItem->text</a></li>\n";
}
$customLink = helper::createLink('custom', 'ajaxMenu', "module={$app->getModuleName()}&method={$app->getMethodName()}", '', true);
if(!commonModel::isTutorialMode() and $app->viewType != 'mhtml') echo "<li class='custom-item'><a href='$customLink' data-toggle='modal' data-type='iframe' title='$lang->customMenu' data-icon='cog' data-width='80%'><i class='icon icon-cog'></i></a></li>";
if(!commonModel::isTutorialMode() and $app->viewType != 'mhtml' and $app->user->account != 'guest') echo "<li class='custom-item'><a href='$customLink' data-toggle='modal' data-type='iframe' title='$lang->customMenu' data-icon='cog' data-width='80%'><i class='icon icon-cog'></i></a></li>";
echo "</ul>\n";
}
@@ -482,14 +431,16 @@ class commonModel extends model
$currentModule = ($isTutorialMode and defined('WIZARD_MODULE')) ? WIZARD_MODULE : $app->getModuleName();
$currentMethod = ($isTutorialMode and defined('WIZARD_METHOD')) ? WIZARD_METHOD : $app->getMethodName();
$menu = customModel::getModuleMenu($moduleName);
$isMobile = $app->viewType === 'mhtml';
/* The beginning of the menu. */
echo "<ul class='nav'>\n";
echo $isMobile ? '' : "<ul class='nav'>\n";
/* Cycling to print every sub menus. */
foreach($menu as $menuItem)
{
if(isset($menuItem->hidden) && $menuItem->hidden) continue;
if($isMobile and empty($menuItem->link)) continue;
/* Init the these vars. */
if($menuItem->link)
@@ -514,14 +465,17 @@ class commonModel extends model
if(isset($menuItem->link['method'])) $method = $menuItem->link['method'];
}
if($float != 'right' and $module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false)) $active = 'active';
echo "<li class='$float $active' data-id='$menuItem->name'>" . html::a($link, $menuItem->text, $target) . "</li>\n";
$menuItemHtml = "<li class='$float $active' data-id='$menuItem->name'>" . html::a($link, $menuItem->text, $target) . "</li>\n";
if($isMobile) $menuItemHtml = html::a($link, $menuItem->text, $target, "class='$active'") . "\n";
echo $menuItemHtml;
}
else
{
echo "<li data-id='$menuItem->name'>$menuItem->text</li>\n";
echo $isMobile ? $menuItem->text : "<li data-id='$menuItem->name'>$menuItem->text</li>\n";
}
}
echo "</ul>\n";
echo $isMobile ? '' : "</ul>\n";
}
/**
@@ -612,6 +566,7 @@ class commonModel extends model
if(empty($module)) $module = $app->getModuleName();
if(empty($method)) $method = $app->getMethodName();
$className = 'header';
$isMobile = $app->viewType === 'mhtml';
$order = explode('_', $orderBy);
$order[0] = trim($order[0], '`');
@@ -620,12 +575,12 @@ class commonModel extends model
if(isset($order[1]) and $order[1] == 'asc')
{
$orderBy = "{$order[0]}_desc";
$className = 'headerSortDown';
$className = $isMobile ? 'SortDown' : 'headerSortDown';
}
else
{
$orderBy = "{$order[0]}_asc";
$className = 'headerSortUp';
$className = $isMobile ? 'SortUp' : 'headerSortUp';
}
}
else
@@ -634,7 +589,7 @@ class commonModel extends model
$className = 'header';
}
$link = helper::createLink($module, $method, sprintf($vars, $orderBy));
echo "<div class='$className'>" . html::a($link, $label) . '</div>';
echo $isMobile ? html::a($link, $label, '', "class='$className'") : "<div class='$className'>" . html::a($link, $label) . '</div>';
}
/**
@@ -749,7 +704,7 @@ class commonModel extends model
/* set the class. */
if(!$icon)
{
$icon = $lang->icons[$method] ? $lang->icons[$method] : $method;
$icon = isset($lang->icons[$method]) ? $lang->icons[$method] : $method;
}
if(strpos(',edit,copy,report,export,delete,', ",$method,") !== false) $module = 'common';
$class = "icon-$module-$method";
@@ -762,7 +717,7 @@ class commonModel extends model
{
if($app->getViewType() == 'mhtml')
{
return html::a($link, $title, $target, "class='$extraClass' data-role='button' data-mini='true' data-inline='true' data-theme='b'", true);
return "<a data-remote='$link' class='$extraClass' $misc>$title</a>";
}
if($type == 'button')
{
@@ -913,18 +868,23 @@ class commonModel extends model
/**
* Judge Suhosin Setting whether the actual size of post data is large than the setting size.
*
* @param int $numberOfItems
* @param int $columns
* @param int $countInputVars
* @static
* @access public
* @return void
* @return bool
*/
public function judgeSuhosinSetting($numberOfItems, $columns)
public static function judgeSuhosinSetting($countInputVars)
{
if(extension_loaded('suhosin'))
{
$maxPostVars = ini_get('suhosin.post.max_vars');
$maxRequestVars = ini_get('suhosin.request.max_vars');
if($numberOfItems * $columns > $maxPostVars or $numberOfItems * $columns > $maxRequestVars) return true;
if($countInputVars > $maxPostVars or $countInputVars > $maxRequestVars) return true;
}
else
{
$maxInputVars = ini_get('max_input_vars');
if($maxInputVars and $countInputVars > (int)$maxInputVars) return true;
}
return false;
@@ -1177,8 +1137,7 @@ class commonModel extends model
global $app, $lang;
/* Check is the super admin or not. */
$account = ',' . $app->user->account . ',';
if(strpos($app->company->admins, $account) !== false) return true;
if($app->user->admin) return true;
/* If not super admin, check the rights. */
$rights = $app->user->rights['rights'];
@@ -1307,6 +1266,49 @@ class commonModel extends model
{
return (isset($_SESSION['tutorialMode']) and $_SESSION['tutorialMode']);
}
/**
* Convert items to Pinyin.
*
* @param array $items
* @static
* @access public
* @return array
*/
public static function convert2Pinyin($items)
{
global $app;
static $allConverted = array();
static $pinyin;
if(empty($pinyin)) $pinyin = $app->loadClass('pinyin');
$sign = ' aNdAnD ';
$notConvertedItems = array_diff($items, array_keys($allConverted));
if($notConvertedItems)
{
$convertedPinYin = $pinyin->romanize(join($sign, $notConvertedItems));
$itemsPinYin = explode(trim($sign), $convertedPinYin);
foreach($notConvertedItems as $item)
{
$itemPinYin = array_shift($itemsPinYin);
$wordsPinYin = explode("\t", trim($itemPinYin));
$abbr = '';
foreach($wordsPinYin as $i => $wordPinyin)
{
if($wordPinyin) $abbr .= $wordPinyin[0];
}
$allConverted[$item] = strtolower(join($wordsPinYin) . ' ' . $abbr);
}
}
$convertedItems = array();
foreach($items as $item) $convertedItems[$item] = zget($allConverted, $item, null);
return $convertedItems;
}
}
class common extends commonModel
-25
View File
@@ -1,25 +0,0 @@
<div id='actionbox'>
<fieldset>
<hr color='#dddddd'/>
<ol id='historyItem' style='padding-left:20px; font-size:11px'>
<?php $i = 1; ?>
<?php foreach($actions as $action):?>
<li value='<?php echo $i ++;?>'>
<?php
if(isset($users[$action->actor])) $action->actor = $users[$action->actor];
if($action->action == 'assigned' and isset($users[$action->extra]) ) $action->extra = $users[$action->extra];
if(strpos($action->actor, ':') !== false) $action->actor = substr($action->actor, strpos($action->actor, ':') + 1);
?>
<span><?php $this->action->printAction($action);?></span>
<?php if(!empty($action->comment) or !empty($action->history)):?>
<?php if(!empty($action->comment)) echo "<div class='history'>";?>
<?php if($action->comment) echo strip_tags($action->comment) == $action->comment ? nl2br($action->comment) : $action->comment; ?>
<?php if(!empty($action->comment)) echo "</div>";?>
<?php endif;?>
</li>
<?php endforeach;?>
</ol>
</fieldset>
</div>
-20
View File
@@ -1,20 +0,0 @@
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='hidden'></iframe>
<?php
if(isset($pageJS)) js::execute($pageJS); // load the js for current page.
/* Load hook files for current page. */
$extPath = dirname(dirname(dirname(realpath($viewFile)))) . '/common/ext/view/';
$extHookRule = $extPath . 'm.footer.*.hook.php';
$extHookFiles = glob($extHookRule);
if($extHookFiles) foreach($extHookFiles as $extHookFile) include $extHookFile;
?>
<?php if($this->server->HTTP_X_PJAX == false):?>
<script>
/* May be fix bug #576. */
$(function(){$("#main").css('padding-top', $("div[data-role='header']").height() + 'px')})
</script>
</div>
</body>
</html>
<?php endif;?>
@@ -1,8 +0,0 @@
</div>
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<iframe frameborder='0' name='hiddenwin' id='hiddenwin' scrolling='no' class='hidden'></iframe>
<script laguage='Javascript'>
<?php if(isset($pageJS)) echo $pageJS;?>
</script>
</body>
</html>
-12
View File
@@ -1,12 +0,0 @@
<?php
if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}
include 'm.header.lite.html.php';
?>
<div data-role="header" data-position='fixed' style='border-bottom:1px solid #ddd'>
<?php echo html::a($this->createLink('my', 'index', '', 'html'), $lang->goPC, '', "id='goPC' data-icon='forward' class='ui-btn-left'")?>
<h1 style='margin-left:0px'><?php echo $app->company->name?></h1>
<?php echo html::a($this->createLink('user', 'logout'), $lang->logout, '', "id='logout' data-icon='delete' class='ui-btn-right'")?>
<div data-role="navbar" id='mainMenu'>
<?php commonModel::printMainmenu($this->moduleName, $this->methodName)?>
</ul>
</div>
-44
View File
@@ -1,44 +0,0 @@
<?php if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}?>
<?php
$webRoot = $this->app->getWebRoot();
$jsRoot = $webRoot . "js/";
$themeRoot = $webRoot . "theme/";
$defaultTheme = $webRoot . 'theme/default/';
$langTheme = $themeRoot . 'lang/' . $app->getClientLang() . '.css';
$clientTheme = $this->app->getClientTheme();
?>
<?php if($this->server->HTTP_X_PJAX == false):?>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<?php
echo html::title($title . ' - ' . $lang->zentaoPMS);
js::exportConfigVars();
if($config->debug)
{
js::import($jsRoot . 'jquery/mobile/jquery-1.10.1.min.js');
js::import($jsRoot . 'm.my.full.js');
js::import($jsRoot . 'jquery/mobile/jquery.mobile.min.js');
js::import($jsRoot . 'jquery/jquery.pjax.js');
css::import($defaultTheme . 'jquery.mobile.css');
css::import($defaultTheme . 'm.style.css');
css::import($langTheme);
}
else
{
js::import($jsRoot . 'm.all.js');
css::import($defaultTheme . 'm.' . $this->cookie->lang . '.default.css');
}
if(isset($pageCSS)) css::internal($pageCSS);
echo html::favicon($webRoot . 'favicon.ico');
?>
</head>
<body>
<div data-role="page" id='main'>
<?php endif;?>
+1 -1
View File
@@ -6,7 +6,7 @@ if(file_exists($extViewFile))
return;
}
?>
<?php if(!empty($action)): ?>
<?php if(isset($action->objectType) and isset($action->action)):?>
<?php if(!empty($action->comment)):?>
<tr>
<td style="padding:0px 10px 10px 10px; border: none;">
+3 -3
View File
@@ -13,8 +13,8 @@ $editorLang = isset($editorLangs[$app->getClientLang()]) ? $editorLangs[$app->
$uid = uniqid('');
js::set('kuid', $uid);
?>
<script type="text/javascript" charset="utf-8" src="<?php echo $jsRoot?>ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="<?php echo $jsRoot?>ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="<?php echo $this->app->getWebRoot() . "js/"?>ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="<?php echo $this->app->getWebRoot() . "js/"?>ueditor/ueditor.all.min.js"> </script>
<script language='javascript'>
var editor = <?php echo json_encode($editor);?>;
@@ -22,7 +22,7 @@ var toolbars = [[
'paragraph', 'fontfamily', 'fontsize', '|',
'forecolor', 'backcolor', 'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript', 'blockquote', 'pasteplain', '|',
'insertorderedlist', 'insertunorderedlist', 'justifyleft', 'justifycenter', 'justifyright', '|',
'simpleupload', 'insertvideo', 'insertcode', '|',
'simpleupload', 'insertcode', '|',
'link', 'unlink', '|',
'inserttable', '|',
'fullscreen', 'source', '|',
+1 -1
View File
@@ -40,7 +40,7 @@ $lang->cron->introduction = <<<EOD
<p>This function need to be improved, so it is turned off by default.</p>
EOD;
$lang->cron->confirmOpen = <<<EOD
<p>Do you want to turn it on?<a href="%s" target='hiddenwin'><i class="icon icon-toggle-on"></i><strong>Turn On Planned Task<strong></a></p>
<p>Do you want to turn it on?<a href="%s" target='hiddenwin'><strong>Turn On Planned Task<strong></a></p>
EOD;
$lang->cron->notice = new stdclass();
+1 -1
View File
@@ -40,7 +40,7 @@ $lang->cron->introduction = <<<EOD
<p>该功能还有待完善,所以默认关闭该功能</p>
EOD;
$lang->cron->confirmOpen = <<<EOD
<p>是否开启该功能?<a href="%s" target='hiddenwin'><i class="icon icon-toggle-on"></i><strong>打开计划任务</strong></a></p>
<p>是否开启该功能?<a href="%s" target='hiddenwin'><strong>打开计划任务</strong></a></p>
EOD;
$lang->cron->notice = new stdclass();
+1 -1
View File
@@ -40,7 +40,7 @@ $lang->cron->introduction = <<<EOD
<p>該功能還有待完善,所以預設關閉該功能</p>
EOD;
$lang->cron->confirmOpen = <<<EOD
<p>是否開啟該功能?<a href="%s" target='hiddenwin'><i class="icon icon-toggle-on"></i><strong>打開計劃任務</strong></a></p>
<p>是否開啟該功能?<a href="%s" target='hiddenwin'><strong>打開計劃任務</strong></a></p>
EOD;
$lang->cron->notice = new stdclass();
+4
View File
@@ -7,3 +7,7 @@ $config->custom->canAdd['testcase'] = 'priList,typeList,stageList,resultList,sta
$config->custom->canAdd['testtask'] = 'priList';
$config->custom->canAdd['todo'] = 'priList,typeList';
$config->custom->canAdd['user'] = 'roleList';
$config->custom->canAdd['block'] = '';
$config->custom->moblieHidden['main'] = array('repo');
$config->custom->moblieHidden['product'] = array('branch', 'module', 'create');
+22 -8
View File
@@ -34,6 +34,7 @@ class custom extends control
public function set($module = 'story', $field = 'priList', $lang = 'zh_cn')
{
if($module == 'user' and $field == 'priList') $field = 'roleList';
if($module == 'block' and $field == 'priList')$field = 'closed';
$currentLang = $this->app->getClientLang();
$this->app->loadLang($module);
@@ -45,40 +46,53 @@ class custom extends control
unset($fieldList['newfeature']);
unset($fieldList['trackthings']);
}
if(($module == 'story' || $module == 'testcase') && $field == 'review')
if(($module == 'story' or $module == 'testcase') and $field == 'review')
{
$this->app->loadConfig($module);
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed');
$this->view->needReview = zget($this->config->$module, 'needReview', 1);
$this->view->forceReview = zget($this->config->$module, 'forceReview', '');
}
if($module == 'task' && $field == 'hours')
if($module == 'task' and $field == 'hours')
{
$this->app->loadConfig('project');
$this->view->weekend = $this->config->project->weekend;
$this->view->workhours = $this->config->project->defaultWorkhours;
}
if($module == 'bug' && $field == 'longlife')
if($module == 'bug' and $field == 'longlife')
{
$this->app->loadConfig('bug');
$this->view->longlife = $this->config->bug->longlife;
}
if(!empty($_POST))
if($module == 'block' and $field == 'closed')
{
if(($module == 'story' || $module == 'testcase') && $field == 'review')
$this->loadModel('block');
$closedBlock = isset($this->config->block->closed) ? $this->config->block->closed : '';
$this->view->blockPairs = $this->block->getClosedBlockPairs($closedBlock);
$this->view->closedBlock = $closedBlock;
}
if(strtolower($_SERVER['REQUEST_METHOD']) == "post")
{
if(($module == 'story' or $module == 'testcase') and $field == 'review')
{
$data = fixer::input('post')->join('forceReview', ',')->get();
$this->loadModel('setting')->setItems("system.$module", $data);
}
elseif($module == 'task' && $field == 'hours')
elseif($module == 'task' and $field == 'hours')
{
$this->loadModel('setting')->setItems('system.project', fixer::input('post')->get());
}
elseif($module == 'bug' && $field == 'longlife')
elseif($module == 'bug' and $field == 'longlife')
{
$this->loadModel('setting')->setItems('system.bug', fixer::input('post')->get());
}
elseif($module == 'block' and $field == 'closed')
{
$data = fixer::input('post')->join('closed', ',')->get();
$this->loadModel('setting')->setItem('system.block.closed', zget($data, 'closed', ''));
}
else
{
$lang = $_POST['lang'];
+7 -3
View File
@@ -16,6 +16,7 @@ $lang->custom->object['testcase'] = 'Case';
$lang->custom->object['testtask'] = 'Build';
$lang->custom->object['todo'] = 'To-Dos';
$lang->custom->object['user'] = 'User';
$lang->custom->object['block'] = 'Block';
$lang->custom->story = new stdClass();
$lang->custom->story->fields['priList'] = 'Priority';
@@ -49,6 +50,7 @@ $lang->custom->testcase->fields['typeList'] = 'Type';
$lang->custom->testcase->fields['stageList'] = 'Stage';
$lang->custom->testcase->fields['resultList'] = 'Result';
$lang->custom->testcase->fields['statusList'] = 'Status';
$lang->custom->testcase->fields['review'] = 'Review';
$lang->custom->testtask = new stdClass();
$lang->custom->testtask->fields['priList'] = 'Priority';
@@ -60,8 +62,10 @@ $lang->custom->todo->fields['typeList'] = 'Type';
$lang->custom->todo->fields['statusList'] = 'Status';
$lang->custom->user = new stdClass();
$lang->custom->user->fields['roleList'] = 'Role';
$lang->custom->user->fields['statusList'] = 'Status';
$lang->custom->user->fields['roleList'] = 'Role';
$lang->custom->user->fields['statusList'] = 'Status';
$lang->custom->block->fields['closed'] = 'Closed Block';
$lang->custom->currentLang = 'Current Language';
$lang->custom->allLang = 'All Language';
@@ -71,7 +75,7 @@ $lang->custom->confirmRestore = 'Do you want to reset to Default?';
$lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = 'Key must be no more than 20 characters!';
$lang->custom->notice->canNotAdd = 'This item will be processed, so customized feature is not enabled.';
$lang->custom->notice->forceReview = 'Review is required for stories submitted by certain assignee.';
$lang->custom->notice->forceReview = 'Review is required for %s submitted by certain assignee.';
$lang->custom->notice->longlife = 'List "Undone" bugs that are older than hold days from "Longlife" bugs.';
$lang->custom->notice->priListKey = 'Priority list key should be numbers!';
$lang->custom->notice->severityListKey = 'Bug severity list key should be numbers.';
+4 -1
View File
@@ -16,6 +16,7 @@ $lang->custom->object['testcase'] = '用例';
$lang->custom->object['testtask'] = '版本';
$lang->custom->object['todo'] = '待办';
$lang->custom->object['user'] = '用户';
$lang->custom->object['block'] = '区块';
$lang->custom->story = new stdClass();
$lang->custom->story->fields['priList'] = '优先级';
@@ -64,6 +65,8 @@ $lang->custom->user = new stdClass();
$lang->custom->user->fields['roleList'] = '职位';
$lang->custom->user->fields['statusList'] = '状态';
$lang->custom->block->fields['closed'] = '关闭的区块';
$lang->custom->currentLang = '适用当前语言';
$lang->custom->allLang = '适用所有语言';
@@ -72,7 +75,7 @@ $lang->custom->confirmRestore = '是否要恢复默认配置?';
$lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = '键的长度必须小于20个字符!';
$lang->custom->notice->canNotAdd = '该项参与运算,不提供自定义添加功能';
$lang->custom->notice->forceReview = '指定人提交的需求必须评审。';
$lang->custom->notice->forceReview = "指定人提交的%s必须评审。";
$lang->custom->notice->longlife = 'Bug列表页面的久未处理标签中,列出设置天数之前未处理的Bug。';
$lang->custom->notice->priListKey = '优先级的键应当为数字!';
$lang->custom->notice->severityListKey = 'Bug严重程度的键应当为数字!';
+5 -1
View File
@@ -16,6 +16,7 @@ $lang->custom->object['testcase'] = '用例';
$lang->custom->object['testtask'] = '版本';
$lang->custom->object['todo'] = '待辦';
$lang->custom->object['user'] = '用戶';
$lang->custom->object['block'] = '區塊';
$lang->custom->story = new stdClass();
$lang->custom->story->fields['priList'] = '優先順序';
@@ -49,6 +50,7 @@ $lang->custom->testcase->fields['typeList'] = '類型';
$lang->custom->testcase->fields['stageList'] = '階段';
$lang->custom->testcase->fields['resultList'] = '執行結果';
$lang->custom->testcase->fields['statusList'] = '狀態';
$lang->custom->testcase->fields['review'] = '評審流程';
$lang->custom->testtask = new stdClass();
$lang->custom->testtask->fields['priList'] = '優先順序';
@@ -63,6 +65,8 @@ $lang->custom->user = new stdClass();
$lang->custom->user->fields['roleList'] = '職位';
$lang->custom->user->fields['statusList'] = '狀態';
$lang->custom->block->fields['closed'] = '關閉的區塊';
$lang->custom->currentLang = '適用當前語言';
$lang->custom->allLang = '適用所有語言';
@@ -71,7 +75,7 @@ $lang->custom->confirmRestore = '是否要恢復預設配置?';
$lang->custom->notice = new stdclass();
$lang->custom->notice->userRole = '鍵的長度必須小於20個字元!';
$lang->custom->notice->canNotAdd = '該項參與運算,不提供自定義添加功能';
$lang->custom->notice->forceReview = '指定人提交的需求必須評審。';
$lang->custom->notice->forceReview = "指定人提交的%s必須評審。";
$lang->custom->notice->longlife = 'Bug列表頁面的久未處理標籤中,列出設置天數之前未處理的Bug。';
$lang->custom->notice->priListKey = '優先順序的鍵應當為數字!';
$lang->custom->notice->severityListKey = 'Bug嚴重程度的鍵應當為數字!';
+4 -1
View File
@@ -134,6 +134,7 @@ class customModel extends model
{
global $app, $lang, $config;
$menu = array();
$menuModuleName = $module;
$order = 1;
$customMenuMap = array();
$isTutorialMode = commonModel::isTutorialMode();
@@ -254,6 +255,9 @@ class customModel extends model
if($hidden) $menuItem->hidden = $hidden;
if($isTutorialMode) $menuItem->tutorial = true;
/* Hidden menu by config in mobile. */
if($app->viewType == 'mhtml' and isset($config->custom->moblieHidden[$menuModuleName]) and in_array($name, $config->custom->moblieHidden[$menuModuleName])) $menuItem->hidden = 1;
while(isset($menu[$menuItem->order])) $menuItem->order++;
$menu[$menuItem->order] = $menuItem;
}
@@ -283,7 +287,6 @@ class customModel extends model
$customMenu = isset($config->customMenu->$module) ? $config->customMenu->$module : array();
if(commonModel::isTutorialMode() && $module === 'main')$customMenu = 'my,product,project,qa,company';
if(!empty($customMenu) && is_string($customMenu) && substr($customMenu, 0, 1) === '[') $customMenu = json_decode($customMenu);
if($app->viewType == 'mhtml') $customMenu = array();
$menu = self::setMenuByConfig($allMenu, $customMenu, $module);
+13 -2
View File
@@ -62,7 +62,7 @@ EOT;
<div class='panel-heading'>
<strong><?php echo $lang->custom->object[$module] . $lang->arrow . $lang->custom->$module->fields[$field]?></strong>
</div>
<?php if(($module == 'story' ||$module == 'testcase') and $field == 'review'):?>
<?php if(($module == 'story' or $module == 'testcase') and $field == 'review'):?>
<table class='table table-form mw-800px'>
<tr>
<th class='w-80px'><?php echo $lang->custom->storyReview;?></th>
@@ -72,7 +72,7 @@ EOT;
<tr>
<th><?php echo $lang->custom->forceReview;?></th>
<td><?php echo html::select('forceReview[]', $users, $forceReview, "class='form-control chosen' multiple");?></td>
<td class='w-180px'><?php echo $lang->custom->notice->forceReview;?></td>
<td class='w-180px'><?php printf($lang->custom->notice->forceReview, $lang->$module->common);?></td>
</tr>
<tr>
<td></td>
@@ -109,6 +109,17 @@ EOT;
</tr>
</table>
<div class='alert alert-info alert-block'><?php echo $lang->custom->notice->longlife;?></div>
<?php elseif($module == 'block' and $field == 'closed'):?>
<table class='table table-form mw-600px'>
<tr>
<th class='w-100px'><?php echo $lang->custom->block->fields['closed'];?></th>
<td><?php echo html::select('closed[]', $blockPairs, $closedBlock, "class='form-control chosen' multiple");?></td>
</tr>
<tr>
<td></td>
<td><?php echo html::submitButton();?></td>
</tr>
</table>
<?php else:?>
<table class='table table-form active-disabled table-condensed mw-600px'>
<tr class='text-center'>
+2 -2
View File
@@ -604,7 +604,7 @@ class docModel extends model
$account = ',' . $this->app->user->account . ',';
if(isset($object->addedBy) and $object->addedBy == $this->app->user->account) return true;
if(strpos($this->app->company->admins, $account) !== false) return true;
if($this->app->user->admin) return true;
if($object->acl == 'private' and strpos(",$object->users,", $account) !== false) return true;
if($object->acl == 'custom')
{
@@ -915,7 +915,7 @@ class docModel extends model
if($table) $table .= '.';
$condition = '';
$account = ',' . $this->app->user->account . ',';
if(strpos($this->app->company->admins, $account) === false)
if(!$this->app->user->admin)
{
$condition .= "{$table}acl='open'";
if($type == 'doc') $condition .= " OR {$table}addedBy = '{$this->app->user->account}'";
+33 -1
View File
@@ -20,7 +20,15 @@
<?php if(empty($file->pathname)) continue;?>
<div class='col-md-3'>
<div class='card lib-file'>
<a class='media-wrapper' title='<?php echo $file->title . '.' . $file->extension?>' target='_blank' href='<?php echo $this->createLink('file', 'download', "fileID=$file->id&mouse=left") ?>'>
<?php
$imageWidth = 0;
if(stripos('jpg|jpeg|gif|png|bmp', $file->extension) !== false and file_exists($file->realPath))
{
$imageSize = getimagesize($file->realPath);
$imageWidth = $imageSize ? $imageSize[0] : 0;
}
?>
<a class='media-wrapper' href='###' title='<?php echo $file->title . '.' . $file->extension?>' target='_blank' onclick="return downloadFile(<?php echo $file->id?>, '<?php echo $file->extension?>', <?php echo $imageWidth?>)">
<?php
$downloadLink = $this->createLink('file', 'download', "fileID=$file->id&mouse=left");
if(in_array($file->extension, $config->file->imageExtensions))
@@ -54,4 +62,28 @@
</div>
<div class='clearfix pager-wrapper'><?php $pager->show();?></div>
<?php js::set('type', 'doc');?>
<script>
<?php
$sessionString = $config->requestType == 'PATH_INFO' ? '?' : '&';
$sessionString .= session_name() . '=' . session_id();
?>
function downloadFile(fileID, extension, imageWidth)
{
if(!fileID) return;
var fileTypes = 'txt,jpg,jpeg,gif,png,bmp';
var sessionString = '<?php echo $sessionString;?>';
var windowWidth = $(window).width();
var url = createLink('file', 'download', 'fileID=' + fileID + '&mouse=left') + sessionString;
width = (windowWidth > imageWidth) ? ((imageWidth < windowWidth*0.5) ? windowWidth*0.5 : imageWidth) : windowWidth;
if(fileTypes.indexOf(extension) >= 0)
{
$('<a>').modalTrigger({url: url, type: 'iframe', width: width}).trigger('click');
}
else
{
window.open(url, '_blank');
}
return false;
}
</script>
<?php include '../../common/view/footer.html.php';?>
+1
View File
@@ -205,6 +205,7 @@ class group extends control
foreach($this->lang->resource as $module => $moduleActions)
{
$modules[$module] = $this->lang->$module->common;
if($module == 'caselib') $module = 'testsuite';
foreach($moduleActions as $action)
{
$actions[$module][$action] = $this->lang->$module->$action;
+3
View File
@@ -46,6 +46,9 @@ $lang->group->copyOptions['copyPriv'] = 'Copy Privilege';
$lang->group->copyOptions['copyUser'] = 'Copy User';
$lang->group->versions[''] = 'History';
$lang->group->versions['9_1'] = 'ZenTao9.1';
$lang->group->versions['9_0'] = 'ZenTao9.0';
$lang->group->versions['8_4'] = 'ZenTao8.4';
$lang->group->versions['8_3'] = 'ZenTao8.3';
$lang->group->versions['8_2_beta'] = 'ZenTao8.2.beta';
$lang->group->versions['8_0_1'] = 'ZenTao8.0.1';
+149 -51
View File
@@ -28,33 +28,36 @@ $lang->moduleOrder[50] = 'qa';
$lang->moduleOrder[55] = 'bug';
$lang->moduleOrder[60] = 'testcase';
$lang->moduleOrder[65] = 'testtask';
$lang->moduleOrder[70] = 'testsuite';
$lang->moduleOrder[75] = 'testreport';
$lang->moduleOrder[80] = 'caselib';
$lang->moduleOrder[70] = 'doc';
$lang->moduleOrder[75] = 'report';
$lang->moduleOrder[85] = 'doc';
$lang->moduleOrder[90] = 'report';
$lang->moduleOrder[80] = 'company';
$lang->moduleOrder[85] = 'dept';
$lang->moduleOrder[90] = 'group';
$lang->moduleOrder[95] = 'user';
$lang->moduleOrder[95] = 'company';
$lang->moduleOrder[100] = 'dept';
$lang->moduleOrder[105] = 'group';
$lang->moduleOrder[110] = 'user';
$lang->moduleOrder[100] = 'admin';
$lang->moduleOrder[105] = 'extension';
$lang->moduleOrder[110] = 'custom';
$lang->moduleOrder[115] = 'editor';
$lang->moduleOrder[120] = 'convert';
$lang->moduleOrder[125] = 'action';
$lang->moduleOrder[115] = 'admin';
$lang->moduleOrder[120] = 'extension';
$lang->moduleOrder[125] = 'custom';
$lang->moduleOrder[130] = 'editor';
$lang->moduleOrder[135] = 'convert';
$lang->moduleOrder[140] = 'action';
$lang->moduleOrder[130] = 'mail';
$lang->moduleOrder[135] = 'svn';
$lang->moduleOrder[140] = 'git';
$lang->moduleOrder[145] = 'search';
$lang->moduleOrder[150] = 'tree';
$lang->moduleOrder[155] = 'api';
$lang->moduleOrder[160] = 'file';
$lang->moduleOrder[165] = 'misc';
$lang->moduleOrder[170] = 'backup';
$lang->moduleOrder[175] = 'cron';
$lang->moduleOrder[180] = 'dev';
$lang->moduleOrder[145] = 'mail';
$lang->moduleOrder[150] = 'svn';
$lang->moduleOrder[155] = 'git';
$lang->moduleOrder[160] = 'search';
$lang->moduleOrder[165] = 'tree';
$lang->moduleOrder[170] = 'api';
$lang->moduleOrder[175] = 'file';
$lang->moduleOrder[180] = 'misc';
$lang->moduleOrder[185] = 'backup';
$lang->moduleOrder[190] = 'cron';
$lang->moduleOrder[195] = 'dev';
$lang->resource = new stdclass();
@@ -130,7 +133,7 @@ $lang->resource->product->edit = 'edit';
$lang->resource->product->batchEdit = 'batchEdit';
$lang->resource->product->delete = 'delete';
$lang->resource->product->roadmap = 'roadmap';
//$lang->resource->product->doc = 'doc';
$lang->resource->product->doc = 'doc';
$lang->resource->product->dynamic = 'dynamic';
$lang->resource->product->project = 'project';
$lang->resource->product->close = 'close';
@@ -300,7 +303,7 @@ $lang->resource->project->computeBurn = 'computeBurn';
$lang->resource->project->fixFirst = 'fixFirst';
$lang->resource->project->burnData = 'burnData';
$lang->resource->project->team = 'team';
//$lang->resource->project->doc = 'doc';
$lang->resource->project->doc = 'doc';
$lang->resource->project->dynamic = 'dynamic';
$lang->resource->project->manageProducts = 'manageProducts';
//$lang->resource->project->manageChilds = 'manageChilds';
@@ -513,25 +516,35 @@ $lang->resource->testcase->confirmChange = 'confirmChange';
$lang->resource->testcase->confirmStoryChange = 'confirmStoryChange';
$lang->resource->testcase->batchChangeModule = 'batchChangeModule';
$lang->resource->testcase->bugs = 'bugs';
$lang->resource->testcase->review = 'review';
$lang->resource->testcase->batchReview = 'batchReview';
$lang->resource->testcase->importFromLib = 'importFromLib';
$lang->resource->testcase->batchCaseTypeChange = 'batchCaseTypeChange';
$lang->resource->testcase->batchConfirmStoryChange = 'batchConfirmStoryChange';
$lang->testcase->methodOrder[0] = 'index';
$lang->testcase->methodOrder[5] = 'browse';
$lang->testcase->methodOrder[10] = 'groupCase';
$lang->testcase->methodOrder[15] = 'create';
$lang->testcase->methodOrder[20] = 'batchCreate';
$lang->testcase->methodOrder[25] = 'createBug';
$lang->testcase->methodOrder[30] = 'view';
$lang->testcase->methodOrder[35] = 'edit';
$lang->testcase->methodOrder[40] = 'delete';
$lang->testcase->methodOrder[45] = 'export';
$lang->testcase->methodOrder[50] = 'confirmChange';
$lang->testcase->methodOrder[55] = 'confirmStoryChange';
$lang->testcase->methodOrder[60] = 'batchEdit';
$lang->testcase->methodOrder[65] = 'batchDelete';
$lang->testcase->methodOrder[70] = 'batchChangeModule';
$lang->testcase->methodOrder[75] = 'linkCases';
$lang->testcase->methodOrder[80] = 'unlinkCase';
$lang->testcase->methodOrder[85] = 'bugs';
$lang->testcase->methodOrder[0] = 'index';
$lang->testcase->methodOrder[5] = 'browse';
$lang->testcase->methodOrder[10] = 'groupCase';
$lang->testcase->methodOrder[15] = 'create';
$lang->testcase->methodOrder[20] = 'batchCreate';
$lang->testcase->methodOrder[25] = 'createBug';
$lang->testcase->methodOrder[30] = 'view';
$lang->testcase->methodOrder[35] = 'edit';
$lang->testcase->methodOrder[40] = 'delete';
$lang->testcase->methodOrder[45] = 'export';
$lang->testcase->methodOrder[50] = 'confirmChange';
$lang->testcase->methodOrder[55] = 'confirmStoryChange';
$lang->testcase->methodOrder[60] = 'batchEdit';
$lang->testcase->methodOrder[65] = 'batchDelete';
$lang->testcase->methodOrder[70] = 'batchChangeModule';
$lang->testcase->methodOrder[75] = 'linkCases';
$lang->testcase->methodOrder[80] = 'unlinkCase';
$lang->testcase->methodOrder[85] = 'bugs';
$lang->testcase->methodOrder[95] = 'review';
$lang->testcase->methodOrder[100] = 'batchReview';
$lang->testcase->methodOrder[105] = 'batchConfirmStoryChange';
$lang->testcase->methodOrder[110] = 'importFromLib';
$lang->testcase->methodOrder[115] = 'batchCaseTypeChange';
/* Test task. */
$lang->resource->testtask = new stdclass();
@@ -553,6 +566,9 @@ $lang->resource->testtask->runcase = 'lblRunCase';
$lang->resource->testtask->results = 'lblResults';
$lang->resource->testtask->results = 'lblResults';
$lang->resource->testtask->batchRun = 'batchRun';
$lang->resource->testtask->activate = 'activate';
$lang->resource->testtask->block = 'block';
$lang->resource->testtask->report = 'reportChart';
$lang->testtask->methodOrder[0] = 'index';
$lang->testtask->methodOrder[5] = 'create';
@@ -562,14 +578,64 @@ $lang->testtask->methodOrder[20] = 'cases';
$lang->testtask->methodOrder[25] = 'groupCase';
$lang->testtask->methodOrder[30] = 'edit';
$lang->testtask->methodOrder[35] = 'start';
$lang->testtask->methodOrder[40] = 'close';
$lang->testtask->methodOrder[45] = 'delete';
$lang->testtask->methodOrder[50] = 'batchAssign';
$lang->testtask->methodOrder[55] = 'linkcase';
$lang->testtask->methodOrder[60] = 'unlinkcase';
$lang->testtask->methodOrder[65] = 'runcase';
$lang->testtask->methodOrder[70] = 'results';
$lang->testtask->methodOrder[75] = 'batchUnlinkCases';
$lang->testtask->methodOrder[40] = 'activate';
$lang->testtask->methodOrder[45] = 'block';
$lang->testtask->methodOrder[50] = 'close';
$lang->testtask->methodOrder[55] = 'delete';
$lang->testtask->methodOrder[60] = 'batchAssign';
$lang->testtask->methodOrder[65] = 'linkcase';
$lang->testtask->methodOrder[70] = 'unlinkcase';
$lang->testtask->methodOrder[75] = 'runcase';
$lang->testtask->methodOrder[80] = 'results';
$lang->testtask->methodOrder[85] = 'batchUnlinkCases';
$lang->testtask->methodOrder[90] = 'report';
$lang->resource->testreport = new stdclass();
$lang->resource->testreport->browse = 'browse';
$lang->resource->testreport->create = 'create';
$lang->resource->testreport->view = 'view';
$lang->resource->testreport->delete = 'delete';
$lang->resource->testreport->edit = 'edit';
$lang->testreport->methodOrder[0] = 'browse';
$lang->testreport->methodOrder[5] = 'create';
$lang->testreport->methodOrder[10] = 'view';
$lang->testreport->methodOrder[15] = 'delete';
$lang->testreport->methodOrder[20] = 'edit';
$lang->resource->testsuite = new stdclass();
$lang->resource->testsuite->index = 'index';
$lang->resource->testsuite->browse = 'browse';
$lang->resource->testsuite->create = 'create';
$lang->resource->testsuite->view = 'view';
$lang->resource->testsuite->edit = 'edit';
$lang->resource->testsuite->delete = 'delete';
$lang->resource->testsuite->linkCase = 'linkCase';
$lang->resource->testsuite->unlinkCase = 'unlinkCase';
$lang->resource->testsuite->batchUnlinkCases = 'batchUnlinkCases';
$lang->testsuite->methodOrder[0] = 'index';
$lang->testsuite->methodOrder[5] = 'browse';
$lang->testsuite->methodOrder[10] = 'create';
$lang->testsuite->methodOrder[15] = 'view';
$lang->testsuite->methodOrder[20] = 'edit';
$lang->testsuite->methodOrder[25] = 'delete';
$lang->testsuite->methodOrder[30] = 'linkCase';
$lang->testsuite->methodOrder[35] = 'unlinkCase';
$lang->testsuite->methodOrder[40] = 'batchUnlinkCases';
$lang->resource->caselib = new stdclass();
$lang->resource->caselib->library = 'library';
$lang->resource->caselib->createLib = 'createLib';
$lang->resource->caselib->edit = 'editLib';
$lang->resource->caselib->createCase = 'createCase';
$lang->resource->caselib->libView = 'libView';
$lang->caselib->methodOrder[0] = 'library';
$lang->caselib->methodOrder[5] = 'createLib';
$lang->caselib->methodOrder[10] = 'edit';
$lang->caselib->methodOrder[15] = 'createCase';
$lang->caselib->methodOrder[20] = 'libView';
/* Doc. */
$lang->resource->doc = new stdclass();
@@ -1199,3 +1265,35 @@ $lang->changelog['8.4'][] = 'story-cases';
$lang->changelog['9.0'][] = 'testcase-bugs';
$lang->changelog['9.0'][] = 'mail-resend';
$lang->changelog['9.1'][] = 'testcase-review';
$lang->changelog['9.1'][] = 'testcase-batchReview';
$lang->changelog['9.1'][] = 'testcase-importFromLib';
$lang->changelog['9.1'][] = 'testcase-batchCaseTypeChange';
$lang->changelog['9.1'][] = 'testcase-batchConfirmStoryChange';
$lang->changelog['9.1'][] = 'testreport-browse';
$lang->changelog['9.1'][] = 'testreport-create';
$lang->changelog['9.1'][] = 'testreport-view';
$lang->changelog['9.1'][] = 'testreport-delete';
$lang->changelog['9.1'][] = 'testreport-edit';
$lang->changelog['9.1'][] = 'testsuite-index';
$lang->changelog['9.1'][] = 'testsuite-browse';
$lang->changelog['9.1'][] = 'testsuite-create';
$lang->changelog['9.1'][] = 'testsuite-view';
$lang->changelog['9.1'][] = 'testsuite-edit';
$lang->changelog['9.1'][] = 'testsuite-delete';
$lang->changelog['9.1'][] = 'testsuite-linkCase';
$lang->changelog['9.1'][] = 'testsuite-unlinkCase';
$lang->changelog['9.1'][] = 'testsuite-batchUnlinkCases';
$lang->changelog['9.1'][] = 'testsuite-library';
$lang->changelog['9.1'][] = 'testsuite-createLib';
$lang->changelog['9.1'][] = 'testsuite-createCase';
$lang->changelog['9.1'][] = 'testsuite-libView';
$lang->changelog['9.1'][] = 'caselib-library';
$lang->changelog['9.1'][] = 'caselib-createLib';
$lang->changelog['9.1'][] = 'caselib-edit';
$lang->changelog['9.1'][] = 'caselib-createCase';
$lang->changelog['9.1'][] = 'caselib-libView';
$lang->changelog['9.1'][] = 'testtask-activate';
$lang->changelog['9.1'][] = 'testtask-block';
$lang->changelog['9.1'][] = 'testtask-report';
+3
View File
@@ -46,6 +46,9 @@ $lang->group->copyOptions['copyPriv'] = '复制权限';
$lang->group->copyOptions['copyUser'] = '复制用户';
$lang->group->versions[''] = '修改历史';
$lang->group->versions['9_1'] = '禅道9.1';
$lang->group->versions['9_0'] = '禅道9.0';
$lang->group->versions['8_4'] = '禅道8.4';
$lang->group->versions['8_3'] = '禅道8.3';
$lang->group->versions['8_2_beta'] = '禅道8.2.beta';
$lang->group->versions['8_0_1'] = '禅道8.0.1';
+3
View File
@@ -46,6 +46,9 @@ $lang->group->copyOptions['copyPriv'] = '複製權限';
$lang->group->copyOptions['copyUser'] = '複製用戶';
$lang->group->versions[''] = '修改歷史';
$lang->group->versions['9_1'] = '禪道9.1';
$lang->group->versions['9_0'] = '禪道9.0';
$lang->group->versions['8_4'] = '禪道8.4';
$lang->group->versions['8_3'] = '禪道8.3';
$lang->group->versions['8_2_beta'] = '禪道8.2.beta';
$lang->group->versions['8_0_1'] = '禪道8.0.1';
+2 -2
View File
@@ -73,7 +73,7 @@ class groupModel extends model
foreach($privs as $priv)
{
$priv->group = $toGroup;
$this->dao->insert(TABLE_GROUPPRIV)->data($priv)->exec();
$this->dao->replace(TABLE_GROUPPRIV)->data($priv)->exec();
}
}
@@ -249,7 +249,7 @@ class groupModel extends model
$data->group = $groupID;
$data->module = $moduleName;
$data->method = $actionName;
$this->dao->insert(TABLE_GROUPPRIV)->data($data)->exec();
$this->dao->replace(TABLE_GROUPPRIV)->data($data)->exec();
}
}
}
+1
View File
@@ -62,6 +62,7 @@
<th class='text-right w-150px'><?php echo $this->lang->$moduleName->common;?><?php echo html::selectAll($moduleName, 'checkbox')?></th>
<td id='<?php echo $moduleName;?>' class='pv-10px'>
<?php $i = 1;?>
<?php if($moduleName == 'caselib') $moduleName = 'testsuite';?>
<?php foreach($moduleActions as $action => $actionLabel):?>
<?php if(!empty($version) and strpos($changelogs, ",$moduleName-$actionLabel,") === false) continue;?>
<div class='group-item'>
+16 -8
View File
@@ -277,7 +277,7 @@ class mail extends control
$this->view->title = $this->lang->mail->common . $this->lang->colon . $this->lang->mail->test;
$this->view->position[] = html::a(inlink('index'), $this->lang->mail->common);
$this->view->position[] = $this->lang->mail->test;
$this->view->users = $this->dao->select('account, CONCAT(realname, " ", email) AS email' )->from(TABLE_USER)->where('email')->ne('')->orderBy('account')->fetchPairs();
$this->view->users = $this->dao->select('account, CONCAT(realname, " ", email) AS email' )->from(TABLE_USER)->where('email')->ne('')->andWhere('deleted')->eq(0)->orderBy('account')->fetchPairs();
$this->display();
}
@@ -314,7 +314,7 @@ class mail extends control
}
$this->dao->update(TABLE_MAILQUEUE)->set('status')->eq('sending')->where('id')->in($queue->id)->exec();
$this->mail->send($queue->toList, $queue->subject, $queue->body, $queue->ccList);
$this->mail->send($queue->toList, $queue->subject, $queue->body, $queue->ccList, true);
$data = new stdclass();
$data->sendTime = $now;
@@ -491,6 +491,12 @@ class mail extends control
$this->display();
}
/**
* zentao cloud.
*
* @access public
* @return void
*/
public function ztCloud()
{
if($_POST)
@@ -514,7 +520,7 @@ class mail extends control
$this->view->title = $this->lang->mail->ztCloud;
$this->view->position[] = html::a(inlink('index'), $this->lang->mail->common);
$this->view->position[] = $this->lang->mail->ztCloud;
if(!empty($this->config->mail->ztcloud->secretKey))
if(!empty($this->config->mail->ztcloud->secretKey) and !empty($this->config->global->community))
{
$mailConfig = new stdclass();
$mailConfig->fromAddress = $this->config->mail->fromAddress;
@@ -529,16 +535,18 @@ class mail extends control
die($this->display());
}
if($this->cookie->ztCloudLicense != 'yes')
{
$this->view->step = 'license';
die($this->display());
}
if(empty($this->config->global->ztPrivateKey) or $this->config->global->community == 'na' or empty($this->config->global->community))
{
if(!empty($this->config->global->community) and $this->config->global->community != 'na') die(js::locate($this->createLink('admin', 'bind', 'from=mail')));
die(js::locate($this->createLink('admin', 'register', 'from=mail')));
}
if($this->cookie->ztCloudLicense != 'yes')
{
$this->view->step = 'license';
die($this->display());
}
$result = $this->loadModel('admin')->getSecretKey();
if(empty($result))die(js::alert($this->lang->mail->connectFail) . js::locate($this->createLink('admin', 'register', "from=mail")));
if($result->result == 'fail' and empty($result->data)) die(js::alert($this->lang->mail->centifyFail) . js::locate($this->createLink('admin', 'register', "from=mail")));
+3 -3
View File
@@ -21,12 +21,12 @@ include '../../common/view/header.html.php';
<table class='table table-form' id='selectmta'>
<tr>
<td class='text-center'>
<?php if(common::hasPriv('mail', 'detect')):?>
<?php echo html::a(inlink('detect'), $lang->mail->smtp, '', "class='btn btn-sm w-120px'")?>
<?php endif;?>
<?php if($this->app->getClientLang() != 'en' and common::hasPriv('mail', 'ztCloud')):?>
<?php echo html::a(inlink('ztCloud'), $lang->mail->ztCloud, '', "class='btn btn-sm w-120px'")?>
<?php endif;?>
<?php if(common::hasPriv('mail', 'detect')):?>
<?php echo html::a(inlink('detect'), $lang->mail->smtp, '', "class='btn btn-sm w-120px'")?>
<?php endif;?>
</td>
</tr>
</table>
+2
View File
@@ -275,6 +275,8 @@ class my extends control
}
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', $type == 'assigntome' ? false : true);
$cases = $this->testcase->appendData($cases, $type == 'assigntome' ? 'run' : 'case');
/* Assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->testCase;
$this->view->position[] = $this->lang->my->testCase;
-38
View File
@@ -1,38 +0,0 @@
<?php include '../../common/view/m.header.html.php';?>
<div data-role='navbar' id='subMenu'>
<ul>
<?php foreach($config->mobile->bugBar as $menu):?>
<?php $active = $type == $menu ? 'ui-btn-active' : ''?>
<li>
<?php
$subMenuName = $menu == 'assignedTo' ? $lang->bug->assignToMe : $lang->bug->{$menu . 'Me'};
echo html::a($this->createLink('my', 'bug', "type=$menu"), $subMenuName, '', "class='$active' data-theme='d'");
?>
</li>
<?php endforeach;?>
</ul>
</div>
</div>
<?php $this->session->set('bugType', $type);?>
<?php foreach($bugs as $bug):?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="<?php echo $this->session->bugID == $bug->id ? 'false' : 'true'?>" class='collapsible'>
<?php if($this->session->bugID == $bug->id) echo "<script>showDetail('bug', $bug->id);</script>";?>
<h1 onClick="showDetail('bug', <?php echo $bug->id;?>)"><?php echo $bug->title;?></h1>
<div><?php echo $bug->steps;?></div>
<div id='item<?php echo $bug->id;?>'></div>
<div data-role='content' class='text-center'>
<?php
common::printIcon('bug', 'confirmBug', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
common::printIcon('bug', 'assignTo', "bugID=$bug->id", '', 'button', '', '', 'iframe');
common::printIcon('bug', 'resolve', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
common::printIcon('bug', 'close', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
common::printIcon('bug', 'activate', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
?>
</div>
<?php if(end($bugs) == $bug) echo "<hr />";?>
</div>
</div>
<?php endforeach;?>
<?php $pager->show('left', 'mobile')?>
<?php include '../../common/view/m.footer.html.php';?>
-44
View File
@@ -1,44 +0,0 @@
<?php
/**
* The story view file of dashboard module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package my
* @version $Id: story.html.php 4735 2013-05-03 08:30:02Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/m.header.html.php';?>
<div data-role='navbar' id='subMenu'>
<ul>
<?php foreach($config->mobile->storyBar as $menu):?>
<?php $active = $type == $menu ? 'ui-btn-active' : ''?>
<li><?php echo html::a($this->createLink('my', 'story', "type=$menu"), $lang->my->storyMenu->{$menu . 'Me'}, '', "class='$active' data-theme='d'")?></li>
<?php endforeach;?>
</ul>
</div>
</div>
<?php foreach($stories as $story):?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="true">
<?php if($this->session->storyID == $story->id) echo "<script>showDetail('story', $story->id);</script>";?>
<h1 onClick="showDetail('story', <?php echo $story->id;?>)"><?php echo $story->title;?></h1>
<div id='item<?php echo $story->id;?>'></div>
<div data-role='content' class='text-center'>
<?php
if(!$story->deleted)
{
common::printIcon('story', 'review', "storyID=$story->id", $story);
common::printIcon('story', 'close', "storyID=$story->id", $story);
common::printIcon('story', 'activate', "storyID=$story->id", $story);
common::printIcon('story', 'delete', "storyID=$story->id", '', '', '', 'hiddenwin');
}
?>
</div>
</div>
</div>
<?php endforeach;?>
<?php $pager->show('left', 'mobile')?>
<?php include '../../common/view/m.footer.html.php';?>
-46
View File
@@ -1,46 +0,0 @@
<?php
/**
* The task view file of dashboard module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package my
* @version $Id: task.html.php 4735 2013-05-03 08:30:02Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/m.header.html.php';?>
<div data-role='navbar' id='subMenu'>
<ul>
<?php foreach($config->mobile->taskBar as $menu):?>
<?php $active = $type == $menu ? 'ui-btn-active' : ''?>
<li><?php echo html::a($this->createLink('my', 'task', "type=$menu"), $lang->my->taskMenu->{$menu . 'Me'}, '', "class='$active' data-theme='d'")?></li>
<?php endforeach;?>
</ul>
</div>
</div>
<?php $this->session->set('taskType', $type);?>
<?php foreach($tasks as $task):?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="<?php echo $this->session->taskID == $task->id ? 'false' : 'true'?>" class='collapsible'>
<?php if($this->session->taskID == $task->id) echo "<script>showDetail('task', $task->id);</script>";?>
<h1 onClick="showDetail('task', <?php echo $task->id;?>)"><?php echo $task->name;?></h1>
<div><?php echo $task->desc;?></div>
<div id='item<?php echo $task->id;?>'><?php echo $task->desc;?></div>
<div data-role='content' class='text-center'>
<?php
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task);
common::printIcon('task', 'start', "taskID=$task->id", $task);
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task);
common::printIcon('task', 'finish', "taskID=$task->id", $task);
common::printIcon('task', 'close', "taskID=$task->id", $task);
common::printIcon('task', 'activate', "taskID=$task->id", $task);
?>
</div>
<?php if(end($tasks) == $task) echo "<hr />";?>
</div>
</div>
<?php endforeach;?>
<?php $pager->show('left', 'mobile')?>
<?php include '../../common/view/m.footer.html.php';?>
-54
View File
@@ -1,54 +0,0 @@
<?php
/**
* The todo view file of dashboard module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package my
* @version $Id: todo.html.php 4735 2013-05-03 08:30:02Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/m.header.html.php';?>
<div data-role='navbar' id='subMenu'>
<ul>
<?php foreach($config->mobile->todoBar as $period):?>
<?php $active = $type == $period ? 'ui-btn-active' : ''?>
<li><?php echo html::a($this->createLink('my', 'todo', "type=$period"), $lang->todo->periods[$period], '', "class='$active' data-theme='d'")?></li>
<?php endforeach;?>
</ul>
</div>
</div>
<?php $this->session->set('todoType', $type);?>
<?php foreach($todos as $todo):?>
<?php if(!$todo->private or ($todo->private and $todo->account == $app->user->account)):?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="true" class='collapsible'>
<h1 onClick="showDetail('todo', <?php echo $todo->id;?>)"><?php echo $todo->name;?></h1>
<div><?php echo $todo->desc;?></div>
<div id='item<?php echo $todo->id;?>'><?php echo $todo->desc;?></div>
<div data-role='content' class='text-center'>
<?php
common::printIcon('todo', 'finish', "id=$todo->id", $todo, 'button', '', 'hiddenwin');
if($todo->account == $app->user->account)
{
if($type != 'today') common::printIcon('todo', 'import2Today', "todoID=$todo->id");
common::printIcon('todo', 'delete', "todoID=$todo->id", '', 'button', '', 'hiddenwin');
}
?>
</div>
<?php if(end($todos) == $todo) echo "<hr />";?>
</div>
</div>
<?php endif;?>
<?php endforeach;?>
<?php echo $pager->show('left', 'mobile')?>
<div data-role='footer' data-position='fixed'>
<div data-role='navbar' data-iconpos="left">
<ul>
<li><?php echo html::a($this->createLink('todo', 'batchCreate'), $lang->todo->create, '', "data-icon='plus' data-theme='e'")?></li>
</ul>
</div>
</div>
<?php include '../../common/view/m.footer.html.php';?>
+14 -10
View File
@@ -48,13 +48,17 @@
$canBatchRun = common::hasPriv('testtask', 'batchRun');
?>
<?php foreach($cases as $case):?>
<?php
$caseID = $type == 'assigntome' ? $case->case : $case->id;
$runID = $type == 'assigntome' ? $case->id : 0;
?>
<tr class='text-center'>
<td class='cell-id'>
<?php if($canBatchEdit or $canBatchRun):?><input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>'/><?php endif;?>
<?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$case->id"), sprintf('%03d', $case->id));?>
<?php if($canBatchEdit or $canBatchRun):?><input type='checkbox' name='caseIDList[]' value='<?php echo $caseID;?>'/><?php endif;?>
<?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), sprintf('%03d', $caseID));?>
</td>
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span</td>
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$case->id"), $case->title, null, "style='color: $case->color'");?></td>
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "testcaseID=$caseID&version=$case->version"), $case->title, null, "style='color: $case->color'");?></td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td><?php echo $users[$case->lastRunner];?></td>
@@ -63,18 +67,18 @@
<td class='<?php if(isset($run)) echo $run->status;?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
<td class='text-right'>
<?php
common::printIcon('testtask', 'runCase', "runID=0&caseID=$case->id&version=$case->version", '', 'list', 'play', '', 'iframe');
common::printIcon('testtask', 'results', "runID=0&caseID=$case->id", '', 'list', 'list-alt', '', 'iframe');
common::printIcon('testcase', 'edit', "caseID=$case->id", $case, 'list', 'pencil');
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase&param=$case->id", $case, 'list', 'copy');
common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$caseID&version=$case->version", '', 'list', 'play', '', 'iframe', '', "data-width='95%'");
common::printIcon('testtask', 'results', "runID=$runID&caseID=$caseID", '', 'list', 'list-alt', '', 'iframe', '', "data-width='95%'");
common::printIcon('testcase', 'edit', "caseID=$caseID", $case, 'list', 'pencil');
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase&param=$caseID", $case, 'list', 'copy');
if(common::hasPriv('testcase', 'delete'))
{
$deleteURL = $this->createLink('testcase', 'delete', "caseID=$case->id&confirm=yes");
$deleteURL = $this->createLink('testcase', 'delete', "caseID=$caseID&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"caseList\",confirmDelete)", '<i class="icon-remove"></i>', '', "class='btn-icon' title='{$lang->testcase->delete}'");
}
common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$case->id,version=$case->version,runID=", $case, 'list', 'bug');
common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$caseID,version=$case->version,runID=$runID", $case, 'list', 'bug');
?>
</td>
</tr>
@@ -92,7 +96,7 @@
$actionLink = $this->createLink('testcase', 'batchEdit');
echo html::submitButton("<i class='icon-pencil'></i> " . $lang->edit, "onclick=setFormAction('$actionLink')");
}
if($canBatchRun)
if($canBatchRun and $type != 'assigntome')
{
$actionLink = $this->createLink('testtask', 'batchRun', "productID=0&orderBy=$orderBy&from=testcase");
echo html::submitButton("<i class='icon-play'></i> " . $lang->testtask->runCase, "onclick=setFormAction('$actionLink')");
+12 -37
View File
@@ -229,6 +229,8 @@ class product extends control
$this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst|noclosed');
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst|noclosed');
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst|noclosed');
unset($this->lang->product->typeList['']);
$this->display();
}
@@ -272,6 +274,7 @@ class product extends control
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst', $product->QD);
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst', $product->RD);
unset($this->lang->product->typeList['']);
$this->display();
}
@@ -316,6 +319,8 @@ class product extends control
$this->view->poUsers = $this->loadModel('user')->getPairs('nodeleted|pofirst');
$this->view->qdUsers = $this->loadModel('user')->getPairs('nodeleted|qdfirst');
$this->view->rdUsers = $this->loadModel('user')->getPairs('nodeleted|devfirst');
unset($this->lang->product->typeList['']);
$this->display();
}
@@ -558,44 +563,14 @@ class product extends control
$this->view->module = $module;
$this->view->method = $method;
$this->view->extra = $extra;
$this->view->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('id')->in(array_keys($this->products))->orderBy('`order` desc')->fetchAll();
$this->display();
}
/**
* The results page of search.
*
* @param string $keywords
* @param string $module
* @param string $method
* @param mix $extra
* @access public
* @return void
*/
public function ajaxGetMatchedItems($keywords, $module, $method, $extra)
{
$products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq(0)->orderBy('`order` desc')->fetchAll();
$toPinyin = $this->product->toPinyin($products);
$products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('id')->in(array_keys($this->products))->orderBy('`order` desc')->fetchAll('id');
$productPairs = array();
foreach($products as $product) $productPairs[$product->id] = $product->name;
$productsPinyin = common::convert2Pinyin($productPairs);
foreach($toPinyin as $key => $value) {
if(!strstr($value ,$keywords) && !strstr($key,$keywords)) {
unset($toPinyin[$key]);
}
}
foreach($products as $key => $product)
{
if(!isset($toPinyin[$product->name])) {
unset($products[$key]);
continue;
}
if(!$this->product->checkPriv($product)) unset($products[$key]);
}
$this->view->link = $this->product->getProductLink($module, $method, $extra);
$this->view->products = $products;
$this->view->keywords = $keywords;
foreach($products as $key => $product) $product->key = $productsPinyin[$product->name];
$this->view->products = $products;
$this->display();
}
@@ -654,7 +629,7 @@ class product extends control
{
$this->session->set('productList', $this->app->getURI(true));
$productID = $this->product->saveState($productID, $this->products);
if($this->app->getViewType() != 'mhtml') $this->product->setMenu($this->products, $productID);
$this->product->setMenu($this->products, $productID);
/* Load pager and get tasks. */
$this->app->loadClass('pager', $static = true);
+16 -55
View File
@@ -66,11 +66,13 @@ class productModel extends model
unset($this->lang->product->menu->branch);
return;
}
$isMobile = $this->app->viewType == 'mhtml';
setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot);
$currentProduct = $this->getById($productID);
$this->session->set('currentProductType', $currentProduct->type);
$output = "<a id='currentItem' href=\"javascript:showDropMenu('product', '$productID', '$currentModule', '$currentMethod', '$extra')\">{$currentProduct->name} <span class='icon-caret-down'></span></a><div id='dropMenu'><i class='icon icon-spin icon-spinner'></i></div>";
$output = "<a id='currentItem' href=\"javascript:showSearchMenu('product', '$productID', '$currentModule', '$currentMethod', '$extra')\">{$currentProduct->name} <span class='icon-caret-down'></span></a><div id='dropMenu'><i class='icon icon-spin icon-spinner'></i></div>";
if($isMobile) $output = "<a id='currentItem' href=\"javascript:showSearchMenu('product', '$productID', '$currentModule', '$currentMethod', '$extra')\">{$currentProduct->name} <span class='icon-caret-down'></span></a><div id='currentItemDropMenu' class='hidden affix enter-from-bottom layer'></div>";
if($currentProduct->type == 'normal') unset($this->lang->product->menu->branch);
if($currentProduct->type != 'normal')
{
@@ -78,8 +80,15 @@ class productModel extends model
$this->lang->product->menu->branch = str_replace('@branch@', $this->lang->product->branchName[$currentProduct->type], $this->lang->product->menu->branch);
$branches = $this->loadModel('branch')->getPairs($productID);
$branchName = isset($branches[$branch]) ? $branches[$branch] : $branches[0];
$output .= '</li><li>';
$output .= "<a id='currentBranch' href=\"javascript:showDropMenu('branch', '$productID', '$currentModule', '$currentMethod', '$extra')\">{$branchName} <span class='icon-caret-down'></span></a><div id='dropMenu'><i class='icon icon-spin icon-spinner'></i></div>";
if(!$isMobile)
{
$output .= '</li><li>';
$output .= "<a id='currentBranch' href=\"javascript:showSearchMenu('branch', '$productID', '$currentModule', '$currentMethod', '$extra')\">{$branchName} <span class='icon-caret-down'></span></a><div id='dropMenu'><i class='icon icon-spin icon-spinner'></i></div>";
}
else
{
$output .= "<a id='currentBranch' href=\"javascript:showSearchMenu('branch', '$productID', '$currentModule', '$currentMethod', '$extra')\">{$branchName} <span class='icon-caret-down'></span></a><div id='currentBranchDropMenu' class='hidden affix enter-from-bottom layer'></div>";
}
}
return $output;
}
@@ -128,7 +137,7 @@ class productModel extends model
{
/* Is admin? */
$account = ',' . $this->app->user->account . ',';
if(strpos($this->app->company->admins, $account) !== false) return true;
if($this->app->user->admin) return true;
$acls = $this->app->user->rights['acls'];
if(!empty($acls['products']) and !in_array($product->id, $acls['products'])) return false;
@@ -343,7 +352,7 @@ class productModel extends model
$products[$productID]->RD = $data->RDs[$productID];
$products[$productID]->type = $data->types[$productID];
$products[$productID]->status = $data->statuses[$productID];
$products[$productID]->desc = $data->descs[$productID];
$products[$productID]->desc = strip_tags($this->post->descs[$productID], $this->config->allowedTags);
$products[$productID]->order = $data->orders[$productID];
}
@@ -746,8 +755,8 @@ class productModel extends model
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.id = t2.product')
->leftJoin(TABLE_TEAM)->alias('t3')->on('t2.project = t3.project')
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t2.project = t4.id')
->beginIF(strpos($this->app->company->admins, $account) !== false)->where('t1.deleted')->eq(0)->fi()
->beginIF(strpos($this->app->company->admins, $account) === false)
->beginIF($this->app->user->admin)->where('t1.deleted')->eq(0)->fi()
->beginIF(!$this->app->user->admin)
->where('t1.acl')->eq('open')
->orWhere("(t1.acl = 'custom' AND $groupSql)")
->orWhere('t1.PO')->eq($this->app->user->account)
@@ -900,52 +909,4 @@ class productModel extends model
->limit(1)
->fetch();
}
public function toPinyin($products)
{
global $app;
static $pinyin;
static $dataKeys;
if(empty($pinyin)) $pinyin = $app->loadClass('pinyin');
$joinOptions = '';
$sign = ' aNd ';
foreach($products as $value)
{
if(!isset($dataKeys[$value->name])) $joinOptions .= str_replace($sign, ' and ', $value->name) . $sign;
}
if($joinOptions)
{
$valuesPinyin = $pinyin->romanize($joinOptions);
$signLenth = strlen($sign);
$pinyinSign = trim($sign);
$pySignLenth = strlen($pinyinSign);
while($joinOptions)
{
$valuePinyin = '';
$value = '';
$pinyinPos = strpos($valuesPinyin, $pinyinSign);
if($pinyinPos !== false)
{
$valuePinyin = substr($valuesPinyin, 0, $pinyinPos);
$valuesPinyin = substr($valuesPinyin, $pinyinPos + $pySignLenth);
}
$valuePos = strpos($joinOptions, $sign);
if($valuePos === false) break;
$value = substr($joinOptions, 0, $valuePos);
$joinOptions = substr($joinOptions, $valuePos + $signLenth);
$valuePinyin = preg_split('/[^a-z]+/iu', trim($valuePinyin));
$valueAbbr = '';
foreach($valuePinyin as $wordPinyin) if($wordPinyin) $valueAbbr .= $wordPinyin[0];
$dataKeys[$value] = empty($valuePinyin) ? '' : join($valuePinyin) . ' ' . $valueAbbr;
}
}
return $dataKeys;
}
}
+3 -4
View File
@@ -22,7 +22,7 @@
{
if($product->status == 'normal' and $product->PO == $this->app->user->account)
{
echo "<li>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "class='mine text-important'"). "</li>";
echo "<li data-id='{$product->id}' data-tag=':{$product->status} @{$product->PO} @mine' data-key='{$product->key}'>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "class='mine text-important'"). "</li>";
}
}
@@ -32,7 +32,7 @@
{
if($product->status == 'normal' and !($product->PO == $this->app->user->account))
{
echo "<li>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "$class"). "</li>";
echo "<li data-id='{$product->id}' data-tag=':{$product->status} @{$product->PO}' data-key='{$product->key}'>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "$class"). "</li>";
}
}
?>
@@ -45,13 +45,12 @@
<?php endif;?>
</div>
</div>
<div id='moreMenu'>
<ul>
<?php
foreach($products as $product)
{
if($product->status == 'closed') echo "<li>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "class='closed'"). "</li>";
if($product->status == 'closed') echo "<li data-id='{$product->id}' data-tag=':{$product->status} @{$product->PO}' data-key='{$product->key}'>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "class='closed'"). "</li>";
}
?>
</ul>
@@ -1,11 +0,0 @@
<div class='search-list'>
<ul>
<?php if(!$products) echo "<li class='no-result-tip'>" . sprintf($lang->product->noMatched, $keywords) . '</li>';?>
<?php
foreach($products as $product)
{
echo "<li>" . html::a(sprintf($link, $product->id), "<i class='icon-cube'></i> " . $product->name, '', "class='$product->status'"). "</li>";
}
?>
</ul>
</div>
-1
View File
@@ -41,7 +41,6 @@
</thead>
<tbody>
<?php foreach($actions as $action):?>
<?php $module = $action->objectType == 'case' ? 'testcase' : $action->objectType;?>
<tr class='text-center'>
<td><?php echo $action->date;?></td>
<td><?php isset($users[$action->actor]) ? print($users[$action->actor]) : print($action->actor);?></td>
-29
View File
@@ -1,29 +0,0 @@
<?php
/**
* The html template file of index method of index module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Yangyang Shi <shiyangyang@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id$
*/
?>
<?php include '../../common/view/m.header.html.php';?>
</div>
<ul data-role='listview'>
<?php foreach($productStats as $product):?>
<li>
<table class='table table-fixed'>
<tr>
<td><h3><?php echo $product->name?></h3></td>
<td width='120'>
<?php echo html::a($this->createLink('product', 'browse', "productID=$product->id"), $lang->story->common, '', "data-role='button' data-mini='true' data-inline='true'")?>
<?php echo html::a($this->createLink('bug', 'browse', "productID=$product->id"), $lang->bug->common, '', "data-role='button' data-mini='true' data-inline='true'")?>
</td>
</tr>
</table>
</li>
<?php endforeach;?>
</ul>
<?php include '../../common/view/m.footer.html.php';?>
-26
View File
@@ -1,26 +0,0 @@
<?php include '../../common/view/m.header.html.php';?>
</div>
<?php foreach($stories as $story):?>
<?php if($story->status == 'closed') continue;?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="<?php echo $this->session->storyID == $story->id ? 'false' : 'true'?>" class='collapsible'>
<?php if($this->session->storyID == $story->id) echo "<script>showDetail('story', $story->id);</script>";?>
<h1 onClick="showDetail('story', <?php echo $story->id;?>)"><?php echo $story->title;?></h1>
<div id='item<?php echo $story->id;?>'></div>
<div data-role='content' class='text-center'>
<?php
if(!$story->deleted)
{
common::printIcon('story', 'review', "storyID=$story->id", $story);
common::printIcon('story', 'close', "storyID=$story->id", $story);
common::printIcon('story', 'delete', "storyID=$story->id", '', '', '', 'hiddenwin');
}
?>
</div>
</div>
</div>
<?php endforeach;?>
<?php $pager->show('left', 'mobile')?>
<?php include '../../common/view/m.footer.html.php';?>
+8 -39
View File
@@ -583,10 +583,9 @@ class project extends control
$position[] = $this->lang->project->story;
/* Count T B C */
$storyIdList = array();
foreach($stories as $story) $storyIdList[$story->id] = $story->id;
$storyTasks = $this->loadModel('task')->getStoryTaskCounts($storyIdList);
$storyBugs = $this->loadModel('bug')->getStoryBugCounts($storyIdList);
$storyIdList = array_keys($stories);;
$storyTasks = $this->loadModel('task')->getStoryTaskCounts($storyIdList,$projectID);
$storyBugs = $this->loadModel('bug')->getStoryBugCounts($storyIdList,$projectID);
$storyCases = $this->loadModel('testcase')->getStoryCaseCounts($storyIdList);
/* Assign. */
@@ -1880,44 +1879,14 @@ class project extends control
$this->view->module = $module;
$this->view->method = $method;
$this->view->extra = $extra;
$this->view->projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in(array_keys($this->projects))->orderBy('order desc')->fetchAll();
$this->display();
}
/**
* The results page of search.
*
* @param string $keywords
* @param string $module
* @param string $method
* @param mix $extra
* @access public
* @return void
*/
public function ajaxGetMatchedItems($keywords, $module, $method, $extra)
{
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq(0)->orderBy('order desc')->fetchAll();
$toPinyin = $this->project->toPinyin($projects);
$projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->in(array_keys($this->projects))->orderBy('order desc')->fetchAll();
$projectPairs = array();
foreach($projects as $project) $projectPairs[$project->id] = $project->name;
$projectsPinyin = common::convert2Pinyin($projectPairs);
foreach($projects as $key => $project) $project->key = $projectsPinyin[$project->name];
foreach($toPinyin as $key => $value) {
if(!strstr($value ,$keywords) && !strstr($key,$keywords)) {
unset($toPinyin[$key]);
}
}
foreach($projects as $key => $project)
{
if(!isset($toPinyin[$project->name])) {
unset($projects[$key]);
continue;
}
if(!$this->project->checkPriv($project)) unset($projects[$key]);
}
$this->view->link = $this->project->getProjectLink($module, $method, $extra);
$this->view->projects = $projects;
$this->view->keywords = $keywords;
$this->display();
}
+5 -53
View File
@@ -26,8 +26,7 @@ class projectModel extends model
public function checkPriv($project)
{
/* If is admin, return true. */
$account = ',' . $this->app->user->account . ',';
if(strpos($this->app->company->admins, $account) !== false) return true;
if($this->app->user->admin) return true;
$acls = $this->app->user->rights['acls'];
if(!empty($acls['projects']) and !in_array($project->id, $acls['projects'])) return false;
@@ -125,7 +124,7 @@ class projectModel extends model
setCookie("lastProject", $projectID, $this->config->cookieLife, $this->config->webRoot);
$currentProject = $this->getById($projectID);
$output = "<a id='currentItem' href=\"javascript:showDropMenu('project', '$projectID', '$currentModule', '$currentMethod', '$extra')\">{$currentProject->name} <span class='icon-caret-down'></span></a><div id='dropMenu'><i class='icon icon-spin icon-spinner'></i></div>";
$output = "<a id='currentItem' href=\"javascript:showSearchMenu('project', '$projectID', '$currentModule', '$currentMethod', '$extra')\">{$currentProject->name} <span class='icon-caret-down'></span></a><div id='dropMenu'><i class='icon icon-spin icon-spinner'></i></div>";
return $output;
}
@@ -1697,11 +1696,12 @@ class projectModel extends model
$currentTime = strtotime($current);
if($currentTime > $endTime) break;
if(isset($sets[$current])) $preValue = $sets[$current]->value;
if($currentTime > time())
if($currentTime > time() and !$todayTag)
{
$preValue = 0;
$todayTag = $i + 1;
break;
}
if(!isset($sets[$current]) and $mode == 'noempty')
{
$sets[$current] = new stdclass();
@@ -2389,52 +2389,4 @@ class projectModel extends model
if(isset($fullTrees[0]) and empty($fullTrees[0]->children)) array_shift($fullTrees);
return array_values($fullTrees);
}
public function toPinyin($products)
{
global $app;
static $pinyin;
static $dataKeys;
if(empty($pinyin)) $pinyin = $app->loadClass('pinyin');
$joinOptions = '';
$sign = ' aNd ';
foreach($products as $value)
{
if(!isset($dataKeys[$value->name])) $joinOptions .= str_replace($sign, ' and ', $value->name) . $sign;
}
if($joinOptions)
{
$valuesPinyin = $pinyin->romanize($joinOptions);
$signLenth = strlen($sign);
$pinyinSign = trim($sign);
$pySignLenth = strlen($pinyinSign);
while($joinOptions)
{
$valuePinyin = '';
$value = '';
$pinyinPos = strpos($valuesPinyin, $pinyinSign);
if($pinyinPos !== false)
{
$valuePinyin = substr($valuesPinyin, 0, $pinyinPos);
$valuesPinyin = substr($valuesPinyin, $pinyinPos + $pySignLenth);
}
$valuePos = strpos($joinOptions, $sign);
if($valuePos === false) break;
$value = substr($joinOptions, 0, $valuePos);
$joinOptions = substr($joinOptions, $valuePos + $signLenth);
$valuePinyin = preg_split('/[^a-z]+/iu', trim($valuePinyin));
$valueAbbr = '';
foreach($valuePinyin as $wordPinyin) if($wordPinyin) $valueAbbr .= $wordPinyin[0];
$dataKeys[$value] = empty($valuePinyin) ? '' : join($valuePinyin) . ' ' . $valueAbbr;
}
}
return $dataKeys;
}
}
+3 -3
View File
@@ -23,7 +23,7 @@
{
if($project->status != 'done' and $project->PM == $this->app->user->account)
{
echo "<li>" . html::a(sprintf($link, $project->id), "<i class='icon-folder-close-alt'></i> " . $project->name). "</li>";
echo "<li data-id='{$project->id}' data-tag=':{$project->status} @{$project->PM} @mine' data-key='{$project->key}'>" . html::a(sprintf($link, $project->id), "<i class='icon-folder-close-alt'></i> " . $project->name). "</li>";
}
}
@@ -33,7 +33,7 @@
{
if($project->status != 'done' and !($project->PM == $this->app->user->account))
{
echo "<li>" . html::a(sprintf($link, $project->id), "<i class='icon-folder-close-alt'></i> " . $project->name, '', "$class"). "</li>";
echo "<li data-id='{$project->id}' data-tag=':{$project->status} @{$project->PM}' data-key='{$project->key}'>" . html::a(sprintf($link, $project->id), "<i class='icon-folder-close-alt'></i> " . $project->name, '', "$class"). "</li>";
}
}
?>
@@ -51,7 +51,7 @@
<?php
foreach($projects as $project)
{
if($project->status == 'done') echo "<li>" . html::a(sprintf($link, $project->id), "<i class='icon-folder-close-alt'></i> " . $project->name, '', "class='done'"). "</li>";
if($project->status == 'done') echo "<li data-id='{$project->id}' data-tag=':{$project->status} @{$project->PM}' data-key='{$project->key}'>" . html::a(sprintf($link, $project->id), "<i class='icon-folder-close-alt'></i> " . $project->name, '', "class='done'"). "</li>";
}
?>
</ul>
@@ -1,11 +0,0 @@
<div class='search-list'>
<ul>
<?php if(!$projects) echo "<li class='no-result-tip'>" . sprintf($lang->project->noMatched, $keywords) . '</li>';?>
<?php
foreach($projects as $project)
{
echo "<li>" . html::a(sprintf($link, $project->id), "<i class='icon-cube'></i> " . $project->name, '', "class='$project->status'"). "</li>";
}
?>
</ul>
</div>
-19
View File
@@ -1,19 +0,0 @@
<?php
/**
* The html template file of index method of index module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id: index.html.php 4129 2013-01-18 01:58:14Z wwccss $
*/
?>
<?php include '../../common/view/m.header.html.php';?>
</div>
<ul data-role='listview'>
<?php foreach($projectStats as $project):?>
<li><?php echo html::a($this->createLink('project', 'task', "projectID=$project->id"), $project->name)?></li>
<?php endforeach;?>
</ul>
<?php include '../../common/view/m.footer.html.php';?>
-26
View File
@@ -1,26 +0,0 @@
<?php include '../../common/view/m.header.html.php';?>
</div>
<?php $this->session->set('taskType', '');?>
<?php foreach($tasks as $task):?>
<div data-role="collapsible-set">
<div data-role="collapsible" data-collapsed="<?php echo $this->session->taskID == $task->id ? 'false' : 'true'?>" class='collapsible'>
<?php if($this->session->taskID == $task->id) echo "<script>showDetail('task', $task->id);</script>";?>
<h1 onClick="showDetail('task', <?php echo $task->id;?>)"><?php echo $task->name;?></h1>
<div><?php echo $task->desc?></div>
<div id='item<?php echo $task->id;?>'></div>
<div data-role='content' class='text-center'>
<?php
common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task);
common::printIcon('task', 'start', "taskID=$task->id", $task);
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task);
common::printIcon('task', 'finish', "taskID=$task->id", $task);
common::printIcon('task', 'close', "taskID=$task->id", $task);
common::printIcon('task', 'activate', "taskID=$task->id", $task);
?>
</div>
<?php if(end($tasks) == $task) echo "<hr />";?>
</div>
</div>
<?php endforeach;?>
<?php $pager->show('left', 'mobile')?>
<?php include '../../common/view/m.footer.html.php';?>
+9 -9
View File
@@ -106,16 +106,16 @@
$storyTasks[$story->id] > 0 ? print(html::a($tasksLink, $storyTasks[$story->id], '', 'class="iframe"')) : print(0);
?>
<td>
<?php
$bugsLink = $this->createLink('story', 'bugs', "storyID=$story->id&projectID=$project->id");
$storyBugs[$story->id] > 0 ? print(html::a($bugsLink, $storyBugs[$story->id], '', 'class="iframe"')) : print(0);
?>
<?php
$bugsLink = $this->createLink('story', 'bugs', "storyID=$story->id&projectID=$project->id");
$storyBugs[$story->id] > 0 ? print(html::a($bugsLink, $storyBugs[$story->id], '', 'class="iframe"')) : print(0);
?>
</td>
<td>
<?php
$casesLink = $this->createLink('story', 'cases', "storyID=$story->id&projectID=$project->id");
$storyCases[$story->id] > 0 ? print(html::a($casesLink, $storyCases[$story->id], '', 'class="iframe"')) : print(0);
?>
<?php
$casesLink = $this->createLink('story', 'cases', "storyID=$story->id&projectID=$project->id");
$storyCases[$story->id] > 0 ? print(html::a($casesLink, $storyCases[$story->id], '', 'class="iframe"')) : print(0);
?>
</td>
<td>
<?php
@@ -150,7 +150,7 @@
</tbody>
<tfoot>
<tr>
<td colspan='10'>
<td colspan='12'>
<div class='table-actions clearfix'>
<?php
$storyInfo = sprintf($lang->project->productStories, inlink('linkStory', "project={$project->id}"));
+6 -2
View File
@@ -18,7 +18,10 @@
<?php echo html::icon($lang->icons['test']);?> <?php echo $lang->testtask->browse;?>
</div>
<div class='actions'>
<?php common::printIcon('testtask', 'create', "product=0&project=$projectID");?>
<?php
common::printIcon('testreport', 'browse', "objectID=$projectID&objectType=project", '', 'button','flag');
common::printIcon('testtask', 'create', "product=0&project=$projectID");
?>
</div>
</div>
@@ -32,7 +35,7 @@
<th class='w-100px'><?php echo $lang->testtask->begin;?></th>
<th class='w-100px'><?php echo $lang->testtask->end;?></th>
<th class='w-80px'><?php echo $lang->statusAB;?></th>
<th class='w-100px {sorter:false}'><?php echo $lang->actions;?></th>
<th class='w-120px {sorter:false}'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
@@ -50,6 +53,7 @@
common::printIcon('testtask', 'cases', "taskID=$task->id", '', 'list', 'sitemap');
common::printIcon('testtask', 'linkCase', "taskID=$task->id", '', 'list', 'link');
common::printIcon('testtask', 'edit', "taskID=$task->id", '', 'list');
common::printIcon('testreport', 'create', "objectID=$task->id&objectType=testtask", '', 'list','flag');
if(common::hasPriv('testtask', 'delete'))
{
+1 -1
View File
@@ -128,7 +128,7 @@ class report extends control
$this->app->loadConfig('project');
$begin = $begin ? strtotime($begin) : time();
$end = $end ? strtotime($end) : time() + (7 * 24 * 3600);
$end += 24 * 2600;
$end += 24 * 3600;
$beginWeekDay = date('w', $begin);
$begin = date('Y-m-d', $begin);
$end = date('Y-m-d', $end);
+1 -1
View File
@@ -65,7 +65,7 @@ $lang->report->to = 'to';
$lang->report->taskTotal = "Total Tasks";
$lang->report->manhourTotal = "Total Man-Hour";
$lang->report->validRate = "Efficiency";
$lang->report->validRateTips = "Solution is fixed/postponed or status is resolved/closed.";
$lang->report->validRateTips = "Solution is fixed or postponed / status is resolved or closed.";
$lang->report->unplanned = 'Unplanned';
$lang->report->workday = 'Man-Hour/Day';
$lang->report->diffDays = 'Work Days';
+1 -1
View File
@@ -9,7 +9,7 @@
$list .= '|';
list($label, $module, $method, $params) = explode('|', $list);
$class = $label == $title ? ' active' : '';
echo html::a($this->createLink($module, $method, $params), $label, '', "class='list-group-item $class'");
if(common::hasPriv($module, $method)) echo html::a($this->createLink($module, $method, $params), $label, '', "class='list-group-item $class'");
}
?>
</ul>

Some files were not shown because too many files have changed in this diff Show More