Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -2,6 +2,7 @@ config/my.php
|
||||
www/data/
|
||||
www/install.php
|
||||
www/upgrade.php
|
||||
www/ok.txt
|
||||
tools/*
|
||||
release/*
|
||||
tmp/*
|
||||
|
||||
@@ -27,7 +27,7 @@ include './framework/router.class.php';
|
||||
include './framework/control.class.php';
|
||||
include './framework/model.class.php';
|
||||
include './framework/helper.class.php';
|
||||
helper::import(realpath('./config/config.php'));
|
||||
include realpath('./config/config.php');
|
||||
|
||||
/* Set the PATH_INFO variable. */
|
||||
if($config->requestType == 'PATH_INFO')
|
||||
|
||||
+7
-1
@@ -17,7 +17,7 @@ if(!function_exists('getWebRoot')){function getWebRoot(){}}
|
||||
|
||||
/* Basic settings. */
|
||||
$config = new config();
|
||||
$config->version = '9.0.beta'; // The version of zentaopms. Don't change it.
|
||||
$config->version = '9.1'; // The version of zentaopms. Don't change it.
|
||||
$config->charset = 'UTF-8'; // The charset of zentaopms.
|
||||
$config->cookieLife = time() + 2592000; // The cookie life time.
|
||||
$config->timezone = 'Asia/Shanghai'; // The time zone setting, for more see http://www.php.net/manual/en/timezones.php
|
||||
@@ -170,6 +170,9 @@ define('TABLE_CRON', '`' . $config->db->prefix . 'cron`');
|
||||
define('TABLE_MAILQUEUE', '`' . $config->db->prefix . 'mailqueue`');
|
||||
define('TABLE_BLOCK', '`' . $config->db->prefix . 'block`');
|
||||
define('TABLE_DOCCONTENT', '`' . $config->db->prefix . 'doccontent`');
|
||||
define('TABLE_TESTSUITE', '`' . $config->db->prefix . 'testsuite`');
|
||||
define('TABLE_SUITECASE', '`' . $config->db->prefix . 'suitecase`');
|
||||
define('TABLE_TESTREPORT', '`' . $config->db->prefix . 'testreport`');
|
||||
if(!defined('TABLE_LANG')) define('TABLE_LANG', '`' . $config->db->prefix . 'lang`');
|
||||
|
||||
$config->objectTables['product'] = TABLE_PRODUCT;
|
||||
@@ -183,6 +186,8 @@ $config->objectTables['bug'] = TABLE_BUG;
|
||||
$config->objectTables['case'] = TABLE_CASE;
|
||||
$config->objectTables['testcase'] = TABLE_CASE;
|
||||
$config->objectTables['testtask'] = TABLE_TESTTASK;
|
||||
$config->objectTables['testsuite'] = TABLE_TESTSUITE;
|
||||
$config->objectTables['testreport'] = TABLE_TESTREPORT;
|
||||
$config->objectTables['user'] = TABLE_USER;
|
||||
$config->objectTables['doc'] = TABLE_DOC;
|
||||
$config->objectTables['doclib'] = TABLE_DOCLIB;
|
||||
@@ -190,6 +195,7 @@ $config->objectTables['todo'] = TABLE_TODO;
|
||||
$config->objectTables['custom'] = TABLE_LANG;
|
||||
$config->objectTables['branch'] = TABLE_BRANCH;
|
||||
$config->objectTables['module'] = TABLE_MODULE;
|
||||
$config->objectTables['caselib'] = TABLE_TESTSUITE;
|
||||
|
||||
/* Include extension config files. */
|
||||
$extConfigFiles = glob($configRoot . 'ext/*.php');
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
CREATE TABLE IF NOT EXISTS `zt_testsuite` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`type` varchar(20) NOT NULL,
|
||||
`addedBy` char(30) NOT NULL,
|
||||
`addedDate` datetime NOT NULL,
|
||||
`lastEditedBy` char(30) NOT NULL,
|
||||
`lastEditedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE IF NOT EXISTS `zt_suitecase` (
|
||||
`suite` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`case` mediumint(8) unsigned NOT NULL,
|
||||
`version` smallint(5) unsigned NOT NULL,
|
||||
UNIQUE KEY `suitecase` (`suite`,`case`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE `zt_case` ADD `lib` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `branch`;
|
||||
ALTER TABLE `zt_case` ADD `fromCaseID` mediumint(8) unsigned NOT NULL AFTER `fromBug`;
|
||||
ALTER TABLE `zt_case` ADD `reviewedBy` varchar(255) NOT NULL AFTER `openedDate`;
|
||||
ALTER TABLE `zt_case` ADD `reviewedDate` date NOT NULL AFTER `reviewedBy`;
|
||||
ALTER TABLE `zt_casestep` ADD `parent` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `id`;
|
||||
ALTER TABLE `zt_casestep` ADD `type` varchar(10) NOT NULL DEFAULT 'step' AFTER `version`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_testreport` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`tasks` varchar(255) NOT NULL,
|
||||
`builds` varchar(255) NOT NULL,
|
||||
`title` varchar(255) NOT NULL,
|
||||
`begin` date NOT NULL,
|
||||
`end` date NOT NULL,
|
||||
`owner` char(30) NOT NULL,
|
||||
`members` text NOT NULL,
|
||||
`stories` text NOT NULL,
|
||||
`bugs` text NOT NULL,
|
||||
`cases` text NOT NULL,
|
||||
`report` text NOT NULL,
|
||||
`objectType` varchar(20) NOT NULL,
|
||||
`objectID` mediumint(8) unsigned NOT NULL,
|
||||
`createdBy` char(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
ALTER TABLE `zt_bug` ADD `deadline` date NOT NULL AFTER `assignedDate`;
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE `zt_burn` ADD `estimate` float NOT NULL AFTER `date`;
|
||||
+166
@@ -73,6 +73,7 @@ CREATE TABLE IF NOT EXISTS `zt_bug` (
|
||||
`openedBuild` varchar(255) NOT NULL,
|
||||
`assignedTo` varchar(30) NOT NULL default '',
|
||||
`assignedDate` datetime NOT NULL,
|
||||
`deadline` date NOT NULL,
|
||||
`resolvedBy` varchar(30) NOT NULL default '',
|
||||
`resolution` varchar(30) NOT NULL default '',
|
||||
`resolvedBuild` varchar(30) NOT NULL default '',
|
||||
@@ -113,6 +114,7 @@ CREATE TABLE IF NOT EXISTS `zt_build` (
|
||||
CREATE TABLE IF NOT EXISTS `zt_burn` (
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`date` date NOT NULL,
|
||||
`estimate` float NOT NULL,
|
||||
`left` float NOT NULL,
|
||||
`consumed` float NOT NULL,
|
||||
PRIMARY KEY (`project`,`date`)
|
||||
@@ -122,6 +124,7 @@ CREATE TABLE IF NOT EXISTS `zt_case` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`branch` mediumint(8) unsigned NOT NULL default '0',
|
||||
`lib` mediumint(8) unsigned NOT NULL default '0',
|
||||
`module` mediumint(8) unsigned NOT NULL default '0',
|
||||
`path` mediumint(8) unsigned NOT NULL default '0',
|
||||
`story` mediumint(30) unsigned NOT NULL default '0',
|
||||
@@ -143,11 +146,14 @@ CREATE TABLE IF NOT EXISTS `zt_case` (
|
||||
`order` tinyint(30) unsigned NOT NULL default '0',
|
||||
`openedBy` char(30) NOT NULL default '',
|
||||
`openedDate` datetime NOT NULL,
|
||||
`reviewedBy` varchar(255) NOT NULL,
|
||||
`reviewedDate` date NOT NULL,
|
||||
`lastEditedBy` char(30) NOT NULL default '',
|
||||
`lastEditedDate` datetime NOT NULL,
|
||||
`version` tinyint(3) unsigned NOT NULL default '0',
|
||||
`linkCase` varchar(255) NOT NULL,
|
||||
`fromBug` mediumint(8) unsigned NOT NULL,
|
||||
`fromCaseID` mediumint(8) unsigned NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
`lastRunner` varchar(30) NOT NULL,
|
||||
`lastRunDate` datetime NOT NULL,
|
||||
@@ -158,8 +164,10 @@ CREATE TABLE IF NOT EXISTS `zt_case` (
|
||||
-- DROP TABLE IF EXISTS `zt_casestep`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_casestep` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`parent` mediumint(8) unsigned NOT NULL default '0',
|
||||
`case` mediumint(8) unsigned NOT NULL default '0',
|
||||
`version` smallint(3) unsigned NOT NULL default '0',
|
||||
`type` varchar(10) NOT NULL DEFAULT 'step',
|
||||
`desc` text NOT NULL,
|
||||
`expect` text NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -552,6 +560,14 @@ CREATE TABLE IF NOT EXISTS `zt_storystage` (
|
||||
`stage` varchar(50) NOT NULL,
|
||||
KEY `story` (`story`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_suitecase`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_suitecase` (
|
||||
`suite` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`case` mediumint(8) unsigned NOT NULL,
|
||||
`version` smallint(5) unsigned NOT NULL,
|
||||
UNIQUE KEY `suitecase` (`suite`,`case`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_task`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_task` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
@@ -612,6 +628,29 @@ CREATE TABLE IF NOT EXISTS `zt_team` (
|
||||
`hours` float(2,1) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`project`,`account`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_testreport`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_testreport` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`tasks` varchar(255) NOT NULL,
|
||||
`builds` varchar(255) NOT NULL,
|
||||
`title` varchar(255) NOT NULL,
|
||||
`begin` date NOT NULL,
|
||||
`end` date NOT NULL,
|
||||
`owner` char(30) NOT NULL,
|
||||
`members` text NOT NULL,
|
||||
`stories` text NOT NULL,
|
||||
`bugs` text NOT NULL,
|
||||
`cases` text NOT NULL,
|
||||
`report` text NOT NULL,
|
||||
`objectType` varchar(20) NOT NULL,
|
||||
`objectID` mediumint(8) unsigned NOT NULL,
|
||||
`createdBy` char(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_testresult`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_testresult` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
@@ -639,6 +678,20 @@ CREATE TABLE IF NOT EXISTS `zt_testrun` (
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `task` (`task`,`case`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_testsuite`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_testsuite` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`type` varchar(20) NOT NULL,
|
||||
`addedBy` char(30) NOT NULL,
|
||||
`addedDate` datetime NOT NULL,
|
||||
`lastEditedBy` char(30) NOT NULL,
|
||||
`lastEditedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_testtask`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_testtask` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
@@ -903,6 +956,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1, 'mail', 'batchDelete'),
|
||||
(1, 'mail', 'browse'),
|
||||
(1, 'mail', 'delete'),
|
||||
(1, 'mail', 'resend'),
|
||||
(1, 'mail', 'detect'),
|
||||
(1, 'mail', 'edit'),
|
||||
(1, 'mail', 'index'),
|
||||
@@ -1071,12 +1125,17 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1, 'testcase', 'batchDelete'),
|
||||
(1, 'testcase', 'batchEdit'),
|
||||
(1, 'testcase', 'browse'),
|
||||
(1, 'testcase', 'bugs'),
|
||||
(1, 'testcase', 'confirmChange'),
|
||||
(1, 'testcase', 'confirmStoryChange'),
|
||||
(1, 'testcase', 'create'),
|
||||
(1, 'testcase', 'createBug'),
|
||||
(1, 'testcase', 'delete'),
|
||||
(1, 'testcase', 'edit'),
|
||||
(1, 'testcase', 'review'),
|
||||
(1, 'testcase', 'batchReview'),
|
||||
(1, 'testcase', 'batchCaseTypeChange'),
|
||||
(1, 'testcase', 'batchConfirmStoryChange'),
|
||||
(1, 'testcase', 'batchChangeModule'),
|
||||
(1, 'testcase', 'linkCases'),
|
||||
(1, 'testcase', 'unlinkCase'),
|
||||
@@ -1087,6 +1146,25 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1, 'testcase', 'index'),
|
||||
(1, 'testcase', 'showImport'),
|
||||
(1, 'testcase', 'view'),
|
||||
(1, 'testcase', 'importFromLib'),
|
||||
(1, 'testreport', 'browse'),
|
||||
(1, 'testreport', 'create'),
|
||||
(1, 'testreport', 'view'),
|
||||
(1, 'testreport', 'delete'),
|
||||
(1, 'testreport', 'edit'),
|
||||
(1, 'testsuite', 'index'),
|
||||
(1, 'testsuite', 'browse'),
|
||||
(1, 'testsuite', 'create'),
|
||||
(1, 'testsuite', 'view'),
|
||||
(1, 'testsuite', 'edit'),
|
||||
(1, 'testsuite', 'delete'),
|
||||
(1, 'testsuite', 'linkCase'),
|
||||
(1, 'testsuite', 'unlinkCase'),
|
||||
(1, 'testsuite', 'batchUnlinkCases'),
|
||||
(1, 'testsuite', 'library'),
|
||||
(1, 'testsuite', 'createLib'),
|
||||
(1, 'testsuite', 'createCase'),
|
||||
(1, 'testsuite', 'libView'),
|
||||
(1, 'testtask', 'batchAssign'),
|
||||
(1, 'testtask', 'batchRun'),
|
||||
(1, 'testtask', 'browse'),
|
||||
@@ -1101,6 +1179,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1, 'testtask', 'results'),
|
||||
(1, 'testtask', 'runcase'),
|
||||
(1, 'testtask', 'start'),
|
||||
(1, 'testtask', 'activate'),
|
||||
(1, 'testtask', 'block'),
|
||||
(1, 'testtask', 'report'),
|
||||
(1, 'testtask', 'unlinkcase'),
|
||||
(1, 'testtask', 'view'),
|
||||
(1, 'todo', 'batchCreate'),
|
||||
@@ -1279,10 +1360,14 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(2, 'task', 'start'),
|
||||
(2, 'task', 'view'),
|
||||
(2, 'testcase', 'browse'),
|
||||
(2, 'testcase', 'bugs'),
|
||||
(2, 'testcase', 'export'),
|
||||
(2, 'testcase', 'groupCase'),
|
||||
(2, 'testcase', 'index'),
|
||||
(2, 'testcase', 'view'),
|
||||
(2, 'testsuite', 'index'),
|
||||
(2, 'testsuite', 'browse'),
|
||||
(2, 'testsuite', 'view'),
|
||||
(2, 'testtask', 'browse'),
|
||||
(2, 'testtask', 'cases'),
|
||||
(2, 'testtask', 'create'),
|
||||
@@ -1456,11 +1541,16 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(3, 'testcase', 'batchCreate'),
|
||||
(3, 'testcase', 'batchEdit'),
|
||||
(3, 'testcase', 'browse'),
|
||||
(3, 'testcase', 'bugs'),
|
||||
(3, 'testcase', 'confirmChange'),
|
||||
(3, 'testcase', 'confirmStoryChange'),
|
||||
(3, 'testcase', 'create'),
|
||||
(3, 'testcase', 'createBug'),
|
||||
(3, 'testcase', 'edit'),
|
||||
(3, 'testcase', 'review'),
|
||||
(3, 'testcase', 'batchReview'),
|
||||
(3, 'testcase', 'batchCaseTypeChange'),
|
||||
(3, 'testcase', 'batchConfirmStoryChange'),
|
||||
(3, 'testcase', 'batchChangeModule'),
|
||||
(3, 'testcase', 'linkCases'),
|
||||
(3, 'testcase', 'unlinkCase'),
|
||||
@@ -1471,6 +1561,16 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(3, 'testcase', 'index'),
|
||||
(3, 'testcase', 'showImport'),
|
||||
(3, 'testcase', 'view'),
|
||||
(3, 'testreport', 'browse'),
|
||||
(3, 'testreport', 'view'),
|
||||
(3, 'testsuite', 'index'),
|
||||
(3, 'testsuite', 'browse'),
|
||||
(3, 'testsuite', 'create'),
|
||||
(3, 'testsuite', 'view'),
|
||||
(3, 'testsuite', 'edit'),
|
||||
(3, 'testsuite', 'delete'),
|
||||
(3, 'testsuite', 'linkCase'),
|
||||
(3, 'testsuite', 'unlinkCase'),
|
||||
(3, 'testtask', 'batchAssign'),
|
||||
(3, 'testtask', 'batchRun'),
|
||||
(3, 'testtask', 'browse'),
|
||||
@@ -1484,6 +1584,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(3, 'testtask', 'results'),
|
||||
(3, 'testtask', 'runcase'),
|
||||
(3, 'testtask', 'start'),
|
||||
(3, 'testtask', 'activate'),
|
||||
(3, 'testtask', 'block'),
|
||||
(3, 'testtask', 'report'),
|
||||
(3, 'testtask', 'unlinkcase'),
|
||||
(3, 'testtask', 'view'),
|
||||
(3, 'todo', 'batchCreate'),
|
||||
@@ -1690,11 +1793,15 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(4, 'task', 'start'),
|
||||
(4, 'task', 'view'),
|
||||
(4, 'testcase', 'browse'),
|
||||
(4, 'testcase', 'bugs'),
|
||||
(4, 'testcase', 'createBug'),
|
||||
(4, 'testcase', 'export'),
|
||||
(4, 'testcase', 'groupCase'),
|
||||
(4, 'testcase', 'index'),
|
||||
(4, 'testcase', 'view'),
|
||||
(4, 'testsuite', 'index'),
|
||||
(4, 'testsuite', 'browse'),
|
||||
(4, 'testsuite', 'view'),
|
||||
(4, 'testtask', 'batchAssign'),
|
||||
(4, 'testtask', 'browse'),
|
||||
(4, 'testtask', 'cases'),
|
||||
@@ -1935,11 +2042,20 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(5, 'task', 'report'),
|
||||
(5, 'task', 'view'),
|
||||
(5, 'testcase', 'browse'),
|
||||
(5, 'testcase', 'bugs'),
|
||||
(5, 'testcase', 'createBug'),
|
||||
(5, 'testcase', 'export'),
|
||||
(5, 'testcase', 'groupCase'),
|
||||
(5, 'testcase', 'index'),
|
||||
(5, 'testcase', 'view'),
|
||||
(5, 'testcase', 'importFromLib'),
|
||||
(5, 'testsuite', 'index'),
|
||||
(5, 'testsuite', 'browse'),
|
||||
(5, 'testsuite', 'view'),
|
||||
(5, 'testsuite', 'library'),
|
||||
(5, 'testsuite', 'createLib'),
|
||||
(5, 'testsuite', 'createCase'),
|
||||
(5, 'testsuite', 'libView'),
|
||||
(5, 'testtask', 'browse'),
|
||||
(5, 'testtask', 'cases'),
|
||||
(5, 'testtask', 'groupCase'),
|
||||
@@ -2157,10 +2273,14 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(6, 'task', 'start'),
|
||||
(6, 'task', 'view'),
|
||||
(6, 'testcase', 'browse'),
|
||||
(6, 'testcase', 'bugs'),
|
||||
(6, 'testcase', 'export'),
|
||||
(6, 'testcase', 'groupCase'),
|
||||
(6, 'testcase', 'index'),
|
||||
(6, 'testcase', 'view'),
|
||||
(6, 'testsuite', 'index'),
|
||||
(6, 'testsuite', 'browse'),
|
||||
(6, 'testsuite', 'view'),
|
||||
(6, 'testtask', 'browse'),
|
||||
(6, 'testtask', 'cases'),
|
||||
(6, 'testtask', 'create'),
|
||||
@@ -2384,11 +2504,20 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(7, 'task', 'report'),
|
||||
(7, 'task', 'view'),
|
||||
(7, 'testcase', 'browse'),
|
||||
(7, 'testcase', 'bugs'),
|
||||
(7, 'testcase', 'createBug'),
|
||||
(7, 'testcase', 'export'),
|
||||
(7, 'testcase', 'groupCase'),
|
||||
(7, 'testcase', 'index'),
|
||||
(7, 'testcase', 'view'),
|
||||
(7, 'testcase', 'importFromLib'),
|
||||
(7, 'testsuite', 'index'),
|
||||
(7, 'testsuite', 'browse'),
|
||||
(7, 'testsuite', 'view'),
|
||||
(7, 'testsuite', 'library'),
|
||||
(7, 'testsuite', 'createLib'),
|
||||
(7, 'testsuite', 'createCase'),
|
||||
(7, 'testsuite', 'libView'),
|
||||
(7, 'testtask', 'browse'),
|
||||
(7, 'testtask', 'cases'),
|
||||
(7, 'testtask', 'groupCase'),
|
||||
@@ -2584,12 +2713,17 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(8, 'testcase', 'batchDelete'),
|
||||
(8, 'testcase', 'batchEdit'),
|
||||
(8, 'testcase', 'browse'),
|
||||
(8, 'testcase', 'bugs'),
|
||||
(8, 'testcase', 'confirmChange'),
|
||||
(8, 'testcase', 'confirmStoryChange'),
|
||||
(8, 'testcase', 'create'),
|
||||
(8, 'testcase', 'createBug'),
|
||||
(8, 'testcase', 'delete'),
|
||||
(8, 'testcase', 'edit'),
|
||||
(8, 'testcase', 'review'),
|
||||
(8, 'testcase', 'batchReview'),
|
||||
(8, 'testcase', 'batchCaseTypeChange'),
|
||||
(8, 'testcase', 'batchConfirmStoryChange'),
|
||||
(8, 'testcase', 'batchChangeModule'),
|
||||
(8, 'testcase', 'linkCases'),
|
||||
(8, 'testcase', 'unlinkCase'),
|
||||
@@ -2600,6 +2734,24 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(8, 'testcase', 'index'),
|
||||
(8, 'testcase', 'showImport'),
|
||||
(8, 'testcase', 'view'),
|
||||
(8, 'testcase', 'importFromLib'),
|
||||
(8, 'testreport', 'browse'),
|
||||
(8, 'testreport', 'create'),
|
||||
(8, 'testreport', 'view'),
|
||||
(8, 'testreport', 'delete'),
|
||||
(8, 'testreport', 'edit'),
|
||||
(8, 'testsuite', 'index'),
|
||||
(8, 'testsuite', 'browse'),
|
||||
(8, 'testsuite', 'create'),
|
||||
(8, 'testsuite', 'view'),
|
||||
(8, 'testsuite', 'edit'),
|
||||
(8, 'testsuite', 'delete'),
|
||||
(8, 'testsuite', 'linkCase'),
|
||||
(8, 'testsuite', 'unlinkCase'),
|
||||
(8, 'testsuite', 'library'),
|
||||
(8, 'testsuite', 'createLib'),
|
||||
(8, 'testsuite', 'createCase'),
|
||||
(8, 'testsuite', 'libView'),
|
||||
(8, 'testtask', 'batchAssign'),
|
||||
(8, 'testtask', 'batchRun'),
|
||||
(8, 'testtask', 'browse'),
|
||||
@@ -2614,6 +2766,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(8, 'testtask', 'results'),
|
||||
(8, 'testtask', 'runcase'),
|
||||
(8, 'testtask', 'start'),
|
||||
(8, 'testtask', 'activate'),
|
||||
(8, 'testtask', 'block'),
|
||||
(8, 'testtask', 'report'),
|
||||
(8, 'testtask', 'unlinkcase'),
|
||||
(8, 'testtask', 'view'),
|
||||
(8, 'todo', 'batchCreate'),
|
||||
@@ -2767,10 +2922,14 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(9, 'task', 'report'),
|
||||
(9, 'task', 'view'),
|
||||
(9, 'testcase', 'browse'),
|
||||
(9, 'testcase', 'bugs'),
|
||||
(9, 'testcase', 'export'),
|
||||
(9, 'testcase', 'groupCase'),
|
||||
(9, 'testcase', 'index'),
|
||||
(9, 'testcase', 'view'),
|
||||
(9, 'testsuite', 'index'),
|
||||
(9, 'testsuite', 'browse'),
|
||||
(9, 'testsuite', 'view'),
|
||||
(9, 'testtask', 'browse'),
|
||||
(9, 'testtask', 'cases'),
|
||||
(9, 'testtask', 'groupCase'),
|
||||
@@ -2887,6 +3046,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(10, 'task', 'editEstimate'),
|
||||
(10, 'task', 'recordEstimate'),
|
||||
(10, 'task', 'view'),
|
||||
(10, 'testsuite', 'index'),
|
||||
(10, 'testsuite', 'browse'),
|
||||
(10, 'testsuite', 'view'),
|
||||
(10, 'todo', 'batchCreate'),
|
||||
(10, 'todo', 'batchEdit'),
|
||||
(10, 'todo', 'batchFinish'),
|
||||
@@ -2974,9 +3136,13 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(11, 'task', 'recordEstimate'),
|
||||
(11, 'task', 'view'),
|
||||
(11, 'testcase', 'browse'),
|
||||
(11, 'testcase', 'bugs'),
|
||||
(11, 'testcase', 'groupCase'),
|
||||
(11, 'testcase', 'index'),
|
||||
(11, 'testcase', 'view'),
|
||||
(11, 'testsuite', 'index'),
|
||||
(11, 'testsuite', 'browse'),
|
||||
(11, 'testsuite', 'view'),
|
||||
(11, 'testtask', 'browse'),
|
||||
(11, 'testtask', 'cases'),
|
||||
(11, 'testtask', 'groupCase'),
|
||||
|
||||
+546
-364
File diff suppressed because it is too large
Load Diff
@@ -1216,7 +1216,7 @@ class baseRouter
|
||||
*/
|
||||
public function setModuleName($moduleName = '')
|
||||
{
|
||||
$moduleName = strip_tags(urldecode(strtolower($moduleName)));
|
||||
$moduleName = strip_tags(strtolower($moduleName));
|
||||
if(!preg_match('/^[a-zA-Z0-9]+$/', $moduleName)) $this->triggerError("The modulename '$moduleName' illegal. ", __FILE__, __LINE__, $exit = true);
|
||||
$this->moduleName = $moduleName;
|
||||
}
|
||||
@@ -1251,7 +1251,7 @@ class baseRouter
|
||||
*/
|
||||
public function setMethodName($methodName = '')
|
||||
{
|
||||
$methodName = strip_tags(urldecode(strtolower($methodName)));
|
||||
$methodName = strip_tags(strtolower($methodName));
|
||||
if(!preg_match('/^[a-zA-Z0-9]+$/', $methodName)) $this->triggerError("The methodname '$methodName' illegal. ", __FILE__, __LINE__, $exit = true);
|
||||
$this->methodName = $methodName;
|
||||
}
|
||||
@@ -1544,7 +1544,7 @@ class baseRouter
|
||||
{
|
||||
if(isset($passedParams[$i]))
|
||||
{
|
||||
$defaultParams[$key] = strip_tags(urldecode($passedParams[$i]));
|
||||
$defaultParams[$key] = strip_tags($passedParams[$i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -89,7 +89,6 @@ class helper extends baseHelper
|
||||
static public function convertEncoding($string, $fromEncoding, $toEncoding = 'utf-8')
|
||||
{
|
||||
$toEncoding = str_replace('utf8', 'utf-8', $toEncoding);
|
||||
if($fromEncoding == $toEncoding) return $string;
|
||||
if(function_exists('mb_convert_encoding'))
|
||||
{
|
||||
/* Remove like utf-8//TRANSLIT. */
|
||||
@@ -99,10 +98,11 @@ class helper extends baseHelper
|
||||
/* Check string encoding. */
|
||||
$encoding = strtolower(mb_detect_encoding($string, array('ASCII','UTF-8','GB2312','GBK','BIG5')));
|
||||
if($encoding == $toEncoding) return $string;
|
||||
return mb_convert_encoding($string, $toEncoding, $fromEncoding);
|
||||
return mb_convert_encoding($string, $toEncoding, $encoding);
|
||||
}
|
||||
elseif(function_exists('iconv'))
|
||||
{
|
||||
if($fromEncoding == $toEncoding) return $string;
|
||||
$convertString = @iconv($fromEncoding, $toEncoding, $string);
|
||||
/* iconv error then return original. */
|
||||
if(!$convertString) return $string;
|
||||
|
||||
@@ -1923,6 +1923,9 @@ class baseSQL
|
||||
$pos = stripos($order, 'limit');
|
||||
$orders = $pos ? substr($order, 0, $pos) : $order;
|
||||
$limit = $pos ? substr($order, $pos) : '';
|
||||
$orders = trim($orders);
|
||||
if(empty($orders)) return $this;
|
||||
if(!preg_match('/^(\w+\.)?(`\w+`|\w+)( +(desc|asc))?( *(, *(\w+\.)?(`\w+`|\w+)( +(desc|asc))?)?)*$/i', $orders)) die("Order is bad request, The order is $orders");
|
||||
|
||||
$orders = explode(',', $orders);
|
||||
foreach($orders as $i => $order)
|
||||
@@ -1936,13 +1939,13 @@ class baseSQL
|
||||
$field = $value;
|
||||
/* such as t1.id field. */
|
||||
if(strpos($value, '.') !== false) list($table, $field) = explode('.', $field);
|
||||
/* Ignore order with function e.g. order by length(tag) asc. */
|
||||
if(strpos($field, '(') === false and strpos($field, '`') === false) $field = "`$field`";
|
||||
if(strpos($field, '`') === false) $field = "`$field`";
|
||||
|
||||
$orderParse[$key] = isset($table) ? $table . '.' . $field : $field;
|
||||
unset($table);
|
||||
}
|
||||
$orders[$i] = join(' ', $orderParse);
|
||||
if(empty($orders[$i])) unset($orders[$i]);
|
||||
}
|
||||
$order = join(',', $orders) . ' ' . $limit;
|
||||
|
||||
@@ -1962,7 +1965,11 @@ class baseSQL
|
||||
{
|
||||
if($this->inCondition and !$this->conditionIsTrue) return $this;
|
||||
if(empty($limit)) return $this;
|
||||
stripos($limit, 'limit') !== false ? $this->sql .= " $limit " : $this->sql .= ' ' . DAO::LIMIT . " $limit ";
|
||||
|
||||
/* filter limit. */
|
||||
$limit = trim(str_ireplace('limit', '', $limit));
|
||||
if(!preg_match('/^[0-9]+ *(, *[0-9]+)?$/', $limit)) die("Limit is bad query, The limit is $limit");
|
||||
$this->sql .= ' ' . DAO::LIMIT . " $limit ";
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,9 +97,6 @@ class html extends baseHTML
|
||||
*/
|
||||
static public function select($name = '', $options = array(), $selectedItems = "", $attrib = "", $append = false)
|
||||
{
|
||||
global $app;
|
||||
static $dataKeys;
|
||||
|
||||
$options = (array)($options);
|
||||
if($append and !isset($options[$selectedItems])) $options[$selectedItems] = $selectedItems;
|
||||
if(!is_array($options) or empty($options)) return false;
|
||||
@@ -113,54 +110,15 @@ class html extends baseHTML
|
||||
$string = "<select name='$name' {$id} $attrib>\n";
|
||||
|
||||
/* The options. */
|
||||
static $pinyin;
|
||||
if(empty($pinyin)) $pinyin = $app->loadClass('pinyin');
|
||||
|
||||
$joinOptions = '';
|
||||
$sign = ' aNd ';
|
||||
foreach($options as $value)
|
||||
{
|
||||
if(!isset($dataKeys[$value])) $joinOptions .= str_replace($sign, ' and ', $value) . $sign;
|
||||
}
|
||||
|
||||
if($joinOptions)
|
||||
{
|
||||
$valuesPinyin = $pinyin->romanize($joinOptions);
|
||||
$signLenth = strlen($sign);
|
||||
$pinyinSign = trim($sign);
|
||||
$pySignLenth = strlen($pinyinSign);
|
||||
while($joinOptions)
|
||||
{
|
||||
$valuePinyin = '';
|
||||
$value = '';
|
||||
|
||||
$pinyinPos = strpos($valuesPinyin, $pinyinSign);
|
||||
if($pinyinPos !== false)
|
||||
{
|
||||
$valuePinyin = substr($valuesPinyin, 0, $pinyinPos);
|
||||
$valuesPinyin = substr($valuesPinyin, $pinyinPos + $pySignLenth);
|
||||
}
|
||||
|
||||
$valuePos = strpos($joinOptions, $sign);
|
||||
if($valuePos === false) break;
|
||||
$value = substr($joinOptions, 0, $valuePos);
|
||||
$joinOptions = substr($joinOptions, $valuePos + $signLenth);
|
||||
|
||||
$valuePinyin = preg_split('/[^a-z]+/iu', trim($valuePinyin));
|
||||
$valueAbbr = '';
|
||||
foreach($valuePinyin as $wordPinyin) if($wordPinyin) $valueAbbr .= $wordPinyin[0];
|
||||
|
||||
$dataKeys[$value] = empty($valuePinyin) ? '' : join($valuePinyin) . ' ' . $valueAbbr;
|
||||
}
|
||||
}
|
||||
|
||||
if(is_array($selectedItems)) $selectedItems = implode(',', $selectedItems);
|
||||
$selectedItems = ",$selectedItems,";
|
||||
$selectedItems = ",$selectedItems,";
|
||||
$convertedPinYin = class_exists('common') ? common::convert2Pinyin($options) : array();
|
||||
foreach($options as $key => $value)
|
||||
{
|
||||
$optionPinyin = zget($convertedPinYin, $value, '');
|
||||
$key = str_replace('item', '', $key);
|
||||
$selected = strpos($selectedItems, ",$key,") !== false ? " selected='selected'" : '';
|
||||
$string .= "<option value='$key'$selected data-keys='{$dataKeys[$value]}'>$value</option>\n";
|
||||
$string .= "<option value='$key'$selected data-keys='{$optionPinyin}'>$value</option>\n";
|
||||
}
|
||||
|
||||
/* End. */
|
||||
|
||||
@@ -75,11 +75,19 @@ class ztcloud
|
||||
$param['body'] = $this->body;
|
||||
|
||||
$result = $this->queryZtcloud($this->url, $param);
|
||||
if(!isset($result->result))
|
||||
{
|
||||
throw new Exception($result);
|
||||
return false;
|
||||
}
|
||||
|
||||
if($result->result == 'fail')
|
||||
{
|
||||
throw new Exception($result->message . "(code:{$result->code})");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,7 +110,9 @@ class ztcloud
|
||||
);
|
||||
$context = stream_context_create($options);
|
||||
$result = file_get_contents($url, FILE_TEXT, $context);
|
||||
return json_decode($result);
|
||||
|
||||
$parsedResult = json_decode($result);
|
||||
return empty($parsedResult) ? $result : $parsedResult;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,5 +16,8 @@ $config->action->objectNameFields['doclib'] = 'name';
|
||||
$config->action->objectNameFields['todo'] = 'name';
|
||||
$config->action->objectNameFields['branch'] = 'name';
|
||||
$config->action->objectNameFields['module'] = 'name';
|
||||
$config->action->objectNameFields['testsuite'] = 'name';
|
||||
$config->action->objectNameFields['caselib'] = 'name';
|
||||
$config->action->objectNameFields['testreport'] = 'title';
|
||||
|
||||
$config->action->commonImgSize = 870;
|
||||
|
||||
+28
-13
@@ -61,6 +61,9 @@ $lang->action->objectTypes['doclib'] = 'Doc Lib';
|
||||
$lang->action->objectTypes['todo'] = 'To-Dos';
|
||||
$lang->action->objectTypes['branch'] = 'Branch';
|
||||
$lang->action->objectTypes['module'] = 'Module';
|
||||
$lang->action->objectTypes['testsuite'] = 'Suite';
|
||||
$lang->action->objectTypes['caselib'] = 'Library';
|
||||
$lang->action->objectTypes['testreport'] = 'Report';
|
||||
|
||||
/* 用来描述操作历史记录。*/
|
||||
$lang->action->desc = new stdclass();
|
||||
@@ -80,6 +83,7 @@ $lang->action->desc->undeleted = '$date, restored by <strong>$actor</strong
|
||||
$lang->action->desc->hidden = '$date, hidden by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->commented = '$date, added by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->activated = '$date, activated by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->blocked = '$date, blocked by <strong>$actor</strong> .' . "\n";
|
||||
$lang->action->desc->moved = '$date, moved by <strong>$actor</strong> , which was "$extra".' . "\n";
|
||||
$lang->action->desc->confirmed = '$date, <strong>$actor</strong> confirmed the change of Story. The latest version is <strong>#$extra</strong>.' . "\n";
|
||||
$lang->action->desc->caseconfirmed = '$date, <strong>$actor</strong> confirmed the change of Case. The latest version is <strong>#$extra</strong>' . "\n";
|
||||
@@ -102,8 +106,8 @@ $lang->action->desc->diff2 = '<strong><i>%s</i></strong> has been chang
|
||||
$lang->action->desc->diff3 = 'File Name %s was changed to %s .' . "\n";
|
||||
|
||||
/* 关联用例和移除用例时的历史操作记录。*/
|
||||
$lang->action->desc->linkrelatedcase = '$date, <strong>$actor</strong> related relevant use case <strong>$extra</strong>.' . "\n";
|
||||
$lang->action->desc->unlinkrelatedcase = '$date, <strong>$actor</strong> removed relevant use case <strong>$extra</strong>.' . "\n";
|
||||
$lang->action->desc->linkrelatedcase = '$date, <strong>$actor</strong> linked relevant use case <strong>$extra</strong>.' . "\n";
|
||||
$lang->action->desc->unlinkrelatedcase = '$date, <strong>$actor</strong> unlinked relevant use case <strong>$extra</strong>.' . "\n";
|
||||
|
||||
/* 用来显示动态信息。*/
|
||||
$lang->action->label = new stdclass();
|
||||
@@ -121,6 +125,7 @@ $lang->action->label->undeleted = 'Restored';
|
||||
$lang->action->label->hidden = 'Hidden';
|
||||
$lang->action->label->commented = 'Commented';
|
||||
$lang->action->label->activated = 'Activated';
|
||||
$lang->action->label->blocked = 'Blocked';
|
||||
$lang->action->label->resolved = 'Resolved';
|
||||
$lang->action->label->reviewed = 'Reviewed';
|
||||
$lang->action->label->moved = 'Moved';
|
||||
@@ -128,23 +133,26 @@ $lang->action->label->confirmed = 'Confirm a Story, ';
|
||||
$lang->action->label->bugconfirmed = 'Confirmed';
|
||||
$lang->action->label->tostory = 'Convert to Story';
|
||||
$lang->action->label->frombug = 'Converted from Bug';
|
||||
$lang->action->label->fromlib = 'Import from library';
|
||||
$lang->action->label->totask = 'Convert to Task';
|
||||
$lang->action->label->svncommited = 'SVN Commit';
|
||||
$lang->action->label->gitcommited = 'Git Commit';
|
||||
$lang->action->label->linked2plan = 'Relate to Plan';
|
||||
$lang->action->label->unlinkedfromplan = 'Unrelate';
|
||||
$lang->action->label->linked2plan = 'Link to Plan';
|
||||
$lang->action->label->unlinkedfromplan = 'Unlink';
|
||||
$lang->action->label->changestatus = 'Change Status';
|
||||
$lang->action->label->marked = 'Marked';
|
||||
$lang->action->label->linked2project = "Relate {$lang->projectCommon}";
|
||||
$lang->action->label->unlinkedfromproject = "Remove {$lang->projectCommon}";
|
||||
$lang->action->label->linkrelatedbug = "Relate to Bug";
|
||||
$lang->action->label->unlinkrelatedbug = "Unrelate";
|
||||
$lang->action->label->linkrelatedcase = "Relate to Case";
|
||||
$lang->action->label->unlinkrelatedcase = "Unrelate";
|
||||
$lang->action->label->linkrelatedstory = "Relate to Story";
|
||||
$lang->action->label->unlinkrelatedstory = "Unrelate";
|
||||
$lang->action->label->linked2project = "Link {$lang->projectCommon}";
|
||||
$lang->action->label->unlinkedfromproject = "Unlink {$lang->projectCommon}";
|
||||
$lang->action->label->linked2release = "Link Release";
|
||||
$lang->action->label->unlinkedfromrelease = "Unlink Release";
|
||||
$lang->action->label->linkrelatedbug = "Link to Bug";
|
||||
$lang->action->label->unlinkrelatedbug = "Unlink";
|
||||
$lang->action->label->linkrelatedcase = "Link to Case";
|
||||
$lang->action->label->unlinkrelatedcase = "Unlink";
|
||||
$lang->action->label->linkrelatedstory = "Link to Story";
|
||||
$lang->action->label->unlinkrelatedstory = "Unlink";
|
||||
$lang->action->label->subdividestory = "Decompose Story";
|
||||
$lang->action->label->unlinkchildstory = "Unrelate";
|
||||
$lang->action->label->unlinkchildstory = "Unlink";
|
||||
$lang->action->label->started = 'Initiated';
|
||||
$lang->action->label->restarted = 'Continued';
|
||||
$lang->action->label->recordestimate = 'Recorded Man-Hour';
|
||||
@@ -169,10 +177,13 @@ $lang->action->label->build = 'Build|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
$lang->action->label->case = 'Case|testcase|view|caseID=%s';
|
||||
$lang->action->label->testtask = 'Test Task|testtask|view|caseID=%s';
|
||||
$lang->action->label->testsuite = 'Test Suite|testsuite|view|suiteID=%s';
|
||||
$lang->action->label->caselib = 'Case Library|testsuite|libview|libID=%s';
|
||||
$lang->action->label->todo = 'To-Dos|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = 'Doc Lib|doc|browse|libID=%s';
|
||||
$lang->action->label->doc = 'Document|doc|view|docID=%s';
|
||||
$lang->action->label->user = 'User|user|view|account=%s';
|
||||
$lang->action->label->testreport = 'Report|testreport|view|report=%s';
|
||||
$lang->action->label->space = ' ';
|
||||
|
||||
/* Object type. */
|
||||
@@ -194,6 +205,9 @@ $lang->action->search->objectTypeList['build'] = 'Build';
|
||||
$lang->action->search->objectTypeList['release'] = 'Release';
|
||||
$lang->action->search->objectTypeList['productplan'] = 'Plan';
|
||||
$lang->action->search->objectTypeList['branch'] = 'Branch';
|
||||
$lang->action->search->objectTypeList['testsuite'] = 'Suite';
|
||||
$lang->action->search->objectTypeList['caselib'] = 'Library';
|
||||
$lang->action->search->objectTypeList['testreport'] = 'Report';
|
||||
|
||||
/* 用来在动态显示中显示动作 */
|
||||
$lang->action->search->label[''] = '';
|
||||
@@ -211,6 +225,7 @@ $lang->action->search->label['undeleted'] = $lang->action->label->unde
|
||||
$lang->action->search->label['hidden'] = $lang->action->label->hidden;
|
||||
$lang->action->search->label['commented'] = $lang->action->label->commented;
|
||||
$lang->action->search->label['activated'] = $lang->action->label->activated;
|
||||
$lang->action->search->label['blocked'] = $lang->action->label->blocked;
|
||||
$lang->action->search->label['resolved'] = $lang->action->label->resolved;
|
||||
$lang->action->search->label['reviewed'] = $lang->action->label->reviewed;
|
||||
$lang->action->search->label['moved'] = $lang->action->label->moved;
|
||||
|
||||
@@ -61,6 +61,9 @@ $lang->action->objectTypes['doclib'] = '文档库';
|
||||
$lang->action->objectTypes['todo'] = '待办';
|
||||
$lang->action->objectTypes['branch'] = '分支';
|
||||
$lang->action->objectTypes['module'] = '模块';
|
||||
$lang->action->objectTypes['testsuite'] = '套件';
|
||||
$lang->action->objectTypes['caselib'] = '用例库';
|
||||
$lang->action->objectTypes['testreport'] = '报告';
|
||||
|
||||
/* 用来描述操作历史记录。*/
|
||||
$lang->action->desc = new stdclass();
|
||||
@@ -80,6 +83,7 @@ $lang->action->desc->undeleted = '$date, 由 <strong>$actor</strong> 还原
|
||||
$lang->action->desc->hidden = '$date, 由 <strong>$actor</strong> 隐藏。' . "\n";
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 添加备注。' . "\n";
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。' . "\n";
|
||||
$lang->action->desc->blocked = '$date, 由 <strong>$actor</strong> 阻塞。' . "\n";
|
||||
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移动,之前为 "$extra"。' . "\n";
|
||||
$lang->action->desc->confirmed = '$date, 由 <strong>$actor</strong> 确认需求变动,最新版本为<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->caseconfirmed = '$date, 由 <strong>$actor</strong> 确认用例变动,最新版本为<strong>#$extra</strong>。' . "\n";
|
||||
@@ -121,6 +125,7 @@ $lang->action->label->undeleted = '还原了';
|
||||
$lang->action->label->hidden = '隐藏了';
|
||||
$lang->action->label->commented = '评论了';
|
||||
$lang->action->label->activated = '激活了';
|
||||
$lang->action->label->blocked = '阻塞了';
|
||||
$lang->action->label->resolved = '解决了';
|
||||
$lang->action->label->reviewed = '评审了';
|
||||
$lang->action->label->moved = '移动了';
|
||||
@@ -128,6 +133,7 @@ $lang->action->label->confirmed = '确认了需求,';
|
||||
$lang->action->label->bugconfirmed = '确认了';
|
||||
$lang->action->label->tostory = '转需求';
|
||||
$lang->action->label->frombug = '转需求';
|
||||
$lang->action->label->fromlib = '从用例库导入';
|
||||
$lang->action->label->totask = '转任务';
|
||||
$lang->action->label->svncommited = '提交代码';
|
||||
$lang->action->label->gitcommited = '提交代码';
|
||||
@@ -137,6 +143,8 @@ $lang->action->label->changestatus = '修改状态';
|
||||
$lang->action->label->marked = '编辑了';
|
||||
$lang->action->label->linked2project = "关联{$lang->projectCommon}";
|
||||
$lang->action->label->unlinkedfromproject = "移除{$lang->projectCommon}";
|
||||
$lang->action->label->linked2release = "关联发布";
|
||||
$lang->action->label->unlinkedfromrelease = "移除发布";
|
||||
$lang->action->label->linkrelatedbug = "关联了相关Bug";
|
||||
$lang->action->label->unlinkrelatedbug = "移除了相关Bug";
|
||||
$lang->action->label->linkrelatedcase = "关联了相关用例";
|
||||
@@ -169,10 +177,13 @@ $lang->action->label->build = 'Build|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
$lang->action->label->case = '用例|testcase|view|caseID=%s';
|
||||
$lang->action->label->testtask = '测试任务|testtask|view|caseID=%s';
|
||||
$lang->action->label->testsuite = '测试套件|testsuite|view|suiteID=%s';
|
||||
$lang->action->label->caselib = '测试库|testsuite|libview|libID=%s';
|
||||
$lang->action->label->todo = 'todo|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = '文档库|doc|browse|libID=%s';
|
||||
$lang->action->label->doc = '文档|doc|view|docID=%s';
|
||||
$lang->action->label->user = '用户|user|view|account=%s';
|
||||
$lang->action->label->testreport = '报告|testreport|view|report=%s';
|
||||
$lang->action->label->space = ' ';
|
||||
|
||||
/* Object type. */
|
||||
@@ -194,6 +205,9 @@ $lang->action->search->objectTypeList['build'] = 'Build';
|
||||
$lang->action->search->objectTypeList['release'] = '发布';
|
||||
$lang->action->search->objectTypeList['productplan'] = '计划';
|
||||
$lang->action->search->objectTypeList['branch'] = '分支';
|
||||
$lang->action->search->objectTypeList['testsuite'] = '套件';
|
||||
$lang->action->search->objectTypeList['caselib'] = '公共库';
|
||||
$lang->action->search->objectTypeList['testreport'] = '报告';
|
||||
|
||||
/* 用来在动态显示中显示动作 */
|
||||
$lang->action->search->label[''] = '';
|
||||
@@ -211,6 +225,7 @@ $lang->action->search->label['undeleted'] = $lang->action->label->unde
|
||||
$lang->action->search->label['hidden'] = $lang->action->label->hidden;
|
||||
$lang->action->search->label['commented'] = $lang->action->label->commented;
|
||||
$lang->action->search->label['activated'] = $lang->action->label->activated;
|
||||
$lang->action->search->label['blocked'] = $lang->action->label->blocked;
|
||||
$lang->action->search->label['resolved'] = $lang->action->label->resolved;
|
||||
$lang->action->search->label['reviewed'] = $lang->action->label->reviewed;
|
||||
$lang->action->search->label['moved'] = $lang->action->label->moved;
|
||||
|
||||
@@ -61,6 +61,9 @@ $lang->action->objectTypes['doclib'] = '文檔庫';
|
||||
$lang->action->objectTypes['todo'] = '待辦';
|
||||
$lang->action->objectTypes['branch'] = '分支';
|
||||
$lang->action->objectTypes['module'] = '模組';
|
||||
$lang->action->objectTypes['testsuite'] = '套件';
|
||||
$lang->action->objectTypes['caselib'] = '用例庫';
|
||||
$lang->action->objectTypes['testreport'] = '報告';
|
||||
|
||||
/* 用來描述操作歷史記錄。*/
|
||||
$lang->action->desc = new stdclass();
|
||||
@@ -80,6 +83,7 @@ $lang->action->desc->undeleted = '$date, 由 <strong>$actor</strong> 還原
|
||||
$lang->action->desc->hidden = '$date, 由 <strong>$actor</strong> 隱藏。' . "\n";
|
||||
$lang->action->desc->commented = '$date, 由 <strong>$actor</strong> 添加備註。' . "\n";
|
||||
$lang->action->desc->activated = '$date, 由 <strong>$actor</strong> 激活。' . "\n";
|
||||
$lang->action->desc->blocked = '$date, 由 <strong>$actor</strong> 阻塞。' . "\n";
|
||||
$lang->action->desc->moved = '$date, 由 <strong>$actor</strong> 移動,之前為 "$extra"。' . "\n";
|
||||
$lang->action->desc->confirmed = '$date, 由 <strong>$actor</strong> 確認需求變動,最新版本為<strong>#$extra</strong>。' . "\n";
|
||||
$lang->action->desc->caseconfirmed = '$date, 由 <strong>$actor</strong> 確認用例變動,最新版本為<strong>#$extra</strong>。' . "\n";
|
||||
@@ -121,6 +125,7 @@ $lang->action->label->undeleted = '還原了';
|
||||
$lang->action->label->hidden = '隱藏了';
|
||||
$lang->action->label->commented = '評論了';
|
||||
$lang->action->label->activated = '激活了';
|
||||
$lang->action->label->blocked = '阻塞了';
|
||||
$lang->action->label->resolved = '解決了';
|
||||
$lang->action->label->reviewed = '評審了';
|
||||
$lang->action->label->moved = '移動了';
|
||||
@@ -128,6 +133,7 @@ $lang->action->label->confirmed = '確認了需求,';
|
||||
$lang->action->label->bugconfirmed = '確認了';
|
||||
$lang->action->label->tostory = '轉需求';
|
||||
$lang->action->label->frombug = '轉需求';
|
||||
$lang->action->label->fromlib = '從用例庫導入';
|
||||
$lang->action->label->totask = '轉任務';
|
||||
$lang->action->label->svncommited = '提交代碼';
|
||||
$lang->action->label->gitcommited = '提交代碼';
|
||||
@@ -137,6 +143,8 @@ $lang->action->label->changestatus = '修改狀態';
|
||||
$lang->action->label->marked = '編輯了';
|
||||
$lang->action->label->linked2project = "關聯{$lang->projectCommon}";
|
||||
$lang->action->label->unlinkedfromproject = "移除{$lang->projectCommon}";
|
||||
$lang->action->label->linked2release = "關聯發佈";
|
||||
$lang->action->label->unlinkedfromrelease = "移除發佈";
|
||||
$lang->action->label->linkrelatedbug = "關聯了相關Bug";
|
||||
$lang->action->label->unlinkrelatedbug = "移除了相關Bug";
|
||||
$lang->action->label->linkrelatedcase = "關聯了相關用例";
|
||||
@@ -169,10 +177,13 @@ $lang->action->label->build = 'Build|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
$lang->action->label->case = '用例|testcase|view|caseID=%s';
|
||||
$lang->action->label->testtask = '測試任務|testtask|view|caseID=%s';
|
||||
$lang->action->label->testsuite = '測試套件|testsuite|view|suiteID=%s';
|
||||
$lang->action->label->caselib = '測試庫|testsuite|libview|libID=%s';
|
||||
$lang->action->label->todo = 'todo|todo|view|todoID=%s';
|
||||
$lang->action->label->doclib = '文檔庫|doc|browse|libID=%s';
|
||||
$lang->action->label->doc = '文檔|doc|view|docID=%s';
|
||||
$lang->action->label->user = '用戶|user|view|account=%s';
|
||||
$lang->action->label->testreport = '報告|testreport|view|report=%s';
|
||||
$lang->action->label->space = ' ';
|
||||
|
||||
/* Object type. */
|
||||
@@ -194,6 +205,9 @@ $lang->action->search->objectTypeList['build'] = 'Build';
|
||||
$lang->action->search->objectTypeList['release'] = '發佈';
|
||||
$lang->action->search->objectTypeList['productplan'] = '計劃';
|
||||
$lang->action->search->objectTypeList['branch'] = '分支';
|
||||
$lang->action->search->objectTypeList['testsuite'] = '套件';
|
||||
$lang->action->search->objectTypeList['caselib'] = '公共庫';
|
||||
$lang->action->search->objectTypeList['testreport'] = '報告';
|
||||
|
||||
/* 用來在動態顯示中顯示動作 */
|
||||
$lang->action->search->label[''] = '';
|
||||
@@ -211,6 +225,7 @@ $lang->action->search->label['undeleted'] = $lang->action->label->unde
|
||||
$lang->action->search->label['hidden'] = $lang->action->label->hidden;
|
||||
$lang->action->search->label['commented'] = $lang->action->label->commented;
|
||||
$lang->action->search->label['activated'] = $lang->action->label->activated;
|
||||
$lang->action->search->label['blocked'] = $lang->action->label->blocked;
|
||||
$lang->action->search->label['resolved'] = $lang->action->label->resolved;
|
||||
$lang->action->search->label['reviewed'] = $lang->action->label->reviewed;
|
||||
$lang->action->search->label['moved'] = $lang->action->label->moved;
|
||||
|
||||
+25
-6
@@ -52,8 +52,11 @@ class actionModel extends model
|
||||
$action->project = $productAndProject['project'];
|
||||
|
||||
$this->dao->insert(TABLE_ACTION)->data($action)->autoCheck()->exec();
|
||||
$actionID = $this->dbh->lastInsertID();
|
||||
|
||||
$this->file->updateObjectID($this->post->uid, $objectID, $objectType);
|
||||
return $this->dbh->lastInsertID();
|
||||
|
||||
return $actionID;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -290,6 +293,11 @@ class actionModel extends model
|
||||
$name = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($action->objectID)->fetch('name');
|
||||
if($name) $action->extra = html::a(helper::createLink('testtask', 'view', "testtaskID=$action->objectID"), "#$action->objectID " . $name);
|
||||
}
|
||||
elseif($actionName == 'fromlib' and $action->objectType == 'case')
|
||||
{
|
||||
$name = $this->dao->select('name')->from(TABLE_TESTSUITE)->where('id')->eq($action->extra)->fetch('name');
|
||||
if($name) $action->extra = html::a(helper::createLink('testsuite', 'library', "libID=$action->extra"), $name);
|
||||
}
|
||||
elseif(($actionName == 'closed' and $action->objectType == 'story') or ($actionName == 'resolved' and $action->objectType == 'bug'))
|
||||
{
|
||||
$action->appendLink = '';
|
||||
@@ -368,7 +376,7 @@ class actionModel extends model
|
||||
->andWhere('extra')->eq($extra)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
if(!$trashes) return array();
|
||||
|
||||
|
||||
/* Group trashes by objectType, and get there name field. */
|
||||
foreach($trashes as $object)
|
||||
{
|
||||
@@ -413,6 +421,7 @@ class actionModel extends model
|
||||
*/
|
||||
public function logHistory($actionID, $changes)
|
||||
{
|
||||
if(empty($actionID)) return false;
|
||||
foreach($changes as $change)
|
||||
{
|
||||
$change['action'] = $actionID;
|
||||
@@ -429,6 +438,8 @@ class actionModel extends model
|
||||
*/
|
||||
public function printAction($action)
|
||||
{
|
||||
if(!isset($action->objectType) or !isset($action->action)) return false;
|
||||
|
||||
$objectType = $action->objectType;
|
||||
$actionType = strtolower($action->action);
|
||||
|
||||
@@ -524,9 +535,15 @@ class actionModel extends model
|
||||
$condition = "(product =',0,' AND project = '0')";
|
||||
if($projectCondition) $condition .= ' OR ' . $projectCondition;
|
||||
if($productCondition) $condition .= ' OR ' . $productCondition;
|
||||
if(strpos($this->app->company->admins, ',' . $this->app->user->account . ',') !== false) $condition = 1;
|
||||
if($this->app->user->admin) $condition = 1;
|
||||
}
|
||||
|
||||
$this->loadModel('doc');
|
||||
$docCondition = $this->doc->buildConditionSQL('doc');
|
||||
$libCondition = $this->doc->buildConditionSQL('lib');
|
||||
if($docCondition) $docCondition = $this->dao->select('id')->from(TABLE_DOC)->where($docCondition)->andWhere('deleted')->eq(0)->get();
|
||||
if($libCondition) $libCondition = $this->dao->select('id')->from(TABLE_DOCLIB)->where($libCondition)->andWhere('deleted')->eq(0)->get();
|
||||
|
||||
/* Get actions. */
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where(1)
|
||||
@@ -538,6 +555,8 @@ class actionModel extends model
|
||||
->beginIF($productID == 'notzero')->andWhere('product')->gt(0)->fi()
|
||||
->beginIF($projectID == 'notzero')->andWhere('project')->gt(0)->fi()
|
||||
->beginIF($projectID == 'all' or $productID == 'all')->andWhere("($condition)")->fi()
|
||||
->beginIF($docCondition)->andWhere("IF(objectType != 'doc', '1=1', objectID in ($docCondition))")->fi()
|
||||
->beginIF($libCondition)->andWhere("IF(objectType != 'doclib', '1=1', objectID in ($libCondition))")->fi()
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
|
||||
if(!$actions) return array();
|
||||
@@ -614,7 +633,7 @@ class actionModel extends model
|
||||
*/
|
||||
public function getBySQL($sql, $orderBy, $pager = null)
|
||||
{
|
||||
return $actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
return $actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->where($sql)
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
@@ -656,11 +675,11 @@ class actionModel extends model
|
||||
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
|
||||
if($todo->private == 1 and $todo->account != $this->app->user->account)
|
||||
{
|
||||
$objectNames[$objectType][$id] = $this->lang->todo->thisIsPrivate;
|
||||
$objectNames[$objectType][$id] = $this->lang->todo->thisIsPrivate;
|
||||
}
|
||||
else
|
||||
{
|
||||
$objectNames[$objectType][$id] = $todo->name;
|
||||
$objectNames[$objectType][$id] = $todo->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,13 @@
|
||||
<tr class='text-center'>
|
||||
<td><?php echo zget($lang->action->objectTypes, $action->objectType, '');?></td>
|
||||
<td><?php echo $action->objectID;?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink($module, 'view', $action->objectType == 'user' ? "account={$action->objectName}" : "id={$action->objectID}"), $action->objectName);?></td>
|
||||
<td class='text-left'>
|
||||
<?php
|
||||
$methodName = $module == 'caselib' ? 'libview' : 'view';
|
||||
$params = $action->objectType == 'user' ? "account={$action->objectName}" : "id={$action->objectID}";
|
||||
echo html::a($this->createLink($module, $moduleName, $params), $action->objectName);
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $users[$action->actor];?></td>
|
||||
<td><?php echo $action->date;?></td>
|
||||
<td>
|
||||
|
||||
@@ -282,7 +282,7 @@ class admin extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ztCompany()
|
||||
public function ztCompany($fields = 'company')
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
@@ -294,6 +294,8 @@ class admin extends control
|
||||
|
||||
$this->view->title = $this->lang->admin->ztCompany;
|
||||
$this->view->position[] = $this->lang->admin->ztCompany;
|
||||
|
||||
$this->view->fields = explode(',', $fields);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ $lang->admin->captcha = 'Verification Code';
|
||||
$lang->admin->getCaptcha = 'Get Verification Code';
|
||||
|
||||
$lang->admin->info = new stdclass();
|
||||
$lang->admin->info->version = 'Current Version is %s,';
|
||||
$lang->admin->info->version = 'Current Version is %s. ';
|
||||
$lang->admin->info->links = 'You can visit ';
|
||||
$lang->admin->info->account = "Your ZenTao account is %s.";
|
||||
|
||||
@@ -57,6 +57,9 @@ $lang->admin->safe->modeList[0] = 'N/A';
|
||||
$lang->admin->safe->modeList[1] = 'Medium';
|
||||
$lang->admin->safe->modeList[2] = 'Strong';
|
||||
|
||||
$lang->admin->safe->modeRuleList[1] = 'Should be contain letters and numbers, at lease six characters.';
|
||||
$lang->admin->safe->modeRuleList[2] = 'Should be contain letters, numbers and special characters, at lease 10 characters.';
|
||||
|
||||
$lang->admin->safe->reasonList['weak'] = 'Common Weak Password';
|
||||
$lang->admin->safe->reasonList['account'] = 'Same as your account';
|
||||
$lang->admin->safe->reasonList['mobile'] = 'Same as your mobile number';
|
||||
|
||||
@@ -57,6 +57,9 @@ $lang->admin->safe->modeList[0] = '不检查';
|
||||
$lang->admin->safe->modeList[1] = '中';
|
||||
$lang->admin->safe->modeList[2] = '强';
|
||||
|
||||
$lang->admin->safe->modeRuleList[1] = '6位以上,包含大小写字母,数字。';
|
||||
$lang->admin->safe->modeRuleList[2] = '10位以上,包含字母,数字,特殊字符。';
|
||||
|
||||
$lang->admin->safe->reasonList['weak'] = '常用弱口令';
|
||||
$lang->admin->safe->reasonList['account'] = '与帐号相同';
|
||||
$lang->admin->safe->reasonList['mobile'] = '与手机相同';
|
||||
@@ -67,4 +70,4 @@ $lang->admin->safe->modifyPasswordList[1] = '必须修改';
|
||||
$lang->admin->safe->modifyPasswordList[0] = '不强制';
|
||||
|
||||
$lang->admin->safe->noticeMode = '系统会在登录、创建和修改用户、修改密码的时候检查用户口令。';
|
||||
$lang->admin->safe->noticeStrong = '密码长度越长,含有大写字母或数字或特殊符合越多,密码字母越不重复,安全度越强!';
|
||||
$lang->admin->safe->noticeStrong = '密码长度越长,含有大写字母或数字或特殊符号越多,密码字母越不重复,安全度越强!';
|
||||
|
||||
@@ -17,6 +17,7 @@ $lang->admin->safeIndex = '安全';
|
||||
$lang->admin->checkWeak = '弱口令檢查';
|
||||
$lang->admin->certifyMobile = '認證手機';
|
||||
$lang->admin->certifyEmail = '認證郵箱';
|
||||
$lang->admin->ztCompany = '認證公司';
|
||||
$lang->admin->captcha = '驗證碼';
|
||||
$lang->admin->getCaptcha = '獲取驗證碼';
|
||||
|
||||
@@ -56,6 +57,9 @@ $lang->admin->safe->modeList[0] = '不檢查';
|
||||
$lang->admin->safe->modeList[1] = '中';
|
||||
$lang->admin->safe->modeList[2] = '強';
|
||||
|
||||
$lang->admin->safe->modeRuleList[1] = '6位以上,包含大小寫字母,數字。';
|
||||
$lang->admin->safe->modeRuleList[2] = '10位以上,包含字母,數字,特殊字元。';
|
||||
|
||||
$lang->admin->safe->reasonList['weak'] = '常用弱口令';
|
||||
$lang->admin->safe->reasonList['account'] = '與帳號相同';
|
||||
$lang->admin->safe->reasonList['mobile'] = '與手機相同';
|
||||
@@ -66,4 +70,4 @@ $lang->admin->safe->modifyPasswordList[1] = '必須修改';
|
||||
$lang->admin->safe->modifyPasswordList[0] = '不強制';
|
||||
|
||||
$lang->admin->safe->noticeMode = '系統會在登錄、創建和修改用戶、修改密碼的時候檢查用戶口令。';
|
||||
$lang->admin->safe->noticeStrong = '密碼長度越長,含有大寫字母或數字或特殊符合越多,密碼字母越不重複,安全度越強!';
|
||||
$lang->admin->safe->noticeStrong = '密碼長度越長,含有大寫字母或數字或特殊符號越多,密碼字母越不重複,安全度越強!';
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
$account = zget($config->global, 'community', '');
|
||||
if($account == 'na') $account = '';
|
||||
?>
|
||||
<td><?php echo html::input('account', $account, "class='form-control'");?></td>
|
||||
<td><?php echo html::input('account', $account, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->password;?></th>
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->email;?></th>
|
||||
<td><?php echo html::input('email', $email, "class='form-control'");?></td>
|
||||
<td><?php echo html::input('email', $email, "class='form-control' autocomplete='off'");?></td>
|
||||
<td><?php echo html::a(inlink('ajaxsendcode', 'type=email'), $lang->admin->getCaptcha, '', "id='codeSender' class='btn'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->admin->captcha;?></th>
|
||||
<td><?php echo html::input('captcha', '', "class='form-control'");?></td>
|
||||
<td><?php echo html::input('captcha', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->mobile;?></th>
|
||||
<td><?php echo html::input('mobile', $mobile, "class='form-control'");?></td>
|
||||
<td><?php echo html::input('mobile', $mobile, "class='form-control' autocomplete='off'");?></td>
|
||||
<td><?php echo html::a(inlink('ajaxsendcode', 'type=mobile'), $lang->admin->getCaptcha, '', "id='codeSender' class='btn'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->admin->captcha;?></th>
|
||||
<td><?php echo html::input('captcha', '', "class='form-control'");?></td>
|
||||
<td><?php echo html::input('captcha', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
|
||||
@@ -32,27 +32,27 @@
|
||||
<th class='w-100px'><?php echo $lang->user->account;?></th>
|
||||
<td>
|
||||
<div class="required required-wrapper"></div>
|
||||
<?php echo html::input('account', '', "class='form-control' placeholder='{$lang->admin->register->lblAccount}'");?>
|
||||
<?php echo html::input('account', '', "class='form-control' placeholder='{$lang->admin->register->lblAccount}' autocomplete='off'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->realname;?></th>
|
||||
<td><div class="required required-wrapper"></div><?php echo html::input('realname', '', "class='form-control'");?></td>
|
||||
<td><div class="required required-wrapper"></div><?php echo html::input('realname', '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->company;?></th>
|
||||
<td><div class="required required-wrapper"></div><?php echo html::input('company', $register->company, "class='form-control'");?></td>
|
||||
<td><div class="required required-wrapper"></div><?php echo html::input('company', $register->company, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->mobile;?></th>
|
||||
<td>
|
||||
<div class="required required-wrapper"></div>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('mobile', '', "class='form-control'");?>
|
||||
<?php echo html::input('mobile', '', "class='form-control' autocomplete='off'");?>
|
||||
<span class='input-group-btn'><?php echo html::a(inlink('ajaxSendCode', 'type=mobile'), $lang->admin->getCaptcha, '', "id='mobileSender' class='btn'")?></span>
|
||||
<span class='input-group-addon' style='border:0px;background:none'></span>
|
||||
<span class='input-group-addon'><?php echo $lang->admin->captcha?></span>
|
||||
<?php echo html::input('mobileCode', '', "class='form-control'");?>
|
||||
<?php echo html::input('mobileCode', '', "class='form-control' autocomplete='off'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -61,11 +61,11 @@
|
||||
<td>
|
||||
<div class="required required-wrapper"></div>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('email', $register->email, "class='form-control'");?>
|
||||
<?php echo html::input('email', $register->email, "class='form-control' autocomplete='off'");?>
|
||||
<span class='input-group-btn'><?php echo html::a(inlink('ajaxSendCode', 'type=email'), $lang->admin->getCaptcha, '', "id='mailSender' class='btn'")?></span>
|
||||
<span class='input-group-addon' style='border:0px;background:none'></span>
|
||||
<span class='input-group-addon'><?php echo $lang->admin->captcha?></span>
|
||||
<?php echo html::input('emailCode', '', "class='form-control'");?>
|
||||
<?php echo html::input('emailCode', '', "class='form-control' autocomplete='off'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -101,7 +101,7 @@
|
||||
$account = zget($config->global, 'community', '');
|
||||
if($account == 'na') $account = '';
|
||||
?>
|
||||
<td><?php echo html::input('account', $account, "class='form-control'");?></td>
|
||||
<td><?php echo html::input('account', $account, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->password;?></th>
|
||||
|
||||
@@ -22,12 +22,16 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-130px'><?php echo $lang->admin->safe->password?></th>
|
||||
<td><?php echo html::radio('mode', $lang->admin->safe->modeList, isset($config->safe->mode) ? $config->safe->mode : 0)?></td>
|
||||
<td><?php echo html::radio('mode', $lang->admin->safe->modeList, isset($config->safe->mode) ? $config->safe->mode : 0, "onclick=showModeRule(this.value)")?></td>
|
||||
<td><?php echo $lang->admin->safe->noticeMode?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id='mode1Rule' class='hidden'>
|
||||
<th></th>
|
||||
<td colspan='2'><span style='color:#03b8cf;font-weight:bold;'><?php echo $lang->admin->safe->noticeStrong;?></span></td>
|
||||
<td colspan='2'><span style='color:#03b8cf;font-weight:bold;'><?php echo $lang->admin->safe->modeRuleList[1] . $lang->admin->safe->noticeStrong;?></span></td>
|
||||
</tr>
|
||||
<tr id='mode2Rule' class='hidden'>
|
||||
<th></th>
|
||||
<td colspan='2'><span style='color:#03b8cf;font-weight:bold;'><?php echo $lang->admin->safe->modeRuleList[2] . $lang->admin->safe->noticeStrong;?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->admin->safe->weak?></th>
|
||||
@@ -44,4 +48,24 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
var mode = $("input[name='mode']:checked").val();
|
||||
showModeRule(mode);
|
||||
});
|
||||
function showModeRule(mode)
|
||||
{
|
||||
if(mode == 0)
|
||||
{
|
||||
$('#mode1Rule').addClass('hidden');
|
||||
$('#mode2Rule').addClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
mode == 1 ? $('#mode1Rule').removeClass('hidden') : $('#mode1Rule').addClass('hidden');
|
||||
mode == 2 ? $('#mode2Rule').removeClass('hidden') : $('#mode2Rule').addClass('hidden');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -26,15 +26,15 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->sso->addr; ?></th>
|
||||
<td><?php echo html::input('addr', $addr, "class='form-control' placeholder='{$lang->sso->addrNotice}'");?></td>
|
||||
<td><?php echo html::input('addr', $addr, "class='form-control' placeholder='{$lang->sso->addrNotice}' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->sso->code; ?></th>
|
||||
<td><?php echo html::input('code', $code, "class='form-control'");?></td>
|
||||
<td><?php echo html::input('code', $code, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->sso->key; ?></th>
|
||||
<td><?php echo html::input('key', $key, "class='form-control'");?></td>
|
||||
<td><?php echo html::input('key', $key, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'>
|
||||
|
||||
@@ -17,10 +17,12 @@
|
||||
</div>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<?php foreach($fields as $field):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->company->name;?></th>
|
||||
<td><?php echo html::input('company', '', "class='form-control'");?></td>
|
||||
<th><?php echo $field == 'company' ? $lang->company->name : $lang->user->$field;?></th>
|
||||
<td><?php echo html::input($field, '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td><?php echo html::submitButton();?></td>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<?php foreach($method->parameters as $param):?>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $param->name?></th>
|
||||
<td><?php echo html::input("$param->name", $param->isOptional() ? $param->getDefaultValue() : '', "class='form-control'")?></td>
|
||||
<td><?php echo html::input("$param->name", $param->isOptional() ? $param->getDefaultValue() : '', "class='form-control' autocomplete='off'")?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('holdDays', $config->backup->holdDays, "class='form-control'");?>
|
||||
<?php echo html::input('holdDays', $config->backup->holdDays, "class='form-control' autocomplete='off'");?>
|
||||
<strong class='input-group-addon'><?php echo $lang->day;?></strong>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -49,9 +49,10 @@ class block extends control
|
||||
if(!common::hasPriv($moduleKey, 'index')) unset($modules[$moduleKey]);
|
||||
}
|
||||
|
||||
$modules['dynamic'] = $this->lang->block->dynamic;
|
||||
$modules['flowchart'] = $this->lang->block->lblFlowchart;
|
||||
$modules['html'] = 'HTML';
|
||||
$closedBlock = isset($this->config->block->closed) ? $this->config->block->closed : '';
|
||||
if(strpos(",$closedBlock,", ",|dynamic,") === false) $modules['dynamic'] = $this->lang->block->dynamic;
|
||||
if(strpos(",$closedBlock,", ",|flowchart,") === false) $modules['flowchart'] = $this->lang->block->lblFlowchart;
|
||||
if(strpos(",$closedBlock,", ",|html,") === false) $modules['html'] = 'HTML';
|
||||
$modules = array('' => '') + $modules;
|
||||
|
||||
$hiddenBlocks = $this->block->getHiddenBlocks();
|
||||
@@ -338,7 +339,7 @@ class block extends control
|
||||
|
||||
$sso = base64_decode($this->get->sso);
|
||||
$this->view->sso = $sso;
|
||||
$this->view->sign = strpos($sso, '&') === false ? '?' : '&';
|
||||
$this->view->sign = strpos($sso, '?') === false ? '?' : '&';
|
||||
}
|
||||
|
||||
$this->viewType = (isset($params->viewType) and $params->viewType == 'json') ? 'json' : 'html';
|
||||
@@ -615,4 +616,20 @@ class block extends control
|
||||
{
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Close block forever.
|
||||
*
|
||||
* @param int $blockID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function close($blockID)
|
||||
{
|
||||
$block = $this->block->getByID($blockID);
|
||||
$closedBlock = isset($this->config->block->closed) ? $this->config->block->closed : '';
|
||||
$this->dao->delete()->from(TABLE_BLOCK)->where('source')->eq($block->source)->andWhere('block')->eq($block->block)->exec();
|
||||
$this->loadModel('setting')->setItem('system.block.closed', $closedBlock . ",{$block->source}|{$block->block}");
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,15 +86,41 @@ function initTableHeader()
|
||||
|
||||
$panel.toggleClass('with-fixed-header', isFixed);
|
||||
var $header = $panel.children('.table-header-fixed').toggle(isFixed);
|
||||
if(!isFixed) return;
|
||||
if(!isFixed)
|
||||
{
|
||||
$table.find('thead').css('visibility', 'visible');
|
||||
return;
|
||||
}
|
||||
var tableWidth = $table.width();
|
||||
if(!$header.length)
|
||||
{
|
||||
$header = $('<div class="table-header-fixed" style="position: absolute; left: 0; top: 0; right: 0;"><table class="table table-fixed"></table></div>').css('right', $panel.width() - tableWidth).css('min-width', tableWidth);
|
||||
$header.find('.table').addClass($table.attr('class')).append($table.find('thead').css('visibility', 'hidden').clone().css('visibility', 'visible'));
|
||||
var $oldTableHead = $table.find('thead');
|
||||
$oldTableHead.find('th').each(function(idx)
|
||||
{
|
||||
$(this).attr('data-idx', idx);
|
||||
});
|
||||
$header.find('.table').addClass($table.attr('class')).append($oldTableHead.css('visibility', 'hidden').clone().css('visibility', 'visible'));
|
||||
$panel.addClass('with-fixed-header').append($header);
|
||||
var $heading = $panel.children('.panel-heading');
|
||||
if($heading.length) $header.css('top', $heading.outerHeight());
|
||||
if($table.hasClass('tablesorter'))
|
||||
{
|
||||
$header.on('mousedown mouseup', 'th[data-idx]', function(e)
|
||||
{
|
||||
var $th = $(this);
|
||||
var $targetTh = $oldTableHead.find('th[data-idx="' + $th.data('idx') + '"]').trigger(e);
|
||||
if(e.type === 'mouseup')
|
||||
{
|
||||
var updateTh = function()
|
||||
{
|
||||
$header.find('thead').empty().append($oldTableHead.find('tr').clone());
|
||||
};
|
||||
setTimeout(updateTh, 10);
|
||||
setTimeout(updateTh, 200);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -152,7 +178,12 @@ $(function()
|
||||
panelRemovingTip : config.confirmRemoveBlock,
|
||||
resizable : !useGuest,
|
||||
onResize : resizeBlock,
|
||||
afterRefresh : initTableHeader
|
||||
afterRefresh : function(e)
|
||||
{
|
||||
var $sortTable = e.$panel.find('.tablesorter');
|
||||
if($sortTable.length) $sortTable.sortTable();
|
||||
initTableHeader();
|
||||
}
|
||||
});
|
||||
|
||||
// $dashboard.find('ul.dashboard-actions').addClass('hide').children('li').addClass('right').appendTo($('#modulemenu > .nav'));
|
||||
|
||||
@@ -31,6 +31,9 @@ $lang->block->createBlock = 'Create Widget';
|
||||
$lang->block->editBlock = 'Edit';
|
||||
$lang->block->ordersSaved = 'Ranking is saved.';
|
||||
$lang->block->confirmRemoveBlock = 'Do you want to remove Widget【{0}】?';
|
||||
$lang->block->closeForever = 'Permanent Close';
|
||||
$lang->block->confirmClose = 'Do you want to permanently close this block? Once done, it is not available to anyone. It can be switched on at Admin->Custom.';
|
||||
$lang->block->remove = 'Remove';
|
||||
$lang->block->refresh = 'Refresh';
|
||||
$lang->block->hidden = 'Hide';
|
||||
$lang->block->dynamicInfo = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>.";
|
||||
@@ -82,7 +85,7 @@ $lang->block->default['qa']['2']['params']['num'] = 15;
|
||||
$lang->block->default['qa']['2']['params']['orderBy'] = 'id_desc';
|
||||
$lang->block->default['qa']['2']['params']['type'] = 'assigntome';
|
||||
|
||||
$lang->block->default['qa']['3']['title'] = 'Pending Versions';
|
||||
$lang->block->default['qa']['3']['title'] = 'Pending Builds';
|
||||
$lang->block->default['qa']['3']['block'] = 'testtask';
|
||||
$lang->block->default['qa']['3']['grid'] = 4;
|
||||
|
||||
@@ -226,9 +229,11 @@ $lang->block->typeList->project['undone'] = 'Undone';
|
||||
$lang->block->typeList->project['isdoing'] = 'Doing';
|
||||
$lang->block->typeList->project['all'] = 'All';
|
||||
|
||||
$lang->block->typeList->testtask['wait'] = 'Testing Pending';
|
||||
$lang->block->typeList->testtask['done'] = 'Tested';
|
||||
$lang->block->typeList->testtask['all'] = 'All';
|
||||
$lang->block->typeList->testtask['wait'] = 'Testing Pending';
|
||||
$lang->block->typeList->testtask['doing'] = 'Testing';
|
||||
$lang->block->typeList->testtask['blocked'] = 'Blocked';
|
||||
$lang->block->typeList->testtask['done'] = 'Tested';
|
||||
$lang->block->typeList->testtask['all'] = 'All';
|
||||
|
||||
$lang->block->modules['product']->moreLinkList = new stdclass();
|
||||
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&status=%s';
|
||||
@@ -248,7 +253,7 @@ $lang->block->modules['common']->moreLinkList->dynamic = 'company|dynamic|';
|
||||
|
||||
$lang->block->flowchart = array();
|
||||
$lang->block->flowchart[] = array('Administration', 'Manage a Company', 'Add Users', 'Maintain Privileges');
|
||||
$lang->block->flowchart[] = array('Product Manager', 'Add Products', 'Maintain Modules', 'Maintain Plans', 'Maintain Stories', 'Create Release');
|
||||
$lang->block->flowchart[] = array('Project Manager', 'Add Projects', 'Maintain Teams', 'Link Products', 'Link Stories', 'Decompose Tasks');
|
||||
$lang->block->flowchart[] = array('DEV Team', 'Claim TaskS/Bugs', 'Update Status', 'Finish Tasks/Bugs');
|
||||
$lang->block->flowchart[] = array($lang->productCommon . ' Manager', 'Add ' . $lang->productCommon, 'Maintain Modules', 'Maintain Plans', 'Maintain Stories', 'Create Release');
|
||||
$lang->block->flowchart[] = array($lang->projectCommon . ' Manager', 'Add ' . $lang->projectCommon, 'Maintain Teams', 'Link ' . $lang->productCommon . 's', 'Link Stories', 'Decompose Tasks');
|
||||
$lang->block->flowchart[] = array('DEV Team', 'Claim Tasks/Bugs', 'Update Status', 'Finish Tasks/Bugs');
|
||||
$lang->block->flowchart[] = array('Testing Team', 'Write Cases', 'Implement Cases', 'Report Bugs', 'Fix Bugs', 'Close Bugs');
|
||||
|
||||
@@ -31,6 +31,9 @@ $lang->block->createBlock = '添加区块';
|
||||
$lang->block->editBlock = '编辑区块';
|
||||
$lang->block->ordersSaved = '排序已保存';
|
||||
$lang->block->confirmRemoveBlock = '确定移除区块【{0}】吗?';
|
||||
$lang->block->closeForever = '永久关闭';
|
||||
$lang->block->confirmClose = '确定永久关闭该区块吗?闭后所有人都将无法使用该区块,可以在后台自定义中打开';
|
||||
$lang->block->remove = '移除';
|
||||
$lang->block->refresh = '刷新';
|
||||
$lang->block->hidden = '隐藏';
|
||||
$lang->block->dynamicInfo = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>。";
|
||||
@@ -226,9 +229,11 @@ $lang->block->typeList->project['undone'] = '未完成';
|
||||
$lang->block->typeList->project['isdoing'] = '进行中';
|
||||
$lang->block->typeList->project['all'] = '全部';
|
||||
|
||||
$lang->block->typeList->testtask['wait'] = '待测版本';
|
||||
$lang->block->typeList->testtask['done'] = '已测版本';
|
||||
$lang->block->typeList->testtask['all'] = '全部';
|
||||
$lang->block->typeList->testtask['wait'] = '待测版本';
|
||||
$lang->block->typeList->testtask['doing'] = '测试中版本';
|
||||
$lang->block->typeList->testtask['blocked'] = '阻塞版本';
|
||||
$lang->block->typeList->testtask['done'] = '已测版本';
|
||||
$lang->block->typeList->testtask['all'] = '全部';
|
||||
|
||||
$lang->block->modules['product']->moreLinkList = new stdclass();
|
||||
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&status=%s';
|
||||
@@ -248,7 +253,7 @@ $lang->block->modules['common']->moreLinkList->dynamic = 'company|dynamic|';
|
||||
|
||||
$lang->block->flowchart = array();
|
||||
$lang->block->flowchart[] = array('管理员', '维护公司', '添加用户', '维护权限');
|
||||
$lang->block->flowchart[] = array('产品经理', '创建产品', '维护模块', '维护计划', '维护需求', '创建发布');
|
||||
$lang->block->flowchart[] = array('项目经理', '创建项目', '维护团队', '关联产品', '关联需求', '分解任务');
|
||||
$lang->block->flowchart[] = array($lang->productCommon . '经理', '创建' . $lang->productCommon, '维护模块', '维护计划', '维护需求', '创建发布');
|
||||
$lang->block->flowchart[] = array($lang->projectCommon . '经理', '创建' . $lang->projectCommon, '维护团队', '关联' . $lang->productCommon, '关联需求', '分解任务');
|
||||
$lang->block->flowchart[] = array('研发人员', '领取任务和Bug', '更新状态', '完成任务和Bug');
|
||||
$lang->block->flowchart[] = array('测试人员', '撰写用例', '执行用例', '提交Bug', '验证Bug', '关闭Bug');
|
||||
|
||||
@@ -31,6 +31,9 @@ $lang->block->createBlock = '添加區塊';
|
||||
$lang->block->editBlock = '編輯區塊';
|
||||
$lang->block->ordersSaved = '排序已保存';
|
||||
$lang->block->confirmRemoveBlock = '確定移除區塊【{0}】嗎?';
|
||||
$lang->block->closeForever = '永久關閉';
|
||||
$lang->block->confirmClose = '確定永久關閉該區塊嗎?閉後所有人都將無法使用該區塊,可以在後台自定義中打開';
|
||||
$lang->block->remove = '移除';
|
||||
$lang->block->refresh = '刷新';
|
||||
$lang->block->hidden = '隱藏';
|
||||
$lang->block->dynamicInfo = "%s, %s <em>%s</em> %s <a href='%s'>%s</a>。";
|
||||
@@ -226,9 +229,11 @@ $lang->block->typeList->project['undone'] = '未完成';
|
||||
$lang->block->typeList->project['isdoing'] = '進行中';
|
||||
$lang->block->typeList->project['all'] = '全部';
|
||||
|
||||
$lang->block->typeList->testtask['wait'] = '待測版本';
|
||||
$lang->block->typeList->testtask['done'] = '已測版本';
|
||||
$lang->block->typeList->testtask['all'] = '全部';
|
||||
$lang->block->typeList->testtask['wait'] = '待測版本';
|
||||
$lang->block->typeList->testtask['doing'] = '測試中版本';
|
||||
$lang->block->typeList->testtask['blocked'] = '阻塞版本';
|
||||
$lang->block->typeList->testtask['done'] = '已測版本';
|
||||
$lang->block->typeList->testtask['all'] = '全部';
|
||||
|
||||
$lang->block->modules['product']->moreLinkList = new stdclass();
|
||||
$lang->block->modules['product']->moreLinkList->list = 'product|all|product=&status=%s';
|
||||
@@ -248,7 +253,7 @@ $lang->block->modules['common']->moreLinkList->dynamic = 'company|dynamic|';
|
||||
|
||||
$lang->block->flowchart = array();
|
||||
$lang->block->flowchart[] = array('管理員', '維護公司', '添加用戶', '維護權限');
|
||||
$lang->block->flowchart[] = array('產品經理', '創建產品', '維護模組', '維護計劃', '維護需求', '創建發佈');
|
||||
$lang->block->flowchart[] = array('項目經理', '創建項目', '維護團隊', '關聯產品', '關聯需求', '分解任務');
|
||||
$lang->block->flowchart[] = array($lang->productCommon . '經理', '創建' . $lang->productCommon, '維護模組', '維護計劃', '維護需求', '創建發佈');
|
||||
$lang->block->flowchart[] = array($lang->projectCommon . '經理', '創建' . $lang->projectCommon, '維護團隊', '關聯' . $lang->productCommon, '關聯需求', '分解任務');
|
||||
$lang->block->flowchart[] = array('研發人員', '領取任務和Bug', '更新狀態', '完成任務和Bug');
|
||||
$lang->block->flowchart[] = array('測試人員', '撰寫用例', '執行用例', '提交Bug', '驗證Bug', '關閉Bug');
|
||||
|
||||
+43
-2
@@ -173,8 +173,16 @@ class blockModel extends model
|
||||
*/
|
||||
public function getAvailableBlocks($module = '')
|
||||
{
|
||||
if($module and isset($this->lang->block->modules[$module]))return json_encode($this->lang->block->modules[$module]->availableBlocks);
|
||||
return json_encode($this->lang->block->availableBlocks);
|
||||
$blocks = $this->lang->block->availableBlocks;
|
||||
if($module and isset($this->lang->block->modules[$module])) $blocks = $this->lang->block->modules[$module]->availableBlocks;
|
||||
if(isset($this->config->block->closed))
|
||||
{
|
||||
foreach($blocks as $blockKey => $blockName)
|
||||
{
|
||||
if(strpos(",{$this->config->block->closed},", ",{$module}|{$blockKey},") !== false) unset($blocks->$blockKey);
|
||||
}
|
||||
}
|
||||
return json_encode($blocks);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -389,6 +397,39 @@ class blockModel extends model
|
||||
return json_encode($this->onlyNumParams($module, $params));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get closed block pairs.
|
||||
*
|
||||
* @param string $closedBlock
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getClosedBlockPairs($closedBlock)
|
||||
{
|
||||
$blockPairs = array();
|
||||
if(empty($closedBlock)) return $blockPairs;
|
||||
|
||||
foreach(explode(',', $closedBlock) as $block)
|
||||
{
|
||||
$block = trim($block);
|
||||
if(empty($block)) continue;
|
||||
|
||||
list($moduleName, $blockKey) = explode('|', $block);
|
||||
if(empty($moduleName))
|
||||
{
|
||||
if($blockKey == 'html') $blockPairs[$block] = 'HTML';
|
||||
if($blockKey == 'flowchart') $blockPairs[$block] = $this->lang->block->lblFlowchart;
|
||||
if($blockKey == 'dynamic') $blockPairs[$block] = $this->lang->block->dynamic;
|
||||
}
|
||||
else
|
||||
{
|
||||
$blockPairs[$block] = "{$this->lang->block->moduleList[$moduleName]}|{$this->lang->block->modules[$moduleName]->availableBlocks->$blockKey}";
|
||||
}
|
||||
}
|
||||
|
||||
return $blockPairs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build number params.
|
||||
*
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.ranzhi.org
|
||||
*/
|
||||
?>
|
||||
<table class='table table-data table-hover block-bug table-fixed'>
|
||||
<table class='table table-data table-hover block-bug table-fixed tablesorter'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='50'><?php echo $lang->idAB?></th>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.ranzhi.org
|
||||
*/
|
||||
?>
|
||||
<table class='table table-data table-hover block-build table-fixed'>
|
||||
<table class='table tablesorter table-data table-hover block-build table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='50'><?php echo $lang->idAB?></th>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.ranzhi.org
|
||||
*/
|
||||
?>
|
||||
<table class='table table-data table-hover block-case table-fixed'>
|
||||
<table class='table tablesorter table-data table-hover block-case table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='50'><?php echo $lang->idAB?></th>
|
||||
|
||||
@@ -16,13 +16,17 @@ $themeRoot = $webRoot . "theme/";
|
||||
if(isset($pageCSS)) css::internal($pageCSS);
|
||||
$useGuest = $this->app->user->account == 'guest';
|
||||
?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<div class='dashboard' id='dashboard' data-confirm-remove-block='<?php echo $lang->block->confirmRemoveBlock;?>'>
|
||||
<?php if(!$useGuest):?>
|
||||
<div class='dashboard-actions'><a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='700' data-title='<?php echo $lang->block->createBlock?>'><i class='icon icon-plus' title='<?php echo $lang->block->createBlock?>' data-toggle='tooltip' data-placement='left'></i></a></div>
|
||||
<div class='dashboard-empty-message hide'>
|
||||
<a href='<?php echo $this->createLink("block", "admin", "id=0&module=$module"); ?>' data-toggle='modal' data-type='ajax' data-width='700' class='btn btn-primary'><i class='icon icon-plus'></i> <?php echo $lang->block->createBlock?></a>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class='row'>
|
||||
<?php foreach($blocks as $index => $block):?>
|
||||
<?php if(isset($config->block->closed) and strpos(",{$config->block->closed},", ",{$block->source}|{$block->block},") !== false) continue;?>
|
||||
<div class='col-sm-6 col-md-<?php echo $block->grid;?>'>
|
||||
<div class='panel panel-block <?php if(isset($block->params->color)) echo 'panel-' . $block->params->color;?>' id='block<?php echo $block->id?>' data-id='<?php echo $block->id?>' data-name='<?php echo $block->title?>' data-url='<?php echo $block->blockLink?>'>
|
||||
<div class='panel-heading'>
|
||||
@@ -39,7 +43,10 @@ $useGuest = $this->app->user->account == 'guest';
|
||||
<?php if(!$block->source and $block->block == 'html'):?>
|
||||
<li><a href="javascript:hiddenBlock(<?php echo $index;?>)" class="hidden-panel"><i class='icon-eye-close'></i><?php echo $lang->block->hidden; ?></a></li>
|
||||
<?php endif;?>
|
||||
<li><a href='javascript:;' class='remove-panel'><i class='icon-remove'></i> <?php echo $lang->delete; ?></a></li>
|
||||
<li><a href='javascript:;' class='remove-panel'><i class='icon-remove'></i> <?php echo $lang->block->remove; ?></a></li>
|
||||
<?php endif;?>
|
||||
<?php if($this->app->user->admin):?>
|
||||
<li><?php echo html::a($this->createLink('block', 'close', "blockID={$block->id}"), "<i class='icon-eye-close'></i> {$lang->block->closeForever}", 'hiddenwin', "class='close-block' onclick=\"return confirm('{$lang->block->confirmClose}')\"")?>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -51,7 +58,6 @@ $useGuest = $this->app->user->account == 'guest';
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
config.ordersSaved = '<?php echo $lang->block->ordersSaved; ?>';
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.ranzhi.org
|
||||
*/
|
||||
?>
|
||||
<table class='table table-data table-hover block-plan table-fixed'>
|
||||
<table class='table tablesorter table-data table-hover block-plan table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='50'><?php echo $lang->idAB?></th>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<table class='table table-data table-hover table-fixed table-striped block-product'>
|
||||
<table class='table tablesorter table-data table-hover table-fixed table-striped block-product'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='text-left'><?php echo $lang->product->name;?></th>
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
<?php include '../../common/view/sparkline.html.php';?>
|
||||
<?php $projectboxId = 'projectbox-' . rand(); ?>
|
||||
<div id='<?php echo $projectboxId ?>'>
|
||||
<table class='table table-data table-hover table-striped table-fixed block-project'>
|
||||
<table class='table tablesorter table-data table-hover table-striped table-fixed block-project'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th><div class='text-left'><?php echo $lang->project->name;?></div></th>
|
||||
<th class='text-left'><?php echo $lang->project->name;?></th>
|
||||
<th width='80'><?php echo $lang->project->end;?></th>
|
||||
<th width='50'><?php echo $lang->statusAB;?></th>
|
||||
<th width='45'><?php echo $lang->project->totalEstimate;?></th>
|
||||
<th width='45'><?php echo $lang->project->totalConsumed;?></th>
|
||||
<th width='45'><?php echo $lang->project->totalLeft;?></th>
|
||||
<th width='115'><?php echo $lang->project->progess;?></th>
|
||||
<th width='100'><?php echo $lang->project->burn;?></th>
|
||||
<th width='100' class='{sorter: false}'><?php echo $lang->project->burn;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -64,7 +64,7 @@ $(function()
|
||||
$sparks = $sparks.not('.sparked');
|
||||
var rowHeight = $sparks.first().closest('tr').outerHeight() - ($.zui.browser.ie === 8 ? 0.3 : 0);
|
||||
|
||||
var scrollFn = false, scrollStart, i, id, $spark;
|
||||
var scrollFn = false, scrollStart = 6, i, id, $spark;
|
||||
$projectbox.parent().on('scroll.spark', function(e)
|
||||
{
|
||||
if(!$sparks.length)
|
||||
@@ -76,8 +76,7 @@ $(function()
|
||||
|
||||
scrollFn = setTimeout(function()
|
||||
{
|
||||
scrollStart = Math.floor(($projectbox.scrollTop() - 30) / (rowHeight)) + 1;
|
||||
for(i = scrollStart; i <= scrollStart + 7; i++)
|
||||
for(i = scrollStart; i <= scrollStart + 10; i++)
|
||||
{
|
||||
id = '#spark-' + i;
|
||||
$spark = $(id);
|
||||
@@ -85,6 +84,7 @@ $(function()
|
||||
$spark.addClass('sparked').projectLine();
|
||||
$sparks = $sparks.not(id);
|
||||
}
|
||||
scrollStart += 10;
|
||||
},100);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
?>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->block->name?></th>
|
||||
<td><?php echo html::input('title', $block ? $block->title : '', "class='form-control'")?></td>
|
||||
<td><?php echo html::input('title', $block ? $block->title : '', "class='form-control' autocomplete='off'")?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->block->style;?></th>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.ranzhi.org
|
||||
*/
|
||||
?>
|
||||
<table class='table table-data table-hover block-release table-fixed'>
|
||||
<table class='table tablesorter table-data table-hover block-release table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='50'><?php echo $lang->idAB?></th>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.ranzhi.org
|
||||
*/
|
||||
?>
|
||||
<table class='table table-data table-hover block-story table-fixed'>
|
||||
<table class='table tablesorter table-data table-hover block-story table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='50'><?php echo $lang->idAB?></th>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<style>
|
||||
td.delayed{background: #e84e0f!important; color: white;}
|
||||
</style>
|
||||
<table class='table table-data table-hover block-task table-fixed'>
|
||||
<table class='table tablesorter table-data table-hover block-task table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='50'><?php echo $lang->idAB?></th>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.ranzhi.org
|
||||
*/
|
||||
?>
|
||||
<table class='table table-data table-hover block-testtask table-fixed'>
|
||||
<table class='table tablesorter table-data table-hover block-testtask table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='50'><?php echo $lang->idAB?></th>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @link http://www.ranzhi.org
|
||||
*/
|
||||
?>
|
||||
<table class='table table-data table-hover block-todo table-fixed'>
|
||||
<table class='table tablesorter table-data table-hover block-todo table-fixed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='90'><?php echo $lang->todo->date?></th>
|
||||
|
||||
@@ -66,27 +66,10 @@ class branch extends control
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->branches = $this->branch->getPairs($productID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get matched items
|
||||
*
|
||||
* @param string $keywords
|
||||
* @param string $module
|
||||
* @param string $method
|
||||
* @param string $extra
|
||||
* @param int $objectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetMatchedItems($keywords, $module, $method, $extra, $objectID)
|
||||
{
|
||||
$this->view->link = $this->loadModel('product')->getProductLink($module, $method, $extra, true);
|
||||
$this->view->branches = $this->dao->select('*')->from(TABLE_BRANCH)->where('deleted')->eq(0)->andWhere('product')->eq($objectID)->andWhere('name')->like("%$keywords%")->orderBy('id desc')->fetchPairs('id', 'name');
|
||||
$this->view->productID = $objectID;
|
||||
$this->view->keywords = $keywords;
|
||||
$branches = $this->branch->getPairs($productID);
|
||||
$this->view->branches = $branches;
|
||||
$this->view->branchesPinyin = common::convert2Pinyin($branches);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<?php
|
||||
foreach($branches as $branchID => $branch)
|
||||
{
|
||||
echo "<li>" . html::a(sprintf($link, $productID, $branchID), "<i class='icon-cube'></i> " . $branch, '', "class='text-important'"). "</li>";
|
||||
echo "<li data-id='{$branchID}' data-key='{$branchesPinyin[$branch]}'>" . html::a(sprintf($link, $productID, $branchID), "<i class='icon-cube'></i> " . $branch, '', "class='text-important'"). "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<div class='search-list'>
|
||||
<ul>
|
||||
<?php if(!$branches) echo "<li class='no-result-tip'>" . sprintf($lang->product->noMatched, $keywords) . '</li>';?>
|
||||
<?php
|
||||
foreach($branches as $branchID => $branch)
|
||||
{
|
||||
echo "<li>" . html::a(sprintf($link, $productID, $branchID), "<i class='icon-cube'></i> " . $branch). "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
+11
-4
@@ -24,7 +24,7 @@ $config->bug->list->allFields = 'id, module, project, story, task,
|
||||
lastEditedDate';
|
||||
$config->bug->list->defaultFields = 'id,severity,pri,title,openedBy,assignedTo,resolvedBy,resolution';
|
||||
|
||||
$config->bug->list->exportFields = 'id, product, module, project, story, task,
|
||||
$config->bug->list->exportFields = 'id, product, branch, module, project, story, task,
|
||||
title, keywords, severity, pri, type, os, browser,
|
||||
steps, status, activatedCount, confirmed, mailto,
|
||||
openedBy, openedDate, openedBuild,
|
||||
@@ -36,14 +36,14 @@ $config->bug->list->exportFields = 'id, product, module, project, story, task,
|
||||
lastEditedBy,
|
||||
lastEditedDate, files';
|
||||
|
||||
$config->bug->list->customCreateFields = 'project,story,task,pri,severity,os,browser,mailto,keywords';
|
||||
$config->bug->list->customCreateFields = 'project,story,task,pri,severity,os,browser,deadline,mailto,keywords';
|
||||
$config->bug->list->customBatchCreateFields = 'module,project,steps,type,pri,severity,os,browser,keywords';
|
||||
$config->bug->list->customBatchEditFields = 'type,severity,pri,productplan,assignedTo,status,resolvedBy,resolution,os,browser,keywords';
|
||||
$config->bug->list->customBatchEditFields = 'type,severity,pri,productplan,assignedTo,deadline,status,resolvedBy,resolution,os,browser,keywords';
|
||||
|
||||
$config->bug->custom = new stdclass();
|
||||
$config->bug->custom->createFields = $config->bug->list->customCreateFields;
|
||||
$config->bug->custom->batchCreateFields = 'module,project,steps,type,severity,os,browser';
|
||||
$config->bug->custom->batchEditFields = 'type,severity,pri,assignedTo,status,resolvedBy,resolution';
|
||||
$config->bug->custom->batchEditFields = 'type,severity,pri,assignedTo,deadline,status,resolvedBy,resolution';
|
||||
|
||||
$config->bug->editor = new stdclass();
|
||||
$config->bug->editor->create = array('id' => 'steps', 'tools' => 'bugTools');
|
||||
@@ -99,6 +99,7 @@ $config->bug->search['fields']['assignedDate'] = $lang->bug->assignedDate;
|
||||
$config->bug->search['fields']['resolvedDate'] = $lang->bug->resolvedDate;
|
||||
$config->bug->search['fields']['closedDate'] = $lang->bug->closedDate;
|
||||
$config->bug->search['fields']['lastEditedDate'] = $lang->bug->lastEditedDateAB;
|
||||
$config->bug->search['fields']['deadline'] = $lang->bug->deadline;
|
||||
|
||||
$config->bug->search['params']['title'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->bug->search['params']['keywords'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
@@ -141,6 +142,7 @@ $config->bug->search['params']['assignedDate'] = array('operator' => '=',
|
||||
$config->bug->search['params']['resolvedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->bug->search['params']['closedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->bug->search['params']['lastEditedDate']= array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->bug->search['params']['deadline'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
|
||||
$config->bug->datatable = new stdclass();
|
||||
$config->bug->datatable->defaultField = array('id', 'severity', 'pri', 'title', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolvedBy', 'resolution', 'resolvedDate', 'actions');
|
||||
@@ -205,6 +207,11 @@ $config->bug->datatable->fieldList['assignedDate']['fixed'] = 'no';
|
||||
$config->bug->datatable->fieldList['assignedDate']['width'] = '90';
|
||||
$config->bug->datatable->fieldList['assignedDate']['required'] = 'no';
|
||||
|
||||
$config->bug->datatable->fieldList['deadline']['title'] = 'deadline';
|
||||
$config->bug->datatable->fieldList['deadline']['fixed'] = 'no';
|
||||
$config->bug->datatable->fieldList['deadline']['width'] = '90';
|
||||
$config->bug->datatable->fieldList['deadline']['required'] = 'no';
|
||||
|
||||
$config->bug->datatable->fieldList['resolvedBy']['title'] = 'resolvedByAB';
|
||||
$config->bug->datatable->fieldList['resolvedBy']['fixed'] = 'no';
|
||||
$config->bug->datatable->fieldList['resolvedBy']['width'] = '80';
|
||||
|
||||
+31
-23
@@ -250,6 +250,7 @@ class bug extends control
|
||||
$os = '';
|
||||
$browser = '';
|
||||
$assignedTo = '';
|
||||
$deadline = '';
|
||||
$mailto = '';
|
||||
$keywords = '';
|
||||
$severity = 3;
|
||||
@@ -259,16 +260,8 @@ class bug extends control
|
||||
$extras = str_replace(array(',', ' '), array('&', ''), $extras);
|
||||
parse_str($extras);
|
||||
|
||||
/* If set runID, get the last result info as the template. */
|
||||
if(!empty($runID)) $resultID = $this->dao->select('id')->from(TABLE_TESTRESULT)->where('run')->eq($runID)->orderBy('id desc')->limit(1)->fetch('id');
|
||||
if(isset($resultID) and $resultID > 0) extract($this->bug->getBugInfoFromResult($resultID));
|
||||
|
||||
/* If set caseID and runID='', get the last result info as the template. */
|
||||
if($caseID && empty($runID))
|
||||
{
|
||||
$resultID = $this->dao->select('id')->from(TABLE_TESTRESULT)->where('`case`')->eq($caseID)->orderBy('date desc')->limit(1)->fetch('id');
|
||||
if(isset($resultID) and $resultID > 0) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version));
|
||||
}
|
||||
if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID));// If set runID and resultID, get the result info by resultID as template.
|
||||
if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version));// If not set runID but set caseID, get the result info by resultID and case info.
|
||||
|
||||
/* If bugID setted, use this bug as template. */
|
||||
if(isset($bugID))
|
||||
@@ -283,6 +276,7 @@ class bug extends control
|
||||
$severity = $bug->severity;
|
||||
$type = $bug->type;
|
||||
$assignedTo = $bug->assignedTo;
|
||||
$deadline = $bug->deadline;
|
||||
}
|
||||
|
||||
/* If projectID is setted, get builds and stories of this project. */
|
||||
@@ -338,6 +332,7 @@ class bug extends control
|
||||
$this->view->browser = $browser;
|
||||
$this->view->projectMembers = $projectMembers;
|
||||
$this->view->assignedTo = $assignedTo;
|
||||
$this->view->deadline = $deadline;
|
||||
$this->view->mailto = $mailto;
|
||||
$this->view->keywords = $keywords;
|
||||
$this->view->severity = $severity;
|
||||
@@ -445,6 +440,8 @@ class bug extends control
|
||||
if($bug->project and !$this->loadModel('project')->checkPriv($this->project->getByID($bug->project)))
|
||||
{
|
||||
echo(js::alert($this->lang->project->accessDenied));
|
||||
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
|
||||
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
|
||||
die(js::locate('back'));
|
||||
}
|
||||
|
||||
@@ -648,10 +645,9 @@ class bug extends control
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id');
|
||||
|
||||
/* Judge whether the editedTasks is too large and set session. */
|
||||
$showSuhosinInfo = false;
|
||||
$showSuhosinInfo = $this->loadModel('common')->judgeSuhosinSetting(count($bugs), count(explode(',', $this->config->bug->custom->batchEditFields)) + 2);
|
||||
$this->app->session->set('showSuhosinInfo', $showSuhosinInfo);
|
||||
if($showSuhosinInfo) $this->view->suhosinInfo = $this->lang->suhosinInfo;
|
||||
$countInputVars = count($bugs) * (count(explode(',', $this->config->bug->custom->batchEditFields)) + 2);
|
||||
$showSuhosinInfo = common::judgeSuhosinSetting($countInputVars);
|
||||
if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars);
|
||||
|
||||
/* Set Custom*/
|
||||
foreach(explode(',', $this->config->bug->list->customBatchEditFields) as $field) $customFields[$field] = $this->lang->bug->$field;
|
||||
@@ -783,9 +779,10 @@ class bug extends control
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->bug->confirm($bugID);
|
||||
$changes = $this->bug->confirm($bugID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
$actionID = $this->action->create('bug', $bugID, 'bugConfirmed', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->bug->sendmail($bugID, $actionID);
|
||||
if(isonlybody()) die(js::closeModal('parent.parent'));
|
||||
die(js::locate($this->createLink('bug', 'view', "bugID=$bugID"), 'parent'));
|
||||
@@ -876,7 +873,8 @@ class bug extends control
|
||||
$this->view->bug = $bug;
|
||||
$this->view->users = $users;
|
||||
$this->view->assignedTo = $assignedTo;
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, 'noterminate,nodone');
|
||||
$this->view->projects = $this->loadModel('product')->getProjectPairs($productID, $bug->branch ? "0,{$bug->branch}" : 0, $params = 'nodeleted');
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch = 0, 'all');
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
$this->display();
|
||||
}
|
||||
@@ -1277,6 +1275,7 @@ class bug extends control
|
||||
if($_POST)
|
||||
{
|
||||
$this->loadModel('file');
|
||||
$this->loadModel('branch');
|
||||
$bugLang = $this->lang->bug;
|
||||
$bugConfig = $this->config->bug;
|
||||
|
||||
@@ -1300,20 +1299,24 @@ class bug extends control
|
||||
$projects = $this->loadModel('project')->getPairs('all|nocode');
|
||||
|
||||
/* Get related objects id lists. */
|
||||
$relatedModuleIdList = array();
|
||||
$relatedStoryIdList = array();
|
||||
$relatedTaskIdList = array();
|
||||
$relatedBugIdList = array();
|
||||
$relatedCaseIdList = array();
|
||||
$relatedBuildIdList = array();
|
||||
$relatedProductIdList = array();
|
||||
$relatedModuleIdList = array();
|
||||
$relatedStoryIdList = array();
|
||||
$relatedTaskIdList = array();
|
||||
$relatedBugIdList = array();
|
||||
$relatedCaseIdList = array();
|
||||
$relatedBuildIdList = array();
|
||||
$relatedBranchIdList = array();
|
||||
|
||||
foreach($bugs as $bug)
|
||||
{
|
||||
$relatedProductIdList[$bug->product] = $bug->product;
|
||||
$relatedModuleIdList[$bug->module] = $bug->module;
|
||||
$relatedStoryIdList[$bug->story] = $bug->story;
|
||||
$relatedTaskIdList[$bug->task] = $bug->task;
|
||||
$relatedCaseIdList[$bug->case] = $bug->case;
|
||||
$relatedBugIdList[$bug->duplicateBug] = $bug->duplicateBug;
|
||||
$relatedBranchIdList[$bug->branch] = $bug->branch;
|
||||
|
||||
/* Process link bugs. */
|
||||
$linkBugs = explode(',', $bug->linkBug);
|
||||
@@ -1332,12 +1335,14 @@ class bug extends control
|
||||
}
|
||||
|
||||
/* Get related objects title or names. */
|
||||
$productsType = $this->dao->select('id, type')->from(TABLE_PRODUCT)->where('id')->in($relatedProductIdList)->fetchPairs();
|
||||
$relatedModules = $this->dao->select('id, name')->from(TABLE_MODULE)->where('id')->in($relatedModuleIdList)->fetchPairs();
|
||||
$relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs();
|
||||
$relatedTasks = $this->dao->select('id, name')->from(TABLE_TASK)->where('id')->in($relatedTaskIdList)->fetchPairs();
|
||||
$relatedBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($relatedBugIdList)->fetchPairs();
|
||||
$relatedCases = $this->dao->select('id, title')->from(TABLE_CASE)->where('id')->in($relatedCaseIdList)->fetchPairs();
|
||||
$relatedBuilds = array('trunk' => 'Trunk') + $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($relatedBuildIdList)->fetchPairs();
|
||||
$relatedBranch = array('0' => $this->lang->branch->all) + $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($relatedBranchIdList)->fetchPairs();
|
||||
$relatedBuilds = array('trunk' => $this->lang->trunk) + $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($relatedBuildIdList)->fetchPairs();
|
||||
$relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('bug')->andWhere('objectID')->in(@array_keys($bugs))->fetchGroup('objectID');
|
||||
|
||||
foreach($bugs as $bug)
|
||||
@@ -1360,6 +1365,7 @@ class bug extends control
|
||||
if(isset($relatedBugs[$bug->duplicateBug])) $bug->duplicateBug = $relatedBugs[$bug->duplicateBug] . "($bug->duplicateBug)";
|
||||
if(isset($relatedCases[$bug->case])) $bug->case = $relatedCases[$bug->case] . "($bug->case)";
|
||||
if(isset($relatedBuilds[$bug->resolvedBuild])) $bug->resolvedBuild = $relatedBuilds[$bug->resolvedBuild] . "(#$bug->resolvedBuild)";
|
||||
if(isset($relatedBranch[$bug->branch])) $bug->branch = $relatedBranch[$bug->branch] . "(#$bug->branch)";
|
||||
|
||||
if(isset($bugLang->priList[$bug->pri])) $bug->pri = $bugLang->priList[$bug->pri];
|
||||
if(isset($bugLang->typeList[$bug->type])) $bug->type = $bugLang->typeList[$bug->type];
|
||||
@@ -1432,6 +1438,8 @@ class bug extends control
|
||||
unset($bug->deleted);
|
||||
}
|
||||
|
||||
if(!(in_array('platform', $productsType) or in_array('branch', $productsType))) unset($fields['branch']);// If products's type are normal, unset branch field.
|
||||
|
||||
$this->post->set('fields', $fields);
|
||||
$this->post->set('rows', $bugs);
|
||||
$this->post->set('kind', 'bug');
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
.confirm1 {color:green; font-size:9px}
|
||||
.red{color:red;}
|
||||
|
||||
#createActionMenu .dropdown-menu {width:100%;}
|
||||
|
||||
.dropdown-menu.with-search {padding: 0; min-width: 150px; overflow: hidden; max-height: 302px;}
|
||||
.dropdown-menu > .menu-search .input-group {width:100%;}
|
||||
.dropdown-menu > .menu-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#contactListGroup .input-group-btn > .btn {margin-left: -1px!important;}
|
||||
#contactListGroup .chosen-container-single a {border-left-width: 0px;}
|
||||
|
||||
.chosen-container {max-width: 533px;}
|
||||
.chosen-container {max-width: 580px;}
|
||||
|
||||
.minw-80px {min-width: 80px;}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
.chosen-container[id^="buildProject"] {max-width: 160px; border-radius: 0}
|
||||
.chosen-container[id^="buildProject"] .chosen-drop {min-width: 400px;!important}
|
||||
+17
-2
@@ -75,8 +75,23 @@ function setTemplate(templateID)
|
||||
function deleteTemplate(templateID)
|
||||
{
|
||||
if(!templateID) return;
|
||||
hiddenwin.location.href = createLink('bug', 'deleteTemplate', 'templateID=' + templateID);
|
||||
$('#tplBox' + templateID).addClass('hidden');
|
||||
if(confirm(confirmDeleteTemplate))
|
||||
{
|
||||
hiddenwin.location.href = createLink('bug', 'deleteTemplate', 'templateID=' + templateID);
|
||||
$('#tplBox' + templateID).addClass('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
/* Display template x icon. */
|
||||
function displayXIcon(templateID)
|
||||
{
|
||||
$('#templateID' + templateID).removeClass('hidden');
|
||||
}
|
||||
|
||||
/* Hide template x icon. */
|
||||
function hideXIcon(templateID)
|
||||
{
|
||||
$('#templateID' + templateID).addClass('hidden');
|
||||
}
|
||||
|
||||
$(function()
|
||||
|
||||
@@ -9,3 +9,22 @@ function setDuplicate(resolution)
|
||||
$('#duplicateBugBox').hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
$('#createBuild').change(function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$('#resolvedBuildBox').addClass('hidden');
|
||||
$('#newBuildBox').removeClass('hidden');
|
||||
$('#newBuildProjectBox').removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#resolvedBuildBox').removeClass('hidden');
|
||||
$('#newBuildBox').addClass('hidden');
|
||||
$('#newBuildProjectBox').addClass('hidden');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
+29
-18
@@ -13,6 +13,7 @@
|
||||
$lang->bug->common = 'Bug';
|
||||
$lang->bug->id = 'ID';
|
||||
$lang->bug->product = $lang->productCommon;
|
||||
$lang->bug->branch = 'Branch/Platform';
|
||||
$lang->bug->productplan = 'Plan';
|
||||
$lang->bug->module = 'Module';
|
||||
$lang->bug->moduleAB = 'Module';
|
||||
@@ -48,13 +49,14 @@ $lang->bug->resolutionAB = 'Solution';
|
||||
$lang->bug->resolvedBuild = 'Resolved Build';
|
||||
$lang->bug->resolvedDate = 'Resolved On';
|
||||
$lang->bug->resolvedDateAB = 'Resolved On';
|
||||
$lang->bug->deadline = 'Deadline';
|
||||
$lang->bug->closedBy = 'Closed By';
|
||||
$lang->bug->closedDate = 'Closed On';
|
||||
$lang->bug->duplicateBug = 'Duplicate';
|
||||
$lang->bug->lastEditedBy = 'Last Edited By';
|
||||
$lang->bug->linkBug = 'Related';
|
||||
$lang->bug->linkBugs = 'Relate Bug';
|
||||
$lang->bug->unlinkBug = 'Unrelate';
|
||||
$lang->bug->linkBug = 'linked';
|
||||
$lang->bug->linkBugs = 'Link Bug';
|
||||
$lang->bug->unlinkBug = 'Unlink';
|
||||
$lang->bug->case = 'Case';
|
||||
$lang->bug->files = 'File';
|
||||
$lang->bug->keywords = 'Keywords';
|
||||
@@ -99,11 +101,12 @@ $lang->bug->openedByMe = 'Created by Me';
|
||||
$lang->bug->resolvedByMe = 'Resolved by Me';
|
||||
$lang->bug->closedByMe = 'Closed by Me';
|
||||
$lang->bug->assignToNull = 'Unassigned';
|
||||
$lang->bug->unResolved = 'Unresolve';
|
||||
$lang->bug->unResolved = 'Unresolved';
|
||||
$lang->bug->toClosed = 'To Be Closed';
|
||||
$lang->bug->unclosed = 'Open';
|
||||
$lang->bug->longLifeBugs = 'Pending';
|
||||
$lang->bug->postponedBugs = 'Postponed';
|
||||
$lang->bug->overdueBugs = 'Overdue';
|
||||
$lang->bug->allBugs = 'All';
|
||||
$lang->bug->byQuery = 'Search';
|
||||
$lang->bug->needConfirm = 'Story Change';
|
||||
@@ -119,6 +122,7 @@ $lang->bug->lblLastEdited = 'Last Edited';
|
||||
$lang->bug->lblResolved = 'Resolved By';
|
||||
$lang->bug->allUsers = 'All User';
|
||||
$lang->bug->allBuilds = 'All';
|
||||
$lang->bug->createBuild = 'New';
|
||||
|
||||
/* legend列表。*/
|
||||
$lang->bug->legendBasicInfo = 'Basic Info';
|
||||
@@ -129,18 +133,19 @@ $lang->bug->lblSystemBrowserAndHardware = 'System/Browser';
|
||||
$lang->bug->legendSteps = 'Repro Steps';
|
||||
$lang->bug->legendComment = 'Note';
|
||||
$lang->bug->legendLife = 'Lifecycle';
|
||||
$lang->bug->legendMisc = 'Miscellaneous';
|
||||
$lang->bug->legendMisc = 'Misc';
|
||||
|
||||
/* 功能按钮。*/
|
||||
$lang->bug->buttonConfirm = 'Confirm';
|
||||
|
||||
/* 交互提示。*/
|
||||
$lang->bug->confirmChangeProduct = "Modification on {$lang->productCommon} will cause related {$lang->projectCommon},Story and Task change. Do you want to do this?";
|
||||
$lang->bug->confirmDelete = 'Do you want to delete this bug?';
|
||||
$lang->bug->setTemplateTitle = 'Please enter the title of template.';
|
||||
$lang->bug->remindTask = 'This Bug has been converted to Task. Do you want to update Status of Task(ID %s)?';
|
||||
$lang->bug->skipClose = 'Bug %s is not resolved. You cannot close it.';
|
||||
$lang->bug->applyTemplate = 'Apply Template';
|
||||
$lang->bug->confirmChangeProduct = "Modification on {$lang->productCommon} will cause linked {$lang->projectCommon},Story and Task change. Do you want to do this?";
|
||||
$lang->bug->confirmDelete = 'Do you want to delete this bug?';
|
||||
$lang->bug->setTemplateTitle = 'Please enter the title of template.';
|
||||
$lang->bug->remindTask = 'This Bug has been converted to Task. Do you want to update Status of Task(ID %s)?';
|
||||
$lang->bug->skipClose = 'Bug %s is not resolved. You cannot close it.';
|
||||
$lang->bug->applyTemplate = 'Apply Template';
|
||||
$lang->bug->confirmDeleteTemplate = 'Do you want to delete this template?';
|
||||
|
||||
/* 模板。*/
|
||||
$lang->bug->tplStep = "<p>[Steps]</p>\n";
|
||||
@@ -256,6 +261,7 @@ $lang->bug->report->charts['bugsPerSeverity'] = 'Bug Priority Report';
|
||||
$lang->bug->report->charts['bugsPerResolution'] = 'Bug Solution Report';
|
||||
$lang->bug->report->charts['bugsPerStatus'] = 'Bug Status Report';
|
||||
$lang->bug->report->charts['bugsPerActivatedCount'] = 'Bug Activation Report';
|
||||
$lang->bug->report->charts['bugsPerPri'] = 'Bug Priority Report';
|
||||
$lang->bug->report->charts['bugsPerType'] = 'Bug Type Report';
|
||||
$lang->bug->report->charts['bugsPerAssignedTo'] = 'Bug Assignment Report';
|
||||
//$lang->bug->report->charts['bugLiveDays'] = 'Bug Handling Time Report';
|
||||
@@ -281,6 +287,7 @@ $lang->bug->report->bugsPerResolution = new stdclass();
|
||||
$lang->bug->report->bugsPerStatus = new stdclass();
|
||||
$lang->bug->report->bugsPerActivatedCount = new stdclass();
|
||||
$lang->bug->report->bugsPerType = new stdclass();
|
||||
$lang->bug->report->bugsPerPri = new stdclass();
|
||||
$lang->bug->report->bugsPerAssignedTo = new stdclass();
|
||||
$lang->bug->report->bugLiveDays = new stdclass();
|
||||
$lang->bug->report->bugHistories = new stdclass();
|
||||
@@ -299,6 +306,7 @@ $lang->bug->report->bugsPerResolution->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerStatus->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerActivatedCount->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerType->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerPri->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerAssignedTo->graph = new stdclass();
|
||||
$lang->bug->report->bugLiveDays->graph = new stdclass();
|
||||
$lang->bug->report->bugHistories->graph = new stdclass();
|
||||
@@ -324,6 +332,7 @@ $lang->bug->report->bugsPerSeverity->graph->xAxisName = 'Priority';
|
||||
$lang->bug->report->bugsPerResolution->graph->xAxisName = 'Solution';
|
||||
$lang->bug->report->bugsPerStatus->graph->xAxisName = 'Status';
|
||||
$lang->bug->report->bugsPerActivatedCount->graph->xAxisName = 'Activation Count';
|
||||
$lang->bug->report->bugsPerPri->graph->xAxisName = 'Priority';
|
||||
$lang->bug->report->bugsPerType->graph->xAxisName = 'Type';
|
||||
$lang->bug->report->bugsPerAssignedTo->graph->xAxisName = 'Assigned To';
|
||||
$lang->bug->report->bugLiveDays->graph->xAxisName = 'Handling Time';
|
||||
@@ -334,17 +343,18 @@ $lang->bug->action = new stdclass();
|
||||
$lang->bug->action->resolved = array('main' => '$date, resolved by <strong>$actor</strong> and the solution is <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
|
||||
$lang->bug->action->tostory = array('main' => '$date, transferred by <strong>$actor</strong> to <strong>Story</strong> with ID <strong>$extra</strong>.');
|
||||
$lang->bug->action->totask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong> with ID <strong>$extra</strong>.');
|
||||
$lang->bug->action->linked2plan = array('main' => '$date, related by <strong>$actor</strong> to Plan <strong>$extra</strong>.');
|
||||
$lang->bug->action->linked2plan = array('main' => '$date, linked by <strong>$actor</strong> to Plan <strong>$extra</strong>.');
|
||||
$lang->bug->action->unlinkedfromplan = array('main' => '$date, deleted by <strong>$actor</strong> from Plan <strong>$extra</strong>.');
|
||||
$lang->bug->action->linked2build = array('main' => '$date, related by <strong>$actor</strong> to Build <strong>$extra</strong>.');
|
||||
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, removed by <strong>$actor</strong> from Build <strong>$extra</strong>.');
|
||||
$lang->bug->action->linked2release = array('main' => '$date, related by <strong>$actor</strong> to Release <strong>$extra</strong>.');
|
||||
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, removed by <strong>$actor</strong> from Release <strong>$extra</strong>.');
|
||||
$lang->bug->action->linkrelatedbug = array('main' => '$date, related by <strong>$actor</strong> to Bug <strong>$extra</strong>.');
|
||||
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, removed by <strong>$actor</strong> from Bug <strong>$extra</strong>.');
|
||||
$lang->bug->action->linked2build = array('main' => '$date, linked by <strong>$actor</strong> to Build <strong>$extra</strong>.');
|
||||
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, unlinked by <strong>$actor</strong> from Build <strong>$extra</strong>.');
|
||||
$lang->bug->action->linked2release = array('main' => '$date, linked by <strong>$actor</strong> to Release <strong>$extra</strong>.');
|
||||
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, unlinked by <strong>$actor</strong> from Release <strong>$extra</strong>.');
|
||||
$lang->bug->action->linkrelatedbug = array('main' => '$date, linked by <strong>$actor</strong> to Bug <strong>$extra</strong>.');
|
||||
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, unlinked by <strong>$actor</strong> from Bug <strong>$extra</strong>.');
|
||||
|
||||
$lang->bug->placeholder = new stdclass();
|
||||
$lang->bug->placeholder->chooseBuilds = 'Choose Build...';
|
||||
$lang->bug->placeholder->newBuildName = 'The name of new build';
|
||||
|
||||
$lang->bug->featureBar['browse']['unclosed'] = $lang->bug->unclosed;
|
||||
$lang->bug->featureBar['browse']['all'] = $lang->bug->allBugs;
|
||||
@@ -357,4 +367,5 @@ $lang->bug->featureBar['browse']['unresolved'] = $lang->bug->unResolved;
|
||||
$lang->bug->featureBar['browse']['toclosed'] = $lang->bug->toClosed;
|
||||
$lang->bug->featureBar['browse']['longlifebugs'] = $lang->bug->longLifeBugs;
|
||||
$lang->bug->featureBar['browse']['postponedbugs'] = $lang->bug->postponedBugs;
|
||||
$lang->bug->featureBar['browse']['overduebugs'] = $lang->bug->overdueBugs;
|
||||
$lang->bug->featureBar['browse']['needconfirm'] = $lang->bug->needConfirm;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
$lang->bug->common = 'Bug';
|
||||
$lang->bug->id = 'Bug编号';
|
||||
$lang->bug->product = '所属' . $lang->productCommon;
|
||||
$lang->bug->branch = '分支/平台';
|
||||
$lang->bug->productplan = '所属计划';
|
||||
$lang->bug->module = '所属模块';
|
||||
$lang->bug->moduleAB = '模块';
|
||||
@@ -48,6 +49,7 @@ $lang->bug->resolutionAB = '方案';
|
||||
$lang->bug->resolvedBuild = '解决版本';
|
||||
$lang->bug->resolvedDate = '解决日期';
|
||||
$lang->bug->resolvedDateAB = '解决日期';
|
||||
$lang->bug->deadline = '截止日期';
|
||||
$lang->bug->closedBy = '由谁关闭';
|
||||
$lang->bug->closedDate = '关闭日期';
|
||||
$lang->bug->duplicateBug = '重复ID';
|
||||
@@ -104,6 +106,7 @@ $lang->bug->toClosed = '待关闭';
|
||||
$lang->bug->unclosed = '未关闭';
|
||||
$lang->bug->longLifeBugs = '久未处理';
|
||||
$lang->bug->postponedBugs = '被延期';
|
||||
$lang->bug->overdueBugs = '过期Bug';
|
||||
$lang->bug->allBugs = '所有';
|
||||
$lang->bug->byQuery = '搜索';
|
||||
$lang->bug->needConfirm = '需求变动';
|
||||
@@ -119,6 +122,7 @@ $lang->bug->lblLastEdited = '最后修改';
|
||||
$lang->bug->lblResolved = '由谁解决';
|
||||
$lang->bug->allUsers = '所有用户';
|
||||
$lang->bug->allBuilds = '所有';
|
||||
$lang->bug->createBuild = '新建';
|
||||
|
||||
/* legend列表。*/
|
||||
$lang->bug->legendBasicInfo = '基本信息';
|
||||
@@ -135,12 +139,13 @@ $lang->bug->legendMisc = '其他相关';
|
||||
$lang->bug->buttonConfirm = '确认';
|
||||
|
||||
/* 交互提示。*/
|
||||
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}会导致相应的{$lang->projectCommon}、需求和任务发生变化,确定吗?";
|
||||
$lang->bug->confirmDelete = '您确认要删除该Bug吗?';
|
||||
$lang->bug->setTemplateTitle = '请输入bug模板标题';
|
||||
$lang->bug->remindTask = '该Bug已经转化为任务,是否更新任务(编号:%s)状态 ?';
|
||||
$lang->bug->skipClose = 'Bug %s 不是已解决状态,不能关闭。';
|
||||
$lang->bug->applyTemplate = '应用模板';
|
||||
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}会导致相应的{$lang->projectCommon}、需求和任务发生变化,确定吗?";
|
||||
$lang->bug->confirmDelete = '您确认要删除该Bug吗?';
|
||||
$lang->bug->setTemplateTitle = '请输入bug模板标题';
|
||||
$lang->bug->remindTask = '该Bug已经转化为任务,是否更新任务(编号:%s)状态 ?';
|
||||
$lang->bug->skipClose = 'Bug %s 不是已解决状态,不能关闭。';
|
||||
$lang->bug->applyTemplate = '应用模板';
|
||||
$lang->bug->confirmDeleteTemplate = '您确认要删除该模板吗?';
|
||||
|
||||
/* 模板。*/
|
||||
$lang->bug->tplStep = "<p>[步骤]</p>\n";
|
||||
@@ -256,6 +261,7 @@ $lang->bug->report->charts['bugsPerSeverity'] = 'Bug严重程度统计';
|
||||
$lang->bug->report->charts['bugsPerResolution'] = 'Bug解决方案统计';
|
||||
$lang->bug->report->charts['bugsPerStatus'] = 'Bug状态统计';
|
||||
$lang->bug->report->charts['bugsPerActivatedCount'] = 'Bug激活次数统计';
|
||||
$lang->bug->report->charts['bugsPerPri'] = 'Bug优先级统计';
|
||||
$lang->bug->report->charts['bugsPerType'] = 'Bug类型统计';
|
||||
$lang->bug->report->charts['bugsPerAssignedTo'] = '指派给统计';
|
||||
//$lang->bug->report->charts['bugLiveDays'] = 'Bug处理时间统计';
|
||||
@@ -281,6 +287,7 @@ $lang->bug->report->bugsPerResolution = new stdclass();
|
||||
$lang->bug->report->bugsPerStatus = new stdclass();
|
||||
$lang->bug->report->bugsPerActivatedCount = new stdclass();
|
||||
$lang->bug->report->bugsPerType = new stdclass();
|
||||
$lang->bug->report->bugsPerPri = new stdclass();
|
||||
$lang->bug->report->bugsPerAssignedTo = new stdclass();
|
||||
$lang->bug->report->bugLiveDays = new stdclass();
|
||||
$lang->bug->report->bugHistories = new stdclass();
|
||||
@@ -299,6 +306,7 @@ $lang->bug->report->bugsPerResolution->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerStatus->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerActivatedCount->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerType->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerPri->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerAssignedTo->graph = new stdclass();
|
||||
$lang->bug->report->bugLiveDays->graph = new stdclass();
|
||||
$lang->bug->report->bugHistories->graph = new stdclass();
|
||||
@@ -324,6 +332,7 @@ $lang->bug->report->bugsPerSeverity->graph->xAxisName = '严重程度';
|
||||
$lang->bug->report->bugsPerResolution->graph->xAxisName = '解决方案';
|
||||
$lang->bug->report->bugsPerStatus->graph->xAxisName = '状态';
|
||||
$lang->bug->report->bugsPerActivatedCount->graph->xAxisName = '激活次数';
|
||||
$lang->bug->report->bugsPerPri->graph->xAxisName = '优先级';
|
||||
$lang->bug->report->bugsPerType->graph->xAxisName = '类型';
|
||||
$lang->bug->report->bugsPerAssignedTo->graph->xAxisName = '指派给';
|
||||
$lang->bug->report->bugLiveDays->graph->xAxisName = '处理时间';
|
||||
@@ -345,6 +354,7 @@ $lang->bug->action->unlinkrelatedbug = array('main' => '$date, 由 <strong>$a
|
||||
|
||||
$lang->bug->placeholder = new stdclass();
|
||||
$lang->bug->placeholder->chooseBuilds = '选择相关版本...';
|
||||
$lang->bug->placeholder->newBuildName = '新版本名称';
|
||||
|
||||
$lang->bug->featureBar['browse']['unclosed'] = $lang->bug->unclosed;
|
||||
$lang->bug->featureBar['browse']['all'] = $lang->bug->allBugs;
|
||||
@@ -357,4 +367,5 @@ $lang->bug->featureBar['browse']['unresolved'] = $lang->bug->unResolved;
|
||||
$lang->bug->featureBar['browse']['toclosed'] = $lang->bug->toClosed;
|
||||
$lang->bug->featureBar['browse']['longlifebugs'] = $lang->bug->longLifeBugs;
|
||||
$lang->bug->featureBar['browse']['postponedbugs'] = $lang->bug->postponedBugs;
|
||||
$lang->bug->featureBar['browse']['overduebugs'] = $lang->bug->overdueBugs;
|
||||
$lang->bug->featureBar['browse']['needconfirm'] = $lang->bug->needConfirm;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
$lang->bug->common = 'Bug';
|
||||
$lang->bug->id = 'Bug編號';
|
||||
$lang->bug->product = '所屬' . $lang->productCommon;
|
||||
$lang->bug->branch = '分支/平台';
|
||||
$lang->bug->productplan = '所屬計劃';
|
||||
$lang->bug->module = '所屬模組';
|
||||
$lang->bug->moduleAB = '模組';
|
||||
@@ -48,6 +49,7 @@ $lang->bug->resolutionAB = '方案';
|
||||
$lang->bug->resolvedBuild = '解決版本';
|
||||
$lang->bug->resolvedDate = '解決日期';
|
||||
$lang->bug->resolvedDateAB = '解決日期';
|
||||
$lang->bug->deadline = '截止日期';
|
||||
$lang->bug->closedBy = '由誰關閉';
|
||||
$lang->bug->closedDate = '關閉日期';
|
||||
$lang->bug->duplicateBug = '重複ID';
|
||||
@@ -104,6 +106,7 @@ $lang->bug->toClosed = '待關閉';
|
||||
$lang->bug->unclosed = '未關閉';
|
||||
$lang->bug->longLifeBugs = '久未處理';
|
||||
$lang->bug->postponedBugs = '被延期';
|
||||
$lang->bug->overdueBugs = '過期Bug';
|
||||
$lang->bug->allBugs = '所有';
|
||||
$lang->bug->byQuery = '搜索';
|
||||
$lang->bug->needConfirm = '需求變動';
|
||||
@@ -119,6 +122,7 @@ $lang->bug->lblLastEdited = '最後修改';
|
||||
$lang->bug->lblResolved = '由誰解決';
|
||||
$lang->bug->allUsers = '所有用戶';
|
||||
$lang->bug->allBuilds = '所有';
|
||||
$lang->bug->createBuild = '新建';
|
||||
|
||||
/* legend列表。*/
|
||||
$lang->bug->legendBasicInfo = '基本信息';
|
||||
@@ -135,12 +139,13 @@ $lang->bug->legendMisc = '其他相關';
|
||||
$lang->bug->buttonConfirm = '確認';
|
||||
|
||||
/* 交互提示。*/
|
||||
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}會導致相應的{$lang->projectCommon}、需求和任務發生變化,確定嗎?";
|
||||
$lang->bug->confirmDelete = '您確認要刪除該Bug嗎?';
|
||||
$lang->bug->setTemplateTitle = '請輸入bug模板標題';
|
||||
$lang->bug->remindTask = '該Bug已經轉化為任務,是否更新任務(編號:%s)狀態 ?';
|
||||
$lang->bug->skipClose = 'Bug %s 不是已解決狀態,不能關閉。';
|
||||
$lang->bug->applyTemplate = '應用模板';
|
||||
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}會導致相應的{$lang->projectCommon}、需求和任務發生變化,確定嗎?";
|
||||
$lang->bug->confirmDelete = '您確認要刪除該Bug嗎?';
|
||||
$lang->bug->setTemplateTitle = '請輸入bug模板標題';
|
||||
$lang->bug->remindTask = '該Bug已經轉化為任務,是否更新任務(編號:%s)狀態 ?';
|
||||
$lang->bug->skipClose = 'Bug %s 不是已解決狀態,不能關閉。';
|
||||
$lang->bug->applyTemplate = '應用模板';
|
||||
$lang->bug->confirmDeleteTemplate = '您確認要刪除該模板嗎?';
|
||||
|
||||
/* 模板。*/
|
||||
$lang->bug->tplStep = "<p>[步驟]</p>\n";
|
||||
@@ -256,6 +261,7 @@ $lang->bug->report->charts['bugsPerSeverity'] = 'Bug嚴重程度統計';
|
||||
$lang->bug->report->charts['bugsPerResolution'] = 'Bug解決方案統計';
|
||||
$lang->bug->report->charts['bugsPerStatus'] = 'Bug狀態統計';
|
||||
$lang->bug->report->charts['bugsPerActivatedCount'] = 'Bug激活次數統計';
|
||||
$lang->bug->report->charts['bugsPerPri'] = 'Bug優先順序統計';
|
||||
$lang->bug->report->charts['bugsPerType'] = 'Bug類型統計';
|
||||
$lang->bug->report->charts['bugsPerAssignedTo'] = '指派給統計';
|
||||
//$lang->bug->report->charts['bugLiveDays'] = 'Bug處理時間統計';
|
||||
@@ -281,6 +287,7 @@ $lang->bug->report->bugsPerResolution = new stdclass();
|
||||
$lang->bug->report->bugsPerStatus = new stdclass();
|
||||
$lang->bug->report->bugsPerActivatedCount = new stdclass();
|
||||
$lang->bug->report->bugsPerType = new stdclass();
|
||||
$lang->bug->report->bugsPerPri = new stdclass();
|
||||
$lang->bug->report->bugsPerAssignedTo = new stdclass();
|
||||
$lang->bug->report->bugLiveDays = new stdclass();
|
||||
$lang->bug->report->bugHistories = new stdclass();
|
||||
@@ -299,6 +306,7 @@ $lang->bug->report->bugsPerResolution->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerStatus->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerActivatedCount->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerType->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerPri->graph = new stdclass();
|
||||
$lang->bug->report->bugsPerAssignedTo->graph = new stdclass();
|
||||
$lang->bug->report->bugLiveDays->graph = new stdclass();
|
||||
$lang->bug->report->bugHistories->graph = new stdclass();
|
||||
@@ -324,6 +332,7 @@ $lang->bug->report->bugsPerSeverity->graph->xAxisName = '嚴重程度';
|
||||
$lang->bug->report->bugsPerResolution->graph->xAxisName = '解決方案';
|
||||
$lang->bug->report->bugsPerStatus->graph->xAxisName = '狀態';
|
||||
$lang->bug->report->bugsPerActivatedCount->graph->xAxisName = '激活次數';
|
||||
$lang->bug->report->bugsPerPri->graph->xAxisName = '優先順序';
|
||||
$lang->bug->report->bugsPerType->graph->xAxisName = '類型';
|
||||
$lang->bug->report->bugsPerAssignedTo->graph->xAxisName = '指派給';
|
||||
$lang->bug->report->bugLiveDays->graph->xAxisName = '處理時間';
|
||||
@@ -345,6 +354,7 @@ $lang->bug->action->unlinkrelatedbug = array('main' => '$date, 由 <strong>$a
|
||||
|
||||
$lang->bug->placeholder = new stdclass();
|
||||
$lang->bug->placeholder->chooseBuilds = '選擇相關版本...';
|
||||
$lang->bug->placeholder->newBuildName = '新版本名稱';
|
||||
|
||||
$lang->bug->featureBar['browse']['unclosed'] = $lang->bug->unclosed;
|
||||
$lang->bug->featureBar['browse']['all'] = $lang->bug->allBugs;
|
||||
@@ -357,4 +367,5 @@ $lang->bug->featureBar['browse']['unresolved'] = $lang->bug->unResolved;
|
||||
$lang->bug->featureBar['browse']['toclosed'] = $lang->bug->toClosed;
|
||||
$lang->bug->featureBar['browse']['longlifebugs'] = $lang->bug->longLifeBugs;
|
||||
$lang->bug->featureBar['browse']['postponedbugs'] = $lang->bug->postponedBugs;
|
||||
$lang->bug->featureBar['browse']['overduebugs'] = $lang->bug->overdueBugs;
|
||||
$lang->bug->featureBar['browse']['needconfirm'] = $lang->bug->needConfirm;
|
||||
|
||||
+221
-59
@@ -46,6 +46,7 @@ class bugModel extends model
|
||||
->add('openedDate', $now)
|
||||
->setDefault('project,story,task', 0)
|
||||
->setDefault('openedBuild', '')
|
||||
->setDefault('deadline', '0000-00-00')
|
||||
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->stripTags($this->config->bug->editor->create['id'], $this->config->allowedTags)
|
||||
@@ -244,6 +245,37 @@ class bugModel extends model
|
||||
elseif($browseType == 'postponedbugs') $bugs = $this->getByPostponedbugs($productID, $branch, $modules, $projects, $sort, $pager);
|
||||
elseif($browseType == 'needconfirm') $bugs = $this->getByNeedconfirm($productID, $branch, $modules, $projects, $sort, $pager);
|
||||
elseif($browseType == 'bysearch') $bugs = $this->getBySearch($productID, $queryID, $sort, $pager, $branch);
|
||||
elseif($browseType == 'overduebugs') $bugs = $this->getOverdueBugs($productID, $branch, $modules, $projects, $sort, $pager);
|
||||
|
||||
return $this->checkDelayBugs($bugs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check delay bug.
|
||||
*
|
||||
* @param array $bugs
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function checkDelayBugs($bugs)
|
||||
{
|
||||
foreach ($bugs as $bug)
|
||||
{
|
||||
// Delayed or not?.
|
||||
if($bug->deadline != '0000-00-00')
|
||||
{
|
||||
if(substr($bug->resolvedDate, 0, 10) != '0000-00-00')
|
||||
{
|
||||
$delay = helper::diffDate(substr($bug->resolvedDate, 0, 10), $bug->deadline);
|
||||
}
|
||||
elseif($bug->status == 'active')
|
||||
{
|
||||
$delay = helper::diffDate(helper::today(), $bug->deadline);
|
||||
}
|
||||
|
||||
if(isset($delay) and $delay > 0) $bug->delay = $delay;
|
||||
}
|
||||
}
|
||||
|
||||
return $bugs;
|
||||
}
|
||||
@@ -451,9 +483,10 @@ class bugModel extends model
|
||||
$bug = fixer::input('post')
|
||||
->cleanInt('product,module,severity,project,story,task')
|
||||
->stripTags($this->config->bug->editor->edit['id'], $this->config->allowedTags)
|
||||
->setDefault('project,module,project,story,task,duplicateBug', 0)
|
||||
->setDefault('project,module,project,story,task,duplicateBug,branch', 0)
|
||||
->setDefault('openedBuild', '')
|
||||
->setDefault('plan', 0)
|
||||
->setDefault('deadline', '0000-00-00')
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->join('openedBuild', ',')
|
||||
@@ -507,9 +540,6 @@ class bugModel extends model
|
||||
$data = fixer::input('post')->get();
|
||||
$bugIDList = $this->post->bugIDList ? $this->post->bugIDList : array();
|
||||
|
||||
/* Adjust whether the post data is complete, if not, remove the last element of $bugIDList. */
|
||||
if($this->session->showSuhosinInfo) array_pop($bugIDList);
|
||||
|
||||
if(!empty($bugIDList))
|
||||
{
|
||||
/* Process the data if the value is 'ditto'. */
|
||||
@@ -552,6 +582,7 @@ class bugModel extends model
|
||||
$bug->title = $data->titles[$bugID];
|
||||
$bug->plan = empty($data->plans[$bugID]) ? 0 : $data->plans[$bugID];
|
||||
$bug->assignedTo = $data->assignedTos[$bugID];
|
||||
$bug->deadline = $data->deadlines[$bugID];
|
||||
$bug->resolvedBy = $data->resolvedBys[$bugID];
|
||||
$bug->keywords = $data->keywords[$bugID];
|
||||
$bug->os = $data->os[$bugID];
|
||||
@@ -640,7 +671,8 @@ class bugModel extends model
|
||||
*/
|
||||
public function confirm($bugID)
|
||||
{
|
||||
$now = helper::now();
|
||||
$now = helper::now();
|
||||
$oldBug = $this->getById($bugID);
|
||||
|
||||
$bug = fixer::input('post')
|
||||
->setDefault('confirmed', 1)
|
||||
@@ -651,6 +683,8 @@ class bugModel extends model
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)->where('id')->eq($bugID)->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldBug, $bug);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -691,17 +725,43 @@ class bugModel extends model
|
||||
$oldBug = $this->getById($bugID);
|
||||
$bug = fixer::input('post')
|
||||
->add('resolvedBy', $this->app->user->account)
|
||||
->add('resolvedDate', $now)
|
||||
->add('status', 'resolved')
|
||||
->add('confirmed', 1)
|
||||
->add('assignedDate', $now)
|
||||
->add('lastEditedBy', $this->app->user->account)
|
||||
->add('lastEditedDate', $now)
|
||||
->setDefault('resolvedDate', $now)
|
||||
->setDefault('duplicateBug', 0)
|
||||
->setDefault('assignedTo', $oldBug->openedBy)
|
||||
->remove('comment,files,labels')
|
||||
->get();
|
||||
|
||||
/* Can create build when resolve bug. */
|
||||
if(isset($bug->createBuild))
|
||||
{
|
||||
if(empty($bug->buildName)) dao::$errors['buildName'][] = sprintf($this->lang->error->notempty, $this->lang->bug->placeholder->newBuildName);
|
||||
if(empty($bug->buildProject)) dao::$errors['buildProject'][] = sprintf($this->lang->error->notempty, $this->lang->bug->project);
|
||||
if(dao::isError()) return false;
|
||||
|
||||
$buildData = new stdclass();
|
||||
$buildData->product = $oldBug->product;
|
||||
$buildData->branch = $oldBug->branch;
|
||||
$buildData->project = $bug->buildProject;
|
||||
$buildData->name = $bug->buildName;
|
||||
$buildData->date = date('Y-m-d');
|
||||
$buildData->builder = $this->app->user->account;
|
||||
$this->dao->insert(TABLE_BUILD)->data($buildData)->autoCheck()
|
||||
->check('name', 'unique', "product = {$buildData->product} AND branch = {$buildData->branch} AND deleted = '0'")
|
||||
->exec();
|
||||
if(dao::isError()) return false;
|
||||
$buildID = $this->dao->lastInsertID();
|
||||
$this->loadModel('action')->create('build', $buildID, 'opened');
|
||||
$bug->resolvedBuild = $buildID;
|
||||
}
|
||||
unset($bug->buildName);
|
||||
unset($bug->createBuild);
|
||||
unset($bug->buildProject);
|
||||
|
||||
if($bug->resolvedBuild != 'trunk') $bug->testtask = $this->dao->select('id')->from(TABLE_TESTTASK)->where('build')->eq($bug->resolvedBuild)->orderBy('id_desc')->limit(1)->fetch('id');
|
||||
|
||||
$this->dao->update(TABLE_BUG)->data($bug)
|
||||
@@ -900,7 +960,7 @@ class bugModel extends model
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$bug = $this->getById($bugID);
|
||||
$bugs2Link = $this->getBySearch($bug->product, $queryID, 'id', null);
|
||||
$bugs2Link = $this->getBySearch($bug->product, $queryID, 'id', null, $bug->branch);
|
||||
foreach($bugs2Link as $key => $bug2Link)
|
||||
{
|
||||
if($bug2Link->id == $bugID) unset($bugs2Link[$key]);
|
||||
@@ -980,7 +1040,7 @@ class bugModel extends model
|
||||
else
|
||||
{
|
||||
$this->config->bug->search['fields']['branch'] = $this->lang->product->branch;
|
||||
$this->config->bug->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty');
|
||||
$this->config->bug->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty') + array('all' => $this->lang->branch->all);
|
||||
}
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->bug->search);
|
||||
@@ -1071,7 +1131,7 @@ class bugModel extends model
|
||||
if(!$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array();
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($type != 'all')->andWhere("$type")->eq($account)->fi()
|
||||
->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi()
|
||||
->orderBy($orderBy)
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->page($pager)
|
||||
@@ -1111,19 +1171,56 @@ class bugModel extends model
|
||||
/**
|
||||
* Get bugs of a project.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param int $projectID
|
||||
* @param int $build
|
||||
* @param string $type
|
||||
* @param int $param
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectBugs($projectID, $orderBy = 'id_desc', $pager = null, $build = 0)
|
||||
public function getProjectBugs($projectID, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF(empty($build))->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF($build)->andWhere("CONCAT(',', openedBuild, ',') like '%,$build,%'")->fi()
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
if($type == 'bySearch')
|
||||
{
|
||||
$queryID = (int)$param;
|
||||
$products = $this->loadModel('project')->getProducts($projectID);
|
||||
|
||||
if($this->session->projectBugQuery == false) $this->session->set('projectBugQuery', ' 1 = 1');
|
||||
if($queryID)
|
||||
{
|
||||
$query = $this->loadModel('search')->getQuery($queryID);
|
||||
if($query)
|
||||
{
|
||||
$this->session->set('projectBugQuery', $query->sql);
|
||||
$this->session->set('projectBugForm', $query->form);
|
||||
}
|
||||
}
|
||||
|
||||
$allProduct = "`product` = 'all'";
|
||||
$bugQuery = $this->session->projectBugQuery;
|
||||
if(strpos($this->session->projectBugQuery, $allProduct) !== false)
|
||||
{
|
||||
$bugQuery = str_replace($allProduct, '1', $this->session->projectBugQuery);
|
||||
}
|
||||
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where($bugQuery)
|
||||
->andWhere('project')->eq((int)$projectID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
}
|
||||
else
|
||||
{
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF(empty($build))->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF($build)->andWhere("CONCAT(',', openedBuild, ',') like '%,$build,%'")->fi()
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug');
|
||||
|
||||
@@ -1230,19 +1327,41 @@ class bugModel extends model
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get case bugs.
|
||||
*
|
||||
* @param int $runID
|
||||
* @param int $caseID
|
||||
* @param int $version
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getCaseBugs($runID, $caseID = 0, $version = 0)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('1=1')
|
||||
->beginIF($runID)->andWhere('`result`')->eq($runID)->fi()
|
||||
->beginIF($runID == 0 and $caseID)->andWhere('`case`')->eq($caseID)->fi()
|
||||
->beginIF($version)->andWhere('`caseVersion`')->eq($version)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get counts of some stories' bugs.
|
||||
*
|
||||
* @param array $stories
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getStoryBugCounts($stories)
|
||||
public function getStoryBugCounts($stories, $projectID = 0)
|
||||
{
|
||||
$bugCounts = $this->dao->select('story, COUNT(*) AS bugs')
|
||||
->from(TABLE_BUG)
|
||||
->where('story')->in($stories)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
|
||||
->groupBy('story')
|
||||
->fetchPairs();
|
||||
foreach($stories as $storyID) if(!isset($bugCounts[$storyID])) $bugCounts[$storyID] = 0;
|
||||
@@ -1274,53 +1393,49 @@ class bugModel extends model
|
||||
{
|
||||
$run = $this->loadModel('testtask')->getRunById($result->run);
|
||||
}
|
||||
if($result and $result->caseResult == 'fail')
|
||||
|
||||
$title = $run->case->title;
|
||||
$caseSteps = $run->case->steps;
|
||||
$stepResults = unserialize($result->stepResults);
|
||||
if($run->case->precondition != '')
|
||||
{
|
||||
$title = $run->case->title;
|
||||
$caseSteps = $run->case->steps;
|
||||
$stepResults = unserialize($result->stepResults);
|
||||
if($run->case->precondition != '')
|
||||
$bugSteps = "<p>[" . $this->lang->testcase->precondition . "]</p>" . "\n" . $run->case->precondition;
|
||||
}
|
||||
|
||||
$bugSteps .= $this->lang->bug->tplStep;
|
||||
if(!empty($stepResults))
|
||||
{
|
||||
$i = 1;
|
||||
foreach($steps as $stepId)
|
||||
{
|
||||
$bugSteps = "<p>[" . $this->lang->testcase->precondition . "]</p>" . "\n" . $run->case->precondition;
|
||||
if(!isset($caseSteps[$stepId])) continue;
|
||||
|
||||
$step = $caseSteps[$stepId];
|
||||
$bugSteps .= $i . '. ' . $step->desc . "<br />";
|
||||
$i++;
|
||||
}
|
||||
$bugSteps .= $this->lang->bug->tplStep;
|
||||
if(!empty($stepResults))
|
||||
|
||||
$bugSteps .= $this->lang->bug->tplResult;
|
||||
$i = 1;
|
||||
foreach($steps as $stepId)
|
||||
{
|
||||
$i = 0;
|
||||
foreach($caseSteps as $key => $step)
|
||||
{
|
||||
if(!in_array($step->id, $steps)) continue;
|
||||
$i++;
|
||||
$bugSteps .= $i . '. ' . $step->desc . "<br />";
|
||||
}
|
||||
|
||||
$bugSteps .= $this->lang->bug->tplResult;
|
||||
$i = 0;
|
||||
foreach($caseSteps as $key => $step)
|
||||
{
|
||||
if(!in_array($step->id, $steps)) continue;
|
||||
$i++;
|
||||
if(empty($stepResults[$step->id]['real'])) continue;
|
||||
$bugSteps .= $i . '. ' . $stepResults[$step->id]['real'] . "<br />";
|
||||
}
|
||||
|
||||
$bugSteps .= $this->lang->bug->tplExpect;
|
||||
$i = 0;
|
||||
foreach($caseSteps as $key => $step)
|
||||
{
|
||||
if(!in_array($step->id, $steps)) continue;
|
||||
$i++;
|
||||
if(!$step->expect) continue;
|
||||
$bugSteps .= $i . '. ' . $step->expect . "<br />";
|
||||
}
|
||||
|
||||
if(!isset($stepResults[$stepId]) or empty($stepResults[$stepId]['real'])) continue;
|
||||
$bugSteps .= $i . '. ' . $stepResults[$stepId]['real'] . "<br />";
|
||||
$i++;
|
||||
}
|
||||
else
|
||||
|
||||
$bugSteps .= $this->lang->bug->tplExpect;
|
||||
$i = 1;
|
||||
foreach($steps as $stepId)
|
||||
{
|
||||
$bugSteps .= $this->lang->bug->tplResult;
|
||||
$bugSteps .= $this->lang->bug->tplExpect;
|
||||
if(!isset($caseSteps[$stepId])) continue;
|
||||
|
||||
$step = $caseSteps[$stepId];
|
||||
if($step->expect) $bugSteps .= $i . '. ' . $step->expect . "<br />";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
return array('title' => $title, 'steps' => $bugSteps, 'storyID' => $run->case->story, 'moduleID' => $run->case->module, 'version' => $run->case->version);
|
||||
}
|
||||
|
||||
@@ -1537,6 +1652,20 @@ class bugModel extends model
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get report data of bugs per pri
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerPri()
|
||||
{
|
||||
$datas = $this->dao->select('pri AS name, COUNT(*) AS value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('name')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
foreach($datas as $status => $data) $data->name = $this->lang->bug->report->bugsPerPri->graph->xAxisName . ':' . $data->name;
|
||||
return $datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get report data of bugs per status.
|
||||
*
|
||||
@@ -1802,6 +1931,33 @@ class bugModel extends model
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bugs the overdueBugs is active or unclosed.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param array $modules
|
||||
* @param array $projects
|
||||
* @param string $status
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getOverdueBugs($productID, $branch, $modules, $projects, $orderBy, $pager)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('project')->in(array_keys($projects))
|
||||
->andWhere('product')->eq($productID)
|
||||
->beginIF($branch)->andWhere('branch')->in($branch)->fi()
|
||||
->beginIF($modules)->andWhere('module')->in($modules)->fi()
|
||||
->andWhere('status')->eq('active')
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('deadline')->ne('0000-00-00')
|
||||
->andWhere('deadline')->lt(helper::today())
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bugs the status is active or unclosed.
|
||||
*
|
||||
@@ -1941,7 +2097,9 @@ class bugModel extends model
|
||||
$bugQuery = str_replace($allProduct, '1', $bugQuery);
|
||||
$bugQuery = $bugQuery . ' AND `product` ' . helper::dbIN($products);
|
||||
}
|
||||
if($branch) $bugQuery .= " AND `branch` in('0','$branch')";
|
||||
$allBranch = "`branch` = 'all'";
|
||||
if($branch and strpos($bugQuery, '`branch` =') === false) $bugQuery .= " AND `branch` in('0','$branch')";
|
||||
if(strpos($bugQuery, $allBranch) !== false) $bugQuery = str_replace($allBranch, '1', $bugQuery);
|
||||
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where($bugQuery)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy($orderBy)->page($pager)->fetchAll();
|
||||
@@ -2079,6 +2237,7 @@ class bugModel extends model
|
||||
if($id == 'status') $class .= ' bug-' . $bug->status;
|
||||
if($id == 'title') $class .= ' text-left';
|
||||
if($id == 'assignedTo' && $bug->assignedTo == $account) $class .= ' red';
|
||||
if($id == 'deadline' && isset($bug->delay)) $class .= ' delayed';
|
||||
|
||||
echo "<td class='" . $class . "'" . ($id=='title' ? " title='{$bug->title}'" : '') . ">";
|
||||
switch ($id)
|
||||
@@ -2130,6 +2289,9 @@ class bugModel extends model
|
||||
case 'assignedDate':
|
||||
echo substr($bug->assignedDate, 5, 11);
|
||||
break;
|
||||
case 'deadline':
|
||||
echo $bug->deadline;
|
||||
break;
|
||||
case 'resolvedBy':
|
||||
echo zget($users, $bug->resolvedBy, $bug->resolvedBy);
|
||||
break;
|
||||
|
||||
@@ -86,7 +86,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[$i]", '', "data-provide='colorpicker' data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->bug->colorTag}' data-update-text='#title\\[{$i}\\]'");?>
|
||||
<?php echo html::input("title[$i]", $bugTitle, 'class=form-control') . html::hidden("uploadImage[$i]", $fileName);?>
|
||||
<?php echo html::input("title[$i]", $bugTitle, "class='form-control' autocomplete='off'") . html::hidden("uploadImage[$i]", $fileName);?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
@@ -95,7 +95,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>'><?php echo html::select("severities[$i]", $lang->bug->severityList, '', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', 'class=form-control');?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
@@ -119,7 +119,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[$i]", '', "data-provide='colorpicker' data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->bug->colorTag}' data-update-text='#title\\[{$i}\\]'");?>
|
||||
<?php echo html::input("title[$i]", '', 'class=form-control');?>
|
||||
<?php echo html::input("title[$i]", '', "class='form-control' autocomplete='off'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo html::textarea("stepses[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
@@ -128,7 +128,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>'><?php echo html::select("severities[$i]", $lang->bug->severityList, '', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>'> <?php echo html::select("oses[$i]", $lang->bug->osList, $os, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>'> <?php echo html::select("browsers[$i]", $lang->bug->browserList, $browser, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', 'class=form-control');?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[$i]", '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
</tbody>
|
||||
@@ -148,7 +148,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[%s]", '', "data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->bug->colorTag}' data-update-text='#title\\[%s\\]'");?>
|
||||
<?php echo html::input("title[%s]", '', 'class=form-control');?>
|
||||
<?php echo html::input("title[%s]", '', "class='form-control' autocomplete='off'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'steps', 'hidden')?>'> <?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
@@ -157,7 +157,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<td class='<?php echo zget($visibleFields, 'severity', 'hidden')?>'><?php echo html::select("severities[%s]", $lang->bug->severityList, '', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'os', 'hidden')?>'> <?php echo html::select("oses[%s]", $lang->bug->osList, '', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'browser', 'hidden')?>'> <?php echo html::select("browsers[%s]", $lang->bug->browserList, '', "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[%s]", '', 'class=form-control');?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'keywords', 'hidden')?>'><?php echo html::input("keywords[%s]", '', "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/datepicker.html.php';?>
|
||||
<?php js::set('dittoNotice', $this->lang->bug->dittoNotice);?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
@@ -21,6 +22,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(isset($suhosinInfo)):?>
|
||||
<div class='alert alert-info'><?php echo $suhosinInfo;?></div>
|
||||
<?php else:?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
foreach(explode(',', $showFields) as $field)
|
||||
@@ -40,6 +44,7 @@ $columns = count($visibleFields) + 2;
|
||||
<th <?php if(count($visibleFields) >= 10) echo "class='w-150px'"?>><?php echo $lang->bug->title;?> <span class='required'></span></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'productplan', ' hidden')?>'><?php echo $lang->bug->productplan;?></th>
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'><?php echo $lang->bug->assignedTo;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'deadline', ' hidden')?>'><?php echo $lang->bug->deadline;?></th>
|
||||
<th class='w-90px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->bug->status;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'os', ' hidden')?>'><?php echo $lang->bug->os;?></th>
|
||||
<th class='w-100px<?php echo zget($visibleFields, 'browser', ' hidden')?>'><?php echo $lang->bug->browser;?></th>
|
||||
@@ -77,6 +82,7 @@ $columns = count($visibleFields) + 2;
|
||||
</td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'productplan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plans[$bugID]", $plans, $bugs[$bugID]->plan, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>' style='overflow:visible'><?php echo html::select("assignedTos[$bugID]", $users, $bugs[$bugID]->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'deadline', ' hidden')?>' style='overflow:visible'><?php echo html::input("deadlines[$bugID]", $bugs[$bugID]->deadline, "class='form-control form-date'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'status', "class='hidden'")?>><?php echo html::select("statuses[$bugID]", $statusList, $bugs[$bugID]->status, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'os', "class='hidden'")?>><?php echo html::select("os[$bugID]", $osList, $bugs[$bugID]->os, 'class=form-control');?></td>
|
||||
<td <?php echo zget($visibleFields, 'browser', "class='hidden'")?>><?php echo html::select("browsers[$bugID]", $browserList, $bugs[$bugID]->browser, 'class=form-control');?></td>
|
||||
@@ -96,15 +102,13 @@ $columns = count($visibleFields) + 2;
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php if(isset($suhosinInfo)):?>
|
||||
<tr><td colspan='<?php echo $columns;?>'><div class='alert alert-info'><?php echo $suhosinInfo;?></div></td></tr>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr><td colspan='<?php echo $columns;?>' class='text-center'><?php echo html::submitButton();?></td></tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=bug§ion=custom&key=batchEditFields')?>
|
||||
<?php include '../../common/view/customfield.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -79,7 +79,7 @@ js::set('bugBrowseType', ($browseType == 'bymodule' and $this->session->bugBrows
|
||||
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu'>
|
||||
<ul class='dropdown-menu pull-right'>
|
||||
<?php
|
||||
$misc = common::hasPriv('bug', 'batchCreate') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('bug', 'batchCreate') ? $this->createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID") : '#';
|
||||
@@ -120,8 +120,8 @@ js::set('bugBrowseType', ($browseType == 'bymodule' and $this->session->bugBrows
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php
|
||||
$columns = $this->cookie->windowWidth >= $this->config->wideSize ? 12 : 10;
|
||||
if($browseType == 'needconfirm') $columns = 7;
|
||||
$columns = $this->cookie->windowWidth >= $this->config->wideSize ? 13 : 11;
|
||||
if($browseType == 'needconfirm') $columns = 8;
|
||||
?>
|
||||
<td colspan='<?php echo $columns;?>'>
|
||||
<?php if(!empty($bugs)):?>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<th class='w-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
|
||||
<th class='w-100px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->statusAB);?></th>
|
||||
<th class='w-80px'> <?php common::printOrderLink('deadline', $orderBy, $vars, $lang->bug->deadline);?></th>
|
||||
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<th class='w-200px'><?php common::printOrderLink('story', $orderBy, $vars, $lang->bug->story);?></th>
|
||||
@@ -76,7 +77,7 @@
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td class="<?php if(isset($bug->delay)) echo 'delayed';?>"><?php if(substr($bug->deadline, 0, 4) > 0) echo substr($bug->deadline, 5, 6)?></td>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<td class='text-left' title="<?php echo $bug->storyTitle?>"><?php echo html::a($this->createLink('story', 'view', "stoyID=$bug->story"), $bug->storyTitle, '_blank');?></td>
|
||||
<td><?php $lang->bug->confirmStoryChange = $lang->confirm; common::printIcon('bug', 'confirmStoryChange', "bugID=$bug->id", '', 'list', '', 'hiddenwin')?></td>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?php
|
||||
foreach($templates as $key => $template)
|
||||
{
|
||||
echo "<li id='tplBox$template->id'>";
|
||||
echo "<li id='tplBox$template->id' onmouseover='displayXIcon($template->id)' onmouseout='hideXIcon($template->id)'>";
|
||||
echo "<a title='{$lang->bug->applyTemplate}' class='tpl-name' id='tplTitleBox$template->id' href='javascript:setTemplate($template->id)'>";
|
||||
if($template->public) echo "<span class='label label-info label-badge'>{$lang->public}</span> ";
|
||||
echo $template->title . "</a>";
|
||||
if(empty($template->public) or $template->account == $app->user->account)echo "<a href='###' onclick='deleteTemplate($template->id)' class='btn-delete'><i class='icon-remove'></i></a>";
|
||||
if(empty($template->public) or $template->account == $app->user->account)echo "<a href='###' onclick='deleteTemplate($template->id)' id='templateID$template->id' class='btn-delete hidden'><i class='icon-remove'></i></a>";
|
||||
echo "<span id='template$template->id' class='hidden'>$template->content</span>";
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
@@ -31,6 +31,10 @@ js::set('page', 'confirmbug');
|
||||
<td class='w-p25-f'><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='select-2 chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->type;?></th>
|
||||
<td><?php echo html::select('type', $lang->bug->typeList, $bug->type, 'class=form-control');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->pri;?></th>
|
||||
<td><?php echo html::select('pri', $lang->bug->priList, $bug->pri, 'class=form-control');?></td>
|
||||
|
||||
@@ -14,11 +14,13 @@
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/form.html.php';
|
||||
include '../../common/view/kindeditor.html.php';
|
||||
include '../../common/view/datepicker.html.php';
|
||||
js::set('holders', $lang->bug->placeholder);
|
||||
js::set('page', 'create');
|
||||
js::set('createRelease', $lang->release->create);
|
||||
js::set('createBuild', $lang->build->create);
|
||||
js::set('refresh', $lang->refresh);
|
||||
js::set('confirmDeleteTemplate', $lang->bug->confirmDeleteTemplate);
|
||||
?>
|
||||
<div class='container mw-1400px'>
|
||||
<div id='titlebar'>
|
||||
@@ -83,6 +85,15 @@ js::set('refresh', $lang->refresh);
|
||||
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allUsers, "class='btn btn-default' onclick='loadAllUsers()' data-toggle='tooltip'");?></span>
|
||||
</div>
|
||||
</td>
|
||||
<?php $showDeadline = strpos(",$showFields,", ',deadline,') !== false;?>
|
||||
<?php if($showDeadline):?>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->bug->deadline?></span>
|
||||
<span><?php echo html::input('deadline', $deadline, "class='form-control form-date'");?></span>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php $showOS = strpos(",$showFields,", ',os,') !== false;?>
|
||||
<?php $showBrowser = strpos(",$showFields,", ',browser,') !== false;?>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
?>
|
||||
<?php
|
||||
include '../../common/view/header.html.php';
|
||||
include '../../common/view/datepicker.html.php';
|
||||
include '../../common/view/kindeditor.html.php';
|
||||
js::set('page' , 'edit');
|
||||
js::set('changeProductConfirmed' , false);
|
||||
@@ -142,6 +143,10 @@ js::set('oldResolvedBuild' , $bug->resolvedBuild);
|
||||
<th><?php echo $lang->bug->assignedTo;?></th>
|
||||
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->deadline;?></th>
|
||||
<td><?php echo html::input('deadline', $bug->deadline, "class='form-control form-date'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->os;?></th>
|
||||
<td><?php echo html::select('os', $lang->bug->osList, $bug->os, "class='form-control'");?></td>
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php include '../../common/view/m.header.html.php';?>
|
||||
</div>
|
||||
<form method='post' enctype='multipart/form-data' target='hiddenwin'>
|
||||
<h3><?php echo "BUG#$bug->id $bug->title";?></h3>
|
||||
<table class='table-1'>
|
||||
<tr>
|
||||
<td class='w-80px'><?php echo $lang->bug->assignedTo?></td>
|
||||
<td><?php echo html::select('assignedTo', $users, $bug->resolvedBy, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $lang->bug->openedBuild;?></td>
|
||||
<td><?php echo html::select('openedBuild[]', $builds, $bug->openedBuild, 'size=4 multiple=multiple class=select-3');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $lang->comment;?></td>
|
||||
<td><?php echo html::textarea('comment', '');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center' colspan='2'>
|
||||
<?php echo html::submitButton($lang->bug->buttonConfirm, 'data-inline="true" data-theme="b"');?>
|
||||
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/m.action.html.php';?>
|
||||
<?php include '../../common/view/m.footer.html.php';?>
|
||||
@@ -1 +0,0 @@
|
||||
<?php include '../../common/view/m.action.html.php';?>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php include '../../common/view/m.header.html.php';?>
|
||||
</div>
|
||||
<form class='form-condensed' method='post' target='hiddenwin'>
|
||||
<h3><?php echo "BUG#$bug->id " . $bug->title;?></h3>
|
||||
<table class='table-1'>
|
||||
<tr>
|
||||
<td class='w-60px'><?php echo $lang->bug->assignedTo;?></td>
|
||||
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='w-60px'><?php echo $lang->comment;?></td>
|
||||
<td><?php echo html::textarea('comment', '', "data-mini='true'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center' colspan='2'>
|
||||
<?php echo html::submitButton('', 'data-inline="true" data-theme="b"'); ?>
|
||||
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/m.action.html.php';?>
|
||||
<?php include '../../common/view/m.footer.html.php';?>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of bug module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package bug
|
||||
* @version $Id: browse.html.php 4660 2013-04-17 08:22:02Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/m.header.html.php';?>
|
||||
</div>
|
||||
<?php $this->session->set('bugType', '');?>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php if($bug->status == 'closed') continue;?>
|
||||
<div data-role="collapsible-set">
|
||||
<div data-role="collapsible" data-collapsed="<?php echo $this->session->bugID == $bug->id ? 'false' : 'true'?>" class='collapsible'>
|
||||
<?php if($this->session->bugID == $bug->id) echo "<script>showDetail('bug', $bug->id);</script>";?>
|
||||
<h1 onClick="showDetail('bug', <?php echo $bug->id;?>)"><?php echo $bug->title;?></h1>
|
||||
<div><?php echo $bug->steps;?></div>
|
||||
<div id='item<?php echo $bug->id;?>'><?php echo $bug->steps;?></div>
|
||||
<div data-role='navbar'>
|
||||
<ul>
|
||||
<?php
|
||||
common::printIcon('bug', 'confirmBug', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
|
||||
common::printIcon('bug', 'assignTo', "bugID=$bug->id", '', 'button', '', '', 'iframe');
|
||||
common::printIcon('bug', 'resolve', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
|
||||
common::printIcon('bug', 'close', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
|
||||
common::printIcon('bug', 'activate', "bugID=$bug->id", $bug, 'button', '', '', 'iframe');
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<?php $pager->show('left', 'mobile')?>
|
||||
<?php include '../../common/view/m.footer.html.php';?>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php include '../../common/view/m.header.html.php';?>
|
||||
</div>
|
||||
<form class='form-condensed' method='post' target='hiddenwin'>
|
||||
<h3><?php echo "BUG#$bug->id $bug->title";?></h3>
|
||||
<table class='table-1'>
|
||||
<tr>
|
||||
<td class='w-60px'><?php echo $lang->comment;?></td>
|
||||
<td><?php echo html::textarea('comment', '');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center' colspan='2'>
|
||||
<?php echo html::submitButton('', 'data-inline="true" data-theme="b"');?>
|
||||
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/m.action.html.php';?>
|
||||
<?php include '../../common/view/m.footer.html.php';?>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php include '../../common/view/m.header.html.php';?>
|
||||
</div>
|
||||
<form class='form-condensed' method='post' target='hiddenwin'>
|
||||
<h3><?php echo "BUG#$bug->id $bug->title";?></h3>
|
||||
<table class='table-1'>
|
||||
<tr>
|
||||
<td class='w-60px'><?php echo $lang->bug->assignedTo;?></td>
|
||||
<td><?php echo html::select('assignedTo', $users, $bug->assignedTo);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='w-60px'><?php echo $lang->comment;?></td>
|
||||
<td><?php echo html::textarea('comment', '');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center' colspan='2'>
|
||||
<?php echo html::submitButton($lang->bug->buttonConfirm, 'data-inline="true" data-theme="b"');?>
|
||||
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/m.action.html.php';?>
|
||||
<?php include '../../common/view/m.footer.html.php';?>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php include '../../common/view/m.header.html.php';?>
|
||||
</div>
|
||||
<form class='form-condensed' method='post' target='hiddenwin'>
|
||||
<h3><?php echo "BUG#$bug->id $bug->title";?></h3>
|
||||
<table class='table-1'>
|
||||
<tr>
|
||||
<td class='w-80px'><?php unset($lang->bug->resolutionList['tostory']); echo $lang->bug->resolution ;?></td>
|
||||
<td><?php echo html::select('resolution', $lang->bug->resolutionList, '', 'class=form-control onchange=setDuplicate(this.value)');?></div>
|
||||
</tr>
|
||||
<tr id='duplicateBugBox' style='display:none'>
|
||||
<td class='w-80px'><?php echo $lang->bug->duplicateBug;?></td>
|
||||
<td><?php echo $lang->bug->duplicateBug . html::input('duplicateBug');?></div>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='w-80px'><?php echo $lang->bug->resolvedBuild?></td>
|
||||
<td><?php echo html::select('resolvedBuild', $builds);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $lang->bug->resolvedDate?></div>
|
||||
<td><?php echo html::input('resolvedDate', helper::now());?></div>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $lang->bug->assignedTo?></div>
|
||||
<td><?php echo html::select('assignedTo', $users, $assignedTo);?></div>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $lang->comment;?></td>
|
||||
<td><?php echo html::textarea('comment');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center' colspan='2'>
|
||||
<?php echo html::submitButton('', 'data-inline="true" data-theme="b"');?>
|
||||
<?php echo html::linkButton($lang->goback, $this->createLink('bug', 'view', "bugID=$bug->id"), 'self', "data-inline='true'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php include '../../common/view/m.action.html.php';?>
|
||||
<?php include '../../common/view/m.footer.html.php';?>
|
||||
@@ -1,2 +0,0 @@
|
||||
<?php
|
||||
include "./sendmail.html.php";
|
||||
@@ -1,5 +0,0 @@
|
||||
<?php
|
||||
$this->session->set('bugID', $bug->id);
|
||||
if($this->session->bugType) die($this->locate($this->createLink('my', 'bug', "type={$this->session->bugType}")));
|
||||
die($this->locate($this->createLink('bug', 'browse', "productID=$productID")));
|
||||
?>
|
||||
@@ -29,7 +29,8 @@ js::set('productID' , $bug->product);
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-80px'><?php echo $lang->bug->resolution;?></th>
|
||||
<td class='w-p35-f'><?php echo html::select('resolution', $lang->bug->resolutionList, '', 'class=form-control onchange=setDuplicate(this.value)');?></td><td></td>
|
||||
<td class='w-p35-f'><?php echo html::select('resolution', $lang->bug->resolutionList, '', 'class=form-control onchange=setDuplicate(this.value)');?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id='duplicateBugBox' class='hide'>
|
||||
<th><?php echo $lang->bug->duplicateBug;?></th>
|
||||
@@ -37,10 +38,19 @@ js::set('productID' , $bug->product);
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->resolvedBuild;?></th>
|
||||
<td id='newBuildProjectBox' class='hidden'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->build->project;?></span>
|
||||
<?php echo html::select('buildProject', $projects, '', "class='form-control chosen'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<span id='resolvedBuildBox'><?php echo html::select('resolvedBuild', $builds, '', "class='form-control chosen'");?></span>
|
||||
<span class='input-group-btn'><?php echo html::commonButton($lang->bug->allBuilds, "class='btn btn-default' onclick=loadAllBuilds()");?></span>
|
||||
<?php if(common::hasPriv('build', 'create')):?>
|
||||
<span id='newBuildBox' class='hidden'><?php echo html::input('buildName', '', "class='form-control' placeholder='{$lang->bug->placeholder->newBuildName}'");?></span>
|
||||
<span class='input-group-addon'><label class="checkbox-inline"><input name="createBuild" value="1" id="createBuild" type="checkbox"> <?php echo $lang->bug->createBuild?></label></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -176,6 +176,10 @@
|
||||
<th><?php echo $lang->bug->lblAssignedTo;?></th>
|
||||
<td><?php if($bug->assignedTo) echo $users[$bug->assignedTo] . $lang->at . $bug->assignedDate;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->deadline;?></th>
|
||||
<td><?php if($bug->deadline) echo $bug->deadline;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->os;?></th>
|
||||
<td><?php echo $lang->bug->osList[$bug->os];?></td>
|
||||
|
||||
@@ -96,10 +96,21 @@ class build extends control
|
||||
|
||||
/* Assign. */
|
||||
$project = $this->loadModel('project')->getById($build->project);
|
||||
if(empty($project))
|
||||
{
|
||||
$project = new stdclass();
|
||||
$project->name = '';
|
||||
}
|
||||
|
||||
$productGroups = $this->project->getProducts($build->project);
|
||||
|
||||
$products = array();
|
||||
foreach($productGroups as $product) $products[$product->id] = $product->name;
|
||||
if(empty($productGroups) and $build->product)
|
||||
{
|
||||
$product = $this->loadModel('product')->getById($build->product);
|
||||
$products[$product->id] = $product->name;
|
||||
}
|
||||
|
||||
$this->view->title = $project->name . $this->lang->colon . $this->lang->build->edit;
|
||||
$this->view->position[] = html::a($this->createLink('project', 'task', "projectID=$build->project"), $project->name);
|
||||
@@ -144,11 +155,11 @@ class build extends control
|
||||
$this->loadModel('project')->setMenu($this->project->getPairs(), $build->project);
|
||||
|
||||
/* Assign. */
|
||||
$projects = $this->project->getPairs();
|
||||
$projects = $this->project->getPairs('empty');
|
||||
$this->view->title = "BUILD #$build->id $build->name - " . $projects[$build->project];
|
||||
$this->view->position[] = html::a($this->createLink('project', 'task', "projectID=$build->project"), $projects[$build->project]);
|
||||
$this->view->position[] = $this->lang->build->view;
|
||||
$this->view->generatedBugs = $this->bug->getProjectBugs($build->project, 'status_desc,id_desc', null, $build->id);
|
||||
$this->view->generatedBugs = $this->bug->getProjectBugs($build->project, $build->id, '', 0, 'status_desc,id_desc', null);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->build = $build;
|
||||
$this->view->stories = $stories;
|
||||
@@ -333,7 +344,7 @@ class build extends control
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allStories = $this->story->getBySearch($build->product, $queryID, 'id', null, $build->project);
|
||||
$allStories = $this->story->getBySearch($build->product, $queryID, 'id', null, $build->project, $build->branch);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+11
-10
@@ -12,23 +12,24 @@
|
||||
$lang->build->common = "Build";
|
||||
$lang->build->create = "Create";
|
||||
$lang->build->edit = "Edit";
|
||||
$lang->build->linkStory = "Relate Story";
|
||||
$lang->build->linkBug = "Relate Bug";
|
||||
$lang->build->linkStory = "Link Story";
|
||||
$lang->build->linkBug = "Link Bug";
|
||||
$lang->build->delete = "Delete Build";
|
||||
$lang->build->deleted = "Deleted";
|
||||
$lang->build->view = "Build Details";
|
||||
$lang->build->batchUnlink = 'Batch Removal';
|
||||
$lang->build->batchUnlinkStory = 'Batch Story Removal';
|
||||
$lang->build->batchUnlinkBug = 'Batch Bug Removal';
|
||||
$lang->build->batchUnlink = 'Batch Unlink';
|
||||
$lang->build->batchUnlinkStory = 'Batch Story Unlink';
|
||||
$lang->build->batchUnlinkBug = 'Batch Bug Unlink';
|
||||
|
||||
$lang->build->confirmDelete = "Do you want to delete this Build?";
|
||||
$lang->build->confirmUnlinkStory = "Do you want to remove this Story?";
|
||||
$lang->build->confirmUnlinkBug = "Do you want to remove this Bug?";
|
||||
$lang->build->confirmUnlinkStory = "Do you want to unlink this Story?";
|
||||
$lang->build->confirmUnlinkBug = "Do you want to unlink this Bug?";
|
||||
|
||||
$lang->build->basicInfo = 'Basic Info';
|
||||
|
||||
$lang->build->id = 'ID';
|
||||
$lang->build->product = $lang->productCommon;
|
||||
$lang->build->project = $lang->projectCommon;
|
||||
$lang->build->name = 'Name';
|
||||
$lang->build->date = 'Date';
|
||||
$lang->build->builder = 'Builder';
|
||||
@@ -37,12 +38,12 @@ $lang->build->filePath = 'File Path';
|
||||
$lang->build->desc = 'Description';
|
||||
$lang->build->files = 'Upload Files';
|
||||
$lang->build->last = 'Last Build';
|
||||
$lang->build->unlinkStory = 'Remove Story';
|
||||
$lang->build->unlinkBug = 'Remove Bug';
|
||||
$lang->build->unlinkStory = 'Unlink Story';
|
||||
$lang->build->unlinkBug = 'Unlink Bug';
|
||||
$lang->build->stories = 'Finished Story';
|
||||
$lang->build->bugs = 'Solved Bug';
|
||||
$lang->build->generatedBugs = 'Remained Bug';
|
||||
$lang->build->noProduct = " <span style='color:red'>This {$lang->projectCommon} has not relateed to {$lang->productCommon}, so Build cannot be created. Please first <a href='%s'> relate {$lang->productCommon}</a></span>";
|
||||
$lang->build->noProduct = " <span style='color:red'>This {$lang->projectCommon} has not linked to {$lang->productCommon}, so Build cannot be created. Please first <a href='%s'> link {$lang->productCommon}</a></span>";
|
||||
|
||||
$lang->build->finishStories = ' %s Stories have been finished.';
|
||||
$lang->build->resolvedBugs = ' %s Bugs have been solved.';
|
||||
|
||||
@@ -29,6 +29,7 @@ $lang->build->basicInfo = '基本信息';
|
||||
|
||||
$lang->build->id = 'ID';
|
||||
$lang->build->product = $lang->productCommon;
|
||||
$lang->build->project = '所属' . $lang->projectCommon;
|
||||
$lang->build->name = '名称编号';
|
||||
$lang->build->date = '打包日期';
|
||||
$lang->build->builder = '构建者';
|
||||
|
||||
@@ -29,6 +29,7 @@ $lang->build->basicInfo = '基本信息';
|
||||
|
||||
$lang->build->id = 'ID';
|
||||
$lang->build->product = $lang->productCommon;
|
||||
$lang->build->project = '所屬' . $lang->projectCommon;
|
||||
$lang->build->name = '名稱編號';
|
||||
$lang->build->date = '打包日期';
|
||||
$lang->build->builder = '構建者';
|
||||
|
||||
+14
-2
@@ -36,6 +36,18 @@ class buildModel extends model
|
||||
return $build;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get by ID list.
|
||||
*
|
||||
* @param array $idList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getByList($idList)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BUILD)->where('id')->in($idList)->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get builds of a project.
|
||||
*
|
||||
@@ -69,7 +81,7 @@ class buildModel extends model
|
||||
{
|
||||
$sysBuilds = array();
|
||||
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => $this->lang->trunk);
|
||||
|
||||
$projectBuilds = $this->dao->select('t1.id, t1.name, t1.project, t2.status as projectStatus, t3.id as releaseID, t3.status as releaseStatus, t4.name as branchName')->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
@@ -114,7 +126,7 @@ class buildModel extends model
|
||||
{
|
||||
$sysBuilds = array();
|
||||
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => 'Trunk');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => $this->lang->trunk);
|
||||
|
||||
$productBuilds = $this->dao->select('t1.id, t1.name, t1.project, t2.status as projectStatus, t3.id as releaseID, t3.status as releaseStatus, t4.name as branchName')->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->build->name;?></th>
|
||||
<td class='w-p25-f'>
|
||||
<?php echo html::input('name', '', "class='form-control'");?>
|
||||
<?php echo html::input('name', '', "class='form-control' autocomplete='off'");?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($lastBuild):?>
|
||||
@@ -63,11 +63,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->scmPath;?></th>
|
||||
<td colspan='2'><?php echo html::input('scmPath', '', "class='form-control' placeholder='{$lang->build->placeholder->scmPath}'");?></td>
|
||||
<td colspan='2'><?php echo html::input('scmPath', '', "class='form-control' placeholder='{$lang->build->placeholder->scmPath}' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->filePath;?></th>
|
||||
<td colspan='2'><?php echo html::input('filePath', '', "class='form-control' placeholder='{$lang->build->placeholder->filePath}'");?></td>
|
||||
<td colspan='2'><?php echo html::input('filePath', '', "class='form-control' placeholder='{$lang->build->placeholder->filePath}' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->files;?></th>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->name;?></th>
|
||||
<td><?php echo html::input('name', $build->name, "class='form-control'");?></td>
|
||||
<td><?php echo html::input('name', $build->name, "class='form-control' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->builder;?></th>
|
||||
@@ -52,11 +52,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->scmPath;?></th>
|
||||
<td colspan='2'><?php echo html::input('scmPath', $build->scmPath, "class='form-control' placeholder='{$lang->build->placeholder->scmPath}'");?></td>
|
||||
<td colspan='2'><?php echo html::input('scmPath', $build->scmPath, "class='form-control' placeholder='{$lang->build->placeholder->scmPath}' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->filePath;?></th>
|
||||
<td colspan='2'><?php echo html::input('filePath', $build->filePath, "class='form-control' placeholder='{$lang->build->placeholder->filePath}'");?></td>
|
||||
<td colspan='2'><?php echo html::input('filePath', $build->filePath, "class='form-control' placeholder='{$lang->build->placeholder->filePath}' autocomplete='off'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->build->files;?></th>
|
||||
|
||||
@@ -13,6 +13,17 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('confirmUnlinkStory', $lang->build->confirmUnlinkStory)?>
|
||||
<?php js::set('confirmUnlinkBug', $lang->build->confirmUnlinkBug)?>
|
||||
<?php if(isonlybody()):?>
|
||||
<style>
|
||||
#stories .action{display:none;}
|
||||
#bugs .action{display:none;}
|
||||
tbody tr td:last-child a{display:none;}
|
||||
tbody tr td:first-child input{display:none;}
|
||||
tfoot tr td .table-actions .btn{display:none;}
|
||||
#titlebar .actions{display:none}
|
||||
.row-table .col-side{display:none;}
|
||||
</style>
|
||||
<?php endif;?>
|
||||
<div id='titlebar'>
|
||||
<div class='heading'>
|
||||
<span class='prefix'><?php echo html::icon($lang->icons['build']);?> <strong><?php echo $build->id;?></strong></span>
|
||||
|
||||
+67
-30
@@ -34,7 +34,7 @@ $lang->refresh = 'Refresh';
|
||||
$lang->edit = 'Edit';
|
||||
$lang->delete = 'Delete';
|
||||
$lang->close = 'Close';
|
||||
$lang->unlink = 'Unrelate';
|
||||
$lang->unlink = 'Unlink';
|
||||
$lang->import = 'Import';
|
||||
$lang->export = 'Export';
|
||||
$lang->setFileName = 'File Name';
|
||||
@@ -48,6 +48,9 @@ $lang->more = 'More';
|
||||
$lang->day = 'Day';
|
||||
$lang->customConfig = 'Custom';
|
||||
$lang->public = 'Public';
|
||||
$lang->trunk = 'Trunk';
|
||||
$lang->sort = 'Ranking';
|
||||
$lang->required = 'Required';
|
||||
|
||||
$lang->actions = 'Actions';
|
||||
$lang->comment = 'Note';
|
||||
@@ -121,6 +124,8 @@ $lang->searchObjects['release'] = 'Release';
|
||||
$lang->searchObjects['productplan'] = $lang->productCommon . 'Plan';
|
||||
$lang->searchObjects['testtask'] = 'Test Task';
|
||||
$lang->searchObjects['doc'] = 'Document';
|
||||
$lang->searchObjects['caselib'] = 'Case Library';
|
||||
$lang->searchObjects['testreport'] = 'Test Report';
|
||||
$lang->searchTips = 'ID (ctrl+g)';
|
||||
|
||||
/* 导入支持的编码格式。*/
|
||||
@@ -213,7 +218,7 @@ $lang->project->menu->story = array('link' => 'Story|project|story|projectID
|
||||
$lang->project->menu->bug = 'Bug|project|bug|projectID=%s';
|
||||
$lang->project->menu->dynamic = 'Dynamic|project|dynamic|projectID=%s';
|
||||
$lang->project->menu->build = array('link' => 'Build|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->menu->testtask = 'Test Task|project|testtask|projectID=%s';
|
||||
$lang->project->menu->testtask = array('link' => 'Test Task|project|testtask|projectID=%s');
|
||||
$lang->project->menu->team = array('link' => 'Team|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->doc = array('link' => 'Document|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
|
||||
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
|
||||
@@ -231,32 +236,57 @@ $lang->build->menu = $lang->project->menu;
|
||||
$lang->qa = new stdclass();
|
||||
$lang->qa->menu = new stdclass();
|
||||
|
||||
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->qa->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->qa->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->qa->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->qa->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->qa->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
|
||||
$lang->qa->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
|
||||
$lang->qa->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->bug = new stdclass();
|
||||
$lang->bug->menu = new stdclass();
|
||||
|
||||
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->bug->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s');
|
||||
$lang->bug->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
$lang->bug->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s');
|
||||
$lang->bug->menu->report = array('link' => 'Report|testreport|browse|productID=%s');
|
||||
$lang->bug->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
|
||||
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase');
|
||||
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testcase->menu->testsuite = array('link' => 'Suite|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testcase->menu->report = array('link' => 'Report|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testcase->menu->caselib = array('link' => 'Library|testsuite|library');
|
||||
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>TestingHomepage|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = $lang->testcase->menu;
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = $lang->testcase->menu;
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = $lang->testcase->menu;
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
|
||||
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
|
||||
$lang->caselib->menu->testcase = array('link' => 'Case|testcase|browse|');
|
||||
$lang->caselib->menu->testtask = array('link' => 'Build|testtask|browse|');
|
||||
$lang->caselib->menu->testsuite = array('link' => 'Suite|testsuite|browse|');
|
||||
$lang->caselib->menu->report = array('link' => 'Report|testreport|browse|');
|
||||
$lang->caselib->menu->caselib = array('link' => 'Library|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
|
||||
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i>Create a Library|testsuite|createLib|", 'float' => 'right');
|
||||
$lang->caselib->menu->index = array('link' => "<i class='icon-home'></i>Test Home|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
/* 文档视图菜单设置。*/
|
||||
$lang->doc = new stdclass();
|
||||
@@ -302,7 +332,7 @@ $lang->user->menu = $lang->company->menu;
|
||||
/* 后台管理菜单设置。*/
|
||||
$lang->admin = new stdclass();
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu->index = array('link' => 'Homepage|admin|index');
|
||||
$lang->admin->menu->index = array('link' => 'Homepage|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
|
||||
$lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension');
|
||||
$lang->admin->menu->custom = array('link' => 'Custom|custom|set', 'subModule' => 'custom');
|
||||
$lang->admin->menu->mail = array('link' => 'Email|mail|index', 'subModule' => 'mail');
|
||||
@@ -351,6 +381,9 @@ $lang->menugroup->group = 'company';
|
||||
$lang->menugroup->bug = 'qa';
|
||||
$lang->menugroup->testcase = 'qa';
|
||||
$lang->menugroup->testtask = 'qa';
|
||||
$lang->menugroup->testsuite = 'qa';
|
||||
$lang->menugroup->caselib = 'qa';
|
||||
$lang->menugroup->testreport = 'qa';
|
||||
$lang->menugroup->people = 'company';
|
||||
$lang->menugroup->dept = 'company';
|
||||
$lang->menugroup->todo = 'my';
|
||||
@@ -389,27 +422,31 @@ $lang->error->tutorialData = 'No data can be imported in tutorial mode. Pleas
|
||||
|
||||
/* 分页信息。*/
|
||||
$lang->pager = new stdclass();
|
||||
$lang->pager->noRecord = "No History";
|
||||
$lang->pager->digest = " <strong>%s</strong> in total. %s <strong>%s/%s</strong> ";
|
||||
$lang->pager->recPerPage= " <strong>%s</strong> per page";
|
||||
$lang->pager->first = "<i class='icon-step-backward' title='Homepage'></i>";
|
||||
$lang->pager->pre = "<i class='icon-play icon-rotate-180' title='Previous Page'></i>";
|
||||
$lang->pager->next = "<i class='icon-play' title='Next Page'></i>";
|
||||
$lang->pager->last = "<i class='icon-step-forward' title='Last Page'></i>";
|
||||
$lang->pager->locate = "GO!";
|
||||
$lang->pager->noRecord = "No History";
|
||||
$lang->pager->digest = " <strong>%s</strong> in total. %s <strong>%s/%s</strong> ";
|
||||
$lang->pager->recPerPage = " <strong>%s</strong> per page";
|
||||
$lang->pager->first = "<i class='icon-step-backward' title='Homepage'></i>";
|
||||
$lang->pager->pre = "<i class='icon-play icon-rotate-180' title='Previous Page'></i>";
|
||||
$lang->pager->next = "<i class='icon-play' title='Next Page'></i>";
|
||||
$lang->pager->last = "<i class='icon-step-forward' title='Last Page'></i>";
|
||||
$lang->pager->locate = "GO!";
|
||||
$lang->pager->previousPage = "Previous";
|
||||
$lang->pager->nextPage = "Next";
|
||||
$lang->pager->summery = "<strong>%s-%s</strong> of <strong>%s</strong>.";
|
||||
|
||||
$lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&from=footer' target='_blank' id='proLink' class='text-important'>ZenTao Pro <i class='text-danger icon-pro-version'></i></a> ";
|
||||
$lang->downNotify = "Download Desktop Notification";
|
||||
|
||||
$lang->suhosinInfo = "Warning! Data is reaching the limit. Please change <font color=red>sohusin.post.max_vars</font> and <font color=red>sohusin.request.max_vars</font> (set larger value) in php.ini, then save and restart Apache, or some data will not be saved.";
|
||||
$lang->suhosinInfo = "Warning! Data is reaching the limit. Please change <font color=red>sohusin.post.max_vars</font> and <font color=red>sohusin.request.max_vars</font> (set larger %s value) in php.ini, then save and restart Apache or php-fpm, or some data will not be saved.";
|
||||
$lang->maxVarsInfo = "Warning! Data is reaching the limit. Please change <font color=red>max_input_vars</font> (set larger %s value) in php.ini, then save and restart Apache or php-fpm, or some data will not be saved.";
|
||||
$lang->pasteTextInfo = "Paste text into text field. Each line will be a header of each data record. ";
|
||||
$lang->noticeImport = "<p style='font-size:14px'>Imported data contains data that has already existed in system. Please confirm you actions on the date </p><p><a href='javascript:submitForm(\"cover\")' class='btn btn-mini'>Override</a> <a href='javascript:submitForm(\"insert\")' class='btn btn-mini'>New Insertion</a></p>";
|
||||
|
||||
$lang->noResultsMatch = "No results match!";
|
||||
$lang->searchMore = "More results:";
|
||||
$lang->chooseUsersToMail = "Choose users you want send notification to...";
|
||||
$lang->chooseUsersToMail = "Choose users you will send notifications to...";
|
||||
$lang->browserNotice = 'Your current browser might not show the best effect. Please use Chrome, Firefox, IE9+, Opera or Safari.';
|
||||
$lang->noticePasteImg = "Can parse image in editor.";
|
||||
$lang->noticePasteImg = "Paste image to editor.";
|
||||
|
||||
/* 时间格式设置。*/
|
||||
define('DT_DATETIME1', 'Y-m-d H:i:s');
|
||||
@@ -469,7 +506,7 @@ $lang->icons['user'] = 'user';
|
||||
$lang->icons['dept'] = 'sitemap';
|
||||
$lang->icons['tree'] = 'sitemap';
|
||||
$lang->icons['usecase'] = 'sitemap';
|
||||
$lang->icons['testcase'] = 'smile';
|
||||
$lang->icons['testcase'] = 'sitemap';
|
||||
$lang->icons['result'] = 'list-alt';
|
||||
$lang->icons['mail'] = 'envelope';
|
||||
$lang->icons['trash'] = 'trash';
|
||||
|
||||
@@ -66,14 +66,18 @@ $lang->task->menuOrder = $lang->project->menuOrder;
|
||||
$lang->build->menuOrder = $lang->project->menuOrder;
|
||||
|
||||
/* qa menu order. */
|
||||
$lang->qa->menuOrder[5] = 'product';
|
||||
$lang->qa->menuOrder[10] = 'index';
|
||||
$lang->qa->menuOrder[15] = 'bug';
|
||||
$lang->qa->menuOrder[20] = 'testcase';
|
||||
$lang->qa->menuOrder[25] = 'testtask';
|
||||
$lang->bug->menuOrder = $lang->qa->menuOrder;
|
||||
$lang->testcase->menuOrder = $lang->bug->menuOrder;
|
||||
$lang->testtask->menuOrder = $lang->testcase->menuOrder;
|
||||
$lang->qa->menuOrder[5] = 'product';
|
||||
$lang->qa->menuOrder[10] = 'index';
|
||||
$lang->qa->menuOrder[15] = 'bug';
|
||||
$lang->qa->menuOrder[20] = 'testcase';
|
||||
$lang->qa->menuOrder[25] = 'testtask';
|
||||
$lang->qa->menuOrder[30] = 'testsuite';
|
||||
$lang->qa->menuOrder[35] = 'testreport';
|
||||
$lang->bug->menuOrder = $lang->qa->menuOrder;
|
||||
$lang->testcase->menuOrder = $lang->bug->menuOrder;
|
||||
$lang->testtask->menuOrder = $lang->testcase->menuOrder;
|
||||
$lang->testsuite->menuOrder = $lang->testcase->menuOrder;
|
||||
$lang->testreport->menuOrder = $lang->testcase->menuOrder;
|
||||
|
||||
/* doc menu order. */
|
||||
$lang->doc->menuOrder[5] = 'list';
|
||||
|
||||
@@ -48,6 +48,9 @@ $lang->more = '更多';
|
||||
$lang->day = '天';
|
||||
$lang->customConfig = '自定义';
|
||||
$lang->public = '公共';
|
||||
$lang->trunk = '主干';
|
||||
$lang->sort = '排序';
|
||||
$lang->required = '必填';
|
||||
|
||||
$lang->actions = '操作';
|
||||
$lang->comment = '备注';
|
||||
@@ -121,6 +124,8 @@ $lang->searchObjects['release'] = '发布';
|
||||
$lang->searchObjects['productplan'] = $lang->productCommon . '计划';
|
||||
$lang->searchObjects['testtask'] = '测试版本';
|
||||
$lang->searchObjects['doc'] = '文档';
|
||||
$lang->searchObjects['caselib'] = '用例库';
|
||||
$lang->searchObjects['testreport'] = '测试报告';
|
||||
$lang->searchTips = '编号(ctrl+g)';
|
||||
|
||||
/* 导入支持的编码格式。*/
|
||||
@@ -213,7 +218,7 @@ $lang->project->menu->story = array('link' => '需求|project|story|projectI
|
||||
$lang->project->menu->bug = 'Bug|project|bug|projectID=%s';
|
||||
$lang->project->menu->dynamic = '动态|project|dynamic|projectID=%s';
|
||||
$lang->project->menu->build = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->menu->testtask = '测试|project|testtask|projectID=%s';
|
||||
$lang->project->menu->testtask = array('link' => '测试|project|testtask|projectID=%s');
|
||||
$lang->project->menu->team = array('link' => '团队|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->doc = array('link' => '文档|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
|
||||
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
|
||||
@@ -231,32 +236,57 @@ $lang->build->menu = $lang->project->menu;
|
||||
$lang->qa = new stdclass();
|
||||
$lang->qa->menu = new stdclass();
|
||||
|
||||
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->qa->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
|
||||
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->qa->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
|
||||
$lang->qa->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->qa->menu->report = array('link' => '报告|testreport|browse|productID=%s');
|
||||
$lang->qa->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->bug = new stdclass();
|
||||
$lang->bug->menu = new stdclass();
|
||||
|
||||
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
|
||||
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
|
||||
$lang->bug->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->bug->menu->report = array('link' => '报告|testreport|browse|productID=%s');
|
||||
$lang->bug->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
|
||||
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase');
|
||||
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testcase->menu->report = array('link' => '报告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testcase->menu->caselib = array('link' => '用例库|testsuite|library');
|
||||
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = $lang->testcase->menu;
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = $lang->testcase->menu;
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = $lang->testcase->menu;
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
|
||||
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
|
||||
$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|');
|
||||
$lang->caselib->menu->testtask = array('link' => '版本|testtask|browse|');
|
||||
$lang->caselib->menu->testsuite = array('link' => '套件|testsuite|browse|');
|
||||
$lang->caselib->menu->report = array('link' => '报告|testreport|browse|');
|
||||
$lang->caselib->menu->caselib = array('link' => '用例库|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
|
||||
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i>创建库|testsuite|createLib|", 'float' => 'right');
|
||||
$lang->caselib->menu->index = array('link' => "<i class='icon-home'></i>测试主页|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
/* 文档视图菜单设置。*/
|
||||
$lang->doc = new stdclass();
|
||||
@@ -302,7 +332,7 @@ $lang->user->menu = $lang->company->menu;
|
||||
/* 后台管理菜单设置。*/
|
||||
$lang->admin = new stdclass();
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu->index = array('link' => '首页|admin|index');
|
||||
$lang->admin->menu->index = array('link' => '首页|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
|
||||
$lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension');
|
||||
$lang->admin->menu->custom = array('link' => '自定义|custom|set', 'subModule' => 'custom');
|
||||
$lang->admin->menu->mail = array('link' => '发信|mail|index', 'subModule' => 'mail');
|
||||
@@ -351,6 +381,9 @@ $lang->menugroup->group = 'company';
|
||||
$lang->menugroup->bug = 'qa';
|
||||
$lang->menugroup->testcase = 'qa';
|
||||
$lang->menugroup->testtask = 'qa';
|
||||
$lang->menugroup->testsuite = 'qa';
|
||||
$lang->menugroup->caselib = 'qa';
|
||||
$lang->menugroup->testreport = 'qa';
|
||||
$lang->menugroup->people = 'company';
|
||||
$lang->menugroup->dept = 'company';
|
||||
$lang->menugroup->todo = 'my';
|
||||
@@ -389,19 +422,23 @@ $lang->error->tutorialData = '新手模式下不会插入数据,请退出
|
||||
|
||||
/* 分页信息。*/
|
||||
$lang->pager = new stdclass();
|
||||
$lang->pager->noRecord = "暂时没有记录";
|
||||
$lang->pager->digest = "共 <strong>%s</strong> 条记录,%s <strong>%s/%s</strong> ";
|
||||
$lang->pager->recPerPage= "每页 <strong>%s</strong> 条";
|
||||
$lang->pager->first = "<i class='icon-step-backward' title='首页'></i>";
|
||||
$lang->pager->pre = "<i class='icon-play icon-rotate-180' title='上一页'></i>";
|
||||
$lang->pager->next = "<i class='icon-play' title='下一页'></i>";
|
||||
$lang->pager->last = "<i class='icon-step-forward' title='末页'></i>";
|
||||
$lang->pager->locate = "GO!";
|
||||
$lang->pager->noRecord = "暂时没有记录";
|
||||
$lang->pager->digest = "共 <strong>%s</strong> 条记录,%s <strong>%s/%s</strong> ";
|
||||
$lang->pager->recPerPage = "每页 <strong>%s</strong> 条";
|
||||
$lang->pager->first = "<i class='icon-step-backward' title='首页'></i>";
|
||||
$lang->pager->pre = "<i class='icon-play icon-rotate-180' title='上一页'></i>";
|
||||
$lang->pager->next = "<i class='icon-play' title='下一页'></i>";
|
||||
$lang->pager->last = "<i class='icon-step-forward' title='末页'></i>";
|
||||
$lang->pager->locate = "GO!";
|
||||
$lang->pager->previousPage = "上一页";
|
||||
$lang->pager->nextPage = "下一页";
|
||||
$lang->pager->summery = "第 <strong>%s-%s</strong> 项,共 <strong>%s</strong> 项";
|
||||
|
||||
$lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&from=footer' target='_blank' id='proLink' class='text-important'>专业版 <i class='text-danger icon-pro-version'></i></a> ";
|
||||
$lang->downNotify = "下载桌面提醒";
|
||||
|
||||
$lang->suhosinInfo = "警告:数据太多,请在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(设置更大的数)。 保存并重新启动apache,否则会造成部分数据无法保存。";
|
||||
$lang->suhosinInfo = "警告:数据太多,请在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。";
|
||||
$lang->maxVarsInfo = "警告:数据太多,请在php.ini中修改<font color=red>max_input_vars</font>(大于%s的数)。 保存并重新启动apache或php-fpm,否则会造成部分数据无法保存。";
|
||||
$lang->pasteTextInfo = "粘贴文本到文本域中,每行文字作为一条数据的标题。";
|
||||
$lang->noticeImport = "<p style='font-size:14px'>导入数据中,含有已经存在系统的数据,请确认这些数据要覆盖或者全新插入</p><p><a href='javascript:submitForm(\"cover\")' class='btn btn-mini'>覆盖</a> <a href='javascript:submitForm(\"insert\")' class='btn btn-mini'>全新插入</a></p>";
|
||||
|
||||
@@ -469,7 +506,7 @@ $lang->icons['user'] = 'user';
|
||||
$lang->icons['dept'] = 'sitemap';
|
||||
$lang->icons['tree'] = 'sitemap';
|
||||
$lang->icons['usecase'] = 'sitemap';
|
||||
$lang->icons['testcase'] = 'smile';
|
||||
$lang->icons['testcase'] = 'sitemap';
|
||||
$lang->icons['result'] = 'list-alt';
|
||||
$lang->icons['mail'] = 'envelope';
|
||||
$lang->icons['trash'] = 'trash';
|
||||
|
||||
@@ -48,6 +48,7 @@ $lang->more = '更多';
|
||||
$lang->day = '天';
|
||||
$lang->customConfig = '自定義';
|
||||
$lang->public = '公共';
|
||||
$lang->trunk = '主幹';
|
||||
|
||||
$lang->actions = '操作';
|
||||
$lang->comment = '備註';
|
||||
@@ -121,6 +122,8 @@ $lang->searchObjects['release'] = '發佈';
|
||||
$lang->searchObjects['productplan'] = $lang->productCommon . '計劃';
|
||||
$lang->searchObjects['testtask'] = '測試版本';
|
||||
$lang->searchObjects['doc'] = '文檔';
|
||||
$lang->searchObjects['caselib'] = '用例庫';
|
||||
$lang->searchObjects['testreport'] = '測試報告';
|
||||
$lang->searchTips = '編號(ctrl+g)';
|
||||
|
||||
/* 導入支持的編碼格式。*/
|
||||
@@ -213,7 +216,7 @@ $lang->project->menu->story = array('link' => '需求|project|story|projectI
|
||||
$lang->project->menu->bug = 'Bug|project|bug|projectID=%s';
|
||||
$lang->project->menu->dynamic = '動態|project|dynamic|projectID=%s';
|
||||
$lang->project->menu->build = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->menu->testtask = '測試|project|testtask|projectID=%s';
|
||||
$lang->project->menu->testtask = array('link' => '測試|project|testtask|projectID=%s');
|
||||
$lang->project->menu->team = array('link' => '團隊|project|team|projectID=%s', 'alias' => 'managemembers');
|
||||
$lang->project->menu->doc = array('link' => '文檔|doc|objectLibs|type=project&objectID=%s&from=project', 'subModule' => 'doc');
|
||||
$lang->project->menu->product = $lang->productCommon . '|project|manageproducts|projectID=%s';
|
||||
@@ -231,32 +234,57 @@ $lang->build->menu = $lang->project->menu;
|
||||
$lang->qa = new stdclass();
|
||||
$lang->qa->menu = new stdclass();
|
||||
|
||||
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->qa->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
|
||||
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
$lang->qa->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->qa->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->qa->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->qa->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
|
||||
$lang->qa->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->qa->menu->report = array('link' => '報告|testreport|browse|productID=%s');
|
||||
$lang->qa->menu->caselib = array('link' => '用例庫|testsuite|library');
|
||||
$lang->qa->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->bug = new stdclass();
|
||||
$lang->bug->menu = new stdclass();
|
||||
|
||||
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
|
||||
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
$lang->bug->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->bug->menu->bug = array('link' => 'Bug|bug|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,resolve,close,activate,report,batchedit,confirmbug,assignto', 'subModule' => 'tree');
|
||||
$lang->bug->menu->testcase = array('link' => '用例|testcase|browse|productID=%s');
|
||||
$lang->bug->menu->testtask = array('link' => '版本|testtask|browse|productID=%s');
|
||||
$lang->bug->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s');
|
||||
$lang->bug->menu->report = array('link' => '報告|testreport|browse|productID=%s');
|
||||
$lang->bug->menu->caselib = array('link' => '用例庫|testsuite|library');
|
||||
$lang->bug->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
|
||||
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase');
|
||||
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
$lang->testcase->menu->product = array('link' => '%s', 'fixed' => true);
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->testtask = array('link' => '版本|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
$lang->testcase->menu->testsuite = array('link' => '套件|testsuite|browse|productID=%s', 'alias' => 'view,create,edit,linkcase');
|
||||
$lang->testcase->menu->report = array('link' => '報告|testreport|browse|productID=%s', 'alias' => 'view,create,edit');
|
||||
$lang->testcase->menu->caselib = array('link' => '用例庫|testsuite|library');
|
||||
$lang->testcase->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = $lang->testcase->menu;
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = $lang->testcase->menu;
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = $lang->testcase->menu;
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
|
||||
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
|
||||
$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|');
|
||||
$lang->caselib->menu->testtask = array('link' => '版本|testtask|browse|');
|
||||
$lang->caselib->menu->testsuite = array('link' => '套件|testsuite|browse|');
|
||||
$lang->caselib->menu->report = array('link' => '報告|testreport|browse|');
|
||||
$lang->caselib->menu->caselib = array('link' => '用例庫|testsuite|library', 'alias' => 'createlib,createcase,libview,edit', 'subModule' => 'tree,testcase');
|
||||
$lang->caselib->menu->create = array('link' => "<i class='icon-plus'></i>創建庫|testsuite|createLib|", 'float' => 'right');
|
||||
$lang->caselib->menu->index = array('link' => "<i class='icon-home'></i>測試主頁|qa|index|locate=no&productID=%s", 'float' => 'right');
|
||||
|
||||
/* 文檔視圖菜單設置。*/
|
||||
$lang->doc = new stdclass();
|
||||
@@ -302,7 +330,7 @@ $lang->user->menu = $lang->company->menu;
|
||||
/* 後台管理菜單設置。*/
|
||||
$lang->admin = new stdclass();
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu->index = array('link' => '首頁|admin|index');
|
||||
$lang->admin->menu->index = array('link' => '首頁|admin|index', 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
|
||||
$lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension');
|
||||
$lang->admin->menu->custom = array('link' => '自定義|custom|set', 'subModule' => 'custom');
|
||||
$lang->admin->menu->mail = array('link' => '發信|mail|index', 'subModule' => 'mail');
|
||||
@@ -351,6 +379,9 @@ $lang->menugroup->group = 'company';
|
||||
$lang->menugroup->bug = 'qa';
|
||||
$lang->menugroup->testcase = 'qa';
|
||||
$lang->menugroup->testtask = 'qa';
|
||||
$lang->menugroup->testsuite = 'qa';
|
||||
$lang->menugroup->caselib = 'qa';
|
||||
$lang->menugroup->testreport = 'qa';
|
||||
$lang->menugroup->people = 'company';
|
||||
$lang->menugroup->dept = 'company';
|
||||
$lang->menugroup->todo = 'my';
|
||||
@@ -401,7 +432,8 @@ $lang->pager->locate = "GO!";
|
||||
$lang->proVersion = "<a href='http://api.zentao.net/goto.php?item=proversion&from=footer' target='_blank' id='proLink' class='text-important'>專業版 <i class='text-danger icon-pro-version'></i></a> ";
|
||||
$lang->downNotify = "下載桌面提醒";
|
||||
|
||||
$lang->suhosinInfo = "警告:數據太多,請在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(設置更大的數)。 保存並重新啟動apache,否則會造成部分數據無法保存。";
|
||||
$lang->suhosinInfo = "警告:數據太多,請在php.ini中修改<font color=red>sohusin.post.max_vars</font>和<font color=red>sohusin.request.max_vars</font>(大於%s的數)。 保存並重新啟動apache或php-fpm,否則會造成部分數據無法保存。";
|
||||
$lang->maxVarsInfo = "警告:數據太多,請在php.ini中修改<font color=red>max_input_vars</font>(大於%s的數)。 保存並重新啟動apache或php-fpm,否則會造成部分數據無法保存。";
|
||||
$lang->pasteTextInfo = "粘貼文本到文本域中,每行文字作為一條數據的標題。";
|
||||
$lang->noticeImport = "<p style='font-size:14px'>導入數據中,含有已經存在系統的數據,請確認這些數據要覆蓋或者全新插入</p><p><a href='javascript:submitForm(\"cover\")' class='btn btn-mini'>覆蓋</a> <a href='javascript:submitForm(\"insert\")' class='btn btn-mini'>全新插入</a></p>";
|
||||
|
||||
@@ -469,7 +501,7 @@ $lang->icons['user'] = 'user';
|
||||
$lang->icons['dept'] = 'sitemap';
|
||||
$lang->icons['tree'] = 'sitemap';
|
||||
$lang->icons['usecase'] = 'sitemap';
|
||||
$lang->icons['testcase'] = 'smile';
|
||||
$lang->icons['testcase'] = 'sitemap';
|
||||
$lang->icons['result'] = 'list-alt';
|
||||
$lang->icons['mail'] = 'envelope';
|
||||
$lang->icons['trash'] = 'trash';
|
||||
|
||||
+68
-69
@@ -30,7 +30,6 @@ class commonModel extends model
|
||||
$this->loadConfigFromDB();
|
||||
$this->loadCustomFromDB();
|
||||
if(!$this->checkIP()) die($this->lang->ipLimited);
|
||||
if($this->app->getViewType() == 'mhtml') $this->setMobileMenu();
|
||||
$this->app->loadLang('company');
|
||||
}
|
||||
}
|
||||
@@ -104,6 +103,7 @@ class commonModel extends model
|
||||
$user->account = 'guest';
|
||||
$user->realname = 'guest';
|
||||
$user->role = 'guest';
|
||||
$user->admin = false;
|
||||
$user->rights = $this->loadModel('user')->authorize('guest');
|
||||
$user->groups = array('group');
|
||||
$this->session->set('user', $user);
|
||||
@@ -305,49 +305,6 @@ class commonModel extends model
|
||||
echo html::a(helper::createLink('misc', 'about'), $lang->aboutZenTao, '', "class='about iframe' data-width='900' data-headerless='true' data-backdrop='true' data-keyboard='true' data-class='modal-about'");
|
||||
}
|
||||
|
||||
/**
|
||||
* Set mobile menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setMobileMenu()
|
||||
{
|
||||
$menu = new stdclass();
|
||||
|
||||
$role = isset($this->app->user->role) ? $this->app->user->role : '';
|
||||
|
||||
$this->config->locate = new stdclass();
|
||||
$this->config->locate->module = 'my';
|
||||
$this->config->locate->method = 'todo';
|
||||
$this->config->locate->params = '';
|
||||
|
||||
$todo = $this->lang->my->menu->todo['link'];
|
||||
$task = $this->lang->my->menu->task['link'];
|
||||
$story = $this->lang->my->menu->story['link'];
|
||||
$bug = $this->lang->my->menu->bug['link'];
|
||||
$project = $this->lang->projectCommon . '|project|all|status=isdoing';
|
||||
$product = $this->lang->productCommon . '|product|all';
|
||||
$menu = array('todo' => $todo, 'task' => $task, 'bug' => $bug, 'project' => $project, 'product' => $product);
|
||||
|
||||
if($role and strpos('dev,td,pm', $role) !== false) $menu = array('todo' => $todo, 'task' => $task, 'bug' => $bug, 'product' => $product, 'project' => $project);
|
||||
if($role and strpos('pd,po', $role) !== false) $menu = array('todo' => $todo, 'story' => $story, 'bug' => $bug, 'product' => $product, 'project' => $project);
|
||||
if($role and strpos('qa,qd', $role) !== false) $menu = array('todo' => $todo, 'bug' => $bug, 'project' => $project, 'product' => $product);
|
||||
if($role and strpos('top', $role) !== false) $menu = array('project' => $project, 'product' => $product, 'todo' => $todo);
|
||||
|
||||
if($role == 'top')
|
||||
{
|
||||
$this->config->locate->module = 'project';
|
||||
$this->config->locate->method = 'all';
|
||||
$this->config->locate->params = 'status=isdoing';
|
||||
}
|
||||
|
||||
unset($this->lang->menuOrder);
|
||||
unset($this->lang->menugroup);
|
||||
$this->lang->menu = new stdclass();
|
||||
$this->lang->menu = $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create menu item link
|
||||
*
|
||||
@@ -390,18 +347,10 @@ class commonModel extends model
|
||||
/* Set the main main menu. */
|
||||
$mainMenu = $moduleName;
|
||||
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
|
||||
if($app->getViewType() == 'mhtml')
|
||||
{
|
||||
if($moduleName == 'my') $mainMenu = $methodName;
|
||||
if($moduleName == 'todo') $mainMenu = $moduleName;
|
||||
if($moduleName == 'story' and !isset($lang->menu->story)) $mainMenu = 'product';
|
||||
if($moduleName == 'bug' and !isset($lang->menu->bug)) $mainMenu = 'product';
|
||||
if($moduleName == 'task' and !isset($lang->menu->task)) $mainMenu = 'project';
|
||||
}
|
||||
|
||||
/* Print all main menus. */
|
||||
$menu = customModel::getMainMenu();
|
||||
$activeName = $app->getViewType() == 'mhtml' ? 'ui-btn-active' : 'active';
|
||||
$menu = customModel::getMainMenu();
|
||||
$activeName = 'active';
|
||||
|
||||
echo "<ul class='nav'>\n";
|
||||
foreach($menu as $menuItem)
|
||||
@@ -412,7 +361,7 @@ class commonModel extends model
|
||||
echo "<li $active data-id='$menuItem->name'><a href='$link' $active>$menuItem->text</a></li>\n";
|
||||
}
|
||||
$customLink = helper::createLink('custom', 'ajaxMenu', "module={$app->getModuleName()}&method={$app->getMethodName()}", '', true);
|
||||
if(!commonModel::isTutorialMode() and $app->viewType != 'mhtml') echo "<li class='custom-item'><a href='$customLink' data-toggle='modal' data-type='iframe' title='$lang->customMenu' data-icon='cog' data-width='80%'><i class='icon icon-cog'></i></a></li>";
|
||||
if(!commonModel::isTutorialMode() and $app->viewType != 'mhtml' and $app->user->account != 'guest') echo "<li class='custom-item'><a href='$customLink' data-toggle='modal' data-type='iframe' title='$lang->customMenu' data-icon='cog' data-width='80%'><i class='icon icon-cog'></i></a></li>";
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
||||
@@ -482,9 +431,10 @@ class commonModel extends model
|
||||
$currentModule = ($isTutorialMode and defined('WIZARD_MODULE')) ? WIZARD_MODULE : $app->getModuleName();
|
||||
$currentMethod = ($isTutorialMode and defined('WIZARD_METHOD')) ? WIZARD_METHOD : $app->getMethodName();
|
||||
$menu = customModel::getModuleMenu($moduleName);
|
||||
$isMobile = $app->viewType === 'mhtml';
|
||||
|
||||
/* The beginning of the menu. */
|
||||
echo "<ul class='nav'>\n";
|
||||
echo $isMobile ? '' : "<ul class='nav'>\n";
|
||||
|
||||
/* Cycling to print every sub menus. */
|
||||
foreach($menu as $menuItem)
|
||||
@@ -514,14 +464,17 @@ class commonModel extends model
|
||||
if(isset($menuItem->link['method'])) $method = $menuItem->link['method'];
|
||||
}
|
||||
if($float != 'right' and $module == $currentModule and ($method == $currentMethod or strpos(",$alias,", ",$currentMethod,") !== false)) $active = 'active';
|
||||
echo "<li class='$float $active' data-id='$menuItem->name'>" . html::a($link, $menuItem->text, $target) . "</li>\n";
|
||||
|
||||
$menuItemHtml = "<li class='$float $active' data-id='$menuItem->name'>" . html::a($link, $menuItem->text, $target) . "</li>\n";
|
||||
if($isMobile) $menuItemHtml = html::a($link, $menuItem->text, $target, "class='$active'") . "\n";
|
||||
echo $menuItemHtml;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<li data-id='$menuItem->name'>$menuItem->text</li>\n";
|
||||
echo $isMobile ? $menuItem->text : "<li data-id='$menuItem->name'>$menuItem->text</li>\n";
|
||||
}
|
||||
}
|
||||
echo "</ul>\n";
|
||||
echo $isMobile ? '' : "</ul>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -749,7 +702,7 @@ class commonModel extends model
|
||||
/* set the class. */
|
||||
if(!$icon)
|
||||
{
|
||||
$icon = $lang->icons[$method] ? $lang->icons[$method] : $method;
|
||||
$icon = isset($lang->icons[$method]) ? $lang->icons[$method] : $method;
|
||||
}
|
||||
if(strpos(',edit,copy,report,export,delete,', ",$method,") !== false) $module = 'common';
|
||||
$class = "icon-$module-$method";
|
||||
@@ -913,18 +866,23 @@ class commonModel extends model
|
||||
/**
|
||||
* Judge Suhosin Setting whether the actual size of post data is large than the setting size.
|
||||
*
|
||||
* @param int $numberOfItems
|
||||
* @param int $columns
|
||||
* @param int $countInputVars
|
||||
* @static
|
||||
* @access public
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function judgeSuhosinSetting($numberOfItems, $columns)
|
||||
public static function judgeSuhosinSetting($countInputVars)
|
||||
{
|
||||
if(extension_loaded('suhosin'))
|
||||
{
|
||||
$maxPostVars = ini_get('suhosin.post.max_vars');
|
||||
$maxRequestVars = ini_get('suhosin.request.max_vars');
|
||||
if($numberOfItems * $columns > $maxPostVars or $numberOfItems * $columns > $maxRequestVars) return true;
|
||||
if($countInputVars > $maxPostVars or $countInputVars > $maxRequestVars) return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$maxInputVars = ini_get('max_input_vars');
|
||||
if($maxInputVars and $countInputVars > (int)$maxInputVars) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -934,7 +892,6 @@ class commonModel extends model
|
||||
* Get the previous and next object.
|
||||
*
|
||||
* @param string $type story|task|bug|case
|
||||
* @param string $objectIDs
|
||||
* @param string $objectID
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -949,7 +906,7 @@ class commonModel extends model
|
||||
$existObject = $type . 'PreAndNext';
|
||||
if(isset($_SESSION[$existObject]) and $_SESSION[$existObject]['objectID'] == $objectID) return $_SESSION[$existObject]['preAndNextObject'];
|
||||
|
||||
/* Get objectIDs. */
|
||||
/* Get objectIDList. */
|
||||
$table = $this->config->objectTables[$type];
|
||||
$queryCondition = $type . 'QueryCondition';
|
||||
$typeOnlyCondition = $type . 'OnlyCondition';
|
||||
@@ -1178,8 +1135,7 @@ class commonModel extends model
|
||||
global $app, $lang;
|
||||
|
||||
/* Check is the super admin or not. */
|
||||
$account = ',' . $app->user->account . ',';
|
||||
if(strpos($app->company->admins, $account) !== false) return true;
|
||||
if($app->user->admin) return true;
|
||||
|
||||
/* If not super admin, check the rights. */
|
||||
$rights = $app->user->rights['rights'];
|
||||
@@ -1308,6 +1264,49 @@ class commonModel extends model
|
||||
{
|
||||
return (isset($_SESSION['tutorialMode']) and $_SESSION['tutorialMode']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert items to Pinyin.
|
||||
*
|
||||
* @param array $items
|
||||
* @static
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public static function convert2Pinyin($items)
|
||||
{
|
||||
global $app;
|
||||
static $allConverted = array();
|
||||
static $pinyin;
|
||||
if(empty($pinyin)) $pinyin = $app->loadClass('pinyin');
|
||||
|
||||
$sign = ' aNdAnD ';
|
||||
$notConvertedItems = array_diff($items, array_keys($allConverted));
|
||||
|
||||
if($notConvertedItems)
|
||||
{
|
||||
$convertedPinYin = $pinyin->romanize(join($sign, $notConvertedItems));
|
||||
$itemsPinYin = explode(trim($sign), $convertedPinYin);
|
||||
foreach($notConvertedItems as $item)
|
||||
{
|
||||
$itemPinYin = array_shift($itemsPinYin);
|
||||
$wordsPinYin = explode("\t", trim($itemPinYin));
|
||||
|
||||
$abbr = '';
|
||||
foreach($wordsPinYin as $i => $wordPinyin)
|
||||
{
|
||||
if($wordPinyin) $abbr .= $wordPinyin[0];
|
||||
}
|
||||
|
||||
$allConverted[$item] = strtolower(join($wordsPinYin) . ' ' . $abbr);
|
||||
}
|
||||
}
|
||||
|
||||
$convertedItems = array();
|
||||
foreach($items as $item) $convertedItems[$item] = zget($allConverted, $item, null);
|
||||
|
||||
return $convertedItems;
|
||||
}
|
||||
}
|
||||
|
||||
class common extends commonModel
|
||||
|
||||
@@ -79,6 +79,8 @@ function toggleOrder(obj)
|
||||
$(obj).find('.log-desc').attr('class', 'icon- log-asc');
|
||||
}
|
||||
$("#historyItem li").reverseOrder();
|
||||
window.editor['lastComment'].remove();
|
||||
initKindeditor();
|
||||
}
|
||||
|
||||
function toggleComment(actionID)
|
||||
|
||||
@@ -42,6 +42,7 @@ var fullTools =
|
||||
$(document).ready(initKindeditor);
|
||||
function initKindeditor(afterInit)
|
||||
{
|
||||
$(':input[type=submit]').next('#uid').remove();
|
||||
$(':input[type=submit]').after("<input type='hidden' id='uid' name='uid' value=" + kuid + ">");
|
||||
var nextFormControl = 'input:not([type="hidden"]), textarea:not(.ke-edit-textarea), button[type="submit"], select';
|
||||
$.each(editor.id, function(key, editorID)
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<div id='actionbox'>
|
||||
<fieldset>
|
||||
<hr color='#dddddd'/>
|
||||
|
||||
<ol id='historyItem' style='padding-left:20px; font-size:11px'>
|
||||
<?php $i = 1; ?>
|
||||
<?php foreach($actions as $action):?>
|
||||
<li value='<?php echo $i ++;?>'>
|
||||
<?php
|
||||
if(isset($users[$action->actor])) $action->actor = $users[$action->actor];
|
||||
if($action->action == 'assigned' and isset($users[$action->extra]) ) $action->extra = $users[$action->extra];
|
||||
if(strpos($action->actor, ':') !== false) $action->actor = substr($action->actor, strpos($action->actor, ':') + 1);
|
||||
?>
|
||||
<span><?php $this->action->printAction($action);?></span>
|
||||
<?php if(!empty($action->comment) or !empty($action->history)):?>
|
||||
<?php if(!empty($action->comment)) echo "<div class='history'>";?>
|
||||
<?php if($action->comment) echo strip_tags($action->comment) == $action->comment ? nl2br($action->comment) : $action->comment; ?>
|
||||
<?php if(!empty($action->comment)) echo "</div>";?>
|
||||
<?php endif;?>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ol>
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user