This commit is contained in:
qiyu-xie
2020-08-31 13:37:59 +08:00
99 changed files with 684 additions and 811 deletions
+3 -2
View File
@@ -237,8 +237,9 @@ $config->objectTables['caselib'] = TABLE_TESTSUITE;
$config->objectTables['entry'] = TABLE_ENTRY;
$config->objectTables['webhook'] = TABLE_WEBHOOK;
$config->objectTables['risk'] = TABLE_RISK;
$config->objectTables['issue'] = TABLE_ISSUE;
/* Program privs.*/
$config->programPriv = new stdclass();
$config->programPriv->scrum = array('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'qa', 'bug', 'testcase', 'testsuite', 'testreport', 'caselib', 'doc', 'report', 'repo', 'svn', 'git', 'search', 'tree', 'file', 'jenkins', 'job', 'ci', 'branch');
$config->programPriv->cmmi = $config->programPriv->scrum + array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'milestone', 'design', 'issue', 'risk', 'auditplan', 'nc', 'cm', 'pssp');
$config->programPriv->scrum = array('product', 'story', 'productplan', 'release', 'project', 'task', 'build', 'qa', 'bug', 'testcase', 'testsuite', 'testreport', 'caselib', 'doc', 'report', 'repo', 'svn', 'git', 'search', 'tree', 'file', 'jenkins', 'job', 'ci', 'branch');
$config->programPriv->waterfall = $config->programPriv->scrum + array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'milestone', 'design', 'issue', 'risk', 'auditplan', 'nc', 'cm', 'pssp');
+2 -2
View File
@@ -223,8 +223,8 @@ INSERT INTO `zt_product` (`id`, `program`, `name`, `code`, `status`, `desc`, `PO
INSERT INTO `zt_productplan` (`id`, `product`, `title`, `desc`, `begin`, `end`, `deleted`) VALUES(1, 1, '1.0版本', '开发出企业网站1.0版本。<br />', '2000-01-01', '2015-01-01', '0');
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`,`parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(1, '0', 0, 'sprint', 'cmmi', 'single', 0, '企业网站第一期', 'coWeb1', '2012-06-05', '2012-12-04', 184, 'done', '1', '1', '开发企业网站的基本雏形。<br />', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '5', '0');
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(2, '0', 0, 'sprint', 'cmmi', 'single', 0, '企业网站第二期', 'coWebsite2', '2013-06-05', '2014-06-04', 365, 'wait', '1', '1', '', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '10', '0');
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`,`parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(1, '0', 0, 'sprint', 'waterfall', 'single', 0, '企业网站第一期', 'coWeb1', '2012-06-05', '2012-12-04', 184, 'done', '1', '1', '开发企业网站的基本雏形。<br />', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '5', '0');
INSERT INTO `zt_project` (`id`, `isCat`, `catID`, `type`, `template`, `category`, `parent`, `name`, `code`, `begin`, `end`, `days`, `status`, `statge`, `pri`, `desc`, `openedBy`, `openedDate`, `closedBy`, `closedDate`, `canceledBy`, `canceledDate`, `PO`, `PM`, `QD`, `RD`, `team`, `acl`, `whitelist`, `order`, `deleted`) VALUES(2, '0', 0, 'sprint', 'waterfall', 'single', 0, '企业网站第二期', 'coWebsite2', '2013-06-05', '2014-06-04', 365, 'wait', '1', '1', '', '', 0, '', 0, '', 0, 'productManager', 'projectManager', 'testManager', 'productManager', '公司开发团队', 'open', '', '10', '0');
INSERT INTO `zt_doclib` (`id`, `type`, `product`, `project`, `name`, `acl`, `main`) VALUES(1, 'product', 1, 0, '产品库', 'default','1');
INSERT INTO `zt_doclib` (`id`, `type`, `product`, `project`, `name`, `acl`, `main`) VALUES(2, 'product', 2, 0, '产品库', 'default', '1');
-59
View File
@@ -1390,65 +1390,6 @@ CREATE TABLE IF NOT EXISTS `zt_relation` (
`extra` char(30) NOT NULL,
UNIQUE KEY `relation` (`relation`,`AType`,`BType`, `AID`, `BID`)
) ENGINE='MyISAM' DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_repo`;
CREATE TABLE IF NOT EXISTS `zt_repo` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`program` mediumint(8) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`path` varchar(255) NOT NULL,
`prefix` varchar(100) NOT NULL,
`encoding` varchar(20) NOT NULL,
`SCM` varchar(10) NOT NULL,
`client` varchar(100) NOT NULL,
`commits` mediumint(8) unsigned NOT NULL,
`account` varchar(30) NOT NULL,
`password` varchar(30) NOT NULL,
`encrypt` varchar(30) NOT NULL DEFAULT 'plain',
`acl` text NOT NULL,
`synced` tinyint(1) NOT NULL DEFAULT '0',
`lastSync` datetime NOT NULL,
`desc` TEXT NULL,
`deleted` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_repobranch`;
CREATE TABLE IF NOT EXISTS `zt_repobranch` (
`repo` mediumint(8) unsigned NOT NULL,
`revision` mediumint(8) unsigned NOT NULL,
`branch` varchar(255) NOT NULL,
UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`),
KEY `branch` (`branch`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_repohistory`;
CREATE TABLE IF NOT EXISTS `zt_repohistory` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`repo` mediumint(9) NOT NULL,
`revision` varchar(40) NOT NULL,
`commit` mediumint(8) unsigned NOT NULL,
`comment` text NOT NULL,
`committer` varchar(100) NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `repo` (`repo`,`revision`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_repofiles`;
CREATE TABLE IF NOT EXISTS `zt_repofiles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`repo` mediumint(8) unsigned NOT NULL,
`revision` mediumint(8) unsigned NOT NULL,
`path` varchar(255) NOT NULL,
`parent` varchar(255) NOT NULL,
`type` varchar(20) NOT NULL,
`action` char(1) NOT NULL,
PRIMARY KEY (`id`),
KEY `path` (`path`),
KEY `parent` (`parent`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES
('*', '*', '*', '*', '*', '', '监控定时任务', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
('30', '23', '*', '*', '*', 'moduleName=project&methodName=computeburn', '更新燃尽图', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
+1 -1
View File
@@ -1800,7 +1800,7 @@ class baseRouter
{
global $filter;
/* Remove these two params. */
/* Remove these three params. */
unset($passedParams['pgm']);
unset($passedParams['onlybody']);
unset($passedParams['HTTP_X_REQUESTED_WITH']);
+1 -1
View File
@@ -166,7 +166,7 @@ class router extends baseRouter
if($this->session->program)
{
$template = $this->dbh->query('SELECT template FROM' . TABLE_PROJECT . "WHERE id = {$this->session->program}")->fetch();
if($template->template == 'cmmi') $projectCommon = 2;
if($template->template == 'waterfall') $projectCommon = 2;
}
$config->storyCommon = $storyCommon;
+1
View File
@@ -23,6 +23,7 @@ $config->action->objectNameFields['testreport'] = 'title';
$config->action->objectNameFields['entry'] = 'name';
$config->action->objectNameFields['webhook'] = 'name';
$config->action->objectNameFields['risk'] = 'name';
$config->action->objectNameFields['issue'] = 'title';
$config->action->commonImgSize = 870;
+1
View File
@@ -405,6 +405,7 @@ $lang->action->label->entry = '应用|entry|browse|';
$lang->action->label->webhook = 'Webhook|webhook|browse|';
$lang->action->label->space = ' ';
$lang->action->label->risk = '风险|risk|view|riskID=%s';
$lang->action->label->issue = '问题|issue|view|issueID=%s';
/* Object type. */
$lang->action->search->objectTypeList[''] = '';
+1 -2
View File
@@ -306,7 +306,7 @@ class actionModel extends model
}
$action->extra = trim(trim($action->extra), ',');
}
/* Code for cmmi. */
/* Code for waterfall. */
elseif($actionName == 'createrequirements')
{
$names = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($action->extra)->fetchPairs('id', 'title');
@@ -850,7 +850,6 @@ class actionModel extends model
if(strpos($action->objectLabel, '|') !== false)
{
list($objectLabel, $moduleName, $methodName, $vars) = explode('|', $action->objectLabel);
$action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID));
if($action->objectType == 'user') $action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectName));
$action->objectLabel = $objectLabel;
+1 -3
View File
@@ -10,9 +10,7 @@
* @link http://www.zentao.net
*/
?>
<style type='text/css'>
.table-form>tbody>tr>th{width:118px !important;}
</style>
<style>.table-form>tbody>tr>th{width:118px !important;}</style>
<?php include '../../common/view/header.html.php';?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
+12 -12
View File
@@ -15,20 +15,20 @@ $config->block->editor = new stdclass();
$config->block->editor->set = array('id' => 'html', 'tools' => 'simple');
$config->block->longBlock = array();
$config->block->longBlock['']['flowchart'] = 'flowchart';
$config->block->longBlock['']['welcome'] = 'welcome';
$config->block->longBlock['product']['statistic'] = 'statistic';
$config->block->longBlock['project']['statistic'] = 'statistic';
$config->block->longBlock['qa']['statistic'] = 'statistic';
$config->block->longBlock['program']['cmmireport'] = 'cmmireport';
$config->block->longBlock['program']['cmmiissue'] = 'cmmiissue';
$config->block->longBlock['program']['cmmirisk'] = 'cmmirisk';
$config->block->longBlock['']['flowchart'] = 'flowchart';
$config->block->longBlock['']['welcome'] = 'welcome';
$config->block->longBlock['product']['statistic'] = 'statistic';
$config->block->longBlock['project']['statistic'] = 'statistic';
$config->block->longBlock['qa']['statistic'] = 'statistic';
$config->block->longBlock['program']['waterfallreport'] = 'waterfallreport';
$config->block->longBlock['program']['waterfallissue'] = 'waterfallissue';
$config->block->longBlock['program']['waterfallrisk'] = 'waterfallrisk';
$config->block->shortBlock = array();
$config->block->shortBlock['product']['overview'] = 'overview';
$config->block->shortBlock['project']['overview'] = 'overview';
$config->block->shortBlock['program']['cmmiestimate'] = 'cmmiestimate';
$config->block->shortBlock['program']['cmmiprogress'] = 'cmmiprogress';
$config->block->shortBlock['product']['overview'] = 'overview';
$config->block->shortBlock['project']['overview'] = 'overview';
$config->block->shortBlock['program']['waterfallestimate'] = 'waterfallestimate';
$config->block->shortBlock['program']['waterfallprogress'] = 'waterfallprogress';
$config->block->shortBlock['']['contribute'] = 'contribute';
$config->statistic = new stdclass();
+40 -33
View File
@@ -206,16 +206,14 @@ class block extends control
{
if($this->loadModel('user')->isLogon()) $this->session->set('blockModule', $module);
$blocks = $this->block->getBlockList($module, $type);
$common = 'common';
if($module == 'program')
{
$program = $this->loadModel('project')->getByID($this->app->session->program);
$program = $this->loadModel('project')->getByID($this->session->program);
$common = $program->template . 'common';
$inited = empty($this->config->$module->$common->blockInited) ? '' : $this->config->$module->$common->blockInited;
}
else
{
$inited = empty($this->config->$module->common->blockInited) ? '' : $this->config->$module->common->blockInited;
}
$inited = empty($this->config->$module->$common->blockInited) ? '' : $this->config->$module->$common->blockInited;
/* Init block when vist index first. */
if((empty($blocks) and !$inited and !defined('TUTORIAL')))
@@ -724,9 +722,10 @@ class block extends control
public function printProgramBlock()
{
$this->loadModel('project');
$this->app->loadLang('project');
$this->app->loadLang('task');
$this->view->programs = $this->loadModel('program')->getUserPrograms('all', $this->params->orderBy, $this->params->num);
$this->view->programs = $this->loadModel('program')->getProgramOverview('byStatus', 'all', $this->params->orderBy, $this->params->num);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
}
@@ -781,25 +780,30 @@ class block extends control
{
if(!empty($this->params->type) and preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
/* Load models and langs. */
$this->loadModel('project');
$this->loadModel('weekly');
$this->app->loadLang('task');
$this->app->loadLang('story');
/* Set program status and count. */
$status = isset($this->params->type) ? $this->params->type : 'all';
$num = isset($this->params->num) ? (int)$this->params->num : 15;
$count = isset($this->params->num) ? (int)$this->params->num : 15;
/* Get projects. */
$programs = $this->loadModel('program')->getUserPrograms($status, 'id_desc', $num);
/* Get programs. */
$programs = $this->loadModel('program')->getProgramOverview('byStatus', $status, 'id_desc', $count);
if(empty($programs))
{
$this->view->programs = $programs;
return false;
}
$today = date('Y-m-d', strtotime(helper::today()));
$date = date('Ymd', strtotime($this->loadModel('weekly')->getThisMonday($today)));
$tasks = $this->dao->select("program, sum(consumed) as totalConsumed, sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")->from(TABLE_TASK)
$today = helper::today();
$monday = $this->loadModel('weekly')->getThisMonday($today);
$tasks = $this->dao->select("program,
sum(consumed) as totalConsumed,
sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")
->from(TABLE_TASK)
->where('program')->in(array_keys($programs))
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
@@ -813,11 +817,11 @@ class block extends control
$program->progress = $program->allStories == 0 ? 0 : round($program->doneStories / $program->allStories, 3) * 100;
$program->projects = $this->project->getProjectStats('all', 0, 0, 1, 'id_desc', null, $programID);
}
else
elseif($program->template == 'waterfall')
{
$begin = $program->begin;
$weeks = $this->weekly->getWeekPairs($begin);
$current = zget($weeks, $date, '');
$current = zget($weeks, $monday, '');
$current = substr($current, 0, -11) . substr($current, -6);
$program->pv = $this->weekly->getPV($programID, $today);
@@ -1097,21 +1101,24 @@ class block extends control
}
/**
* Print cmmi report block.
* Print waterfall report block.
*
* @access public
* @return void
*/
public function printCmmiReportBlock()
public function printWaterfallReportBlock()
{
$this->loadModel('program');
$program = $this->loadModel('project')->getByID($this->session->program);
$today = date('Y-m-d', strtotime(helper::today()));
$today = helper::today();
$date = date('Ymd', strtotime($this->loadModel('weekly')->getThisMonday($today)));
$begin = $program->begin;
$weeks = $this->weekly->getWeekPairs($begin);
$current = zget($weeks, $date, '');
$task = $this->dao->select("sum(consumed) as totalConsumed, sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")->from(TABLE_TASK)->where('program')->eq($this->session->program)
$task = $this->dao->select("
sum(consumed) as totalConsumed,
sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")
->from(TABLE_TASK)->where('program')->eq($this->session->program)
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
->fetch();
@@ -1127,12 +1134,12 @@ class block extends control
}
/**
* Print cmmi gantt block.
* Print waterfall gantt block.
*
* @access public
* @return void
*/
public function printCmmiGanttBlock()
public function printWaterfallGanttBlock()
{
$products = $this->loadModel('product')->getPairs();
$productID = isset($this->session->product) ? 0 : $this->session->product;
@@ -1144,27 +1151,27 @@ class block extends control
}
/**
* Print cmmi gantt block.
* Print waterfall issue block.
*
* @access public
* @return void
*/
public function printCmmiIssueBlock()
public function printWaterfallIssueBlock()
{
$uri = $this->app->getURI(true);
$this->session->set('riskList', $uri);
$this->session->set('issueList', $uri);
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->issues = $this->loadModel('issue')->getBlockIssues($this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->num, $this->params->orderBy);
}
/**
* Print cmmi risk block.
* Print waterfall risk block.
*
* @access public
* @return void
*/
public function printCmmiRiskBlock()
public function printWaterfallRiskBlock()
{
$uri = $this->app->getURI(true);
$this->session->set('riskList', $uri);
@@ -1173,12 +1180,12 @@ class block extends control
}
/**
* Print cmmi estimate block.
* Print waterfall estimate block.
*
* @access public
* @return void
*/
public function printCmmiEstimateBlock()
public function printWaterfallEstimateBlock()
{
$this->app->loadLang('durationestimation');
$programID = $this->session->program;
@@ -1193,12 +1200,12 @@ class block extends control
}
/**
* Print cmmi progress block.
* Print waterfall progress block.
*
* @access public
* @return void
*/
public function printCmmiProgressBlock()
public function printWaterfallProgressBlock()
{
$this->loadModel('milestone');
$this->loadModel('weekly');
@@ -1241,7 +1248,7 @@ class block extends control
public function printScrumoverallBlock()
{
$programID = $this->session->program;
$totalData = $this->loadModel('program')->getUserPrograms('all', 'id_desc', 15, $programID);
$totalData = $this->loadModel('program')->getProgramOverview('byId', $programID, 'id_desc', 15);
$this->view->totalData = $totalData;
$this->view->programID = $programID;
@@ -1703,7 +1710,7 @@ class block extends control
$num = isset($this->params->num) ? (int)$this->params->num : 15;
/* Get projects. */
$this->view->programs = $this->loadModel('program')->getUserPrograms('doing', 'id_desc', $num);
$this->view->programs = $this->loadModel('program')->getProgramOverview('byStatus', 'doing', 'id_desc', $num);
}
/**
+1 -1
View File
@@ -50,7 +50,7 @@ $lang->block->openedStories = 'The Number Of Stories Created';
$lang->block->resolvedTasks = 'The Number Of Tasks Resolved';
$lang->block->resolvedBugs = 'The Number Of Bugs Resolved';
$lang->block->openedTestcases = 'The Number Of Test Case Created';
$lang->block->cmmi = 'CMMI 3';
$lang->block->waterfall = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
+55 -55
View File
@@ -52,7 +52,7 @@ $lang->block->openedStories = 'The Number Of Stories Created';
$lang->block->resolvedTasks = 'The Number Of Tasks Resolved';
$lang->block->resolvedBugs = 'The Number Of Bugs Resolved';
$lang->block->openedTestcases = 'The Number Of Test Case Created';
$lang->block->cmmi = 'CMMI 3';
$lang->block->waterfall = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->allProject = 'All ' . $lang->projectCommon;
$lang->block->doingProject = 'Doning ' . $lang->projectCommon;
@@ -86,47 +86,47 @@ $lang->block->totalStory = 'The Total ' . $lang->storyCommon;
$lang->block->totalBug = 'The Total Bug';
$lang->block->totalRelease = 'Release The Number';
$lang->block->default['cmmi']['program']['1']['title'] = $lang->projectCommon . 'Weekly';
$lang->block->default['cmmi']['program']['1']['block'] = 'Pmmireport';
$lang->block->default['cmmi']['program']['1']['source'] = 'Program';
$lang->block->default['cmmi']['program']['1']['grid'] = 8;
$lang->block->default['waterfall']['program']['1']['title'] = $lang->projectCommon . 'Weekly';
$lang->block->default['waterfall']['program']['1']['block'] = 'Pmmireport';
$lang->block->default['waterfall']['program']['1']['source'] = 'Program';
$lang->block->default['waterfall']['program']['1']['grid'] = 8;
$lang->block->default['cmmi']['program']['2']['title'] = 'Estimate';
$lang->block->default['cmmi']['program']['2']['block'] = 'cmmiestimate';
$lang->block->default['cmmi']['program']['2']['source'] = 'program';
$lang->block->default['cmmi']['program']['2']['grid'] = 4;
$lang->block->default['waterfall']['program']['2']['title'] = 'Estimate';
$lang->block->default['waterfall']['program']['2']['block'] = 'waterfallestimate';
$lang->block->default['waterfall']['program']['2']['source'] = 'program';
$lang->block->default['waterfall']['program']['2']['grid'] = 4;
$lang->block->default['cmmi']['program']['3']['title'] = 'Plan Gantt Chart';
$lang->block->default['cmmi']['program']['3']['block'] = 'cmmigantt';
$lang->block->default['cmmi']['program']['3']['source'] = 'program';
$lang->block->default['cmmi']['program']['3']['grid'] = 8;
$lang->block->default['waterfall']['program']['3']['title'] = 'Plan Gantt Chart';
$lang->block->default['waterfall']['program']['3']['block'] = 'waterfallgantt';
$lang->block->default['waterfall']['program']['3']['source'] = 'program';
$lang->block->default['waterfall']['program']['3']['grid'] = 8;
$lang->block->default['cmmi']['program']['4']['title'] = 'Progress Chart';
$lang->block->default['cmmi']['program']['4']['block'] = 'cmmiprogress';
$lang->block->default['cmmi']['program']['4']['grid'] = 4;
$lang->block->default['waterfall']['program']['4']['title'] = 'Progress Chart';
$lang->block->default['waterfall']['program']['4']['block'] = 'waterfallprogress';
$lang->block->default['waterfall']['program']['4']['grid'] = 4;
$lang->block->default['cmmi']['program']['5']['title'] = 'Program Issue';
$lang->block->default['cmmi']['program']['5']['block'] = 'cmmiissue';
$lang->block->default['cmmi']['program']['5']['source'] = 'program';
$lang->block->default['cmmi']['program']['5']['grid'] = 8;
$lang->block->default['waterfall']['program']['5']['title'] = 'Program Issue';
$lang->block->default['waterfall']['program']['5']['block'] = 'waterfallissue';
$lang->block->default['waterfall']['program']['5']['source'] = 'program';
$lang->block->default['waterfall']['program']['5']['grid'] = 8;
$lang->block->default['cmmi']['program']['5']['params']['type'] = 'all';
$lang->block->default['cmmi']['program']['5']['params']['num'] = '15';
$lang->block->default['cmmi']['program']['5']['params']['orderBy'] = 'id_desc';
$lang->block->default['waterfall']['program']['5']['params']['type'] = 'all';
$lang->block->default['waterfall']['program']['5']['params']['num'] = '15';
$lang->block->default['waterfall']['program']['5']['params']['orderBy'] = 'id_desc';
$lang->block->default['cmmi']['program']['6']['title'] = 'Dynamic';
$lang->block->default['cmmi']['program']['6']['block'] = 'dynamic';
$lang->block->default['cmmi']['program']['6']['grid'] = 4;
$lang->block->default['cmmi']['program']['6']['source'] = '';
$lang->block->default['waterfall']['program']['6']['title'] = 'Dynamic';
$lang->block->default['waterfall']['program']['6']['block'] = 'dynamic';
$lang->block->default['waterfall']['program']['6']['grid'] = 4;
$lang->block->default['waterfall']['program']['6']['source'] = '';
$lang->block->default['cmmi']['program']['7']['title'] = $lang->projectCommon . 'Risk';
$lang->block->default['cmmi']['program']['7']['block'] = 'cmmirisk';
$lang->block->default['cmmi']['program']['7']['source'] = 'program';
$lang->block->default['cmmi']['program']['7']['grid'] = 8;
$lang->block->default['waterfall']['program']['7']['title'] = $lang->projectCommon . 'Risk';
$lang->block->default['waterfall']['program']['7']['block'] = 'waterfallrisk';
$lang->block->default['waterfall']['program']['7']['source'] = 'program';
$lang->block->default['waterfall']['program']['7']['grid'] = 8;
$lang->block->default['cmmi']['program']['7']['params']['type'] = 'all';
$lang->block->default['cmmi']['program']['7']['params']['num'] = '15';
$lang->block->default['cmmi']['program']['7']['params']['orderBy'] = 'id_desc';
$lang->block->default['waterfall']['program']['7']['params']['type'] = 'all';
$lang->block->default['waterfall']['program']['7']['params']['num'] = '15';
$lang->block->default['waterfall']['program']['7']['params']['orderBy'] = 'id_desc';
$lang->block->default['scrum']['program']['1']['title'] = $lang->projectCommon . ' Overall';
$lang->block->default['scrum']['program']['1']['block'] = 'scrumoverall';
@@ -339,14 +339,14 @@ $lang->block->modules['scrum']['index']->availableBlocks->scrumproduct = $lang-
$lang->block->modules['scrum']['index']->availableBlocks->scrumtest = 'Test Version';
$lang->block->modules['scrum']['index']->availableBlocks->scrumroadmap = $lang->productCommon . ' Rode Map';
$lang->block->modules['cmmi']['index'] = new stdclass();
$lang->block->modules['cmmi']['index']->availableBlocks = new stdclass();
$lang->block->modules['cmmi']['index']->availableBlocks->cmmireport = $lang->projectCommon . ' Weekly';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmiestimate = 'Estimate';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmigantt = 'Plan Gantt Chart';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmiprogress = 'Progress Chart';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmiissue = $lang->projectCommon . ' Issue';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmirisk = $lang->projectCommon . ' Risk';
$lang->block->modules['waterfall']['index'] = new stdclass();
$lang->block->modules['waterfall']['index']->availableBlocks = new stdclass();
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallreport = $lang->projectCommon . ' Weekly';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallestimate = 'Estimate';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallgantt = 'Plan Gantt Chart';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallprogress = 'Progress Chart';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallissue = $lang->projectCommon . ' Issue';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallrisk = $lang->projectCommon . ' Risk';
$lang->block->modules['product'] = new stdclass();
$lang->block->modules['product']->availableBlocks = new stdclass();
@@ -472,19 +472,19 @@ $lang->block->typeList->testtask['done'] = 'Done';
$lang->block->typeList->testtask['all'] = 'All';
$lang->block->modules['program']->moreLinkList = new stdclass();
$lang->block->modules['program']->moreLinkList->recentprogram = 'program|browse|';
$lang->block->modules['program']->moreLinkList->statistic = 'program|browse|';
$lang->block->modules['program']->moreLinkList->program = 'program|browse|';
$lang->block->modules['program']->moreLinkList->cmmireport = 'weekly|index|';
$lang->block->modules['program']->moreLinkList->cmmiestimate = 'workestimation|index|';
$lang->block->modules['program']->moreLinkList->cmmiissue = 'issue|browse|';
$lang->block->modules['program']->moreLinkList->cmmirisk = 'risk|browse|';
$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
$lang->block->modules['program']->moreLinkList->scrumroadmap = 'product|all|';
$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
$lang->block->modules['program']->moreLinkList->scrumproject = 'project|all|';
$lang->block->modules['program']->moreLinkList->scrumdynamic = 'company|dynamic|';
$lang->block->modules['program']->moreLinkList->recentprogram = 'program|browse|';
$lang->block->modules['program']->moreLinkList->statistic = 'program|browse|';
$lang->block->modules['program']->moreLinkList->program = 'program|browse|';
$lang->block->modules['program']->moreLinkList->waterfallreport = 'weekly|index|';
$lang->block->modules['program']->moreLinkList->waterfallestimate = 'workestimation|index|';
$lang->block->modules['program']->moreLinkList->waterfallissue = 'issue|browse|';
$lang->block->modules['program']->moreLinkList->waterfallrisk = 'risk|browse|';
$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
$lang->block->modules['program']->moreLinkList->scrumroadmap = 'product|all|';
$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
$lang->block->modules['program']->moreLinkList->scrumproject = 'project|all|';
$lang->block->modules['program']->moreLinkList->scrumdynamic = 'company|dynamic|';
$lang->block->modules['product']->moreLinkList = new stdclass();
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&line=0&status=%s';
+1 -1
View File
@@ -50,7 +50,7 @@ $lang->block->openedStories = 'The Number Of Stories Created';
$lang->block->resolvedTasks = 'The Number Of Tasks Resolved';
$lang->block->resolvedBugs = 'The Number Of Bugs Resolved';
$lang->block->openedTestcases = 'The Number Of Test Case Created';
$lang->block->cmmi = 'CMMI 3';
$lang->block->waterfall = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
+1 -1
View File
@@ -50,7 +50,7 @@ $lang->block->openedStories = 'The Number Of Stories Created';
$lang->block->resolvedTasks = 'The Number Of Tasks Resolved';
$lang->block->resolvedBugs = 'The Number Of Bugs Resolved';
$lang->block->openedTestcases = 'The Number Of Test Case Created';
$lang->block->cmmi = 'CMMI 3';
$lang->block->waterfall = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
+57 -57
View File
@@ -36,7 +36,7 @@ $lang->block->done = '已完成';
$lang->block->lblFlowchart = '流程图';
$lang->block->welcome = '欢迎总览';
$lang->block->lblTesttask = '查看测试详情';
$lang->block->contribute = '个人贡献';
$lang->block->contribute = '我的贡献';
$lang->block->leftToday = '今天剩余工作总计';
$lang->block->myTask = '我的任务';
@@ -52,7 +52,7 @@ $lang->block->openedStories = '创建的需求数';
$lang->block->resolvedTasks = '完成的任务数';
$lang->block->resolvedBugs = '解决Bug数';
$lang->block->openedTestcases = '创建用例数';
$lang->block->cmmi = 'CMMI 3';
$lang->block->waterfall = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->allProject = '所有' . $lang->projectCommon;
$lang->block->doingProject = '进行中的' . $lang->projectCommon;
@@ -62,6 +62,7 @@ $lang->block->consumedHours = '已消耗';
$lang->block->time = '第';
$lang->block->week = '周';
$lang->block->month = '月';
$lang->block->selectProduct = '选择产品';
$lang->block->params = new stdclass();
$lang->block->params->name = '参数名称';
@@ -92,48 +93,47 @@ $lang->block->spent = '已花费';
$lang->block->budget = '预算';
$lang->block->left = '剩余';
$lang->block->default['waterfall']['program']['1']['title'] = '项目周报';
$lang->block->default['waterfall']['program']['1']['block'] = 'waterfallreport';
$lang->block->default['waterfall']['program']['1']['source'] = 'program';
$lang->block->default['waterfall']['program']['1']['grid'] = 8;
$lang->block->default['cmmi']['program']['1']['title'] = '项目周报';
$lang->block->default['cmmi']['program']['1']['block'] = 'cmmireport';
$lang->block->default['cmmi']['program']['1']['source'] = 'program';
$lang->block->default['cmmi']['program']['1']['grid'] = 8;
$lang->block->default['waterfall']['program']['2']['title'] = '估算';
$lang->block->default['waterfall']['program']['2']['block'] = 'waterfallestimate';
$lang->block->default['waterfall']['program']['2']['source'] = 'program';
$lang->block->default['waterfall']['program']['2']['grid'] = 4;
$lang->block->default['cmmi']['program']['2']['title'] = '估算';
$lang->block->default['cmmi']['program']['2']['block'] = 'cmmiestimate';
$lang->block->default['cmmi']['program']['2']['source'] = 'program';
$lang->block->default['cmmi']['program']['2']['grid'] = 4;
$lang->block->default['waterfall']['program']['3']['title'] = '项目计划';
$lang->block->default['waterfall']['program']['3']['block'] = 'waterfallgantt';
$lang->block->default['waterfall']['program']['3']['source'] = 'program';
$lang->block->default['waterfall']['program']['3']['grid'] = 8;
$lang->block->default['cmmi']['program']['3']['title'] = '计划甘特图';
$lang->block->default['cmmi']['program']['3']['block'] = 'cmmigantt';
$lang->block->default['cmmi']['program']['3']['source'] = 'program';
$lang->block->default['cmmi']['program']['3']['grid'] = 8;
$lang->block->default['waterfall']['program']['4']['title'] = '到目前为止项目进展趋势图';
$lang->block->default['waterfall']['program']['4']['block'] = 'waterfallprogress';
$lang->block->default['waterfall']['program']['4']['grid'] = 4;
$lang->block->default['cmmi']['program']['4']['title'] = '到目前为止项目进展趋势图';
$lang->block->default['cmmi']['program']['4']['block'] = 'cmmiprogress';
$lang->block->default['cmmi']['program']['4']['grid'] = 4;
$lang->block->default['waterfall']['program']['5']['title'] = '项目问题';
$lang->block->default['waterfall']['program']['5']['block'] = 'waterfallissue';
$lang->block->default['waterfall']['program']['5']['source'] = 'program';
$lang->block->default['waterfall']['program']['5']['grid'] = 8;
$lang->block->default['cmmi']['program']['5']['title'] = '项目问题';
$lang->block->default['cmmi']['program']['5']['block'] = 'cmmiissue';
$lang->block->default['cmmi']['program']['5']['source'] = 'program';
$lang->block->default['cmmi']['program']['5']['grid'] = 8;
$lang->block->default['waterfall']['program']['5']['params']['type'] = 'all';
$lang->block->default['waterfall']['program']['5']['params']['num'] = '15';
$lang->block->default['waterfall']['program']['5']['params']['orderBy'] = 'id_desc';
$lang->block->default['cmmi']['program']['5']['params']['type'] = 'all';
$lang->block->default['cmmi']['program']['5']['params']['num'] = '15';
$lang->block->default['cmmi']['program']['5']['params']['orderBy'] = 'id_desc';
$lang->block->default['waterfall']['program']['6']['title'] = '最新动态';
$lang->block->default['waterfall']['program']['6']['block'] = 'scrumdynamic';
$lang->block->default['waterfall']['program']['6']['grid'] = 4;
$lang->block->default['waterfall']['program']['6']['source'] = 'program';
$lang->block->default['cmmi']['program']['6']['title'] = '最新动态';
$lang->block->default['cmmi']['program']['6']['block'] = 'scrumdynamic';
$lang->block->default['cmmi']['program']['6']['grid'] = 4;
$lang->block->default['cmmi']['program']['6']['source'] = 'program';
$lang->block->default['waterfall']['program']['7']['title'] = '项目风险';
$lang->block->default['waterfall']['program']['7']['block'] = 'waterfallrisk';
$lang->block->default['waterfall']['program']['7']['source'] = 'program';
$lang->block->default['waterfall']['program']['7']['grid'] = 8;
$lang->block->default['cmmi']['program']['7']['title'] = '项目风险';
$lang->block->default['cmmi']['program']['7']['block'] = 'cmmirisk';
$lang->block->default['cmmi']['program']['7']['source'] = 'program';
$lang->block->default['cmmi']['program']['7']['grid'] = 8;
$lang->block->default['cmmi']['program']['7']['params']['type'] = 'all';
$lang->block->default['cmmi']['program']['7']['params']['num'] = '15';
$lang->block->default['cmmi']['program']['7']['params']['orderBy'] = 'id_desc';
$lang->block->default['waterfall']['program']['7']['params']['type'] = 'all';
$lang->block->default['waterfall']['program']['7']['params']['num'] = '15';
$lang->block->default['waterfall']['program']['7']['params']['orderBy'] = 'id_desc';
$lang->block->default['scrum']['program']['1']['title'] = '项目整体情况';
$lang->block->default['scrum']['program']['1']['block'] = 'scrumoverall';
@@ -276,7 +276,7 @@ $lang->block->default['full']['my']['4']['block'] = 'statistic';
$lang->block->default['full']['my']['4']['source'] = 'program';
$lang->block->default['full']['my']['4']['grid'] = 8;
$lang->block->default['full']['my']['5']['title'] = '个人贡献';
$lang->block->default['full']['my']['5']['title'] = '我的贡献';
$lang->block->default['full']['my']['5']['block'] = 'contribute';
$lang->block->default['full']['my']['5']['source'] = '';
$lang->block->default['full']['my']['5']['grid'] = 4;
@@ -346,14 +346,14 @@ $lang->block->modules['scrum']['index']->availableBlocks->scrumproject = $lang-
$lang->block->modules['scrum']['index']->availableBlocks->scrumproduct = $lang->productCommon . '总览';
$lang->block->modules['scrum']['index']->availableBlocks->scrumtest = '待测版本';
$lang->block->modules['cmmi']['index'] = new stdclass();
$lang->block->modules['cmmi']['index']->availableBlocks = new stdclass();
$lang->block->modules['cmmi']['index']->availableBlocks->cmmireport = '项目周报';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmiestimate = '估算';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmigantt = '计划甘特图';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmiprogress = '到目前为止项目进展趋势图';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmiissue = '项目问题';
$lang->block->modules['cmmi']['index']->availableBlocks->cmmirisk = '项目风险';
$lang->block->modules['waterfall']['index'] = new stdclass();
$lang->block->modules['waterfall']['index']->availableBlocks = new stdclass();
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallreport = '项目周报';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallestimate = '估算';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallgantt = '计划甘特图';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallprogress = '到目前为止项目进展趋势图';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallissue = '项目问题';
$lang->block->modules['waterfall']['index']->availableBlocks->waterfallrisk = '项目风险';
$lang->block->modules['product'] = new stdclass();
$lang->block->modules['product']->availableBlocks = new stdclass();
@@ -479,18 +479,18 @@ $lang->block->typeList->testtask['done'] = '已测版本';
$lang->block->typeList->testtask['all'] = '全部';
$lang->block->modules['program']->moreLinkList = new stdclass();
$lang->block->modules['program']->moreLinkList->recentprogram = 'program|browse|';
$lang->block->modules['program']->moreLinkList->statistic = 'program|browse|';
$lang->block->modules['program']->moreLinkList->program = 'program|browse|';
$lang->block->modules['program']->moreLinkList->cmmireport = 'weekly|index|';
$lang->block->modules['program']->moreLinkList->cmmiestimate = 'workestimation|index|';
$lang->block->modules['program']->moreLinkList->cmmiissue = 'issue|browse|';
$lang->block->modules['program']->moreLinkList->cmmirisk = 'risk|browse|';
$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
$lang->block->modules['program']->moreLinkList->scrumproject = 'project|all|';
$lang->block->modules['program']->moreLinkList->scrumdynamic = 'company|dynamic|';
$lang->block->modules['program']->moreLinkList->recentprogram = 'program|browse|';
$lang->block->modules['program']->moreLinkList->statistic = 'program|browse|';
$lang->block->modules['program']->moreLinkList->program = 'program|browse|';
$lang->block->modules['program']->moreLinkList->waterfallreport = 'weekly|index|';
$lang->block->modules['program']->moreLinkList->waterfallestimate = 'workestimation|index|';
$lang->block->modules['program']->moreLinkList->waterfallissue = 'issue|browse|';
$lang->block->modules['program']->moreLinkList->waterfallrisk = 'risk|browse|';
$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
$lang->block->modules['program']->moreLinkList->scrumproject = 'project|all|';
$lang->block->modules['program']->moreLinkList->scrumdynamic = 'company|dynamic|';
$lang->block->modules['product']->moreLinkList = new stdclass();
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&line=0&status=%s';
+1 -1
View File
@@ -50,7 +50,7 @@ $lang->block->openedStories = '創建的需求數';
$lang->block->resolvedTasks = '完成的任務數';
$lang->block->resolvedBugs = '解決Bug數';
$lang->block->openedTestcases = '創建用例數';
$lang->block->cmmi = 'CMMI 3';
$lang->block->waterfall = 'CMMI 3';
$lang->block->scrum = 'Scrum+';
$lang->block->params = new stdclass();
+10 -10
View File
@@ -59,7 +59,7 @@ class blockModel extends model
unset($_SESSION['album'][$uid]);
}
if(strpos($data->block, 'cmmi') !== false) $data->type = 'cmmi';
if(strpos($data->block, 'waterfall') !== false) $data->type = 'waterfall';
if(strpos($data->block, 'scrum') !== false) $data->type = 'scrum';
$data->params = helper::jsonEncode($data->params);
$this->dao->replace(TABLE_BLOCK)->data($data)->exec();
@@ -628,12 +628,12 @@ class blockModel extends model
}
/**
* Get cmmi program report pararms.
* Get waterfall program report pararms.
*
* @access public
* @return string
*/
public function getCmmireportParams()
public function getWaterfallreportParams()
{
return false;
}
@@ -644,7 +644,7 @@ class blockModel extends model
* @access public
* @return string
*/
public function getCmmiestimateParams()
public function getWaterfallestimateParams()
{
return false;
}
@@ -655,7 +655,7 @@ class blockModel extends model
* @access public
* @return string
*/
public function getCmmiganttParams()
public function getWaterfallganttParams()
{
return false;
}
@@ -666,19 +666,19 @@ class blockModel extends model
* @access public
* @return string
*/
public function getCmmiprogressParams()
public function getWaterfallprogressParams()
{
return false;
}
/**
* Get cmmi issue params.
* Get waterfall issue params.
*
* @param string $module
* @access public
* @return void
*/
public function getCmmiissueParams($module = '')
public function getWaterfallissueParams($module = '')
{
$this->app->loadLang('issue');
$params = new stdclass();
@@ -698,13 +698,13 @@ class blockModel extends model
}
/**
* Get cmmi risk params.
* Get waterfall risk params.
*
* @param string $module▫
* @access public
* @return void
*/
public function getCmmiriskParams($module = '')
public function getWaterfallriskParams($module = '')
{
$this->app->loadLang('risk');
$params = new stdclass();
@@ -191,7 +191,7 @@ $(function()
</div>
<?php else:?>
<div class="actions">
<?php common::printLink('program', 'createguide', '', "<i class='icon icon-plus'></i>" . $lang->project->create, '', "class='btn btn-info' data-toggle='modal' data-type='ajax'");?>
<?php common::printLink('project', 'create', '', "<i class='icon icon-plus'></i>" . $lang->project->create, '', "class='btn btn-info'");?>
</div>
<?php endif;?>
<div class="type-info">
+1 -1
View File
@@ -11,7 +11,7 @@
*/
?>
<?php if(empty($projectStats)): ?>
<div class='empty-tip'><?php common::printLink('program', 'createguide', '', "<i class='icon-plus'></i> " . $lang->project->create, '', "class='btn btn-primary' data-toggle='modal' data-type='ajax'")?></div>
<div class='empty-tip'><?php common::printLink('project', 'create', '', "<i class='icon-plus'></i> " . $lang->project->create, '', "class='btn btn-primary'")?></div>
<?php else:?>
<div class="panel-body has-table scrollbar-hover">
<table class='table table-borderless table-hover table-fixed table-fixed-head tablesorter block-projects tablesorter'>
@@ -37,8 +37,8 @@
<div class='panel-heading'>
<?php $parentName = $program->parentName ? $program->parentName . '/' : '';?>
<strong class='program-name' title='<?php echo $parentName . $program->name;?>'> <?php echo html::a($this->createLink('program', 'index', "programID=$program->id", '', '', $program->id), $parentName . $program->name);?> </strong>
<?php if($program->template === 'cmmi'): ?>
<span class='program-type-label label label-warning label-outline'><?php echo $lang->program->cmmi; ?></span>
<?php if($program->template === 'waterfall'): ?>
<span class='program-type-label label label-warning label-outline'><?php echo $lang->program->waterfall; ?></span>
<?php else: ?>
<span class='program-type-label label label-info label-outline'><?php echo $lang->program->scrum; ?></span>
<?php endif; ?>
@@ -64,7 +64,7 @@
<span><i class='icon icon-clock'></i> <?php printf($lang->program->hoursUnit, $program->estimate); ?></span>
<span><i class='icon icon-cost'></i> <?php echo $program->budget . '' . zget($lang->program->unitList, $program->budgetUnit);?></span>
</div>
<?php if($program->template === 'cmmi'): ?>
<?php if($program->template === 'waterfall'): ?>
<div class='program-detail program-stages'>
<p class='text-muted'><?php echo $lang->program->ongoingStage; ?></p>
<?php
+1 -1
View File
@@ -20,7 +20,7 @@
<div class="col-4 text-middle text-center">
<div class="tile">
<div class="tile-title"><?php echo $lang->block->allProject;?></div>
<?php $projectLink = $this->createLink('project', 'index', 'locate=no')?>
<?php $projectLink = $this->createLink('project', 'all', 'status=all')?>
<div class="tile-amount"><?php echo $summary->total ? html::a($projectLink, $summary->total) : 0;?></div>
</div>
</div>
@@ -1,4 +1,4 @@
<style> .block-cmmiestimate table{margin-bottom: 15px} </style>
<style> .block-waterfallestimate table{margin-bottom: 15px} </style>
<table class='table table-data'>
<tr>
<th class='w-100px'><?php echo $lang->durationestimation->people;?></th>
@@ -1,7 +1,8 @@
<div class="panel-body">
<div id='cmmiGantt'>
<div id='waterfallGantt'>
<?php if(count($products) >= 2): ?>
<?php echo html::select('cmmiGanttProductID', $products, $productID, "class='form-control chosen'"); ?>
<?php echo html::select('waterfallGanttProductID', $products, $productID, "class='form-control chosen'");?>
<span id="ganttProductTips"><i>* </i><?php echo $lang->block->selectProduct;?></span>
<?php endif;?>
<?php if(empty($plans['data'])): ?>
<div class='empty-tip'><?php echo $lang->programplan->noData;?></div>
@@ -10,19 +11,22 @@
<div class='gantt-plans pull-left'></div>
<div class='gantt-container scrollbar-hover'>
<div class='gantt-canvas'>
<div class='gantt-today'><div><?php echo $lang->programplan->today; ?></div></div>
<div class='gantt-today'><div><?php echo $lang->programplan->today; ?></div></div>
</div>
</div>
</div>
<?php endif;?>
</div>
<style>
.block-cmmigantt > .panel-body {overflow: visible!important}
#cmmiGantt {position: relative}
#cmmiGanttProductID_chosen {position: absolute; top: -39px; left: 120px; width: 150px!important}
[lang="zh-cn"] #cmmiGanttProductID_chosen {left: 85px}
#ganttProductTips{position: absolute; top: -32px; left: 240px; opacity: 0.5;}
#ganttProductTips i{vertical-align: middle;}
.block-waterfallgantt > .panel-body {overflow: visible!important}
#waterfallGantt {position: relative}
#waterfallGanttProductID_chosen {position: absolute; top: -39px; left: 120px; width: 150px!important}
[lang="zh-cn"] #waterfallGanttProductID_chosen {left: 85px}
.gantt-plans {padding: 20px 0 22px; max-height: 380px; overflow: hidden;}
.gantt-plan {margin-top: 10px; line-height: 20px}
.gantt-plan {width: 70px; height: 50px; line-height: 50px}
.gantt-plan div {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.gantt-container {position: absolute; left: 100px; top: 0; right: 0; bottom: -10px; overflow: auto; padding-top: 20px; max-height: 380px;}
.gantt-canvas {border: 1px solid #dddee4; border-style: solid dotted; position: relative}
.gantt-row {height: 50px; position: relative; z-index: 1}
@@ -36,15 +40,15 @@
.gantt-today > div {position: absolute; top: 0; left: 0; font-size: 12px; line-height: 14px; padding: 0 3px; background: #00da88; color: #fff; white-space: nowrap; z-index: 10;}
</style>
<script>
function initCmmiGanttBlock()
function initWaterfallGanttBlock()
{
/* Init product select control */
var $cmmiGanttProductID = $('#cmmiGanttProductID');
$cmmiGanttProductID.on('change', function()
var $waterfallGanttProductID = $('#waterfallGanttProductID');
$waterfallGanttProductID.on('change', function()
{
$.get(createLink('product', 'ajaxSetState', 'productID=' + $cmmiGanttProductID.val()), function()
$.get(createLink('product', 'ajaxSetState', 'productID=' + $waterfallGanttProductID.val()), function()
{
refreshBlock($cmmiGanttProductID.closest('.panel'));
refreshBlock($waterfallGanttProductID.closest('.panel'));
});
});
@@ -58,7 +62,7 @@
var startDatetime = Number.MAX_SAFE_INTEGER;
var endDatetime = 0;
var minTimeGap = Number.MAX_SAFE_INTEGER;
var $gantt = $('#cmmiGantt');
var $gantt = $('#waterfallGantt');
var ONE_DAY = 24 * 3600 * 1000;
var TIME_GAP_STEP = 7;
var MIN_COL_WIDTH = 60;
@@ -108,8 +112,7 @@
{
plan.progress = !plan.tasks.length ? 0 : plan.progress / plan.tasks.length;
var $plan = $('<div class="gantt-plan"></div>');
$plan.append('<div class="strong">' + plan.text + '</div>');
$plan.append('<div class="text-muted small"><?php echo $lang->programplan->planPercent?> ' + plan.percent + '%</div>');
$plan.append('<div class="strong" title="' + plan.text + '">' + plan.text + '</div>');
$plans.append($plan);
var $bar = $('<div class="gantt-bar"></div>');
@@ -197,6 +200,6 @@
<?php endif;?>
}
initCmmiGanttBlock();
initWaterfallGanttBlock();
</script>
</div>
@@ -1,7 +1,7 @@
<div class="panel-body">
<style>
.block-cmmiprogress .milestone-chart {box-shadow: none}
.block-cmmiprogress .milestone-chart.has-scrollbar {margin-bottom: -10px}
.block-waterfallprogress .milestone-chart {box-shadow: none}
.block-waterfallprogress .milestone-chart.has-scrollbar {margin-bottom: -10px}
</style>
<div class='milestone-chart' id='milestoneChart'>
<div class='chart-canvas scrollbar-hover'>
@@ -1,15 +1,15 @@
<style>
.block-cmmireport .col-left {width: 25%; text-align: center}
.block-cmmireport .col-right{width: 75%;}
.block-cmmireport .panel-body{padding-top: 0px;}
.block-cmmireport .table-row{margin-bottom: 20px;}
.block-cmmireport .stage{position: absolute; top: 14px; left: 90px;}
.block-cmmireport .col-right .tiles { padding: 10px 0 0 16px; }
.block-cmmireport .col-right .tile { width: 20%;}
.block-cmmireport .col-right .tile .tile-title{font-weight: 700;}
.block-cmmireport .progress {position: absolute; left: 45px; top: 90px; right: 40px;}
.block-cmmireport .progress-num{font-size: 26px; font-weight: 700}
.block-cmmireport .col-right .tile-amount{font-size: 22px; font-weight: 700}
.block-waterfallreport .col-left {width: 25%; text-align: center}
.block-waterfallreport .col-right{width: 75%;}
.block-waterfallreport .panel-body{padding-top: 0px;}
.block-waterfallreport .table-row{margin-bottom: 20px;}
.block-waterfallreport .stage{position: absolute; top: 14px; left: 90px;}
.block-waterfallreport .col-right .tiles { padding: 10px 0 0 16px; }
.block-waterfallreport .col-right .tile { width: 20%;}
.block-waterfallreport .col-right .tile .tile-title{font-weight: 700;}
.block-waterfallreport .progress {position: absolute; left: 45px; top: 90px; right: 40px;}
.block-waterfallreport .progress-num{font-size: 26px; font-weight: 700}
.block-waterfallreport .col-right .tile-amount{font-size: 22px; font-weight: 700}
</style>
<div class="panel-move-handler"><span class='stage text-muted'><?php echo $current;?></span></div>
+2 -2
View File
@@ -36,7 +36,7 @@ class bugModel extends model
if($isMobile)
{
$this->app->loadLang('qa');
$pageNav = html::a(helper::createLink('qa', 'index', ''), $this->lang->qa->index) . $this->lang->colon;
$pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
else
{
@@ -2680,7 +2680,7 @@ class bugModel extends model
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true);
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true);
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
common::printIcon('bug', 'edit', $params, $bug, 'list', '', '', '', '');
common::printIcon('bug', 'edit', $params, $bug, 'list');
common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy');
break;
}
+1 -1
View File
@@ -29,7 +29,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
echo $moduleName;
if($moduleID)
{
$removeLink = $browseType == 'bymodule' ? $this->createLink('bug', 'browse', "productID=$productID&branch=$branch&browseType=$browseType&param=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("bugModule")';
$removeLink = $browseType == 'bymodule' ? inlink('browse', "productID=$productID&branch=$branch&browseType=$browseType&param=0&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("bugModule")';
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
}
?>
+1 -1
View File
@@ -159,7 +159,7 @@ if(isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum')
$lang->system->menu->holiday = array('link' => 'Holiday|holiday|browse|');
$lang->system->menu->custom = array('link' => 'Custom|custom|concept|');
$lang->system->subMenu->setmodel->cmmi ='cmmi|custom|setcmmi|';
$lang->system->subMenu->setmodel->waterfall ='waterfall|custom|setwaterfall|';
$lang->mainNav->system = '<i class="icon icon-menu-users"></i> System|subject|settips|';
unset($lang->system->dividerMenu);
}
+18 -18
View File
@@ -1,23 +1,23 @@
<?php
/* Sort of main menu. */
$lang->cmmipgm = new stdclass();
$lang->cmmipgm->menuOrder[5] = 'programindex';
$lang->cmmipgm->menuOrder[10] = 'programplan';
$lang->cmmipgm->menuOrder[15] = 'project';
$lang->cmmipgm->menuOrder[20] = 'weekly';
$lang->cmmipgm->menuOrder[25] = 'review';
$lang->cmmipgm->menuOrder[30] = 'doc';
$lang->cmmipgm->menuOrder[35] = 'product';
$lang->cmmipgm->menuOrder[40] = 'design';
$lang->cmmipgm->menuOrder[45] = 'ci';
$lang->cmmipgm->menuOrder[50] = 'qa';
$lang->cmmipgm->menuOrder[55] = 'release';
$lang->cmmipgm->menuOrder[60] = 'issue';
$lang->cmmipgm->menuOrder[65] = 'risk';
$lang->cmmipgm->menuOrder[70] = 'report';
$lang->cmmipgm->menuOrder[75] = 'auditplan';
$lang->cmmipgm->menuOrder[80] = 'cm';
$lang->cmmipgm->menuOrder[85] = 'list';
$lang->waterfallpgm = new stdclass();
$lang->waterfallpgm->menuOrder[5] = 'programindex';
$lang->waterfallpgm->menuOrder[10] = 'programplan';
$lang->waterfallpgm->menuOrder[15] = 'project';
$lang->waterfallpgm->menuOrder[20] = 'weekly';
$lang->waterfallpgm->menuOrder[25] = 'review';
$lang->waterfallpgm->menuOrder[30] = 'doc';
$lang->waterfallpgm->menuOrder[35] = 'product';
$lang->waterfallpgm->menuOrder[40] = 'design';
$lang->waterfallpgm->menuOrder[45] = 'ci';
$lang->waterfallpgm->menuOrder[50] = 'qa';
$lang->waterfallpgm->menuOrder[55] = 'release';
$lang->waterfallpgm->menuOrder[60] = 'issue';
$lang->waterfallpgm->menuOrder[65] = 'risk';
$lang->waterfallpgm->menuOrder[70] = 'report';
$lang->waterfallpgm->menuOrder[75] = 'auditplan';
$lang->waterfallpgm->menuOrder[80] = 'cm';
$lang->waterfallpgm->menuOrder[85] = 'list';
$lang->scrumpgm = new stdclass();
$lang->scrumpgm->menuOrder[5] = 'program';
+26 -26
View File
@@ -797,33 +797,33 @@ $lang->icons['score'] = 'tint';
include (dirname(__FILE__) . '/menuOrder.php');
/* Cmmi menu. */
$lang->menu->cmmi = new stdclass();
$lang->menu->cmmi->programindex = array('link' => '仪表盘|program|index|program={PROGRAM}');
$lang->menu->cmmi->programplan = array('link' => '计划|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
$lang->menu->cmmi->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
$lang->menu->cmmi->weekly = array('link' => '报告|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
$lang->menu->cmmi->doc = array('link' => '文档|doc|index|program={PROGRAM}');
$lang->menu->cmmi->product = array('link' => '需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=requirement', 'subModule' => ',story,');
$lang->menu->cmmi->design = '设计|design|browse|product={PRODUCT}';
$lang->menu->cmmi->ci = '代码|repo|browse|';
$lang->menu->cmmi->qa = array('link' => '测试|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$lang->menu->cmmi->release = array('link' => '发布|release|browse|product={PRODUCT}', 'subModule' => 'release');
$lang->menu->cmmi->issue = '问题|issue|browse|';
$lang->menu->cmmi->risk = '风险|risk|browse|';
$lang->menu->cmmi->list = array('link' => '更多|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover cmmi-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
/* Waterfall menu. */
$lang->menu->waterfall = new stdclass();
$lang->menu->waterfall->programindex = array('link' => '仪表盘|program|index|program={PROGRAM}');
$lang->menu->waterfall->programplan = array('link' => '计划|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|program={PROGRAM}');
$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=requirement', 'subModule' => ',story,');
$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = '代码|repo|browse|';
$lang->menu->waterfall->qa = array('link' => '测试|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$lang->menu->waterfall->release = array('link' => '发布|release|browse|product={PRODUCT}', 'subModule' => 'release');
$lang->menu->waterfall->issue = '问题|issue|browse|';
$lang->menu->waterfall->risk = '风险|risk|browse|';
$lang->menu->waterfall->list = array('link' => '更多|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
/* Srcum menu. */
$lang->menu->srcum = new stdclass();
$lang->menu->srcum->programindex = array('link' => '仪表盘|program|index|program={PROGRAM}');
$lang->cmmi = new stdclass();
$lang->cmmi->subMenu = new stdclass();
$lang->cmmi->subMenu->list = new stdclass();
$lang->cmmi->subMenu->list->workestimation = array('link' => '估算|workestimation|index|program=%s', 'subModule' => 'durationestimation,budget');
$lang->cmmi->subMenu->list->program = '项目|program|edit|';
$lang->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
$lang->waterfall->subMenu->list = new stdclass();
$lang->waterfall->subMenu->list->workestimation = array('link' => '估算|workestimation|index|program=%s', 'subModule' => 'durationestimation,budget');
$lang->waterfall->subMenu->list->program = '项目|program|edit|';
$lang->cmmiproduct = new stdclass();
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
@@ -846,7 +846,7 @@ $lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->cmmiproduct->menu = new stdclass();
$lang->waterfallproduct->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
$lang->cm->menu = new stdclass();
@@ -866,10 +866,10 @@ $lang->budget->menu = $lang->workestimation->menu;
$lang->programplan->menu->gantt = array('link' => '甘特图|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=gantt');
$lang->programplan->menu->lists = array('link' => '阶段列表|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create');
$lang->cmmiproduct->menu->plan = array('link' => '排期|productplan|browse|productID={PRODUCT}', 'subModule' => 'productplan');
$lang->cmmiproduct->menu->requirement = '用户需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=requirement';
$lang->cmmiproduct->menu->story = '软件需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=story';
$lang->cmmiproduct->menu->track = '跟踪矩阵|story|track|product={PRODUCT}';
$lang->waterfallproduct->menu->plan = array('link' => '排期|productplan|browse|productID={PRODUCT}', 'subModule' => 'productplan');
$lang->waterfallproduct->menu->requirement = '用户需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=requirement';
$lang->waterfallproduct->menu->story = '软件需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=story';
$lang->waterfallproduct->menu->track = '跟踪矩阵|story|track|product={PRODUCT}';
$lang->nc->menu = $lang->auditplan->menu;
+20 -39
View File
@@ -189,6 +189,9 @@ class commonModel extends model
/**
* Deny access.
*
* @param varchar $module
* @param varchar $method
* @param bool $reload
* @access public
* @return mixed
*/
@@ -430,13 +433,13 @@ class commonModel extends model
$moduleName = $app->getModuleName();
$methodName = $app->getMethodName();
foreach($lang->menu->cmmi as $key => $menu)
foreach($lang->menu->waterfall as $key => $menu)
{
/* Replace for dropdown submenu. */
if(isset($lang->cmmi->subMenu->$key))
if(isset($lang->waterfall->subMenu->$key))
{
$programSubMenu = $lang->cmmi->subMenu->$key;
$subMenu = common::createSubMenu($lang->cmmi->subMenu->$key, $app->session->program);
$programSubMenu = $lang->waterfall->subMenu->$key;
$subMenu = common::createSubMenu($programSubMenu, $app->session->program);
if(!empty($subMenu))
{
@@ -446,13 +449,14 @@ class commonModel extends model
$isActive['method'] = ($moduleName == strtolower($menu->link['module']) and $methodName == strtolower($menu->link['method']));
$isActive['alias'] = ($moduleName == strtolower($menu->link['module']) and (is_array($itemMenu) and isset($itemMenu['alias']) and strpos($itemMenu['alias'], $methodName) !== false));
$isActive['subModule'] = (is_array($itemMenu) and isset($itemMenu['subModule']) and strpos($itemMenu['subModule'], $moduleName) !== false);
if($isActive['method'] or $isActive['alias'] or $isActive['subModule'])
{
$lang->menu->cmmi->{$key}['link'] = $menu->text . "|" . join('|', $menu->link);
$lang->menu->waterfall->{$key}['link'] = $menu->text . "|" . join('|', $menu->link);
break;
}
}
$lang->menu->cmmi->{$key}['subMenu'] = $subMenu;
$lang->menu->waterfall->{$key}['subMenu'] = $subMenu;
}
}
}
@@ -1709,7 +1713,7 @@ EOD;
/* If priv way is reset, unset common program priv, and cover by program priv. */
foreach($rights as $moduleKey => $methods)
{
if(in_array($moduleKey, $this->config->programPriv->cmmi)) unset($rights[$moduleKey]);
if(in_array($moduleKey, $this->config->programPriv->waterfall)) unset($rights[$moduleKey]);
}
$this->app->user->rights['rights'] = array_merge($rights, $programRightGroup);
@@ -2122,31 +2126,8 @@ EOD;
}
if($group == 'system')
{
foreach($lang->system->menu as $key => $menu)
{
self::setMenuVars($lang->system->menu, $key, $menu);
if(isset($lang->system->subMenu->{$key}))
{
$subMenu = self::createSubMenu($lang->system->subMenu->{$key}, $menu);
if(!empty($subMenu))
{
foreach($subMenu as $menu)
{
if(($moduleName == strtolower($menu->link['module']) and $methodName == strtolower($menu->link['method'])))
{
$lang->system->menu->{$key}['link'] = $menu->text . "|" . join('|', $menu->link);
break;
}
}
$lang->system->menu->{$key}['subMenu'] = $subMenu;
}
}
}
$lang->menu = $lang->system->menu;
$lang->menuOrder = $lang->system->menuOrder;
$lang->menu = $lang->system->menu;
$lang->menuOrder = $lang->system->menuOrder;
$lang->report->menu = $lang->measurement->menu;
}
if($group == 'doclib') return;
@@ -2205,14 +2186,14 @@ EOD;
$lang->menuOrder = $lang->scrumpgm->menuOrder;
return $lang->menu;
}
if($program->template == 'cmmi')
if($program->template == 'waterfall')
{
$lang->release->menu = new stdclass();
$lang->menugroup->release = '';
$lang->menuOrder = $lang->cmmipgm->menuOrder;
$lang->menuOrder = $lang->waterfallpgm->menuOrder;
$lang->program->dividerMenu = ',product,issue,';
self::initProgramSubmenu();
return self::processMenuVars($lang->menu->cmmi);
return self::processMenuVars($lang->menu->waterfall);
}
}
@@ -2221,11 +2202,11 @@ EOD;
global $app, $lang, $dbh;
$program = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->program}'")->fetch();
if(empty($program)) return;
if($program->template == 'cmmi')
if($program->template == 'waterfall')
{
$lang->product->menu = $lang->cmmiproduct->menu;
$lang->productplan->menu = $lang->cmmiproduct->menu;
$lang->story->menu = $lang->cmmiproduct->menu;
$lang->product->menu = $lang->waterfallproduct->menu;
$lang->productplan->menu = $lang->waterfallproduct->menu;
$lang->story->menu = $lang->waterfallproduct->menu;
$lang->$moduleName->menu = self::processMenuVars($lang->$moduleName->menu);
}
}
+10 -9
View File
@@ -54,15 +54,16 @@ include 'chosen.html.php';
<?php endif;?>
<?php if(isset($this->config->qcVersion)):?>
<script>
$("#userMenu").append('<button class="btn btn-mini" type="button" id="showSearchGo" style="padding: 2px 3px;"><i class="icon icon-sm icon-search"></i></button>');
$("#searchbox").hide();
$("#showSearchGo").on("click", function(){$("#searchbox").show(); $("#showSearchGo").hide();});
$("#searchInput").mouseout(function(){
var searchValue = $("#searchInput").val();
if(searchValue == ''){$("#searchbox").hide(); $("#showSearchGo").show()};
});
</script>
<script>
$("#userMenu").append('<button class="btn btn-mini" type="button" id="showSearchGo" style="padding: 2px 3px;"><i class="icon icon-sm icon-search"></i></button>');
$("#searchbox").hide();
$("#showSearchGo").on("click", function(){$("#searchbox").show(); $("#showSearchGo").hide();});
$("#searchInput").mouseout(function()
{
var searchValue = $("#searchInput").val();
if(searchValue == ''){$("#searchbox").hide(); $("#showSearchGo").show()};
});
</script>
<?php endif;?>
<main id='main' <?php if(!empty($config->sso->redirect)) echo "class='ranzhiFixedTfootAction'";?> >
<div class='container'>
+11 -10
View File
@@ -348,7 +348,7 @@ class custom extends control
}
/**
* Company estimate.
* Init company estimate unit.
*
* @access public
* @return void
@@ -359,12 +359,13 @@ class custom extends control
$this->lang->navGroup->custom = 'system';
if(strtolower($this->server->request_method) == "post")
{
$this->loadModel('setting');
$data = fixer::input('post')->get();
$this->loadModel('setting')->setItem('system.custom.hourPoint', $data->hourPoint);
$this->loadModel('setting')->setItem('system.custom.cost', $data->cost);
$this->loadModel('setting')->setItem('system.custom.efficiency', $data->efficiency);
$this->loadModel('setting')->setItem('system.custom.days', $data->days);
$this->loadModel('setting')->setItem('system.project.defaultWorkhours', $data->defaultWorkhours);
$this->setting->setItem('system.custom.hourPoint', $data->hourPoint);
$this->setting->setItem('system.custom.cost', $data->cost);
$this->setting->setItem('system.custom.efficiency', $data->efficiency);
$this->setting->setItem('system.custom.days', $data->days);
$this->setting->setItem('system.project.defaultWorkhours', $data->defaultWorkhours);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('custom', 'estimate')));
@@ -395,7 +396,7 @@ class custom extends control
$this->lang->custom->menu = new stdclass();
$this->lang->navGroup->custom = 'system';
if(strtolower($this->server->request_method) == "post")
if($_POST)
{
$data = fixer::input('post')->get();
$this->loadModel('setting')->setItem('system.custom.planStatus', $data->planStatus);
@@ -438,14 +439,14 @@ class custom extends control
}
/**
* Set cmmi model.
* Set waterfall model.
*
* @access public
* @return void
*/
public function setcmmi()
public function setwaterfall()
{
setCookie("systemModel", 'cmmi', $this->config->cookieLife, $this->config->webRoot, '', false, true);
setCookie("systemModel", 'waterfall', $this->config->cookieLife, $this->config->webRoot, '', false, true);
die(js::locate($this->createLink('custom', 'estimate')));
}
+1 -1
View File
@@ -20,7 +20,7 @@ $lang->custom->timezone = 'Timezone';
$lang->custom->scoreReset = 'Reset Points';
$lang->custom->scoreTitle = 'Point Feature';
$lang->custom->setscrum = 'Interval Hint';
$lang->custom->setcmmi = 'Switch Views';
$lang->custom->setwaterfall = 'Switch Views';
$lang->custom->estimate = 'Estimated configuration';
$lang->custom->estimateConfig = 'Estimated configuration';
$lang->custom->estimateUnit = 'Estimating Unit';
+1 -1
View File
@@ -20,7 +20,7 @@ $lang->custom->timezone = '时区';
$lang->custom->scoreReset = '重置积分';
$lang->custom->scoreTitle = '积分功能';
$lang->custom->setscrum = '区间提示';
$lang->custom->setcmmi = '切换视图';
$lang->custom->setwaterfall = '切换视图';
$lang->custom->estimate = '估算配置';
$lang->custom->estimateConfig = '估算配置';
$lang->custom->estimateUnit = '估算单位';
+1 -1
View File
@@ -371,7 +371,7 @@ class customModel extends model
public function getSwapper()
{
$current = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? 'Scrum' : 'CMMI';
$link = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? html::a(helper::createLink('custom', 'setcmmi'), 'CMMI') : html::a(helper::createLink('custom', 'setscrum'), 'Scrum');
$link = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? html::a(helper::createLink('custom', 'setwaterfall'), 'CMMI') : html::a(helper::createLink('custom', 'setscrum'), 'Scrum');
$output = "<div class='btn-group' id='swapper'><button data-toggle='dropdown' type='button' class='btn btn-limit' title='{$current}'>{$current} <i class='icon icon-swap'></i></button>";
$output .= "<ul class='dropdown-menu'><li>" . $link . "</li></ul>";
+16 -14
View File
@@ -41,7 +41,7 @@ class design extends control
$pager = pager::init($recTotal, $recPerPage, $pageID);
$designs = $this->design->getList($productID, $type, $queryID, $orderBy, $pager);
$this->view->title = $this->lang->design->browse;
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->browse;
$this->view->position[] = $this->lang->design->browse;
$this->view->designs = $designs;
@@ -86,7 +86,7 @@ class design extends control
$productID = $this->loadModel('product')->saveState($productID, $this->product->getPairs('nocode'));
$this->design->setProductMenu($productID);
$this->view->title = $this->lang->design->create;
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->create;
$this->view->position[] = $this->lang->design->create;
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
@@ -125,7 +125,7 @@ class design extends control
$this->send($response);
}
$this->view->title = $this->lang->design->batchCreate;
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->batchCreate;
$this->view->position[] = $this->lang->design->batchCreate;
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productID);
@@ -146,7 +146,7 @@ class design extends control
$design = $this->design->getById($designID);
$this->design->setProductMenu($design->product);
$this->view->title = $this->lang->design->view;
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->view;
$this->view->position[] = $this->lang->design->view;
$this->view->design = $design;
@@ -173,6 +173,7 @@ class design extends control
if($_POST)
{
$changes = $this->design->update($designID);
if(dao::isError())
{
$response['result'] = 'fail';
@@ -192,11 +193,12 @@ class design extends control
$this->send($response);
}
$this->view->title = $this->lang->design->edit;
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->edit;
$this->view->position[] = $this->lang->design->view;
$this->view->position[] = $this->lang->design->edit;
$this->view->design = $design;
$this->view->products = $this->loadModel('product')->getPairs($this->session->program);
$this->view->products = $this->loadModel('product')->getPairs();
$this->view->program = $this->loadModel('project')->getByID($this->session->program);
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($design->product);
@@ -204,7 +206,7 @@ class design extends control
}
/**
* Commit a design.
* Design link commits.
*
* @param int $designID
* @param int $repoID
@@ -216,7 +218,7 @@ class design extends control
* @access public
* @return void
*/
public function commit($designID = 0, $repoID = 0, $begin = '', $end = '', $recTotal = 0, $recPerPage = 50, $pageID = 1)
public function linkCommit($designID = 0, $repoID = 0, $begin = '', $end = '', $recTotal = 0, $recPerPage = 50, $pageID = 1)
{
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
@@ -225,9 +227,9 @@ class design extends control
$begin = $begin ? date('Y-m-d', strtotime($begin)) : $program->begin;
$end = $end ? date('Y-m-d', strtotime($end)) : helper::today();
$repos = $this->loadModel('repo')->getRepoPairs();
$repoID = $repoID ? $repoID : key($repos);
$repo = $repoID ? $this->loadModel('repo')->getRepoByID($repoID) : '';
$repos = $this->loadModel('repo')->getRepoPairs();
$repoID = $repoID ? $repoID : key($repos);
$repo = $repoID ? $this->loadModel('repo')->getRepoByID($repoID) : '';
$revisions = $repo ? $this->repo->getCommits($repo, '', 'HEAD', '', $pager, $begin, $end) : '';
@@ -245,8 +247,8 @@ class design extends control
$relations = $this->loadModel('common')->getRelations('design', $designID, 'commit');
foreach($relations as $relation) $linkedRevisions[] = $relation->BID;
$this->view->title = $this->lang->design->commit;
$this->view->position[] = $this->lang->design->commit;
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->linkCommit;
$this->view->position[] = $this->lang->design->linkCommit;
$this->view->repos = $repos;
$this->view->repoID = $repoID;
@@ -322,7 +324,7 @@ class design extends control
die(js::locate($this->createLink('design', 'browse'), 'parent'));
}
$this->view->title = $this->lang->design->assignedTo;
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->assignedTo;
$this->view->position[] = $this->lang->design->assignedTo;
$this->view->design = $this->design->getById($designID);
@@ -17,5 +17,5 @@ $('#begin, #end, #repo').change(function()
for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i];
}
location.href = createLink('design', 'commit', "designID=" + designID + '&repoID=' + repo + '&begin=' + begin + '&end=' + end);
location.href = createLink('design', 'linkCommit', "designID=" + designID + '&repoID=' + repo + '&begin=' + begin + '&end=' + end);
})
+29 -25
View File
@@ -1,53 +1,56 @@
<?php
/**
* The design module English file of ZenTaoPMS.
* The English file of design module.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(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 design
* @version $Id: en.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
$lang->design->common = 'Design';
$lang->design->browse = 'List';
$lang->design->commit = 'Link Commit';
/* Field list. */
$lang->design->id = 'ID';
$lang->design->name = 'Name';
$lang->design->story = 'Story';
$lang->design->type = 'Type';
$lang->design->ditto = 'Ditto';
$lang->design->submission = 'Commit';
$lang->design->version = 'Revision';
$lang->design->assignedTo = 'AssignedTo';
$lang->design->actions = 'Actions';
$lang->design->delete = 'Delete';
$lang->design->confirmDelete = 'Do you want to delete this design?';
$lang->design->edit = 'Edit';
$lang->design->byQuery = 'Search';
$lang->design->products = 'Linked Product';
$lang->design->story = 'Linked Story';
$lang->design->file = 'File';
$lang->design->id = 'ID';
$lang->design->story = 'Story';
$lang->design->ditto = 'Ditto';
$lang->design->type = 'Type';
$lang->design->name = 'Name';
$lang->design->create = 'Create Design';
$lang->design->batchCreate = 'Batch Create';
$lang->design->view = 'View';
$lang->design->desc = 'Description';
$lang->design->range = 'Impact';
$lang->design->product = 'Linked Product';
$lang->design->basicInfo = 'Basic Information';
$lang->design->commitDate = 'Committed Date';
$lang->design->commitBy = 'Commit By';
$lang->design->affectedStory = "{$lang->storyCommon}";
$lang->design->affectedTasks = 'Task';
$lang->design->submit = 'Submit Review';
$lang->design->revision = 'Linked Code';
$lang->design->designView = 'Details';
$lang->design->reviewObject = 'Review Object';
$lang->design->createdBy = 'CreatedBy';
$lang->design->createdDate = 'CreatedDate';
$lang->design->basicInfo = 'Basic Information';
$lang->design->assignTo = 'Assign';
$lang->design->noAssigned = 'Unassigned';
/* Action list. */
$lang->design->common = 'Design';
$lang->design->create = 'Create Design';
$lang->design->batchCreate = 'Batch Create';
$lang->design->edit = 'Edit';
$lang->design->delete = 'Delete';
$lang->design->view = 'View';
$lang->design->browse = 'List';
$lang->design->commit = 'Link Commit';
$lang->design->submit = 'Submit Review';
$lang->design->assignTo = 'Assign';
$lang->design->revision = 'Linked Code';
/* Field value. */
$lang->design->typeList = array();
$lang->design->typeList[''] = '';
$lang->design->typeList['HLDS'] = 'High-Level';
@@ -55,14 +58,15 @@ $lang->design->typeList['DDS'] = 'Detailed';
$lang->design->typeList['DBDS'] = 'Database';
$lang->design->typeList['ADS'] = 'API';
$lang->design->range = 'Impact';
$lang->design->errorSelection = 'No record selected!';
$lang->design->noDesign = 'No record.';
$lang->design->noCommit = 'No record commited.';
$lang->design->rangeList = array();
$lang->design->rangeList['all'] = 'All';
$lang->design->rangeList['assign'] = 'Selected';
$lang->design->featureBar['all'] = 'All';
$lang->design->featureBar += $lang->design->typeList;
/* Prompt information. */
$lang->design->errorSelection = 'No record selected!';
$lang->design->noDesign = 'No record.';
$lang->design->noCommit = 'No record commited.';
$lang->design->confirmDelete = 'Do you want to delete this design?';
+1 -1
View File
@@ -45,7 +45,7 @@ $lang->design->edit = '变更';
$lang->design->delete = '删除';
$lang->design->view = '设计概况';
$lang->design->browse = '浏览列表';
$lang->design->commit = '关联提交';
$lang->design->linkCommit = '关联提交';
$lang->design->submit = '提交评审';
$lang->design->assignTo = '指派';
$lang->design->revision = '查看关联代码';
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* The assign of design module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(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 design
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* The batchCreate view of design module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(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 design
+9 -9
View File
@@ -49,24 +49,24 @@
<th class="text-left w-120px"> <?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->design->createdBy);?></th>
<th class="text-left w-150px"> <?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->design->createdDate);?></th>
<th class="c-assignedTo w-120px"><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->design->assignedTo);?></th>
<th class="text-center w-100px"><?php echo $lang->design->actions;?></th>
<th class="text-center w-100px"> <?php echo $lang->design->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($designs as $design):?>
<tr>
<td><?php printf('%03d', $design->id);?></td>
<td><?php echo zget($lang->design->typeList, $design->type);?></td>
<td title="<?php echo $design->name;?>" class="c-name"><?php echo html::a($this->createLink('design', 'view', "id={$design->id}"), $design->name);?></td>
<td class='c-commit'><?php echo $design->commit;?></td>
<td><?php echo $design->createdBy;?></td>
<td><?php echo substr($design->createdDate, 0, 11);?></td>
<td class="c-assignedTo"><?php echo $this->design->printAssignedHtml($design, $users);?></td>
<td calss="c-id"> <?php printf('%03d', $design->id);?></td>
<td class="c-type"> <?php echo zget($lang->design->typeList, $design->type);?></td>
<td class="c-name" title="<?php echo $design->name;?>"><?php echo html::a($this->createLink('design', 'view', "id={$design->id}"), $design->name);?></td>
<td class="c-commit"> <?php echo $design->commit;?></td>
<td class="c-createdBy"> <?php echo $design->createdBy;?></td>
<td class="c-createdDate"><?php echo substr($design->createdDate, 0, 11);?></td>
<td class="c-assignedTo"> <?php echo $this->design->printAssignedHtml($design, $users);?></td>
<td class='c-actions text-center'>
<?php
$vars = "design={$design->id}";
common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->program);
common::printIcon('design', 'commit', $vars, $design, 'list', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'linkCommit', $vars, $design, 'list', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->program);
?>
</td>
+1 -1
View File
@@ -2,7 +2,7 @@
/**
* The create view of design module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(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 design
+5 -5
View File
@@ -62,12 +62,12 @@
<table class='table'>
<thead>
<tr class='text-center'>
<th class='c-id'><?php echo $lang->task->id;?></th>
<th class='text-left'><?php echo $lang->task->name;?></th>
<th class='w-100px'><?php echo $lang->task->assignedTo;?></th>
<th class='c-id'> <?php echo $lang->task->id;?></th>
<th class='c-name'> <?php echo $lang->task->name;?></th>
<th class='w-100px'> <?php echo $lang->task->assignedTo;?></th>
<th class='c-status'><?php echo $lang->task->status;?></th>
<th class='w-100px'><?php echo $lang->task->consumed;?></th>
<th class='w-90px'><?php echo $lang->task->left;?></th>
<th class='w-100px'> <?php echo $lang->task->consumed;?></th>
<th class='w-90px'> <?php echo $lang->task->left;?></th>
</tr>
</thead>
<tbody>
@@ -16,7 +16,7 @@
<h2>
<span class='label label-id'><?php echo $design->id;?></span>
<span title='<?php echo $design->name?>'><?php echo $design->name?></span>
<small><?php echo $lang->arrow . $lang->design->commit;?></small>
<small><?php echo $lang->arrow . $lang->design->linkCommit;?></small>
</h2>
</div>
<?php if(empty($repoID)):?>
@@ -38,7 +38,7 @@
</tr>
</table>
</div>
<form id='logForm' class='main-table form-ajax' data-ride='table' action=<?php echo inlink('commit', "designID=$designID&repoID=$repoID");?> method='post'>
<form id='logForm' class='main-table form-ajax' data-ride='table' action=<?php echo inlink('linkCommit', "designID=$designID&repoID=$repoID");?> method='post'>
<table class='table'>
<thead>
<tr>
+5 -5
View File
@@ -39,10 +39,10 @@
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
<?php if(!$design->deleted):?>
<?php
common::printIcon('design', 'assignTo', "designID=$design->id", $design, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('design', 'commit', "designID=$design->id", $design, 'button', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'edit', "designID=$design->id", $design, 'button', 'fork', '', '', true);
common::printIcon('design', 'delete', "designID=$design->id", $design, 'button', 'trash', 'hiddenwin');
common::printIcon('design', 'assignTo', "designID=$design->id", $design, 'button', '', '', 'iframe showinonlybody', true);
common::printIcon('design', 'linkCommit', "designID=$design->id", $design, 'button', 'link', '', 'iframe showinonlybody', true);
common::printIcon('design', 'edit', "designID=$design->id", $design, 'button', 'fork', '', '', true);
common::printIcon('design', 'delete', "designID=$design->id", $design, 'button', 'trash', 'hiddenwin');
?>
<?php endif;?>
</div>
@@ -67,7 +67,7 @@
<td><?php echo $design->story ? html::a($this->createLink('story', 'view', "id=$design->story"), zget($stories, $design->story)) : '';?></td>
</tr>
<tr>
<th><?php echo $lang->design->commit;?></th>
<th><?php echo $lang->design->submission;?></th>
<td><?php echo $design->commit;?></td>
</tr>
<tr>
+2 -2
View File
@@ -1,4 +1,4 @@
<?php
$config->durationestimation = new stdclass;
$config->durationestimation->index = new stdclass;
$config->durationestimation = new stdclass();
$config->durationestimation->index = new stdclass();
$config->durationestimation->index->requiredFields = 'scale,productivity,scale,duration,unitLaborCost,totalLaborCost';
+4 -2
View File
@@ -1,13 +1,13 @@
<?php
/**
* The control file of durationestimation of ChanzhiEPS.
* The control file of durationestimation of ZentaoPMS.
*
* @copyright Copyright 2009-2010 QingDao Nature Easy Soft Network Technology Co,LTD (www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv11.html)
* @author Xiying Guan <guanxiying@xirangit.com>
* @package durationestimation
* @version $Id$
* @link http://www.chanzhi.org
* @link http://www.zentao.net
*/
class durationestimation extends control
{
@@ -51,7 +51,9 @@ class durationestimation extends control
$total = 0;
foreach($this->post->workload as $value) $total += $value;
if($total != 100) $this->send(array('result' => 'fail', 'message' => $this->lang->durationestimation->workloadError));
$this->durationestimation->save($programID);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('index', "currentProgram={$programID}")));
}
+16 -13
View File
@@ -16,14 +16,10 @@ $lang->moduleOrder[5] = 'my';
$lang->moduleOrder[10] = 'todo';
$lang->moduleOrder[11] = 'program';
$lang->moduleOrder[12] = 'design';
$lang->moduleOrder[13] = 'programplan';
$lang->moduleOrder[15] = 'product';
$lang->moduleOrder[20] = 'story';
$lang->moduleOrder[25] = 'productplan';
$lang->moduleOrder[30] = 'release';
$lang->moduleOrder[31] = 'issue';
$lang->moduleOrder[32] = 'risk';
$lang->moduleOrder[35] = 'project';
$lang->moduleOrder[40] = 'task';
@@ -39,20 +35,14 @@ $lang->moduleOrder[80] = 'caselib';
$lang->moduleOrder[85] = 'doc';
$lang->moduleOrder[90] = 'report';
$lang->moduleOrder[91] = 'workestimation';
$lang->moduleOrder[92] = 'durationestimation';
$lang->moduleOrder[93] = 'budget';
$lang->moduleOrder[95] = 'company';
$lang->moduleOrder[97] = 'stage';
$lang->moduleOrder[100] = 'dept';
$lang->moduleOrder[105] = 'group';
$lang->moduleOrder[110] = 'user';
$lang->moduleOrder[115] = 'admin';
$lang->moduleOrder[120] = 'extension';
$lang->moduleOrder[121] = 'subject';
$lang->moduleOrder[122] = 'holiday';
$lang->moduleOrder[125] = 'custom';
$lang->moduleOrder[140] = 'action';
@@ -69,6 +59,19 @@ $lang->moduleOrder[190] = 'cron';
$lang->moduleOrder[195] = 'dev';
$lang->moduleOrder[200] = 'message';
$lang->moduleOrder[205] = 'design';
$lang->moduleOrder[210] = 'programplan';
$lang->moduleOrder[215] = 'issue';
$lang->moduleOrder[220] = 'risk';
$lang->moduleOrder[225] = 'stage';
$lang->moduleOrder[230] = 'budget';
$lang->moduleOrder[235] = 'workestimation';
$lang->moduleOrder[240] = 'durationestimation';
$lang->moduleOrder[245] = 'subject';
$lang->moduleOrder[250] = 'holiday';
$lang->resource = new stdclass();
/* Index module. */
@@ -508,7 +511,7 @@ $lang->resource->design->browse = 'browse';
$lang->resource->design->create = 'create';
$lang->resource->design->batchCreate = 'batchCreate';
$lang->resource->design->edit = 'edit';
$lang->resource->design->commit = 'commit';
$lang->resource->design->linkCommit = 'linkCommit';
$lang->resource->design->revision = 'revision';
$lang->resource->design->delete = 'delete';
$lang->resource->design->view = 'view';
@@ -992,7 +995,7 @@ $lang->resource->custom->timezone = 'timezone';
$lang->resource->custom->estimate = 'estimate';
$lang->resource->custom->plan = 'plan';
$lang->resource->custom->concept = 'concept';
$lang->resource->custom->setcmmi = 'setcmmi';
$lang->resource->custom->setwaterfall = 'setwaterfall';
$lang->resource->custom->setscrum = 'setscrum';
$lang->custom->methodOrder[5] = 'index';
@@ -1005,7 +1008,7 @@ $lang->custom->methodOrder[35] = 'timezone';
$lang->custom->methodOrder[40] = 'estimate';
$lang->custom->methodOrder[45] = 'plan';
$lang->custom->methodOrder[50] = 'concept';
$lang->custom->methodOrder[55] = 'setcmmi';
$lang->custom->methodOrder[55] = 'setwaterfall';
$lang->custom->methodOrder[60] = 'setscrum';
$lang->resource->datatable = new stdclass();
+2 -2
View File
@@ -480,8 +480,8 @@ class groupModel extends model
public function checkMenuModule($menu, $moduleName)
{
if(empty($menu)) return true;
if($menu == 'other' and (isset($this->lang->menugroup->$moduleName) or isset($this->lang->menu->$moduleName))) return false;
if($menu != 'other' and !($moduleName == $menu or (isset($this->lang->menugroup->$moduleName) and $this->lang->menugroup->$moduleName == $menu))) return false;
if($menu == 'other' and (isset($this->lang->navGroup->$moduleName) or isset($this->lang->mainNav->$moduleName))) return false;
if($menu != 'other' and !($moduleName == $menu or (isset($this->lang->navGroup->$moduleName) and $this->lang->navGroup->$moduleName == $menu))) return false;
return true;
}
+7 -7
View File
@@ -53,14 +53,14 @@
<?php $active = empty($menu) ? 'btn-active-text' : '';?>
<?php echo html::a(inlink('managePriv', sprintf($params, '')), "<span class='text'>{$lang->group->all}</span>", '', "class='btn btn-link $active'")?>
<?php //foreach($lang->menu as $module => $title):?>
<?php //if(!is_string($title)) continue;?>
<?php //$active = $menu == $module ? 'btn-active-text' : '';?>
<?php //echo html::a(inlink('managePriv', sprintf($params, $module)), "<span class='text'>" . substr($title, 0, strpos($title, '|')) . '</span>', '', "class='btn btn-link $active'")?>
<?php //endforeach;?>
<?php foreach($lang->mainNav as $module => $title):?>
<?php if(!is_string($title)) continue;?>
<?php $active = $menu == $module ? 'btn-active-text' : '';?>
<?php echo html::a(inlink('managePriv', sprintf($params, $module)), "<span class='text'>" . substr($title, 0, strpos($title, '|')) . '</span>', '', "class='btn btn-link $active'")?>
<?php endforeach;?>
<?php //$active = $menu == 'other' ? 'btn-active-text' : '';?>
<?php //echo html::a(inlink('managePriv', sprintf($params, 'other')), "<span class='text'>{$lang->group->other}</span>", '', "class='btn btn-link $active'");?>
<?php $active = $menu == 'other' ? 'btn-active-text' : '';?>
<?php echo html::a(inlink('managePriv', sprintf($params, 'other')), "<span class='text'>{$lang->group->other}</span>", '', "class='btn btn-link $active'");?>
<div class='input-control space w-150px'>
<?php echo html::select('version', $this->lang->group->versions, $version, "onchange=showPriv(this.value) class='form-control chosen'");?>
+38 -41
View File
@@ -4,9 +4,9 @@
*
* @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>
* @author Yong Lei <leiyong@easycorp.ltd>
* @package issue
* @version $Id: control.php 5145 2013-07-15 06:47:26Z chencongzhi520@gmail.com $
* @version $Id$
* @link http://www.zentao.net
*/
class issue extends control
@@ -14,7 +14,7 @@ class issue extends control
/**
* Get issue list data.
*
* @param string $browseType
* @param string $browseType bySearch|open|assignTo|closed|suspended|canceled
* @param int param
* @param string orderBy
* @param int recTotal
@@ -26,6 +26,7 @@ class issue extends control
public function browse($browseType = 'all', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$browseType = strtolower($browseType);
/* Load pager */
$this->app->loadClass('pager', true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
@@ -39,20 +40,17 @@ class issue extends control
$this->view->position[] = $this->lang->issue->browse;
$this->view->pager = $pager;
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->browseType = $browseType;
$this->view->issueList = $this->issue->getIssueList($browseType, $queryID, $orderBy, $pager);
$this->view->issueList = $this->issue->getList($browseType, $queryID, $orderBy, $pager);
$this->view->users = $this->loadModel('user')->getPairs('noletter|pofirst|nodeleted');
$this->display();
}
/**
* Create a issue.
* Create an issue.
*
* @access public
* @return void
@@ -77,7 +75,7 @@ class issue extends control
}
/**
* batchCreate issues
* Batch create issues.
*
* @access public
* @return void
@@ -101,7 +99,7 @@ class issue extends control
}
/**
* Delete a issue.
* Delete an issue.
*
* @param int $issueID
* @param string $confirm yes|no
@@ -116,13 +114,13 @@ class issue extends control
}
else
{
$this->issue->delete($issueID);
$this->issue->delete(TABLE_ISSUE, $issueID);
die(js::locate(inLink('browse'), 'parent'));
}
}
/**
* Edit a issue.
* Edit an issue.
*
* @param int $issueID
* @access public
@@ -151,7 +149,7 @@ class issue extends control
}
/**
* Assign a issue.
* Assign an issue.
*
* @param int $issueID
* @access public
@@ -164,7 +162,7 @@ class issue extends control
$changes = $this->issue->assignTo($issueID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Edited');
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Assigned', '', $this->post->assignedTo);
$this->action->logHistory($actionID, $changes);
die(js::closeModal('parent.parent', 'this'));
@@ -177,7 +175,7 @@ class issue extends control
}
/**
* Close a issue.
* Close an issue.
*
* @param int $issueID
* @access public
@@ -190,7 +188,7 @@ class issue extends control
$changes = $this->issue->close($issueID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Edited');
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Closed');
$this->action->logHistory($actionID, $changes);
die(js::closeModal('parent.parent', 'this'));
@@ -202,7 +200,7 @@ class issue extends control
}
/**
* Cancel a issue.
* Cancel an issue.
*
* @param int $issueID
* @access public
@@ -215,7 +213,7 @@ class issue extends control
$changes = $this->issue->cancel($issueID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Edited');
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Canceled');
$this->action->logHistory($actionID, $changes);
die(js::closeModal('parent.parent', 'this'));
@@ -227,7 +225,7 @@ class issue extends control
}
/**
* Activate a issue.
* Activate an issue.
*
* @param int $issueID
* @access public
@@ -240,7 +238,7 @@ class issue extends control
$changes = $this->issue->activate($issueID);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Edited');
$actionID = $this->loadModel('action')->create('issue', $issueID, 'Activated');
$this->action->logHistory($actionID, $changes);
die(js::closeModal('parent.parent', 'this'));
@@ -253,61 +251,61 @@ class issue extends control
}
/**
* Resolve a issue.
* Resolve an issue.
*
* @param int $issue
* @param int $issueID
* @access public
* @return void
*/
public function resolve($issue)
public function resolve($issueID)
{
if($_POST)
{
$this->issue->resolve($issue);
$this->issue->resolve($issueID);
$resolution = $this->post->issue['resolution'];
$objectID = '';
if($resolution == 'totask')
{
$objectID = $this->issue->createTask($issue);
$objectID = $this->issue->createTask($issueID);
$objectLink = html::a($this->createLink('task', 'view', "id=$objectID"), $this->post->name, "data-toggle='modal'");
$comment = sprintf($this->lang->issue->logComments[$resolution], $objectLink);
$this->loadModel('action')->create('task', $objectID, 'Opened', '');
$this->loadModel('action')->create('issue', $issue, 'resolved', $comment);
$this->loadModel('action')->create('issue', $issueID, 'Resolved', $comment);
}
if($resolution == 'tostory')
{
$objectID = $this->issue->createStory($issue);
$objectID = $this->issue->createStory($issueID);
$objectLink = html::a($this->createLink('story', 'view', "id=$objectID"), $this->post->title, "data-toggle='modal'");
$comment = sprintf($this->lang->issue->logComments[$resolution], $objectLink);
$this->loadModel('action')->create('story', $objectID, 'Opened', '');
$this->loadModel('action')->create('issue', $issue, 'resolved', $comment);
$this->loadModel('action')->create('issue', $issueID, 'Resolved', $comment);
}
if($resolution == 'tobug')
{
$objectID = $this->issue->createBug($issue);
$objectID = $this->issue->createBug($issueID);
$objectLink = html::a($this->createLink('bug', 'view', "id=$objectID"), $this->post->title, "data-toggle='modal'");
$comment = sprintf($this->lang->issue->logComments[$resolution], $objectLink);
$this->loadModel('action')->create('bug', $objectID, 'Opened', '');
$this->loadModel('action')->create('issue', $issue, 'resolved', $comment);
$this->loadModel('action')->create('issue', $issueID, 'Resolved', $comment);
}
if($resolution == 'torisk')
{
$objectID = $this->issue->createRisk($issue);
$objectID = $this->issue->createRisk($issueID);
$objectLink = html::a($this->createLink('risk', 'view', "id=$objectID"), $this->post->title, "data-toggle='modal'");
$comment = sprintf($this->lang->issue->logComments[$resolution], $objectLink);
$this->loadModel('action')->create('risk', $objectID, 'Opened', '');
$this->loadModel('action')->create('issue', $issue, 'resolved', $comment);
$this->loadModel('action')->create('issue', $issueID, 'Resolved', $comment);
}
$this->dao->update(TABLE_ISSUE)->set('objectID')->eq($objectID)->where('id')->eq($issue)->exec();
$this->dao->update(TABLE_ISSUE)->set('objectID')->eq($objectID)->where('id')->eq($issueID)->exec();
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
}
$this->view->title = $this->lang->issue->resolve;
$this->view->issue = $this->issue->getByID($issue);
$this->view->issue = $this->issue->getByID($issueID);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->prepairParams($this->view->issue);
@@ -315,7 +313,7 @@ class issue extends control
}
/**
* prepairParams
* Build page parameters.
*
* @param int $issue
* @access public
@@ -354,7 +352,6 @@ class issue extends control
$showAllModule = isset($this->config->project->task->allModule) ? $this->config->project->task->allModule : '';
$moduleOptionMenu = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : '');
/* Fix bug #2737. When moduleID is not story module. */
$stories = $this->story->getProjectStoryPairs($projectID, 0, 0);
/* Set Custom*/
@@ -371,9 +368,9 @@ class issue extends control
$this->view->members = $members;
$this->view->moduleOptionMenu = $moduleOptionMenu;
$this->view->projects = $this->loadModel('project')->getPairs();
$this->view->program = $this->loadModel('project')->getById($this->session->program);
$this->view->products = $this->loadModel('product')->getPairs();
$this->view->projects = $this->loadModel('project')->getPairs();
$this->view->program = $this->loadModel('project')->getById($this->session->program);
$this->view->products = $this->loadModel('product')->getPairs();
$this->view->productID = $this->session->product;
$this->view->moduleID = 0;
$this->view->branch = 0;
@@ -384,7 +381,7 @@ class issue extends control
}
/**
* Get question details.
* View an issue.
*
* @param int $issueID
* @access public
@@ -404,7 +401,7 @@ class issue extends control
}
/**
* commonAction
* Common actions of issue module.
*
* @param int $issueID
* @param int $object
+1 -1
View File
@@ -57,7 +57,7 @@ $lang->issue->labelList['open'] = 'Open';
$lang->issue->labelList['assignto'] = 'AssignedToMe';
$lang->issue->labelList['closed'] = 'Closed';
$lang->issue->labelList['suspended'] = 'Suspended';
$lang->issue->labelList['cancelled'] = 'Canceled';
$lang->issue->labelList['canceled'] = 'Canceled';
$lang->issue->priList[''] = '';
$lang->issue->priList['1'] = 1;
+1 -1
View File
@@ -57,7 +57,7 @@ $lang->issue->labelList['open'] = '开放';
$lang->issue->labelList['assignto'] = '指派给我';
$lang->issue->labelList['closed'] = '已关闭';
$lang->issue->labelList['suspended'] = '已挂起';
$lang->issue->labelList['cancelled'] = '已取消';
$lang->issue->labelList['canceled'] = '已取消';
$lang->issue->priList[''] = '';
$lang->issue->priList['1'] = 1;
+70 -111
View File
@@ -4,59 +4,15 @@
*
* @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>
* @author Yong Lei <leiyong@easycorp.ltd>
* @package issue
* @version $Id: model.php 5145 2013-07-15 06:47:26Z chencongzhi520@gmail.com $
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php
class issueModel extends model
{
/**
* Create a question.
*
* @access public
* @return bool
*/
public function create()
{
$now = helper::now();
$data = fixer::input('post')
->add('createdBy', $this->app->user->account)
->add('createdDate', $now)
->add('program', $this->session->program)
->remove('labels,files')
->addIF($this->post->assignedTo, 'assignedBy', $this->app->user->account)
->addIF($this->post->assignedTo, 'assignedDate', $now)
->stripTags($this->config->issue->editor->create['id'], $this->config->allowedTags)
->get();
if(strpos($this->config->issue->create->requiredFields, 'type') !== false and !$this->post->type)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->type);
return false;
}
if(strpos($this->config->issue->create->requiredFields, 'title') !== false and !$this->post->title)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->title);
return false;
}
if(strpos($this->config->issue->create->requiredFields, 'severity') !== false and !$this->post->severity)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->severity);
return false;
}
$this->dao->insert(TABLE_ISSUE)->data($data)->exec();
$issueID = $this->dao->lastInsertID();
$this->loadModel('file')->saveUpload('issue', $issueID);
return $issueID;
}
/**
* Get stakeholder issue list data.
* @param string $owner
@@ -79,16 +35,28 @@ class issueModel extends model
}
/**
* Get question list data.
* Get a issue details.
*
* @param string $browseType
* @param int $issueID
* @access public
* @return object
*/
public function getByID($issueID)
{
return $this->dao->select('*')->from(TABLE_ISSUE)->where('id')->eq($issueID)->andWhere('deleted')->eq('0')->fetch();
}
/**
* Get issue list data.
*
* @param string $browseType bySearch|open|assignTo|closed|suspended|canceled
* @param int $queryID
* @param string $orderBy
* @param object $pager
* @access public
* @return object
*/
public function getIssueList($browseType = 'all', $queryID = 0, $orderBy = 'id_desc', $pager = null)
public function getList($browseType = 'all', $queryID = 0, $orderBy = 'id_desc', $pager = null)
{
$issueQuery = '';
if($browseType == 'bysearch')
@@ -110,7 +78,7 @@ class issueModel extends model
->beginIF($browseType == 'assignto')->andWhere('assignedTo')->eq($this->app->user->account)->fi()
->beginIF($browseType == 'closed')->andWhere('status')->eq('closed')->fi()
->beginIF($browseType == 'suspended')->andWhere('status')->eq('suspended')->fi()
->beginIF($browseType == 'cancelled')->andWhere('status')->eq('canceled')->fi()
->beginIF($browseType == 'canceled')->andWhere('status')->eq('canceled')->fi()
->beginIF($browseType == 'bysearch')->andWhere($issueQuery)->fi()
->orderBy($orderBy)
->page($pager)
@@ -120,20 +88,9 @@ class issueModel extends model
}
/**
* getActivityList
* Get the issue in the block.
*
* @access public
* @return object
*/
public function getActivityList()
{
return $this->dao->select('id,name')->from(TABLE_ACTIVITY)->where('deleted')->eq('0')->orderBy('id_desc')->fetchPairs();
}
/**
* getBlockIssues
*
* @param string $browseType
* @param string $browseType open|assignto|closed|suspended|canceled
* @param int $limit
* @param string $orderBy
* @access public
@@ -148,7 +105,7 @@ class issueModel extends model
->beginIF($browseType == 'assignto')->andWhere('assignedTo')->eq($this->app->user->account)->fi()
->beginIF($browseType == 'closed')->andWhere('status')->eq('closed')->fi()
->beginIF($browseType == 'suspended')->andWhere('status')->eq('suspended')->fi()
->beginIF($browseType == 'cancelled')->andWhere('status')->eq('canceled')->fi()
->beginIF($browseType == 'canceled')->andWhere('status')->eq('canceled')->fi()
->orderBy($orderBy)
->limit($limit)
->fetchAll();
@@ -157,32 +114,44 @@ class issueModel extends model
}
/**
* Delete a question.
* Get activity list.
*
* @param int $issueID
* @param int $null
* @access public
* @return object
*/
public function delete($issueID = 0, $null = null)
public function getActivityPairs()
{
$this->dao->update(TABLE_ISSUE)->set('deleted')->eq('1')->where('id')->eq($issueID)->exec();
return $this->dao->select('id,name')->from(TABLE_ACTIVITY)->where('deleted')->eq('0')->orderBy('id_desc')->fetchPairs();
}
/**
* Get a issue details.
* Create an issue.
*
* @param int $issueID
* @access public
* @return object
* @return bool
*/
public function getByID($issueID)
public function create()
{
return $this->dao->select('*')->from(TABLE_ISSUE)->where('id')->eq($issueID)->andWhere('deleted')->eq('0')->fetch();
$now = helper::now();
$data = fixer::input('post')
->add('createdBy', $this->app->user->account)
->add('createdDate', $now)
->add('program', $this->session->program)
->remove('labels,files')
->addIF($this->post->assignedTo, 'assignedBy', $this->app->user->account)
->addIF($this->post->assignedTo, 'assignedDate', $now)
->stripTags($this->config->issue->editor->create['id'], $this->config->allowedTags)
->get();
$this->dao->insert(TABLE_ISSUE)->data($data)->batchCheck($this->config->issue->create->requiredFields, 'notempty')->exec();
$issueID = $this->dao->lastInsertID();
$this->loadModel('file')->saveUpload('issue', $issueID);
return $issueID;
}
/**
* Update a question.
* Update an issue.
*
* @param int $issueID
* @access public
@@ -190,6 +159,8 @@ class issueModel extends model
*/
public function update($issueID)
{
$oldIssue = $this->getByID($issueID);
$now = helper::now();
$data = fixer::input('post')
->add('editedBy', $this->app->user->account)
@@ -199,26 +170,11 @@ class issueModel extends model
->stripTags($this->config->issue->editor->edit['id'], $this->config->allowedTags)
->get();
if(strpos($this->config->issue->edit->requiredFields, 'type') !== false and !$this->post->type)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->type);
return false;
}
$this->dao->update(TABLE_ISSUE)->data($data)
->where('id')->eq($issueID)
->batchCheck($this->config->issue->edit->requiredFields, 'notempty')
->exec();
if(strpos($this->config->issue->edit->requiredFields, 'title') !== false and !$this->post->title)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->title);
return false;
}
if(strpos($this->config->issue->edit->requiredFields, 'severity') !== false and !$this->post->severity)
{
dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->issue->severity);
return false;
}
$oldIssue = $this->getByID($issueID);
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
}
@@ -231,19 +187,19 @@ class issueModel extends model
*/
public function assignTo($issueID)
{
$oldIssue = $this->getByID($issueID);
$data = fixer::input('post')
->add('assignedBy', $this->app->user->account)
->add('assignedDate', helper::now())
->get();
$oldIssue = $this->getByID($issueID);
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
}
/**
* Close issue.
* Close an issue.
*
* @param int $issueID
* @access public
@@ -251,19 +207,19 @@ class issueModel extends model
*/
public function close($issueID)
{
$oldIssue = $this->getByID($issueID);
$data = fixer::input('post')
->add('closeBy', $this->app->user->account)
->add('status', 'closed')
->get();
$oldIssue = $this->getByID($issueID);
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
}
/**
* Cancel issue.
* Cancel an issue.
*
* @param int $issueID
* @access public
@@ -271,15 +227,15 @@ class issueModel extends model
*/
public function cancel($issueID)
{
$data = fixer::input('post')->get();
$oldIssue = $this->getByID($issueID);
$data = fixer::input('post')->get();
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
}
/**
* Activate issue.
* Activate an issue.
*
* @param int $issueID
* @access public
@@ -287,10 +243,11 @@ class issueModel extends model
*/
public function activate($issueID)
{
$oldIssue = $this->getByID($issueID);
$data = fixer::input('post')
->add('status', 'active')
->get();
$oldIssue = $this->getByID($issueID);
$this->dao->update(TABLE_ISSUE)->data($data)->where('id')->eq($issueID)->exec();
return common::createChanges($oldIssue, $data);
@@ -321,10 +278,10 @@ class issueModel extends model
$issue['assignedDate'] = $now;
}
foreach(explode(',',$this->config->issue->create->requiredFields) as $field)
foreach(explode(',', $this->config->issue->create->requiredFields) as $field)
{
$field = trim($field);
if($field and empty($issue["$field"])) return dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->issue->$field);
if($field and empty($issue[$field])) return dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->issue->$field);
}
$issues[] = $issue;
@@ -335,7 +292,7 @@ class issueModel extends model
}
/**
* Resolve issue.
* Resolve an issue.
*
* @param int $issueID
* @access public
@@ -349,7 +306,7 @@ class issueModel extends model
}
/**
* Create task.
* Create an task.
*
* @access public
* @return object
@@ -362,7 +319,7 @@ class issueModel extends model
}
/**
* Create story.
* Create a story.
*
* @access public
* @return int
@@ -374,6 +331,7 @@ class issueModel extends model
->get();
$this->dao->insert(TABLE_STORY)->data($story, 'teamMember,storyEstimate,storyDesc,storyPri,labels,files,spec,story,needNotReview')->exec();
$id = $this->dao->lastInsertID();
$this->dao->insert(TABLE_STORYSPEC)
->set('story')->eq($id)
@@ -381,11 +339,12 @@ class issueModel extends model
->set('spec')->eq($story->spec)
->set('version')->eq(1)
->exec();
return $id;
}
/**
* Create bug.
* Create a bug.
*
* @access public
* @return int
@@ -398,20 +357,20 @@ class issueModel extends model
}
/**
* Create risk.
* Create a risk.
*
* @access public
* @return int
*/
public function createRisk()
{
$risc = fixer::input('post')->remove('issue,color,estimate')->get();
$this->dao->insert(TABLE_RISK)->data($risc, 'spec,title,teamMember,storyEstimate,storyDesc,storyPri,labels,files')->exec();
$risk = fixer::input('post')->remove('issue,color,estimate')->get();
$this->dao->insert(TABLE_RISK)->data($risk, 'spec,title,teamMember,storyEstimate,storyDesc,storyPri,labels,files')->exec();
return $this->dao->lastInsertID();
}
/**
* Build search form.
* Build issue search form.
*
* @param string $actionURL
* @param int $queryID
+9 -25
View File
@@ -32,37 +32,21 @@
<tbody>
<?php for($i = 1;$i <= 10;$i++):?>
<tr data-key="<?php echo $i;?>">
<td><?php echo $i;?></td>
<td>
<?php echo html::input("dataList[$i][title]", '', 'id="dataList'.$i.'title" class="form-control" autocomplete="off"')?>
</td>
<td>
<?php echo html::select("dataList[$i][type]", $lang->issue->typeList, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'type"')?>
</td>
<td>
<?php echo html::select("dataList[$i][severity]", $lang->issue->severityList, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'severity"')?>
</td>
<td>
<?php echo html::textarea("dataList[$i][desc]", '', 'class="form-control" id="dataList'.$i.'desc" rows="1"');?>
</td>
<td>
<?php echo html::select("dataList[$i][pri]", $lang->issue->priList, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'pri"')?>
</td>
<td>
<?php echo html::input("dataList[$i][deadline]", '', 'class="form-control form-date" id="dataList'.$i.'deadline"');?>
</td>
<td>
<?php echo html::select("dataList[$i][assignedTo]", $users, '', 'class="form-control chosen chosen-controled" id="dataList'.$i.'assignedTo"')?>
</td>
<td><?php echo $i;?></td>
<td><?php echo html::input("dataList[$i][title]", '', 'id="dataList' . $i . 'title" class="form-control" autocomplete="off"')?></td>
<td><?php echo html::select("dataList[$i][type]", $lang->issue->typeList, '', 'class="form-control chosen" id="dataList' . $i . 'type"')?></td>
<td><?php echo html::select("dataList[$i][severity]", $lang->issue->severityList, '', 'class="form-control chosen" id="dataList' . $i . 'severity"')?></td>
<td><?php echo html::textarea("dataList[$i][desc]", '', 'class="form-control" id="dataList' . $i . 'desc" rows="1"');?></td>
<td><?php echo html::select("dataList[$i][pri]", $lang->issue->priList, '', 'class="form-control chosen" id="dataList' . $i . 'pri"')?></td>
<td><?php echo html::input("dataList[$i][deadline]", '', 'class="form-control form-date" id="dataList' . $i . 'deadline"');?></td>
<td><?php echo html::select("dataList[$i][assignedTo]", $users, '', 'class="form-control chosen" id="dataList' . $i . 'assignedTo"')?></td>
</tr>
<?php endfor;?>
</tbody>
</table>
<div class="form-actions text-center">
<?php echo html::submitButton('','id="submit" class="btn btn-primary" data-loading="稍后..."')?>
<?php echo html::a('javascript:history.go(-1);', '返回', '', 'class="btn btn-back btn-wide"')?>
<?php echo html::submitButton() . html::backButton();?>
</div>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -54,7 +54,7 @@
<td class="c-id"><?php printf('%03d', $issue->id);?></td>
<td title="<?php echo zget($lang->issue->typeList, $issue->type);?>"><?php echo zget($lang->issue->typeList, $issue->type);?></td>
<td class="text-ellipsis" title="<?php echo $issue->title;?>"><?php common::printLink('issue', 'view', "id=$issue->id", $issue->title);?></td>
<td title="<?php echo $issue->severity;?>"><?php echo $issue->severity;?></td>
<td title="<?php echo $issue->severity;?>"><?php echo zget($lang->issue->severityList, $issue->severity);?></td>
<td title="<?php echo $issue->pri;?>"><?php echo $issue->pri;?></td>
<td title="<?php echo zget($users, $issue->assignedTo);?>"><?php echo zget($users, $issue->assignedTo);?></td>
<td title="<?php echo zget($users, $issue->owner);?>"><?php echo zget($users, $issue->owner);?></td>
-2
View File
@@ -63,8 +63,6 @@
<td></td>
<td></td>
</tr>
<?php endif;?>
<?php if(isset($owner) && $owner):?>
<tr>
<th><?php echo $lang->issue->activity;?></th>
<td><?php echo html::select('activity', $activity, $activityID, 'class="form-control chosen"');?></td>
+1 -1
View File
@@ -85,7 +85,7 @@ foreach($issue as $field => $value)
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->severity;?></th>
<td><?php echo $issue->severity;?></td>
<td><?php echo zget($lang->issue->severityList, $issue->severity);?></td>
</tr>
<tr valign="middle">
<th class="thWidth w-80px"><?php echo $lang->issue->pri;?></th>
+1 -1
View File
@@ -35,7 +35,7 @@ class jenkins extends control
*/
public function browse($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
if(common::hasPriv('jenkins', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('jenkins', 'create', ''), "<i class='icon icon-plus'></i> " . $this->lang->jenkins->create, '', "class='btn btn-primary'");
if(common::hasPriv('jenkins', 'create')) $this->lang->modulePageActions = html::a(helper::createLink('jenkins', 'create'), "<i class='icon icon-plus'></i> " . $this->lang->jenkins->create, '', "class='btn btn-primary'");
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
+2 -2
View File
@@ -13,8 +13,8 @@
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php echo html::a($this->createLink('job', 'browse', ''), "<span class='text'>{$lang->ci->task}</span>", '', "class='btn btn-link btn-active-text'");?>
<?php echo html::a($this->createLink('compile', 'browse', ''), "<span class='text'>{$lang->ci->history}</span>", '', "class='btn btn-link'");?>
<?php echo html::a($this->createLink('job', 'browse'), "<span class='text'>{$lang->ci->task}</span>", '', "class='btn btn-link btn-active-text'");?>
<?php echo html::a($this->createLink('compile', 'browse'), "<span class='text'>{$lang->ci->history}</span>", '', "class='btn btn-link'");?>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('job', 'create')) common::printLink('job', 'create', "", "<i class='icon icon-plus'></i> " . $lang->job->create, '', "class='btn btn-primary'");?>
+2 -2
View File
@@ -352,11 +352,11 @@ class my extends control
$cases = array();
if($type == 'assigntome')
{
$cases = $this->loadModel('testcase')->getByAssignedTo($this->app->user->account, $sort, $pager);
$cases = $this->loadModel('testcase')->getByAssignedTo($this->app->user->account, $sort, $pager, 'skip');
}
elseif($type == 'openedbyme')
{
$cases = $this->loadModel('testcase')->getByOpenedBy($this->app->user->account, $sort, $pager);
$cases = $this->loadModel('testcase')->getByOpenedBy($this->app->user->account, $sort, $pager, 'skip');
}
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', $type == 'assigntome' ? false : true);
+1 -1
View File
@@ -22,7 +22,7 @@ js::set('unfoldStories', $unfoldStories);
js::set('unfoldAll', $lang->project->treeLevel['all']);
js::set('foldAll', $lang->project->treeLevel['root']);
js::set('storyType', $storyType);
if($program->template == 'cmmi') $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement;
if($program->template == 'waterfall') $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang->story->createRequirement;
?>
<div id="mainMenu" class="clearfix">
<div id="sidebarHeader">
+2 -2
View File
@@ -91,7 +91,7 @@ class program extends control
* @access public
* @return void
*/
public function create($template = 'cmmi', $parentProgramID = 0, $copyProgramID = '')
public function create($template = 'waterfall', $parentProgramID = 0, $copyProgramID = '')
{
if($_POST)
{
@@ -723,7 +723,7 @@ class program extends control
$programProjects = $this->project->getPairs();
$programProject = key($programProjects);
if($program->template == 'cmmi')
if($program->template == 'waterfall')
{
$link = $this->createLink('programplan', 'browse', 'programID=' . $programID);
}
+4 -4
View File
@@ -71,8 +71,8 @@ $lang->program->unitList[''] = '';
$lang->program->unitList['yuan'] = 'Yuan';
$lang->program->unitList['dollar'] = 'Dollars';
$lang->program->templateList['scrum'] = "Scrum";
$lang->program->templateList['cmmi'] = "CMMI";
$lang->program->templateList['scrum'] = "Scrum";
$lang->program->templateList['waterfall'] = "CMMI";
$lang->program->categoryList['single'] = "Single product";
$lang->program->categoryList['multiple'] = "Multiple products";
@@ -105,8 +105,8 @@ $lang->program->lastIteration = 'Latest iterations';
$lang->program->ongoingStage = 'Ongoing stage';
$lang->program->scrum = 'Scrum';
$lang->program->scrumTitle = 'Scrum development full process project management';
$lang->program->cmmi = 'CMMI';
$lang->program->cmmiTitle = 'CMMI management';
$lang->program->waterfall = 'CMMI';
$lang->program->waterfallTitle = 'CMMI management';
$lang->program->cannotCreateChild = 'The project already has actual content and can not add subprojects directly. You can create a parent project for the current project and then add a child project under the new parent project.';
$lang->program->hasChildren = 'This project has a subproject and can not be deleted.';
$lang->program->confirmDelete = 'Do you want to delete this project?';
+4 -4
View File
@@ -71,8 +71,8 @@ $lang->program->unitList[''] = '';
$lang->program->unitList['yuan'] = '元';
$lang->program->unitList['dollar'] = 'Dollars';
$lang->program->templateList['scrum'] = "Scrum";
$lang->program->templateList['cmmi'] = "瀑布";
$lang->program->templateList['scrum'] = "Scrum";
$lang->program->templateList['waterfall'] = "瀑布";
$lang->program->categoryList['single'] = "单产品项目";
$lang->program->categoryList['multiple'] = "多产品项目";
@@ -105,8 +105,8 @@ $lang->program->lastIteration = '近期迭代';
$lang->program->ongoingStage = '进行中的阶段';
$lang->program->scrum = 'Scrum';
$lang->program->scrumTitle = '敏捷开发全流程项目管理';
$lang->program->cmmi = '瀑布';
$lang->program->cmmiTitle = '瀑布式项目管理';
$lang->program->waterfall = '瀑布';
$lang->program->waterfallTitle = '瀑布式项目管理';
$lang->program->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。';
$lang->program->hasChildren = '该项目有子项目存在,不能删除。';
$lang->program->confirmDelete = "您确定删除项目[%s]吗?";
+25 -21
View File
@@ -65,16 +65,17 @@ class programModel extends model
}
/**
* Get user programs for block.
* Get program overview for block.
*
* @param varchar $status
* @param varchar $orderBy
* @param int $limit
* @param int $programID
* @param varchar $queryType byId|byStatus
* @param varchar|int $param
* @param varchar $orderBy
* @param int $limit
* @param int $programID
* @access public
* @return void
*/
public function getUserPrograms($status = 'all', $orderBy = 'id_desc', $limit = 15, $programID = 0)
public function getProgramOverview($queryType = 'byStatus', $param = 'all', $orderBy = 'id_desc', $limit = 15)
{
$programs = $this->dao->select('*')->from(TABLE_PROJECT)
->where('iscat')->eq(0)
@@ -82,8 +83,8 @@ class programModel extends model
->andWhere('program')->eq(0)
->andWhere('deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->programs)->fi()
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF($programID)->andWhere('id')->eq($programID)->fi()
->beginIF($queryType == 'byStatus' and $param != 'all')->andWhere('status')->eq($param)->fi()
->beginIF($queryType == 'byId')->andWhere('id')->eq($param)->fi()
->orderBy($orderBy)
->limit($limit)
->fetchAll('id');
@@ -91,7 +92,10 @@ class programModel extends model
if(empty($programs)) return array();
$programIdList = array_keys($programs);
$hours = $this->dao->select('program, cast(sum(consumed) as decimal(10,2)) as consumed, cast(sum(estimate) as decimal(10,2)) as estimate')->from(TABLE_TASK)
$hours = $this->dao->select('program,
cast(sum(consumed) as decimal(10,2)) as consumed,
cast(sum(estimate) as decimal(10,2)) as estimate')
->from(TABLE_TASK)
->where('program')->in($programIdList)
->andWhere('deleted')->eq(0)
->andWhere('parent')->lt(1)
@@ -154,16 +158,16 @@ class programModel extends model
foreach($programs as $programID => $program)
{
$program->teamCount = isset($teams[$programID]) ? $teams[$programID]->count : 0;
$program->consumed = isset($hours[$programID]) ? $hours[$programID]->consumed : 0;
$program->estimate = isset($hours[$programID]) ? $hours[$programID]->estimate : 0;
$program->leftTasks = isset($leftTasks[$programID]) ? $leftTasks[$programID]->leftTasks : 0;
$program->allStories = isset($allStories[$programID]) ? $allStories[$programID]->allStories : 0;
$program->doneStories = isset($doneStories[$programID]) ? $doneStories[$programID]->doneStories : 0;
$program->leftStories = isset($leftStories[$programID]) ? $leftStories[$programID]->leftStories : 0;
$program->leftBugs = isset($leftBugs[$programID]) ? $leftBugs[$programID]->leftBugs : 0;
$program->allBugs = isset($allBugs[$programID]) ? $allBugs[$programID]->allBugs : 0;
$program->doneBugs = isset($doneBugs[$programID]) ? $doneBugs[$programID]->doneBugs : 0;
$program->teamCount = isset($teams[$programID]) ? $teams[$programID]->count : 0;
$program->consumed = isset($hours[$programID]) ? $hours[$programID]->consumed : 0;
$program->estimate = isset($hours[$programID]) ? $hours[$programID]->estimate : 0;
$program->leftTasks = isset($leftTasks[$programID]) ? $leftTasks[$programID]->leftTasks : 0;
$program->allStories = isset($allStories[$programID]) ? $allStories[$programID]->allStories : 0;
$program->doneStories = isset($doneStories[$programID]) ? $doneStories[$programID]->doneStories : 0;
$program->leftStories = isset($leftStories[$programID]) ? $leftStories[$programID]->leftStories : 0;
$program->leftBugs = isset($leftBugs[$programID]) ? $leftBugs[$programID]->leftBugs : 0;
$program->allBugs = isset($allBugs[$programID]) ? $allBugs[$programID]->allBugs : 0;
$program->doneBugs = isset($doneBugs[$programID]) ? $doneBugs[$programID]->doneBugs : 0;
}
return $programs;
@@ -208,7 +212,7 @@ class programModel extends model
foreach($programs as $programID => $program)
{
$orderBy = $program->template == 'cmmi' ? 'id_asc' : 'id_desc';
$orderBy = $program->template == 'waterfall' ? 'id_asc' : 'id_desc';
$program->projects = $this->project->getProjectStats($status, 0, 0, $itemCounts, $orderBy, $pager, $programID);
$program->teamCount = isset($teams[$programID]) ? $teams[$programID]->count : 0;
$program->estimate = isset($estimates[$programID]) ? $estimates[$programID]->estimate : 0;
@@ -320,7 +324,7 @@ class programModel extends model
$this->dao->insert(TABLE_USERGROUP)->data($groupPriv)->exec();
}
if($project->template == 'cmmi')
if($project->template == 'waterfall')
{
$product = new stdclass();
$product->name = $project->name;
+3 -3
View File
@@ -4,8 +4,8 @@
<div class='panel' data-url='<?php echo $this->createLink('program', 'index', "programID=$program->id", '', '', $program->id);?>'>
<div class='panel-heading'>
<strong class='program-name' title='<?php echo $program->name;?>'><?php echo $program->name;?></strong>
<?php if($program->template === 'cmmi'): ?>
<span class='program-type-label label label-warning label-outline'><?php echo $lang->program->cmmi; ?></span>
<?php if($program->template === 'waterfall'): ?>
<span class='program-type-label label label-warning label-outline'><?php echo $lang->program->waterfall; ?></span>
<?php else: ?>
<span class='program-type-label label label-info label-outline'><?php echo $lang->program->scrum; ?></span>
<?php endif; ?>
@@ -31,7 +31,7 @@
<span><i class='icon icon-clock'></i> <?php printf($lang->program->hoursUnit, $program->estimate); ?></span>
<span><i class='icon icon-cost'></i> <?php echo $program->budget . '' . zget($lang->program->unitList, $program->budgetUnit);?></span>
</div>
<?php if($program->template === 'cmmi'): ?>
<?php if($program->template === 'waterfall'): ?>
<div class='program-detail program-stages'>
<p class='text-muted'><?php echo $lang->program->ongoingStage; ?></p>
<?php
+1 -1
View File
@@ -63,7 +63,7 @@
<th><?php echo $lang->program->code;?></th>
<td><?php echo html::input('code', $code, "class='form-control' required");?></td><td></td><td></td>
</tr>
<?php if($template == 'cmmi'):?>
<?php if($template == 'waterfall'):?>
<tr>
<th><?php echo $lang->program->category;?></th>
<td><?php echo html::select('category', $lang->program->categoryList, '', "class='form-control'");?></td><td></td><td></td>
+3 -3
View File
@@ -23,9 +23,9 @@
</div>
<div class='col-xs-6'>
<div class='program-type text-center'>
<img class='program-type-img' data-type='cmmi' src='<?php echo $config->webRoot . 'theme/default/images/main/cmmi.png'?>'>
<h3><?php echo $lang->program->cmmi; ?></h3>
<p><?php echo $lang->program->cmmiTitle; ?></p>
<img class='program-type-img' data-type='waterfall' src='<?php echo $config->webRoot . 'theme/default/images/main/waterfall.png'?>'>
<h3><?php echo $lang->program->waterfall; ?></h3>
<p><?php echo $lang->program->waterfallTitle; ?></p>
</div>
</div>
</div>
+1 -1
View File
@@ -39,7 +39,7 @@
<th><?php echo $lang->program->code;?></th>
<td><?php echo html::input('code', $program->code, "class='form-control' required");?></td><td></td><td></td>
</tr>
<?php if($program->template == 'cmmi'):?>
<?php if($program->template == 'waterfall'):?>
<tr>
<th><?php echo $lang->program->category;?></th>
<td><?php echo html::select('category', $lang->program->categoryList, $program->category, "class='form-control'");?></td><td></td><td></td>
+1 -1
View File
@@ -45,7 +45,7 @@ class project extends control
if($this->app->viewType != 'mhtml') unset($this->lang->project->menu->index);
$this->commonAction($projectID);
if(common::hasPriv('project', 'create')) $this->lang->modulePageActions = html::a($this->createLink('project', 'create', ''), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->project->create, '', "class='btn btn-primary'");
if(common::hasPriv('project', 'create')) $this->lang->modulePageActions = html::a($this->createLink('project', 'create'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->project->create, '', "class='btn btn-primary'");
$this->view->title = $this->lang->project->index;
$this->view->position[] = $this->lang->project->index;
+3 -3
View File
@@ -65,7 +65,7 @@ class projectModel extends model
$program = $this->getByID($this->session->program);
if(empty($projects))
{
if($program->template == 'cmmi')
if($program->template == 'waterfall')
{
if(($this->app->moduleName == 'programplan' && $this->app->methodName != 'create') || $this->app->moduleName == 'project') die(js::locate(helper::createLink('programplan', 'create', "progarmID=$program->id")));
}
@@ -437,7 +437,7 @@ class projectModel extends model
$member->account = $value;
$member->join = helper::today();
$member->role = $this->lang->project->$fieldName;
$member->days = isset($project->days)?$project->days:0;
$member->days = zget($project, 'days', 0);
$member->type = 'project';
$member->hours = $this->config->project->defaultWorkhours;
$this->dao->replace(TABLE_TEAM)->data($member)->exec();
@@ -863,7 +863,7 @@ class projectModel extends model
->orderBy('t1.order desc')
->fetchAll('id');
if($program->template == 'cmmi')
if($program->template == 'waterfall')
{
foreach($projects as $projectID => $project)
{
+9 -9
View File
@@ -16,13 +16,13 @@
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php
echo html::a($this->createLink('release', 'browse', "productID={$product->id}&branch=$branch&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->createLink('release', 'browse', "productID={$product->id}&branch=$branch&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
echo html::a($this->createLink('release', 'browse', "productID={$product->id}&branch=$branch&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
?>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('release', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'", '');?>
<?php common::printLink('release', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent" class='main-table'>
@@ -53,11 +53,11 @@
<tbody>
<?php foreach($releases as $release):?>
<tr>
<td><?php echo html::a(helper::createLink('release', 'view', "releaseID=$release->id"), sprintf('%03d', $release->id));?></td>
<td><?php echo html::a(inlink('view', "releaseID=$release->id"), sprintf('%03d', $release->id));?></td>
<td>
<?php
$flagIcon = $release->marker ? "<icon class='icon icon-flag-alt' title='{$lang->release->marker}'></icon> " : '';
echo html::a($this->createLink('release', 'view', "release=$release->id"), $release->name) . $flagIcon;
echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon;
?>
</td>
<td title='<?php echo $release->buildName?>'><?php echo empty($release->project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
@@ -71,14 +71,14 @@
</td>
<td class='c-actions'>
<?php
if(common::hasPriv('release', 'linkStory')) echo html::a($this->createLink('release', 'view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
if(common::hasPriv('release', 'linkBug')) echo html::a($this->createLink('release', 'view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
if(common::hasPriv('release', 'linkStory')) echo html::a(inlink('view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
if(common::hasPriv('release', 'linkBug')) echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
if(common::hasPriv('release', 'changeStatus', $release))
{
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
echo html::a($this->createLink('release', 'changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'");
}
common::printIcon('release', 'edit', "release=$release->id", $release, 'list', '', '', '', '');
common::printIcon('release', 'edit', "release=$release->id", $release, 'list');
if(common::hasPriv('release', 'delete', $release))
{
$deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes");
+6 -6
View File
@@ -16,7 +16,7 @@
<?php js::set('confirmUnlinkBug', $lang->release->confirmUnlinkBug)?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php $browseLink = $this->session->releaseList ? $this->session->releaseList : $this->createLink('release', 'browse', "productID=$release->product");?>
<?php $browseLink = $this->session->releaseList ? $this->session->releaseList : inlink('browse', "productID=$release->product");?>
<?php common::printBack($browseLink, 'btn btn-primary');?>
<div class='divider'></div>
<div class='page-title'>
@@ -38,10 +38,10 @@
if(common::hasPriv('release', 'changeStatus', $release))
{
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
echo html::a($this->createLink('release', 'changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ' . $lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'");
echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ' . $lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'");
}
if(common::hasPriv('release', 'edit')) echo html::a($this->createLink('release', 'edit', "releaseID=$release->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
if(common::hasPriv('release', 'delete')) echo html::a($this->createLink('release', 'delete', "releaseID=$release->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
if(common::hasPriv('release', 'edit')) echo html::a(inlink('edit', "releaseID=$release->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
if(common::hasPriv('release', 'delete')) echo html::a(inlink('delete', "releaseID=$release->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
}
?>
</div>
@@ -138,7 +138,7 @@
<?php
if(common::hasPriv('release', 'batchUnlinkStory'))
{
$unlinkURL = $this->createLink('release', 'batchUnlinkStory', "release=$release->id");
$unlinkURL = inlink('batchUnlinkStory', "release=$release->id");
echo html::a('###', $lang->release->batchUnlink, '', "onclick='setFormAction(\"$unlinkURL\", \"hiddenwin\", this)' class='btn'");
}
@@ -242,7 +242,7 @@
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"leftBug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
<div class='linkBox cell hidden'></div>
<?php endif;?>
<form class='main-table table-bug' method='post' target='hiddenwin' action="<?php echo $this->createLink('release', 'batchUnlinkBug', "releaseID=$release->id&type=leftBug");?>" id='linkedBugsForm' data-ride="table">
<form class='main-table table-bug' method='post' target='hiddenwin' action="<?php echo inlink('batchUnlinkBug', "releaseID=$release->id&type=leftBug");?>" id='linkedBugsForm' data-ride="table">
<table class='table has-sort-head' id='leftBugList'>
<?php $canBatchUnlink = common::hasPriv('release', 'batchUnlinkBug');?>
<?php $vars = "releaseID={$release->id}&type=leftBug&link=$link&param=$param&orderBy=%s";?>
+2 -2
View File
@@ -52,8 +52,8 @@ $config->risk->search['params']['prevention'] = array('operator' => 'incl
$config->risk->search['params']['remedy'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->risk->search['params']['plannedClosedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->risk->search['params']['actualClosedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->risk->search['params']['createdBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->risk->search['params']['createdDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->risk->search['params']['createdBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->risk->search['params']['createdDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->risk->search['params']['resolution'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
$config->risk->search['params']['resolvedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->risk->search['params']['activateBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
+10 -18
View File
@@ -1,6 +1,6 @@
<?php
/**
* The control file of risk currentModule of ZenTaoPMS.
* The control file of risk 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)
@@ -28,8 +28,8 @@ class risk extends control
$uri = $this->app->getURI(true);
$this->session->set('riskList', $uri);
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
/* Build the search form. */
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
$actionURL = $this->createLink('risk', 'browse', "browseType=bysearch&queryID=myQueryID");
$this->risk->buildSearchForm($queryID, $actionURL);
@@ -61,7 +61,7 @@ class risk extends control
if($_POST)
{
$riskID = $this->risk->create();
$response['result'] = 'success';
$response['message'] = $this->lang->saveSuccess;
if(!$riskID)
@@ -187,12 +187,9 @@ class risk extends control
*/
public function delete($riskID, $confirm = 'no')
{
$risk = $this->risk->getById($riskID);
if($confirm == 'no')
{
echo js::confirm($this->lang->risk->confirmDelete, $this->createLink('risk', 'delete', "risk=$riskID&confirm=yes"), '');
exit;
die(js::confirm($this->lang->risk->confirmDelete, $this->createLink('risk', 'delete', "risk=$riskID&confirm=yes"), ''));
}
else
{
@@ -214,7 +211,7 @@ class risk extends control
if($_POST)
{
$changes = array();
if($this->post->isChange == 1) $changes = $this->risk->track($riskID);
if($this->post->isChange) $changes = $this->risk->track($riskID);
$response['result'] = 'success';
$response['message'] = $this->lang->saveSuccess;
@@ -258,10 +255,9 @@ class risk extends control
$changes = $this->risk->assign($riskID);
if(dao::isError()) die(js::error(dao::getError()));
$this->loadModel('action');
if(!empty($changes))
{
$actionID = $this->action->create('risk', $riskID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$actionID = $this->loadModel('action')->create('risk', $riskID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->action->logHistory($actionID, $changes);
}
@@ -292,10 +288,9 @@ class risk extends control
$changes = $this->risk->cancel($riskID);
if(dao::isError()) die(js::error(dao::getError()));
$this->loadModel('action');
if(!empty($changes))
{
$actionID = $this->action->create('risk', $riskID, 'Canceled', $this->post->comment);
$actionID = $this->loadModel('action')->create('risk', $riskID, 'Canceled', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
@@ -327,8 +322,7 @@ class risk extends control
if(!empty($changes))
{
$this->loadModel('action');
$actionID = $this->action->create('risk', $riskID, 'Closed', $this->post->comment);
$actionID = $this->loadModel('action')->create('risk', $riskID, 'Closed', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
@@ -360,8 +354,7 @@ class risk extends control
if(!empty($changes))
{
$this->loadModel('action');
$actionID = $this->action->create('risk', $riskID, 'Hangup', $this->post->comment);
$actionID = $this->loadModel('action')->create('risk', $riskID, 'Hangup', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
@@ -393,8 +386,7 @@ class risk extends control
if(!empty($changes))
{
$this->loadModel('action');
$actionID = $this->action->create('risk', $riskID, 'Activated', $this->post->comment);
$actionID = $this->loadModel('action')->create('risk', $riskID, 'Activated', $this->post->comment);
$this->action->logHistory($actionID, $changes);
}
+1 -1
View File
@@ -7,7 +7,7 @@ $(function()
{
var impact = $('#impact').val();
var probability = $('#probability').val();
var riskindex = parseInt(impact * probability);
var riskindex = parseInt(impact * probability);
var pri = '';
if(0 < riskindex && riskindex <= 5) pri = 'low';
if(5 < riskindex && riskindex <= 12) pri = 'middle';
+15 -16
View File
@@ -1,19 +1,4 @@
<?php
/* Actions */
$lang->risk->batchCreate = 'Batch Create';
$lang->risk->create = 'Create Risk';
$lang->risk->edit = 'Edit Risk';
$lang->risk->browse = 'Risks';
$lang->risk->view = 'Details';
$lang->risk->activate = 'Active';
$lang->risk->hangup = 'Suspend';
$lang->risk->close = 'Close';
$lang->risk->cancel = 'Cancle';
$lang->risk->track = 'Track';
$lang->risk->assignTo = 'Assign';
$lang->risk->delete = 'Delete';
$lang->risk->byQuery = 'Search';
/* Fields */
$lang->risk->common = 'Risk';
$lang->risk->source = 'Source';
@@ -51,11 +36,25 @@ $lang->risk->trackedBy = 'TrackedBy';
$lang->risk->trackedDate = 'TrackedDate';
$lang->risk->editedBy = 'EditedBy';
$lang->risk->editedDate = 'EditedDate';
$lang->risk->legendBasicInfo = 'Basic Info.';
$lang->risk->legendLifeTime = 'About Risk';
$lang->risk->confirmDelete = 'Do you want to delelte this risk?';
/* Actions */
$lang->risk->batchCreate = 'Batch Create';
$lang->risk->create = 'Create Risk';
$lang->risk->edit = 'Edit Risk';
$lang->risk->browse = 'Risks';
$lang->risk->view = 'Details';
$lang->risk->activate = 'Active';
$lang->risk->hangup = 'Suspend';
$lang->risk->close = 'Close';
$lang->risk->cancel = 'Cancle';
$lang->risk->track = 'Track';
$lang->risk->assignTo = 'Assign';
$lang->risk->delete = 'Delete';
$lang->risk->byQuery = 'Search';
$lang->risk->action = new stdclass();
$lang->risk->action->hangup = '$date, suspended by <strong>$actor</strong>.' . "\n";
$lang->risk->action->tracked = '$date, tracked by <strong>$actor</strong>.' . "\n";
+15 -16
View File
@@ -1,19 +1,4 @@
<?php
/* Actions */
$lang->risk->batchCreate = '批量添加';
$lang->risk->create = '添加风险';
$lang->risk->edit = '编辑风险';
$lang->risk->browse = '浏览列表';
$lang->risk->view = '风险详情';
$lang->risk->activate = '激活';
$lang->risk->hangup = '挂起';
$lang->risk->close = '关闭';
$lang->risk->cancel = '取消';
$lang->risk->track = '跟踪';
$lang->risk->assignTo = '指派';
$lang->risk->delete = '删除';
$lang->risk->byQuery = '搜索';
/* Fields */
$lang->risk->common = '风险';
$lang->risk->source = '来源';
@@ -51,11 +36,25 @@ $lang->risk->trackedBy = '由谁跟踪';
$lang->risk->trackedDate = '跟踪日期';
$lang->risk->editedBy = '由谁编辑';
$lang->risk->editedDate = '编辑日期';
$lang->risk->legendBasicInfo = '基本信息';
$lang->risk->legendLifeTime = '风险的一生';
$lang->risk->confirmDelete = '您确认删除该风险吗?';
/* Actions */
$lang->risk->batchCreate = '批量添加';
$lang->risk->create = '添加风险';
$lang->risk->edit = '编辑风险';
$lang->risk->browse = '浏览列表';
$lang->risk->view = '风险详情';
$lang->risk->activate = '激活';
$lang->risk->hangup = '挂起';
$lang->risk->close = '关闭';
$lang->risk->cancel = '取消';
$lang->risk->track = '跟踪';
$lang->risk->assignTo = '指派';
$lang->risk->delete = '删除';
$lang->risk->byQuery = '搜索';
$lang->risk->action = new stdclass();
$lang->risk->action->hangup = '$date, 由 <strong>$actor</strong> 挂起。' . "\n";
$lang->risk->action->tracked = '$date, 由 <strong>$actor</strong> 跟踪。' . "\n";
+1 -1
View File
@@ -78,7 +78,7 @@ class riskModel extends model
*/
public function update($riskID)
{
$oldRisk = $this->dao->select('*')->from(TABLE_RISK)->where('id')->eq((int)$riskID)->fetch();
$oldRisk = $this->getByID($riskID);
$risk = fixer::input('post')
->add('editedBy', $this->app->user->account)
+1 -2
View File
@@ -54,8 +54,7 @@ class searchModel extends model
$operator = ($field->control == 'input' or $field->control == 'textarea') ? 'include' : '=';
$control = ($field->control == 'select' or $field->control == 'radio' or $field->control == 'checkbox') ? 'select' : 'input';
$options = $this->workflowfield->getFieldOptions($field);
/* Set date zui for date and datetime control. */
$class = ($field->control == 'date' or $field->control == 'datetime') ? 'date' : '';
$class = ($field->control == 'date' or $field->control == 'datetime') ? 'date' : ''; //Set date zui for date and datetime control.
$searchConfig['fields'][$field->field] = $field->name;
$searchConfig['params'][$field->field] = array('operator' => $operator, 'control' => $control, 'values' => $options, 'class' => $class);
+2 -2
View File
@@ -2979,7 +2979,7 @@ class storyModel extends model
echo $story->sourceNote;
break;
case 'status':
if(isset($this->config->qcVersion) && $story->storyChanged)
if($story->storyChanged)
{
print("<span class='status-story status-changed'>{$this->lang->story->storyChanged}</span>");
break;
@@ -3069,7 +3069,7 @@ class storyModel extends model
break;
case 'actions':
$vars = "story={$story->id}";
if(isset($this->config->qcVersion) && $story->storyChanged)
if($story->storyChanged)
{
common::printIcon('story', 'processStoryChange', "storyID=$story->id", '', 'list', 'search', '', 'iframe', true, '', $this->lang->story->process);
break;
+2 -2
View File
@@ -382,7 +382,7 @@
<div class="cell">
<div class='tabs'>
<ul class='nav nav-tabs'>
<?php if($program->template == 'cmmi'):?>
<?php if($program->template == 'waterfall'):?>
<li class='active'><a href='#legendStories' data-toggle='tab'><?php echo $story->type == 'story' ? $lang->story->requirement : $lang->story->story;?></a></li>
<li><a href='#legendProjectAndTask' data-toggle='tab'><?php echo $lang->story->legendProjectAndTask;?></a></li>
<li><a href='#legendRelated' data-toggle='tab'><?php echo $lang->story->legendRelated;?></a></li>
@@ -392,7 +392,7 @@
<?php endif;?>
</ul>
<div class='tab-content'>
<?php if($program->template == 'cmmi'):?>
<?php if($program->template == 'waterfall'):?>
<div class='tab-pane active' id='legendStories'>
<ul class="list-unstyled">
<?php
+2 -2
View File
@@ -47,7 +47,7 @@ class task extends control
}
$program = $this->loadModel('project')->getByID($this->session->program);
if($program->template == 'cmmi') $this->config->task->create->requiredFields .= ',estStarted,deadline';
if($program->template == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
$task = new stdClass();
$task->module = $moduleID;
@@ -233,7 +233,7 @@ class task extends control
}
$program = $this->loadModel('project')->getByID($this->session->program);
if($program->template == 'cmmi') $this->config->task->create->requiredFields .= ',estStarted,deadline';
if($program->template == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
$project = $this->project->getById($projectID);
$taskLink = $this->createLink('project', 'browse', "projectID=$projectID&tab=task");
+4 -4
View File
@@ -506,7 +506,7 @@ class testcaseModel extends model
* @param string $account
* @param string $orderBy
* @param object $pager
* @param string $auto no|unit
* @param string $auto no|unit|skip
* @access public
* @return array
*/
@@ -520,7 +520,7 @@ class testcaseModel extends model
->andWhere('t3.status')->ne('done')
->andWhere('t3.deleted')->eq(0)
->andWhere('t2.deleted')->eq(0)
->beginIF($auto != 'unit')->andWhere('t2.auto')->ne('unit')->fi()
->beginIF($auto != 'skip' and $auto != 'unit')->andWhere('t2.auto')->ne('unit')->fi()
->beginIF($auto == 'unit')->andWhere('t2.auto')->eq('unit')->fi()
->orderBy($orderBy)->page($pager)->fetchAll();
}
@@ -531,7 +531,7 @@ class testcaseModel extends model
* @param string $account
* @param string $orderBy
* @param object $pager
* @param string $auto no|unit
* @param string $auto no|unit|skip
* @access public
* @return array
*/
@@ -540,7 +540,7 @@ class testcaseModel extends model
return $this->dao->findByOpenedBy($account)->from(TABLE_CASE)
->andWhere('product')->ne(0)
->andWhere('deleted')->eq(0)
->beginIF($auto != 'unit')->andWhere('auto')->ne('unit')->fi()
->beginIF($auto != 'skip' and $auto != 'unit')->andWhere('auto')->ne('unit')->fi()
->beginIF($auto == 'unit')->andWhere('auto')->eq('unit')->fi()
->orderBy($orderBy)->page($pager)->fetchAll();
}
+3 -6
View File
@@ -56,10 +56,7 @@ class testreport extends control
$object = $this->$objectType->getById($objectID);
if($extra) $task = $this->testtask->getById($extra);
if(isset($task->name))
$name = $extra ? $task->name : $object->name;
else
$name = '';
$title = $extra ? $task->name : $object->name;
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -99,8 +96,8 @@ class testreport extends control
if($projects) $projects = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in($projects)->fetchPairs('id', 'name');
if($tasks) $tasks = $this->dao->select('id,name')->from(TABLE_TESTTASK)->where('id')->in($tasks)->fetchPairs('id', 'name');
$this->view->title = $name . $this->lang->colon . $this->lang->testreport->common;
$this->view->position[] = html::a(inlink('browse', "objectID=$objectID&objectType=$objectType&extra=$extra"), $extra ? $task->name : isset($object->name) ? $object->name : '');
$this->view->title = $title . $this->lang->colon . $this->lang->testreport->common;
$this->view->position[] = html::a(inlink('browse', "objectID=$objectID&objectType=$objectType&extra=$extra"), $title);
$this->view->position[] = $this->lang->testreport->browse;
$this->view->reports = $reports;
+2 -2
View File
@@ -20,7 +20,7 @@
</span>
</div>
<div class='pull-right btn-toolbar'>
<?php if($objectType == 'product') common::printLink('testreport', 'create', "objectID=0&objectType=testtask&productID=$objectID", "<i class='icon icon-plus'></i>" . $lang->testreport->create, '', "class='btn btn-primary'", '');?>
<?php if($objectType == 'product') common::printLink('testreport', 'create', "objectID=0&objectType=testtask&productID=$objectID", "<i class='icon icon-plus'></i>" . $lang->testreport->create, '', "class='btn btn-primary'");?>
</div>
</div>
<?php endif;?>
@@ -48,7 +48,7 @@
<?php foreach($reports as $report):?>
<tr>
<td><?php echo html::a(helper::createLink('testreport', 'view', "reportID=$report->id"), sprintf('%03d', $report->id));?></td>
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(helper::createLink('testreport', 'view', "reportID=$report->id&from=$objectType"), $report->title)?></td>
<td class='text-left' title='<?php $report->title?>'><?php echo html::a(inlink('view', "reportID=$report->id&from=$objectType"), $report->title)?></td>
<td><?php echo zget($users, $report->createdBy);?></td>
<td><?php echo substr($report->createdDate, 2);?></td>
<?php $projectName = $report->project ? '#' . $report->project . $projects[$report->project] : '';?>
+2 -2
View File
@@ -21,7 +21,7 @@
</a>
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('testsuite', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-primary'", '');?>
<?php common::printLink('testsuite', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-primary'");?>
</div>
</div>
<div id='mainContent' class='main-table' data-ride='table'>
@@ -54,7 +54,7 @@
<td class='text-left' title="<?php echo $suite->name?>">
<?php if($suite->type == 'public') echo "<span class='label label-success label-badge'>{$lang->testsuite->authorList['public']}</span> ";?>
<?php if($suite->type == 'private') echo "<span class='label label-info label-badge'>{$lang->testsuite->authorList['private']}</span> ";?>
<?php echo html::a(helper::createLink('testsuite', 'view', "suiteID=$suite->id"), $suite->name);?>
<?php echo html::a(inlink('view', "suiteID=$suite->id"), $suite->name);?>
</td>
<td><?php echo $suite->desc;?></td>
<td><?php echo zget($users, $suite->addedBy);?></td>
+5 -5
View File
@@ -29,13 +29,13 @@ $status = $this->session->testTaskVersionStatus;
<a href='javascript:;' class='btn btn-link btn-limit' data-toggle='dropdown'><span class='text' title='<?php echo $viewName;?>'><?php echo $viewName;?></span> <span class='caret'></span></a>
<ul class='dropdown-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
<?php
echo "<li>" . html::a($this->createLink('testtask', 'browse', "productID=$productID&branch=0&type=all,$status"), $lang->testtask->all) . "</li>";
echo "<li>" . html::a($this->createLink('testtask', 'browse', "productID=$productID&branch=$branch&type=local,$status"), $productName, '', "title='{$productName}' class='text-ellipsis'") . "</li>";
echo "<li>" . html::a(inlink('browse', "productID=$productID&branch=0&type=all,$status"), $lang->testtask->all) . "</li>";
echo "<li>" . html::a(inlink('browse', "productID=$productID&branch=$branch&type=local,$status"), $productName, '', "title='{$productName}' class='text-ellipsis'") . "</li>";
?>
</ul>
</div>
<?php foreach($lang->testtask->featureBar['browse'] as $key => $label):?>
<?php echo html::a($this->createLink('testtask', 'browse', "productID=$productID&branch=$branch&type=$scope,$key"), "<span class='text'>$label</span>", '', "id='{$key}Tab' class='btn btn-link'");?>
<?php echo html::a(inlink('browse', "productID=$productID&branch=$branch&type=$scope,$key"), "<span class='text'>$label</span>", '', "id='{$key}Tab' class='btn btn-link'");?>
<?php endforeach;?>
<?php $condition = "productID=$productID&branch=$branch&type=$scope,$status&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}&pageID=1"?>
<div class='input-group w-300px input-group-sm'>
@@ -79,8 +79,8 @@ $status = $this->session->testTaskVersionStatus;
<tbody>
<?php foreach($tasks as $task):?>
<tr class='text-left'>
<td><?php echo html::a($this->createLink('testtask', 'cases', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a($this->createLink('testtask', 'cases', "taskID=$task->id"), $task->name);?></td>
<td><?php echo html::a(inlink('cases', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
<td class='c-name' title="<?php echo $task->name?>"><?php echo html::a(inlink('cases', "taskID=$task->id"), $task->name);?></td>
<td class='c-name' title="<?php echo $task->productName?>"><?php echo $task->productName?></td>
<td class='c-name' title="<?php echo $task->projectName?>"><?php echo $task->projectName?></td>
<td class='c-name'><?php echo ($task->build == 'trunk' || empty($task->buildName)) ? $lang->trunk : html::a($this->createLink('build', 'view', "buildID=$task->build", '', true), $task->buildName);?></td>
+1 -1
View File
@@ -890,7 +890,7 @@ class treeModel extends model
}
/**
* Create link of requirement for cmmi.
* Create link of requirement for waterfall.
*
* @param string $type
* @param object $module
+2 -2
View File
@@ -23,7 +23,7 @@
<div><?php echo html::a('index.php', $lang->upgrade->tohome, '', "class='btn btn-primary btn-wide' id='tohome'")?></div>
</div>
</div>
<!--div class='divider'></div>
<div class='divider'></div>
<div class='col-md-6'>
<div class='panel adbox'>
<div class='panel-heading'><strong><?php echo $lang->install->promotion?></strong></div>
@@ -38,7 +38,7 @@
<?php endforeach;?>
</div>
</div>
</div-->
</div>
</div>
</div>
</div>
+2 -2
View File
@@ -120,9 +120,9 @@ class weeklyModel extends model
}
/**
* GetThisMonday
* Get monday for a date.
*
* @param int $date
* @param int $date
* @access public
* @return date
*/