Merge branch 'master' of http://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
+49
-33
@@ -23,24 +23,38 @@ ALTER TABLE `zt_project` ADD `output` text NOT NULL AFTER `milestone`;
|
||||
ALTER TABLE `zt_project` ADD `lastEditedBy` varchar(30) NOT NULL DEFAULT '' AFTER `openedVersion`;
|
||||
ALTER TABLE `zt_project` ADD `lastEditedDate` datetime NOT NULL AFTER `lastEditedBy`;
|
||||
|
||||
ALTER TABLE `zt_product` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_action` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_bug` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_build` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_burn` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_doc` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_relation` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_relation` CHANGE `program` `project` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_doclib` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_task` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_testreport` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
ALTER TABLE `zt_testtask` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL;
|
||||
|
||||
ALTER TABLE `zt_task` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_doc` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_story` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_bug` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_case` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_testtask` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_testreport` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_testsuite` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_build` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_release` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_expect` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
|
||||
ALTER TABLE `zt_product` ADD `bind` enum('0','1') NOT NULL DEFAULT '0' AFTER `code`;
|
||||
ALTER TABLE `zt_task` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_doc` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_story` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_product` ADD `program` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_repo` ADD `product` varchar(255) NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_bug` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_case` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_testtask` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_testreport` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_testsuite` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_build` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
ALTER TABLE `zt_release` ADD `PRJ` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
|
||||
ALTER TABLE `zt_group` ADD `PRJ` mediumint NOT NULL AFTER `id`;
|
||||
INSERT INTO `zt_group` (`name`, `role`, `desc`) VALUES ('项目管理员', 'PRJAdmin', '项目管理员可以维护项目的权限');
|
||||
ALTER TABLE `zt_group` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`;
|
||||
INSERT INTO `zt_group` (`name`, `role`, `desc`) VALUES ('项目管理员', 'projectAdmin', '项目管理员可以维护项目的权限');
|
||||
|
||||
ALTER TABLE `zt_usergroup` ADD `PRJ` text NOT NULL;
|
||||
ALTER TABLE `zt_usergroup` ADD `project` text NOT NULL;
|
||||
|
||||
ALTER TABLE `zt_userview` ADD `programs` mediumtext NOT NULL AFTER `account`;
|
||||
ALTER TABLE `zt_userview` ADD `sprints` mediumtext NOT NULL AFTER `programs`;
|
||||
@@ -58,6 +72,8 @@ REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES (
|
||||
|
||||
ALTER TABLE `zt_config` MODIFY COLUMN `value` longtext NOT NULL AFTER `key`;
|
||||
|
||||
UPDATE `zt_config` SET `key` = 'CRExecution' WHERE `module` = 'common' AND `key` = 'CRProject';
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_stakeholder`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_stakeholder` (
|
||||
`id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
@@ -78,7 +94,7 @@ CREATE TABLE IF NOT EXISTS `zt_stakeholder` (
|
||||
CREATE TABLE IF NOT EXISTS `zt_expect` (
|
||||
`id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`userID` mediumint(8) NOT NULL,
|
||||
`PRJ` mediumint(8) NOT NULL DEFAULT 0,
|
||||
`project` mediumint(8) NOT NULL DEFAULT 0,
|
||||
`expect` text NOT NULL,
|
||||
`progress` text NOT NULL,
|
||||
`createdBy` char(30) NOT NULL,
|
||||
@@ -178,8 +194,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1, 'my', 'uploadAvatar'),
|
||||
(1, 'user', 'execution'),
|
||||
(1, 'user', 'cropAvatar'),
|
||||
(1, 'program', 'PRJBrowse'),
|
||||
(1, 'program', 'PRJView'),
|
||||
(1, 'program', 'browse'),
|
||||
(1, 'program', 'view'),
|
||||
(1, 'search', 'index'),
|
||||
(1, 'search', 'buildIndex'),
|
||||
(2, 'product', 'dashboard'),
|
||||
@@ -192,7 +208,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(2, 'user', 'execution'),
|
||||
(2, 'user', 'cropAvatar'),
|
||||
(2, 'search', 'index'),
|
||||
(2, 'program', 'PRJBrowse'),
|
||||
(2, 'program', 'browse'),
|
||||
(3, 'product', 'dashboard'),
|
||||
(3, 'product', 'manageLine'),
|
||||
(3, 'projectstory', 'story'),
|
||||
@@ -203,7 +219,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(3, 'user', 'execution'),
|
||||
(3, 'user', 'cropAvatar'),
|
||||
(3, 'search', 'index'),
|
||||
(3, 'program', 'PRJBrowse'),
|
||||
(3, 'program', 'browse'),
|
||||
(4, 'product', 'dashboard'),
|
||||
(4, 'product', 'manageLine'),
|
||||
(4, 'projectstory', 'story'),
|
||||
@@ -213,8 +229,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(4, 'my', 'uploadAvatar'),
|
||||
(4, 'user', 'execution'),
|
||||
(4, 'user', 'cropAvatar'),
|
||||
(4, 'program', 'PRJView'),
|
||||
(4, 'program', 'PRJBrowse'),
|
||||
(4, 'program', 'view'),
|
||||
(4, 'program', 'browse'),
|
||||
(4, 'search', 'index'),
|
||||
(5, 'product', 'dashboard'),
|
||||
(5, 'product', 'manageLine'),
|
||||
@@ -227,8 +243,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(5, 'my', 'uploadAvatar'),
|
||||
(5, 'user', 'execution'),
|
||||
(5, 'user', 'cropAvatar'),
|
||||
(5, 'program', 'PRJView'),
|
||||
(5, 'program', 'PRJBrowse'),
|
||||
(5, 'program', 'view'),
|
||||
(5, 'program', 'browse'),
|
||||
(5, 'search', 'index'),
|
||||
(6, 'product', 'dashboard'),
|
||||
(6, 'product', 'manageLine'),
|
||||
@@ -239,8 +255,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(6, 'my', 'uploadAvatar'),
|
||||
(6, 'user', 'execution'),
|
||||
(6, 'user', 'cropAvatar'),
|
||||
(6, 'program', 'PRJView'),
|
||||
(6, 'program', 'PRJBrowse'),
|
||||
(6, 'program', 'view'),
|
||||
(6, 'program', 'browse'),
|
||||
(6, 'search', 'index'),
|
||||
(7, 'product', 'dashboard'),
|
||||
(7, 'product', 'manageLine'),
|
||||
@@ -253,8 +269,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(7, 'my', 'uploadAvatar'),
|
||||
(7, 'user', 'execution'),
|
||||
(7, 'user', 'cropAvatar'),
|
||||
(7, 'program', 'PRJView'),
|
||||
(7, 'program', 'PRJBrowse'),
|
||||
(7, 'program', 'view'),
|
||||
(7, 'program', 'browse'),
|
||||
(7, 'search', 'index'),
|
||||
(8, 'product', 'dashboard'),
|
||||
(8, 'product', 'manageLine'),
|
||||
@@ -265,8 +281,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(8, 'my', 'uploadAvatar'),
|
||||
(8, 'user', 'execution'),
|
||||
(8, 'user', 'cropAvatar'),
|
||||
(8, 'program', 'PRJView'),
|
||||
(8, 'program', 'PRJBrowse'),
|
||||
(8, 'program', 'view'),
|
||||
(8, 'program', 'browse'),
|
||||
(8, 'search', 'index'),
|
||||
(9, 'product', 'dashboard'),
|
||||
(9, 'product', 'manageLine'),
|
||||
@@ -279,8 +295,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(9, 'my', 'uploadAvatar'),
|
||||
(9, 'user', 'execution'),
|
||||
(9, 'user', 'cropAvatar'),
|
||||
(9, 'program', 'PRJView'),
|
||||
(9, 'program', 'PRJBrowse'),
|
||||
(9, 'program', 'view'),
|
||||
(9, 'program', 'browse'),
|
||||
(9, 'search', 'index'),
|
||||
(10, 'product', 'dashboard'),
|
||||
(10, 'product', 'manageLine'),
|
||||
@@ -292,7 +308,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(10, 'user', 'execution'),
|
||||
(10, 'user', 'cropAvatar'),
|
||||
(10, 'search', 'index'),
|
||||
(10, 'program', 'PRJBrowse'),
|
||||
(10, 'program', 'browse'),
|
||||
(11, 'product', 'dashboard'),
|
||||
(11, 'product', 'manageLine'),
|
||||
(11, 'projectstory', 'story'),
|
||||
@@ -301,7 +317,7 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(11, 'my', 'preference'),
|
||||
(11, 'my', 'uploadAvatar'),
|
||||
(11, 'user', 'execution'),
|
||||
(11, 'program', 'PRJBrowse'),
|
||||
(11, 'program', 'browse'),
|
||||
(11, 'user', 'cropAvatar');
|
||||
|
||||
INSERT INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES
|
||||
|
||||
+188
-188
@@ -82,11 +82,11 @@ CREATE TABLE IF NOT EXISTS `zt_branch` (
|
||||
-- DROP TABLE IF EXISTS `zt_bug`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_bug` (
|
||||
`id` mediumint(8) NOT NULL auto_increment,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`branch` mediumint(8) unsigned NOT NULL default '0',
|
||||
`module` mediumint(8) unsigned NOT NULL default '0',
|
||||
`project` mediumint(8) unsigned NOT NULL default '0',
|
||||
`execution` mediumint(8) unsigned NOT NULL default '0',
|
||||
`plan` mediumint(8) unsigned NOT NULL default '0',
|
||||
`story` mediumint(8) unsigned NOT NULL default '0',
|
||||
`storyVersion` smallint(6) NOT NULL default '1',
|
||||
@@ -139,7 +139,7 @@ CREATE TABLE IF NOT EXISTS `zt_bug` (
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `product` (`product`),
|
||||
KEY `project` (`project`),
|
||||
KEY `execution` (`execution`),
|
||||
KEY `status` (`status`),
|
||||
KEY `plan` (`plan`),
|
||||
KEY `story` (`story`),
|
||||
@@ -151,10 +151,10 @@ CREATE TABLE IF NOT EXISTS `zt_bug` (
|
||||
-- DROP TABLE IF EXISTS `zt_build`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_build` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`branch` mediumint(8) unsigned NOT NULL default '0',
|
||||
`project` mediumint(8) unsigned NOT NULL default '0',
|
||||
`execution` mediumint(8) unsigned NOT NULL default '0',
|
||||
`name` char(150) NOT NULL,
|
||||
`scmPath` char(255) NOT NULL,
|
||||
`filePath` char(255) NOT NULL,
|
||||
@@ -166,11 +166,11 @@ CREATE TABLE IF NOT EXISTS `zt_build` (
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `product` (`product`),
|
||||
KEY `project` (`project`)
|
||||
KEY `execution` (`execution`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_burn`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_burn` (
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`execution` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`task` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`date` date NOT NULL,
|
||||
@@ -178,12 +178,12 @@ CREATE TABLE IF NOT EXISTS `zt_burn` (
|
||||
`left` float NOT NULL,
|
||||
`consumed` float NOT NULL,
|
||||
`storyPoint` float NOT NULL,
|
||||
PRIMARY KEY (`project`,`date`,`task`)
|
||||
PRIMARY KEY (`execution`,`date`,`task`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_case`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_case` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`branch` mediumint(8) unsigned NOT NULL default '0',
|
||||
`lib` mediumint(8) unsigned NOT NULL default '0',
|
||||
@@ -334,9 +334,9 @@ CREATE TABLE IF NOT EXISTS `zt_dept` (
|
||||
-- DROP TABLE IF EXISTS `zt_doc`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_doc` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`execution` mediumint(8) unsigned NOT NULL,
|
||||
`lib` varchar(30) NOT NULL,
|
||||
`module` varchar(30) NOT NULL,
|
||||
`title` varchar(255) NOT NULL,
|
||||
@@ -356,7 +356,7 @@ CREATE TABLE IF NOT EXISTS `zt_doc` (
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `product` (`product`),
|
||||
KEY `project` (`project`),
|
||||
KEY `execution` (`execution`),
|
||||
KEY `lib` (`lib`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_doccontent`;
|
||||
@@ -377,7 +377,7 @@ CREATE TABLE IF NOT EXISTS `zt_doclib` (
|
||||
`id` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`type` varchar(30) NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`execution` mediumint(8) unsigned NOT NULL,
|
||||
`name` varchar(60) NOT NULL,
|
||||
`acl` varchar(10) NOT NULL DEFAULT 'open',
|
||||
`groups` varchar(255) NOT NULL,
|
||||
@@ -388,7 +388,7 @@ CREATE TABLE IF NOT EXISTS `zt_doclib` (
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `product` (`product`),
|
||||
KEY `project` (`project`)
|
||||
KEY `execution` (`execution`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_effort`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_effort` (
|
||||
@@ -449,7 +449,7 @@ CREATE TABLE IF NOT EXISTS `zt_file` (
|
||||
-- DROP TABLE IF EXISTS `zt_group`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_group` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL DEFAULT 0,
|
||||
`project` mediumint(8) unsigned NOT NULL DEFAULT 0,
|
||||
`name` char(30) NOT NULL,
|
||||
`role` char(30) NOT NULL default '',
|
||||
`desc` char(255) NOT NULL default '',
|
||||
@@ -703,7 +703,7 @@ CREATE TABLE IF NOT EXISTS `zt_projectstory` (
|
||||
-- DROP TABLE IF EXISTS `zt_release`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_release` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`branch` mediumint(8) unsigned NOT NULL default '0',
|
||||
`build` mediumint(8) unsigned NOT NULL,
|
||||
@@ -797,7 +797,7 @@ CREATE TABLE IF NOT EXISTS `zt_stakeholder` (
|
||||
-- DROP TABLE IF EXISTS `zt_story`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_story` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`parent` mediumint(9) NOT NULL default '0',
|
||||
`product` mediumint(8) unsigned NOT NULL default '0',
|
||||
`branch` mediumint(8) unsigned NOT NULL default '0',
|
||||
@@ -869,9 +869,9 @@ CREATE TABLE IF NOT EXISTS `zt_suitecase` (
|
||||
-- DROP TABLE IF EXISTS `zt_task`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_task` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`parent` mediumint(8) NOT NULL DEFAULT '0',
|
||||
`project` mediumint(8) unsigned NOT NULL default '0',
|
||||
`execution` mediumint(8) unsigned NOT NULL default '0',
|
||||
`module` mediumint(8) unsigned NOT NULL default '0',
|
||||
`design` mediumint(8) unsigned NOT NULL,
|
||||
`story` mediumint(8) unsigned NOT NULL default '0',
|
||||
@@ -912,7 +912,7 @@ CREATE TABLE IF NOT EXISTS `zt_task` (
|
||||
`activatedDate` date NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `project` (`project`),
|
||||
KEY `execution` (`execution`),
|
||||
KEY `story` (`story`),
|
||||
KEY `parent` (`parent`),
|
||||
KEY `assignedTo` (`assignedTo`)
|
||||
@@ -959,9 +959,9 @@ CREATE TABLE IF NOT EXISTS `zt_team` (
|
||||
-- DROP TABLE IF EXISTS `zt_testreport`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_testreport` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`execution` mediumint(8) unsigned NOT NULL,
|
||||
`tasks` varchar(255) NOT NULL,
|
||||
`builds` varchar(255) NOT NULL,
|
||||
`title` varchar(255) NOT NULL,
|
||||
@@ -1016,7 +1016,7 @@ CREATE TABLE IF NOT EXISTS `zt_testrun` (
|
||||
-- DROP TABLE IF EXISTS `zt_testsuite`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_testsuite` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
@@ -1032,10 +1032,10 @@ CREATE TABLE IF NOT EXISTS `zt_testsuite` (
|
||||
-- DROP TABLE IF EXISTS `zt_testtask`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_testtask` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
`PRJ` mediumint(8) unsigned NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`name` char(90) NOT NULL,
|
||||
`project` mediumint(8) unsigned NOT NULL default '0',
|
||||
`execution` mediumint(8) unsigned NOT NULL default '0',
|
||||
`build` char(30) NOT NULL,
|
||||
`owner` varchar(30) NOT NULL,
|
||||
`pri` tinyint(3) unsigned NOT NULL default '0',
|
||||
@@ -1140,7 +1140,7 @@ CREATE TABLE IF NOT EXISTS `zt_usercontact` (
|
||||
CREATE TABLE IF NOT EXISTS `zt_usergroup` (
|
||||
`account` char(30) NOT NULL default '',
|
||||
`group` mediumint(8) unsigned NOT NULL default '0',
|
||||
`PRJ` text NOT NULL,
|
||||
`project` text NOT NULL,
|
||||
UNIQUE KEY `account` (`account`,`group`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_userquery`;
|
||||
@@ -1198,7 +1198,7 @@ CREATE TABLE IF NOT EXISTS `zt_entry` (
|
||||
CREATE TABLE IF NOT EXISTS `zt_expect` (
|
||||
`id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`userID` mediumint(8) NOT NULL,
|
||||
`PRJ` mediumint(8) NOT NULL DEFAULT 0,
|
||||
`project` mediumint(8) NOT NULL DEFAULT 0,
|
||||
`expect` text NOT NULL,
|
||||
`progress` text NOT NULL,
|
||||
`createdBy` char(30) NOT NULL,
|
||||
@@ -1262,9 +1262,9 @@ CREATE TABLE IF NOT EXISTS `zt_score` (
|
||||
-- DROP TABLE IF EXISTS `zt_relation`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_relation` (
|
||||
`id` int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
`PRJ` mediumint(8) NOT NULL,
|
||||
`product` mediumint(8) NOT NULL,
|
||||
`project` mediumint(8) NOT NULL,
|
||||
`product` mediumint(8) NOT NULL,
|
||||
`execution` mediumint(8) NOT NULL,
|
||||
`AType` char(30) NOT NULL,
|
||||
`AID` mediumint(8) NOT NULL,
|
||||
`AVersion` char(30) NOT NULL,
|
||||
@@ -1278,7 +1278,7 @@ CREATE TABLE IF NOT EXISTS `zt_relation` (
|
||||
|
||||
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES
|
||||
('*', '*', '*', '*', '*', '', '监控定时任务', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
|
||||
('30', '23', '*', '*', '*', 'moduleName=project&methodName=computeburn', '更新燃尽图', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
|
||||
('30', '23', '*', '*', '*', 'moduleName=execution&methodName=computeburn', '更新燃尽图', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
|
||||
('0', '8', '*', '*', '*', 'moduleName=report&methodName=remind', '每日任务提醒', 'zentao', 1, 'normal', '0000-00-00 00:00:00'),
|
||||
('*/5', '*', '*', '*', '*', 'moduleName=svn&methodName=run', '同步SVN', 'zentao', 1, 'stop', '0000-00-00 00:00:00'),
|
||||
('*/5', '*', '*', '*', '*', 'moduleName=git&methodName=run', '同步GIT', 'zentao', 1, 'stop', '0000-00-00 00:00:00'),
|
||||
@@ -1305,7 +1305,7 @@ INSERT INTO `zt_group` (`id`, `name`, `role`, `desc`) VALUES
|
||||
(10, 'OTHERS', 'others', 'for others.'),
|
||||
(11, 'guest', 'guest', 'For guest'),
|
||||
(12, 'LIMITED', 'limited', 'For limited user'),
|
||||
(13, '项目管理员', 'PRJAdmin', '项目管理员可以维护项目的权限');
|
||||
(13, '项目管理员', 'projectAdmin', '项目管理员可以维护项目的权限');
|
||||
|
||||
INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1,'action','editComment'),
|
||||
@@ -1516,28 +1516,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1,'program','PGMStakeholder'),
|
||||
(1,'program','PGMStart'),
|
||||
(1,'program','PGMSuspend'),
|
||||
(1,'program','PRJActivate'),
|
||||
(1,'program','PRJAddWhitelist'),
|
||||
(1,'program','PRJBrowse'),
|
||||
(1,'program','PRJClose'),
|
||||
(1,'program','PRJCopyGroup'),
|
||||
(1,'program','PRJCreate'),
|
||||
(1,'program','PRJCreateGroup'),
|
||||
(1,'program','PRJDelete'),
|
||||
(1,'program','PRJEdit'),
|
||||
(1,'program','PRJEditGroup'),
|
||||
(1,'program','PRJGroup'),
|
||||
(1,'program','PRJManageGroupMember'),
|
||||
(1,'program','PRJManageMembers'),
|
||||
(1,'program','PRJManagePriv'),
|
||||
(1,'program','PRJManageProducts'),
|
||||
(1,'program','PRJManageView'),
|
||||
(1,'program','PRJProgramTitle'),
|
||||
(1,'program','PRJStart'),
|
||||
(1,'program','PRJSuspend'),
|
||||
(1,'program','PRJView'),
|
||||
(1,'program','PRJUpdateOrder'),
|
||||
(1,'program','PRJWhitelist'),
|
||||
(1,'program','activate'),
|
||||
(1,'program','addWhitelist'),
|
||||
(1,'program','browse'),
|
||||
(1,'program','close'),
|
||||
(1,'program','copyGroup'),
|
||||
(1,'program','create'),
|
||||
(1,'program','createGroup'),
|
||||
(1,'program','delete'),
|
||||
(1,'program','edit'),
|
||||
(1,'program','editGroup'),
|
||||
(1,'program','group'),
|
||||
(1,'program','manageGroupMember'),
|
||||
(1,'program','manageMembers'),
|
||||
(1,'program','managePriv'),
|
||||
(1,'program','manageProducts'),
|
||||
(1,'program','manageView'),
|
||||
(1,'program','programTitle'),
|
||||
(1,'program','start'),
|
||||
(1,'program','suspend'),
|
||||
(1,'program','view'),
|
||||
(1,'program','updateOrder'),
|
||||
(1,'program','whitelist'),
|
||||
(1,'program','unbindWhielist'),
|
||||
(1,'program','unlinkStakeholder'),
|
||||
(1,'program','view'),
|
||||
@@ -2324,28 +2324,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(4,'program','PGMStakeholder'),
|
||||
(4,'program','PGMStart'),
|
||||
(4,'program','PGMSuspend'),
|
||||
(4,'program','PRJActivate'),
|
||||
(4,'program','PRJAddWhitelist'),
|
||||
(4,'program','PRJBrowse'),
|
||||
(4,'program','PRJClose'),
|
||||
(4,'program','PRJCopyGroup'),
|
||||
(4,'program','PRJCreate'),
|
||||
(4,'program','PRJCreateGroup'),
|
||||
(4,'program','PRJDelete'),
|
||||
(4,'program','PRJEdit'),
|
||||
(4,'program','PRJEditGroup'),
|
||||
(4,'program','PRJGroup'),
|
||||
(4,'program','PRJManageGroupMember'),
|
||||
(4,'program','PRJManageMembers'),
|
||||
(4,'program','PRJManagePriv'),
|
||||
(4,'program','PRJManageProducts'),
|
||||
(4,'program','PRJManageView'),
|
||||
(4,'program','PRJProgramTitle'),
|
||||
(4,'program','PRJStart'),
|
||||
(4,'program','PRJSuspend'),
|
||||
(4,'program','PRJUpdateOrder'),
|
||||
(4,'program','PRJView'),
|
||||
(4,'program','PRJWhitelist'),
|
||||
(4,'program','activate'),
|
||||
(4,'program','addWhitelist'),
|
||||
(4,'program','browse'),
|
||||
(4,'program','close'),
|
||||
(4,'program','copyGroup'),
|
||||
(4,'program','create'),
|
||||
(4,'program','createGroup'),
|
||||
(4,'program','delete'),
|
||||
(4,'program','edit'),
|
||||
(4,'program','editGroup'),
|
||||
(4,'program','group'),
|
||||
(4,'program','manageGroupMember'),
|
||||
(4,'program','manageMembers'),
|
||||
(4,'program','managePriv'),
|
||||
(4,'program','manageProducts'),
|
||||
(4,'program','manageView'),
|
||||
(4,'program','programTitle'),
|
||||
(4,'program','start'),
|
||||
(4,'program','suspend'),
|
||||
(4,'program','updateOrder'),
|
||||
(4,'program','view'),
|
||||
(4,'program','whitelist'),
|
||||
(4,'program','unbindWhielist'),
|
||||
(4,'program','unlinkStakeholder'),
|
||||
(4,'program','view'),
|
||||
@@ -2630,28 +2630,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(5,'program','PGMStakeholder'),
|
||||
(5,'program','PGMStart'),
|
||||
(5,'program','PGMSuspend'),
|
||||
(5,'program','PRJActivate'),
|
||||
(5,'program','PRJAddWhitelist'),
|
||||
(5,'program','PRJBrowse'),
|
||||
(5,'program','PRJClose'),
|
||||
(5,'program','PRJCopyGroup'),
|
||||
(5,'program','PRJCreate'),
|
||||
(5,'program','PRJCreateGroup'),
|
||||
(5,'program','PRJDelete'),
|
||||
(5,'program','PRJEdit'),
|
||||
(5,'program','PRJEditGroup'),
|
||||
(5,'program','PRJGroup'),
|
||||
(5,'program','PRJManageGroupMember'),
|
||||
(5,'program','PRJManageMembers'),
|
||||
(5,'program','PRJManagePriv'),
|
||||
(5,'program','PRJManageProducts'),
|
||||
(5,'program','PRJManageView'),
|
||||
(5,'program','PRJProgramTitle'),
|
||||
(5,'program','PRJStart'),
|
||||
(5,'program','PRJSuspend'),
|
||||
(5,'program','PRJView'),
|
||||
(5,'program','PRJUpdateOrder'),
|
||||
(5,'program','PRJWhitelist'),
|
||||
(5,'program','activate'),
|
||||
(5,'program','addWhitelist'),
|
||||
(5,'program','browse'),
|
||||
(5,'program','close'),
|
||||
(5,'program','copyGroup'),
|
||||
(5,'program','create'),
|
||||
(5,'program','createGroup'),
|
||||
(5,'program','delete'),
|
||||
(5,'program','edit'),
|
||||
(5,'program','editGroup'),
|
||||
(5,'program','group'),
|
||||
(5,'program','manageGroupMember'),
|
||||
(5,'program','manageMembers'),
|
||||
(5,'program','managePriv'),
|
||||
(5,'program','manageProducts'),
|
||||
(5,'program','manageView'),
|
||||
(5,'program','programTitle'),
|
||||
(5,'program','start'),
|
||||
(5,'program','suspend'),
|
||||
(5,'program','view'),
|
||||
(5,'program','updateOrder'),
|
||||
(5,'program','whitelist'),
|
||||
(5,'program','unbindWhielist'),
|
||||
(5,'program','unlinkStakeholder'),
|
||||
(5,'project','activate'),
|
||||
@@ -2924,28 +2924,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(6,'program','PGMStakeholder'),
|
||||
(6,'program','PGMStart'),
|
||||
(6,'program','PGMSuspend'),
|
||||
(6,'program','PRJActivate'),
|
||||
(6,'program','PRJAddWhitelist'),
|
||||
(6,'program','PRJBrowse'),
|
||||
(6,'program','PRJClose'),
|
||||
(6,'program','PRJCopyGroup'),
|
||||
(6,'program','PRJCreate'),
|
||||
(6,'program','PRJCreateGroup'),
|
||||
(6,'program','PRJDelete'),
|
||||
(6,'program','PRJEdit'),
|
||||
(6,'program','PRJEditGroup'),
|
||||
(6,'program','PRJGroup'),
|
||||
(6,'program','PRJManageGroupMember'),
|
||||
(6,'program','PRJManageMembers'),
|
||||
(6,'program','PRJManagePriv'),
|
||||
(6,'program','PRJManageProducts'),
|
||||
(6,'program','PRJManageView'),
|
||||
(6,'program','PRJProgramTitle'),
|
||||
(6,'program','PRJStart'),
|
||||
(6,'program','PRJSuspend'),
|
||||
(6,'program','PRJView'),
|
||||
(6,'program','PRJUpdateOrder'),
|
||||
(6,'program','PRJWhitelist'),
|
||||
(6,'program','activate'),
|
||||
(6,'program','addWhitelist'),
|
||||
(6,'program','browse'),
|
||||
(6,'program','close'),
|
||||
(6,'program','copyGroup'),
|
||||
(6,'program','create'),
|
||||
(6,'program','createGroup'),
|
||||
(6,'program','delete'),
|
||||
(6,'program','edit'),
|
||||
(6,'program','editGroup'),
|
||||
(6,'program','group'),
|
||||
(6,'program','manageGroupMember'),
|
||||
(6,'program','manageMembers'),
|
||||
(6,'program','managePriv'),
|
||||
(6,'program','manageProducts'),
|
||||
(6,'program','manageView'),
|
||||
(6,'program','programTitle'),
|
||||
(6,'program','start'),
|
||||
(6,'program','suspend'),
|
||||
(6,'program','view'),
|
||||
(6,'program','updateOrder'),
|
||||
(6,'program','whitelist'),
|
||||
(6,'program','unbindWhielist'),
|
||||
(6,'program','unlinkStakeholder'),
|
||||
(6,'project','activate'),
|
||||
@@ -3211,28 +3211,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(7,'program','PGMStakeholder'),
|
||||
(7,'program','PGMStart'),
|
||||
(7,'program','PGMSuspend'),
|
||||
(7,'program','PRJActivate'),
|
||||
(7,'program','PRJAddWhitelist'),
|
||||
(7,'program','PRJBrowse'),
|
||||
(7,'program','PRJClose'),
|
||||
(7,'program','PRJCopyGroup'),
|
||||
(7,'program','PRJCreate'),
|
||||
(7,'program','PRJCreateGroup'),
|
||||
(7,'program','PRJDelete'),
|
||||
(7,'program','PRJEdit'),
|
||||
(7,'program','PRJEditGroup'),
|
||||
(7,'program','PRJGroup'),
|
||||
(7,'program','PRJManageGroupMember'),
|
||||
(7,'program','PRJManageMembers'),
|
||||
(7,'program','PRJManagePriv'),
|
||||
(7,'program','PRJManageProducts'),
|
||||
(7,'program','PRJManageView'),
|
||||
(7,'program','PRJProgramTitle'),
|
||||
(7,'program','PRJStart'),
|
||||
(7,'program','PRJSuspend'),
|
||||
(7,'program','PRJView'),
|
||||
(7,'program','PRJUpdateOrder'),
|
||||
(7,'program','PRJWhitelist'),
|
||||
(7,'program','activate'),
|
||||
(7,'program','addWhitelist'),
|
||||
(7,'program','browse'),
|
||||
(7,'program','close'),
|
||||
(7,'program','copyGroup'),
|
||||
(7,'program','create'),
|
||||
(7,'program','createGroup'),
|
||||
(7,'program','delete'),
|
||||
(7,'program','edit'),
|
||||
(7,'program','editGroup'),
|
||||
(7,'program','group'),
|
||||
(7,'program','manageGroupMember'),
|
||||
(7,'program','manageMembers'),
|
||||
(7,'program','managePriv'),
|
||||
(7,'program','manageProducts'),
|
||||
(7,'program','manageView'),
|
||||
(7,'program','programTitle'),
|
||||
(7,'program','start'),
|
||||
(7,'program','suspend'),
|
||||
(7,'program','view'),
|
||||
(7,'program','updateOrder'),
|
||||
(7,'program','whitelist'),
|
||||
(7,'program','unbindWhielist'),
|
||||
(7,'program','unlinkStakeholder'),
|
||||
(7,'project','all'),
|
||||
@@ -3480,28 +3480,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(8,'program','PGMStakeholder'),
|
||||
(8,'program','PGMStart'),
|
||||
(8,'program','PGMSuspend'),
|
||||
(8,'program','PRJActivate'),
|
||||
(8,'program','PRJAddWhitelist'),
|
||||
(8,'program','PRJBrowse'),
|
||||
(8,'program','PRJClose'),
|
||||
(8,'program','PRJCopyGroup'),
|
||||
(8,'program','PRJCreate'),
|
||||
(8,'program','PRJCreateGroup'),
|
||||
(8,'program','PRJDelete'),
|
||||
(8,'program','PRJEdit'),
|
||||
(8,'program','PRJEditGroup'),
|
||||
(8,'program','PRJGroup'),
|
||||
(8,'program','PRJManageGroupMember'),
|
||||
(8,'program','PRJManageMembers'),
|
||||
(8,'program','PRJManagePriv'),
|
||||
(8,'program','PRJManageProducts'),
|
||||
(8,'program','PRJManageView'),
|
||||
(8,'program','PRJProgramTitle'),
|
||||
(8,'program','PRJStart'),
|
||||
(8,'program','PRJSuspend'),
|
||||
(8,'program','PRJView'),
|
||||
(8,'program','PRJUpdateOrder'),
|
||||
(8,'program','PRJWhitelist'),
|
||||
(8,'program','activate'),
|
||||
(8,'program','addWhitelist'),
|
||||
(8,'program','browse'),
|
||||
(8,'program','close'),
|
||||
(8,'program','copyGroup'),
|
||||
(8,'program','create'),
|
||||
(8,'program','createGroup'),
|
||||
(8,'program','delete'),
|
||||
(8,'program','edit'),
|
||||
(8,'program','editGroup'),
|
||||
(8,'program','group'),
|
||||
(8,'program','manageGroupMember'),
|
||||
(8,'program','manageMembers'),
|
||||
(8,'program','managePriv'),
|
||||
(8,'program','manageProducts'),
|
||||
(8,'program','manageView'),
|
||||
(8,'program','programTitle'),
|
||||
(8,'program','start'),
|
||||
(8,'program','suspend'),
|
||||
(8,'program','view'),
|
||||
(8,'program','updateOrder'),
|
||||
(8,'program','whitelist'),
|
||||
(8,'program','unbindWhielist'),
|
||||
(8,'program','unlinkStakeholder'),
|
||||
(8,'project','all'),
|
||||
@@ -3759,28 +3759,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(9,'program','PGMStakeholder'),
|
||||
(9,'program','PGMStart'),
|
||||
(9,'program','PGMSuspend'),
|
||||
(9,'program','PRJActivate'),
|
||||
(9,'program','PRJAddWhitelist'),
|
||||
(9,'program','PRJBrowse'),
|
||||
(9,'program','PRJClose'),
|
||||
(9,'program','PRJCopyGroup'),
|
||||
(9,'program','PRJCreate'),
|
||||
(9,'program','PRJCreateGroup'),
|
||||
(9,'program','PRJDelete'),
|
||||
(9,'program','PRJEdit'),
|
||||
(9,'program','PRJEditGroup'),
|
||||
(9,'program','PRJGroup'),
|
||||
(9,'program','PRJManageGroupMember'),
|
||||
(9,'program','PRJManageMembers'),
|
||||
(9,'program','PRJManagePriv'),
|
||||
(9,'program','PRJManageProducts'),
|
||||
(9,'program','PRJManageView'),
|
||||
(9,'program','PRJProgramTitle'),
|
||||
(9,'program','PRJStart'),
|
||||
(9,'program','PRJSuspend'),
|
||||
(9,'program','PRJView'),
|
||||
(9,'program','PRJUpdateOrder'),
|
||||
(9,'program','PRJWhitelist'),
|
||||
(9,'program','activate'),
|
||||
(9,'program','addWhitelist'),
|
||||
(9,'program','browse'),
|
||||
(9,'program','close'),
|
||||
(9,'program','copyGroup'),
|
||||
(9,'program','create'),
|
||||
(9,'program','createGroup'),
|
||||
(9,'program','delete'),
|
||||
(9,'program','edit'),
|
||||
(9,'program','editGroup'),
|
||||
(9,'program','group'),
|
||||
(9,'program','manageGroupMember'),
|
||||
(9,'program','manageMembers'),
|
||||
(9,'program','managePriv'),
|
||||
(9,'program','manageProducts'),
|
||||
(9,'program','manageView'),
|
||||
(9,'program','programTitle'),
|
||||
(9,'program','start'),
|
||||
(9,'program','suspend'),
|
||||
(9,'program','view'),
|
||||
(9,'program','updateOrder'),
|
||||
(9,'program','whitelist'),
|
||||
(9,'program','unbindWhielist'),
|
||||
(9,'program','unlinkStakeholder'),
|
||||
(9,'project','all'),
|
||||
@@ -4130,9 +4130,9 @@ INSERT INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VA
|
||||
('zh-cn', 'custom', 'URSRList', '3', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u9700\\u6c42\"}', '1'),
|
||||
('zh-cn', 'custom', 'URSRList', '4', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u53f2\\u8bd7\"}', '1');
|
||||
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'hourPoint', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProduct', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProject', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'hourPoint', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProduct', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRExecution', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'URSR', '3');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'program', '', 'unitList', 'CNY,USD');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'program', '', 'defaultCurrency', 'CNY');
|
||||
|
||||
+195
-195
File diff suppressed because it is too large
Load Diff
+32
-32
@@ -392,7 +392,7 @@ class commonModel extends model
|
||||
{
|
||||
if($group == 'program')
|
||||
{
|
||||
$link = helper::createLink($menuItem->link['module'], $menuItem->link['method'], $vars, '', '', $app->session->PRJ);
|
||||
$link = helper::createLink($menuItem->link['module'], $menuItem->link['method'], $vars, '', '', $app->session->project);
|
||||
}
|
||||
elseif($group == 'product' && $menuItem->name == 'doc')
|
||||
{
|
||||
@@ -472,7 +472,7 @@ class commonModel extends model
|
||||
if(isset($lang->$model->subMenu->$key))
|
||||
{
|
||||
$programSubMenu = $lang->$model->subMenu->$key;
|
||||
$subMenu = common::createSubMenu($programSubMenu, $app->session->PRJ);
|
||||
$subMenu = common::createSubMenu($programSubMenu, $app->session->project);
|
||||
|
||||
if(!empty($subMenu))
|
||||
{
|
||||
@@ -592,6 +592,7 @@ class commonModel extends model
|
||||
|
||||
$item = new stdClass();
|
||||
$item->group = $group;
|
||||
$item->code = $group;
|
||||
$item->active = zget($lang->navGroup, $moduleName, '') == $group || $moduleName != 'program' && $moduleName == $group;
|
||||
$item->title = $title;
|
||||
$item->moduleName = $currentModule;
|
||||
@@ -747,9 +748,8 @@ class commonModel extends model
|
||||
foreach ($lang->searchObjects as $key => $value)
|
||||
{
|
||||
$class = $key == $searchObject ? "class='selected'" : '';
|
||||
if($key == 'program') $key = 'program-pgmproduct';
|
||||
if($key == 'project') $key = 'program-index';
|
||||
if($key == 'execution') $key = 'project-view';
|
||||
if($key == 'program') $key = 'program-product';
|
||||
if($key == 'project') $key = 'project-index';
|
||||
if($key == 'deploystep') $key = 'deploy-viewstep';
|
||||
|
||||
echo "<li $class><a href='javascript:$.setSearchType(\"$key\");' data-value='{$key}'>{$value}</a></li>";
|
||||
@@ -1057,7 +1057,7 @@ class commonModel extends model
|
||||
{
|
||||
/* Add data-group attribute. */
|
||||
global $app;
|
||||
if(strpos($misc, 'data-group') === false) $misc .= ' data-group="' . $app->openGroup . '"';
|
||||
if(strpos($misc, 'data-group') === false) $misc .= ' data-group="' . $app->openApp . '"';
|
||||
|
||||
if(!commonModel::hasPriv($module, $method, $object)) return false;
|
||||
echo html::a(helper::createLink($module, $method, $vars, '', $onlyBody), $label, $target, $misc, $newline);
|
||||
@@ -1151,7 +1151,7 @@ EOD;
|
||||
global $app, $lang, $config;
|
||||
|
||||
/* Add data-group attribute. */
|
||||
if(strpos($misc, 'data-group') === false) $misc .= ' data-group="' . $app->openGroup . '"';
|
||||
if(strpos($misc, 'data-group') === false) $misc .= ' data-group="' . $app->openApp . '"';
|
||||
|
||||
/* Judge the $method of $module clickable or not, default is clickable. */
|
||||
$clickable = true;
|
||||
@@ -1169,7 +1169,7 @@ EOD;
|
||||
if(strtolower($module) == 'story' and strtolower($method) == 'createcase') ($module = 'testcase') and ($method = 'create');
|
||||
if(strtolower($module) == 'bug' and strtolower($method) == 'tostory') ($module = 'story') and ($method = 'create');
|
||||
if(strtolower($module) == 'bug' and strtolower($method) == 'createcase') ($module = 'testcase') and ($method = 'create');
|
||||
if($config->systemMode == 'classic' and strtolower($module) == 'program' and strpos($method, 'PRJ') === 0) ($module = 'project') and ($method = substr(strtolower($method), 3));
|
||||
if($config->systemMode == 'classic' and strtolower($module) == 'project') $method = substr(strtolower($method), 3);
|
||||
if(!commonModel::hasPriv($module, $method, $object)) return false;
|
||||
$link = helper::createLink($module, $method, $vars, '', $onlyBody, $programID);
|
||||
|
||||
@@ -1727,7 +1727,7 @@ EOD;
|
||||
if(!defined('IN_UPGRADE') and $inProject)
|
||||
{
|
||||
/* Check program priv. */
|
||||
if($this->session->PRJ and strpos(",{$this->app->user->view->projects},", ",{$this->session->PRJ},") === false and !$this->app->user->admin) $this->loadModel('program')->accessDenied();
|
||||
if($this->session->project and strpos(",{$this->app->user->view->projects},", ",{$this->session->project},") === false and !$this->app->user->admin) $this->loadModel('program')->accessDenied();
|
||||
$this->resetProgramPriv($module, $method);
|
||||
if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method, false);
|
||||
}
|
||||
@@ -1768,7 +1768,7 @@ EOD;
|
||||
/* If is the program admin, have all program privs. */
|
||||
$inProject = isset($lang->navGroup->$module) && $lang->navGroup->$module == 'project';
|
||||
if($module == 'program' && strpos($method, 'prj') !== false) $inProject = true;
|
||||
if($inProject && $app->session->PRJ && strpos(",{$app->user->rights['projects']},", ",{$app->session->PRJ},") !== false) return true;
|
||||
if($inProject && $app->session->project && strpos(",{$app->user->rights['projects']},", ",{$app->session->project},") !== false) return true;
|
||||
|
||||
/* If not super admin, check the rights. */
|
||||
$rights = $app->user->rights['rights'];
|
||||
@@ -1808,8 +1808,8 @@ EOD;
|
||||
public function resetProgramPriv($module, $method)
|
||||
{
|
||||
/* Get user program priv. */
|
||||
if(!$this->app->session->PRJ) return;
|
||||
$program = $this->dao->findByID($this->app->session->PRJ)->from(TABLE_PROJECT)->fetch();
|
||||
if(!$this->app->session->project) return;
|
||||
$program = $this->dao->findByID($this->app->session->project)->from(TABLE_PROJECT)->fetch();
|
||||
$programRights = $this->dao->select('t3.module, t3.method')->from(TABLE_GROUP)->alias('t1')
|
||||
->leftJoin(TABLE_USERGROUP)->alias('t2')->on('t1.id = t2.group')
|
||||
->leftJoin(TABLE_GROUPPRIV)->alias('t3')->on('t2.group=t3.group')
|
||||
@@ -1855,20 +1855,20 @@ EOD;
|
||||
if($module == 'todo' and ($method == 'create' or $method == 'batchcreate')) return true;
|
||||
if($module == 'effort' and ($method == 'batchcreate' or $method == 'createforobject')) return true;
|
||||
|
||||
/* Limited project. */
|
||||
$limitedProject = false;
|
||||
if(!empty($module) && $module == 'task' && !empty($object->project) or
|
||||
!empty($module) && $module == 'project' && !empty($object->id)
|
||||
/* Limited execution. */
|
||||
$limitedExecution = false;
|
||||
if(!empty($module) && $module == 'task' && !empty($object->execution) or
|
||||
!empty($module) && $module == 'execution' && !empty($object->id)
|
||||
)
|
||||
{
|
||||
$objectID = '';
|
||||
if($module == 'project' and !empty($object->id)) $objectID = $object->id;
|
||||
if($module == 'task' and !empty($object->project))$objectID = $object->project;
|
||||
if($module == 'execution' and !empty($object->id)) $objectID = $object->id;
|
||||
if($module == 'task' and !empty($object->execution))$objectID = $object->execution;
|
||||
|
||||
$limitedProjects = !empty($_SESSION['limitedProjects']) ? $_SESSION['limitedProjects'] : '';
|
||||
if($objectID and strpos(",{$limitedProjects},", ",$objectID,") !== false) $limitedProject = true;
|
||||
$limitedExecutions = !empty($_SESSION['limitedExecutions']) ? $_SESSION['limitedExecutions'] : '';
|
||||
if($objectID and strpos(",{$limitedExecutions},", ",$objectID,") !== false) $limitedExecution = true;
|
||||
}
|
||||
if(empty($app->user->rights['rights']['my']['limited']) && !$limitedProject) return true;
|
||||
if(empty($app->user->rights['rights']['my']['limited']) && !$limitedExecution) return true;
|
||||
|
||||
if(!empty($method) && strpos($method, 'batch') === 0) return false;
|
||||
if(!empty($method) && strpos($method, 'link') === 0) return false;
|
||||
@@ -2176,12 +2176,12 @@ EOD;
|
||||
if($product->status == 'closed') return false;
|
||||
}
|
||||
|
||||
/* Check the project is closed. */
|
||||
/* Check the execution is closed. */
|
||||
$productModuleList = array('story', 'bug', 'testtask');
|
||||
if(!in_array($module, $productModuleList) and !empty($object->project) and is_numeric($object->project) and empty($config->CRProject))
|
||||
if(!in_array($module, $productModuleList) and !empty($object->execution) and is_numeric($object->execution) and empty($config->CRExecution))
|
||||
{
|
||||
$project = $app->control->loadModel('project')->getByID($object->project);
|
||||
if($project->status == 'closed') return false;
|
||||
$execution = $app->control->loadModel('execution')->getByID($object->execution);
|
||||
if($execution->status == 'closed') return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2190,7 +2190,7 @@ EOD;
|
||||
/**
|
||||
* Check object can modify.
|
||||
*
|
||||
* @param string $type product|project
|
||||
* @param string $type product|Execution
|
||||
* @param object $object
|
||||
* @static
|
||||
* @access public
|
||||
@@ -2200,8 +2200,8 @@ EOD;
|
||||
{
|
||||
global $config;
|
||||
|
||||
if($type == 'product' and empty($config->CRProduct) and $object->status == 'closed') return false;
|
||||
if($type == 'project' and empty($config->CRProject) and $object->status == 'closed') return false;
|
||||
if($type == 'product' and empty($config->CRProduct) and $object->status == 'closed') return false;
|
||||
if($type == 'execution' and empty($config->CRExecution) and $object->status == 'closed') return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -2381,8 +2381,8 @@ EOD;
|
||||
$link = is_array($setting) ? $setting['link'] : $setting;
|
||||
|
||||
if(strpos($link, "{PRODUCT}") !== false) $link = str_replace('{PRODUCT}', $app->session->product, $link);
|
||||
if(strpos($link, "{EXECUTION}") !== false) $link = str_replace('{EXECUTION}', $app->session->project, $link);
|
||||
if(strpos($link, "{PROJECT}") !== false) $link = str_replace('{PROJECT}', $app->session->PRJ, $link);
|
||||
if(strpos($link, "{EXECUTION}") !== false) $link = str_replace('{EXECUTION}', $app->session->execution, $link);
|
||||
if(strpos($link, "{PROJECT}") !== false) $link = str_replace('{PROJECT}', $app->session->project, $link);
|
||||
|
||||
if(is_array($setting))
|
||||
{
|
||||
@@ -2410,7 +2410,7 @@ EOD;
|
||||
public static function getProgramMainMenu($moduleName)
|
||||
{
|
||||
global $app, $lang, $dbh, $config;
|
||||
$program = $dbh->query("SELECT * FROM " . TABLE_PROGRAM . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
|
||||
$program = $dbh->query("SELECT * FROM " . TABLE_PROGRAM . " WHERE `id` = '{$app->session->project}'")->fetch();
|
||||
if(empty($program)) return;
|
||||
|
||||
self::initProgramSubmenu();
|
||||
@@ -2445,7 +2445,7 @@ EOD;
|
||||
public static function getProgramModuleMenu($moduleName, $methodName)
|
||||
{
|
||||
global $app, $lang, $dbh;
|
||||
$program = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
|
||||
$program = $dbh->query("SELECT * FROM " . TABLE_PROJECT . " WHERE `id` = '{$app->session->project}'")->fetch();
|
||||
if(empty($program)) return;
|
||||
if($program->model == 'waterfall')
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ $(function()
|
||||
<td class='w-150px'><?php echo $lang->datatable->showModule;?></td>
|
||||
<td><?php echo html::radio('showModule', $lang->datatable->showModuleList, isset($config->datatable->$datatableId->showModule) ? $config->datatable->$datatableId->showModule : '');?></td>
|
||||
</tr>
|
||||
<?php if($app->moduleName == 'project' && $app->methodName == 'task'):?>
|
||||
<?php if($app->moduleName == 'execution' && $app->methodName == 'task'):?>
|
||||
<tr>
|
||||
<td><?php echo $lang->datatable->showAllModule;?></td>
|
||||
<td><?php echo html::radio('showAllModule', $lang->datatable->showAllModuleList, isset($config->project->task->allModule) ? $config->project->task->allModule : 0);?></td>
|
||||
|
||||
@@ -23,7 +23,7 @@ $isQa = $rawModule == 'qa';
|
||||
<?php if($isQa) echo isset($lang->qa->switcherMenu) ? $lang->qa->switcherMenu : '';?>
|
||||
<?php if($this->config->systemMode == 'new'):?>
|
||||
<?php if($isProgram) echo isset($lang->program->switcherMenu) ? $lang->program->switcherMenu : '';?>
|
||||
<?php if($isProject) echo $this->loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
|
||||
<?php if($isProject) echo $this->loadModel('project')->getSwitcher($this->session->project, $app->rawModule, $app->rawMethod);?>
|
||||
<?php elseif($this->config->systemMode == 'classic'):?>
|
||||
<?php if($isProject) echo isset($lang->project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
$config->datatable->moduleAlias['product-browse'] = 'story';
|
||||
$config->datatable->moduleAlias['project-task'] = 'task';
|
||||
$config->datatable->moduleAlias['execution-task'] = 'task';
|
||||
$config->datatable->moduleAlias['testtask-cases'] = 'testcase';
|
||||
|
||||
@@ -37,7 +37,7 @@ class datatable extends control
|
||||
|
||||
$name = 'datatable.' . $this->post->target . '.' . $this->post->name;
|
||||
$this->loadModel('setting')->setItem($account . '.' . $name, $this->post->value);
|
||||
if($this->post->allModule !== false) $this->setting->setItem("$account.project.task.allModule", $this->post->allModule);
|
||||
if($this->post->allModule !== false) $this->setting->setItem("$account.execution.task.allModule", $this->post->allModule);
|
||||
if($this->post->global) $this->setting->setItem('system.' . $name, $this->post->value);
|
||||
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => 'dao error.'));
|
||||
|
||||
@@ -12,11 +12,12 @@ $config->dev->group['release'] = 'product';
|
||||
$config->dev->group['project'] = 'project';
|
||||
$config->dev->group['projectproduct'] = 'project';
|
||||
$config->dev->group['projectstory'] = 'project';
|
||||
$config->dev->group['task'] = 'project';
|
||||
$config->dev->group['taskestimate'] = 'project';
|
||||
$config->dev->group['team'] = 'project';
|
||||
$config->dev->group['build'] = 'project';
|
||||
$config->dev->group['burn'] = 'project';
|
||||
$config->dev->group['execution'] = 'execution';
|
||||
$config->dev->group['task'] = 'execution';
|
||||
$config->dev->group['taskestimate'] = 'execution';
|
||||
$config->dev->group['team'] = 'execution';
|
||||
$config->dev->group['build'] = 'execution';
|
||||
$config->dev->group['burn'] = 'execution';
|
||||
$config->dev->group['qa'] = 'qa';
|
||||
$config->dev->group['bug'] = 'qa';
|
||||
$config->dev->group['case'] = 'qa';
|
||||
@@ -92,7 +93,7 @@ $config->dev->tableMap['burn'] = 'task';
|
||||
$config->dev->tableMap['projectproduct'] = 'project';
|
||||
$config->dev->tableMap['projectstory'] = 'story';
|
||||
$config->dev->tableMap['taskestimate'] = 'task';
|
||||
$config->dev->tableMap['team'] = 'project';
|
||||
$config->dev->tableMap['team'] = 'execution';
|
||||
$config->dev->tableMap['case'] = 'testcase';
|
||||
$config->dev->tableMap['casestep'] = 'testcase';
|
||||
$config->dev->tableMap['testresult'] = 'testtask';
|
||||
@@ -135,7 +136,7 @@ $config->dev->postParams['bug']['create']['title'] = 'string';
|
||||
$config->dev->postParams['bug']['create']['openedBuild'] = 'int|trunk';
|
||||
$config->dev->postParams['bug']['create']['branch'] = 'int';
|
||||
$config->dev->postParams['bug']['create']['module'] = 'int';
|
||||
$config->dev->postParams['bug']['create']['project'] = 'int';
|
||||
$config->dev->postParams['bug']['create']['execution'] = 'int';
|
||||
$config->dev->postParams['bug']['create']['assignedTo'] = 'string';
|
||||
$config->dev->postParams['bug']['create']['deadline'] = 'date';
|
||||
$config->dev->postParams['bug']['create']['type'] = 'string';
|
||||
@@ -148,7 +149,7 @@ $config->dev->postParams['bug']['create']['steps'] = 'string';
|
||||
$config->dev->postParams['bug']['create']['mailto'] = 'string';
|
||||
$config->dev->postParams['bug']['create']['keywords'] = 'string';
|
||||
|
||||
$config->dev->postParams['task']['create']['project'] = 'int';
|
||||
$config->dev->postParams['task']['create']['execution'] = 'int';
|
||||
$config->dev->postParams['task']['create']['type'] = 'string';
|
||||
$config->dev->postParams['task']['create']['name'] = 'string';
|
||||
$config->dev->postParams['task']['create']['module'] = 'int';
|
||||
|
||||
+17
-14
@@ -50,9 +50,10 @@ $lang->dev->tableList['lang'] = 'Sprache';
|
||||
$lang->dev->tableList['module'] = 'Modul';
|
||||
$lang->dev->tableList['product'] = $lang->productCommon;
|
||||
$lang->dev->tableList['productplan'] = $lang->productCommon . 'Plan';
|
||||
$lang->dev->tableList['project'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->executionCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->executionCommon . 'Story';
|
||||
$lang->dev->tableList['project'] = $lang->projectCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->projectCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->projectCommon . 'Story';
|
||||
$lang->dev->tableList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['release'] = 'Release';
|
||||
$lang->dev->tableList['story'] = 'Story';
|
||||
$lang->dev->tableList['storyspec'] = 'Beschreibung';
|
||||
@@ -117,17 +118,19 @@ $lang->dev->tableList['job'] = 'Job';
|
||||
$lang->dev->tableList['searchdict'] = 'Search dict';
|
||||
$lang->dev->tableList['searchindex'] = 'Search index';
|
||||
|
||||
$lang->dev->groupList['my'] = 'Dashboard';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = 'QA';
|
||||
$lang->dev->groupList['doc'] = 'Dok';
|
||||
$lang->dev->groupList['report'] = 'Report';
|
||||
$lang->dev->groupList['company'] = 'Unternehmen';
|
||||
$lang->dev->groupList['repo'] = 'CI';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = 'Message';
|
||||
$lang->dev->groupList['search'] = 'Search';
|
||||
$lang->dev->groupList['my'] = 'Dashboard';
|
||||
$lang->dev->groupList['program'] = 'Program';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->projectCommon;
|
||||
$lang->dev->groupList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = 'QA';
|
||||
$lang->dev->groupList['doc'] = 'Dok';
|
||||
$lang->dev->groupList['report'] = 'Report';
|
||||
$lang->dev->groupList['company'] = 'Unternehmen';
|
||||
$lang->dev->groupList['repo'] = 'CI';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = 'Message';
|
||||
$lang->dev->groupList['search'] = 'Search';
|
||||
|
||||
$lang->dev->endGroupList['admin'] = 'Admin';
|
||||
$lang->dev->endGroupList['system'] = 'System';
|
||||
|
||||
+17
-14
@@ -50,9 +50,10 @@ $lang->dev->tableList['lang'] = 'Language';
|
||||
$lang->dev->tableList['module'] = 'Module';
|
||||
$lang->dev->tableList['product'] = $lang->productCommon;
|
||||
$lang->dev->tableList['productplan'] = $lang->productCommon . 'Plan';
|
||||
$lang->dev->tableList['project'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->executionCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->executionCommon . 'Story';
|
||||
$lang->dev->tableList['project'] = $lang->projectCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->projectCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->projectCommon . 'Story';
|
||||
$lang->dev->tableList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['release'] = 'Release';
|
||||
$lang->dev->tableList['story'] = 'Story';
|
||||
$lang->dev->tableList['storyspec'] = 'Story Description';
|
||||
@@ -117,17 +118,19 @@ $lang->dev->tableList['job'] = 'Job';
|
||||
$lang->dev->tableList['searchdict'] = 'Search dict';
|
||||
$lang->dev->tableList['searchindex'] = 'Search index';
|
||||
|
||||
$lang->dev->groupList['my'] = 'Dashboard';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = 'Test';
|
||||
$lang->dev->groupList['doc'] = 'Doc';
|
||||
$lang->dev->groupList['report'] = 'Report';
|
||||
$lang->dev->groupList['company'] = 'Company';
|
||||
$lang->dev->groupList['repo'] = 'CI';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = 'Message';
|
||||
$lang->dev->groupList['search'] = 'Search';
|
||||
$lang->dev->groupList['my'] = 'Dashboard';
|
||||
$lang->dev->groupList['program'] = 'Program';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->projectCommon;
|
||||
$lang->dev->groupList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = 'Test';
|
||||
$lang->dev->groupList['doc'] = 'Doc';
|
||||
$lang->dev->groupList['report'] = 'Report';
|
||||
$lang->dev->groupList['company'] = 'Company';
|
||||
$lang->dev->groupList['repo'] = 'CI';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = 'Message';
|
||||
$lang->dev->groupList['search'] = 'Search';
|
||||
|
||||
$lang->dev->endGroupList['admin'] = 'Admin';
|
||||
$lang->dev->endGroupList['system'] = 'System';
|
||||
|
||||
+36
-33
@@ -1,23 +1,23 @@
|
||||
<?php
|
||||
$lang->dev->common = 'Développeur';
|
||||
$lang->dev->common = 'D?veloppeur';
|
||||
$lang->dev->api = 'API';
|
||||
$lang->dev->db = 'Base de Données';
|
||||
$lang->dev->db = 'Base de Donn?es';
|
||||
$lang->dev->editor = 'Editeur';
|
||||
$lang->dev->translate = 'Translate';
|
||||
$lang->dev->dbList = 'Bases de Données';
|
||||
$lang->dev->dbList = 'Bases de Donn?es';
|
||||
$lang->dev->moduleList = 'Modules';
|
||||
$lang->dev->params = 'Paramètres';
|
||||
$lang->dev->params = 'Param?tres';
|
||||
$lang->dev->type = 'Type';
|
||||
$lang->dev->desc = 'Description';
|
||||
$lang->dev->noParams = 'Pas de Paramètres';
|
||||
$lang->dev->post = 'Paramètre POST';
|
||||
$lang->dev->noParams = 'Pas de Param?tres';
|
||||
$lang->dev->post = 'Param?tre POST';
|
||||
|
||||
$lang->dev->paramRange = 'Rang Paramètre : %s';
|
||||
$lang->dev->paramRange = 'Rang Param?tre : %s';
|
||||
$lang->dev->paramDate = 'Format Date : YY-mm-dd, e.g 2019-01-01';
|
||||
$lang->dev->paramColor = 'Format Couleur : #RGB, e.g. #3da7f5';
|
||||
$lang->dev->paramMailto = "Comptes utilisateurs. Séparé par des ','.";
|
||||
$lang->dev->noteEditor = "L'éditeur est désactivé pour des raisons de sécurité. Pour utiliser cette fonction, veuillez vous rendre sur le site officiel pour télécharger et installer le plugin de l'<a href='https://www.zentao.pm/extension-viewExt-150.html' target='_blank'>editeur</a>.";
|
||||
$lang->dev->noteTranslate = "La traduction est désactivée pour des raisons de sécurité. Pour utiliser cette fonctionnalité, veuillez vous rendre sur le site officiel pour télécharger et installer le plugin de <a href='https://www.zentao.pm/extension-viewExt-151.html' target='_blank'>traduction</a>.";
|
||||
$lang->dev->paramMailto = "Comptes utilisateurs. S?par? par des ','.";
|
||||
$lang->dev->noteEditor = "L'?diteur est d?sactiv? pour des raisons de s?curit?. Pour utiliser cette fonction, veuillez vous rendre sur le site officiel pour t?l?charger et installer le plugin de l'<a href='https://www.zentao.pm/extension-viewExt-150.html' target='_blank'>editeur</a>.";
|
||||
$lang->dev->noteTranslate = "La traduction est d?sactiv?e pour des raisons de s?curit?. Pour utiliser cette fonctionnalit?, veuillez vous rendre sur le site officiel pour t?l?charger et installer le plugin de <a href='https://www.zentao.pm/extension-viewExt-151.html' target='_blank'>traduction</a>.";
|
||||
|
||||
$lang->dev->fields = array();
|
||||
$lang->dev->fields['id'] = 'ID';
|
||||
@@ -39,28 +39,29 @@ $lang->dev->tableList['config'] = 'Configuration';
|
||||
$lang->dev->tableList['custom'] = 'Personnalisation';
|
||||
$lang->dev->tableList['dept'] = 'Compartiment';
|
||||
$lang->dev->tableList['doc'] = 'Document';
|
||||
$lang->dev->tableList['doclib'] = 'Bibliothèque Document';
|
||||
$lang->dev->tableList['doclib'] = 'Biblioth?que Document';
|
||||
$lang->dev->tableList['effort'] = 'Effort';
|
||||
$lang->dev->tableList['extension'] = 'Extension';
|
||||
$lang->dev->tableList['file'] = 'Fichier';
|
||||
$lang->dev->tableList['group'] = 'Groupe';
|
||||
$lang->dev->tableList['grouppriv'] = 'Privilège';
|
||||
$lang->dev->tableList['grouppriv'] = 'Privil?ge';
|
||||
$lang->dev->tableList['history'] = 'Historique';
|
||||
$lang->dev->tableList['lang'] = 'Langue';
|
||||
$lang->dev->tableList['module'] = 'Module';
|
||||
$lang->dev->tableList['product'] = $lang->productCommon;
|
||||
$lang->dev->tableList['productplan'] = $lang->productCommon . 'Plan';
|
||||
$lang->dev->tableList['project'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->executionCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->executionCommon . 'Story';
|
||||
$lang->dev->tableList['project'] = $lang->projectCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->projectCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->projectCommon . 'Story';
|
||||
$lang->dev->tableList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['release'] = 'Release';
|
||||
$lang->dev->tableList['story'] = 'Story';
|
||||
$lang->dev->tableList['storyspec'] = 'Description Story';
|
||||
$lang->dev->tableList['task'] = 'Tâche';
|
||||
$lang->dev->tableList['taskestimate'] = 'Estimés';
|
||||
$lang->dev->tableList['task'] = 'T?che';
|
||||
$lang->dev->tableList['taskestimate'] = 'Estim?s';
|
||||
$lang->dev->tableList['team'] = 'Equipe';
|
||||
$lang->dev->tableList['testresult'] = 'Résultats Test';
|
||||
$lang->dev->tableList['testrun'] = 'Exécution Test';
|
||||
$lang->dev->tableList['testresult'] = 'R?sultats Test';
|
||||
$lang->dev->tableList['testrun'] = 'Ex?cution Test';
|
||||
$lang->dev->tableList['testtask'] = 'Campagne';
|
||||
$lang->dev->tableList['todo'] = 'Agenda';
|
||||
$lang->dev->tableList['user'] = 'User';
|
||||
@@ -73,7 +74,7 @@ $lang->dev->tableList['api'] = 'API';
|
||||
$lang->dev->tableList['backup'] = 'Sauvegarde';
|
||||
$lang->dev->tableList['common'] = 'Commun';
|
||||
$lang->dev->tableList['convert'] = 'Convert';
|
||||
$lang->dev->tableList['dev'] = 'Dévelop';
|
||||
$lang->dev->tableList['dev'] = 'D?velop';
|
||||
$lang->dev->tableList['git'] = 'GIT';
|
||||
$lang->dev->tableList['index'] = 'Accueil';
|
||||
$lang->dev->tableList['install'] = 'Installer';
|
||||
@@ -92,7 +93,7 @@ $lang->dev->tableList['caselib'] = 'Case Library';
|
||||
$lang->dev->tableList['tree'] = 'Arborescence';
|
||||
$lang->dev->tableList['upgrade'] = 'Update';
|
||||
$lang->dev->tableList['cron'] = 'Cron';
|
||||
$lang->dev->tableList['datatable'] = 'Tableau Données';
|
||||
$lang->dev->tableList['datatable'] = 'Tableau Donn?es';
|
||||
$lang->dev->tableList['block'] = 'Bloc';
|
||||
$lang->dev->tableList['branch'] = 'Branche';
|
||||
$lang->dev->tableList['doccontent'] = 'Contenu Doc';
|
||||
@@ -117,18 +118,20 @@ $lang->dev->tableList['job'] = 'Job';
|
||||
$lang->dev->tableList['searchdict'] = 'Search dict';
|
||||
$lang->dev->tableList['searchindex'] = 'Search index';
|
||||
|
||||
$lang->dev->groupList['my'] = 'Dashboard';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = 'QA';
|
||||
$lang->dev->groupList['doc'] = 'Doc';
|
||||
$lang->dev->groupList['report'] = 'Rapport';
|
||||
$lang->dev->groupList['company'] = 'Entreprise';
|
||||
$lang->dev->groupList['repo'] = 'CI';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = 'Message';
|
||||
$lang->dev->groupList['search'] = 'Search';
|
||||
$lang->dev->groupList['my'] = 'Dashboard';
|
||||
$lang->dev->groupList['program'] = 'Program';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->projectCommon;
|
||||
$lang->dev->groupList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = 'QA';
|
||||
$lang->dev->groupList['doc'] = 'Doc';
|
||||
$lang->dev->groupList['report'] = 'Rapport';
|
||||
$lang->dev->groupList['company'] = 'Entreprise';
|
||||
$lang->dev->groupList['repo'] = 'CI';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = 'Message';
|
||||
$lang->dev->groupList['search'] = 'Search';
|
||||
|
||||
$lang->dev->endGroupList['admin'] = 'Admin';
|
||||
$lang->dev->endGroupList['system'] = 'Système';
|
||||
$lang->dev->endGroupList['system'] = 'Syst?me';
|
||||
$lang->dev->endGroupList['other'] = 'Autres';
|
||||
|
||||
+17
-14
@@ -50,9 +50,10 @@ $lang->dev->tableList['lang'] = 'Ngôn ngữ';
|
||||
$lang->dev->tableList['module'] = 'Module';
|
||||
$lang->dev->tableList['product'] = $lang->productCommon;
|
||||
$lang->dev->tableList['productplan'] = 'Kế hoạch '.$lang->productCommon;
|
||||
$lang->dev->tableList['project'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->executionCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->executionCommon . 'Câu chuyện';
|
||||
$lang->dev->tableList['project'] = $lang->projectCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->projectCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->projectCommon . 'Câu chuyện';
|
||||
$lang->dev->tableList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['release'] = 'Phát hành';
|
||||
$lang->dev->tableList['story'] = 'Câu chuyện';
|
||||
$lang->dev->tableList['storyspec'] = 'Mô tả câu chuyện';
|
||||
@@ -117,17 +118,19 @@ $lang->dev->tableList['job'] = 'Job';
|
||||
$lang->dev->tableList['searchdict'] = 'Search dict';
|
||||
$lang->dev->tableList['searchindex'] = 'Search index';
|
||||
|
||||
$lang->dev->groupList['my'] = 'Dashboard';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = 'QA';
|
||||
$lang->dev->groupList['doc'] = 'Tài liệu';
|
||||
$lang->dev->groupList['report'] = 'Báo cáo';
|
||||
$lang->dev->groupList['company'] = 'Doanh nghiệp';
|
||||
$lang->dev->groupList['repo'] = 'CI';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = 'Tin nhắn';
|
||||
$lang->dev->groupList['search'] = 'Tìm kiếm';
|
||||
$lang->dev->groupList['my'] = 'Dashboard';
|
||||
$lang->dev->groupList['program'] = 'Program';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->projectCommon;
|
||||
$lang->dev->groupList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = 'QA';
|
||||
$lang->dev->groupList['doc'] = 'Tài liệu';
|
||||
$lang->dev->groupList['report'] = 'Báo cáo';
|
||||
$lang->dev->groupList['company'] = 'Doanh nghiệp';
|
||||
$lang->dev->groupList['repo'] = 'CI';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = 'Tin nhắn';
|
||||
$lang->dev->groupList['search'] = 'Tìm kiếm';
|
||||
|
||||
$lang->dev->endGroupList['admin'] = 'Quản trị';
|
||||
$lang->dev->endGroupList['system'] = 'Hệ thống';
|
||||
|
||||
+17
-14
@@ -50,9 +50,10 @@ $lang->dev->tableList['lang'] = '语言定义';
|
||||
$lang->dev->tableList['module'] = '模块';
|
||||
$lang->dev->tableList['product'] = $lang->productCommon;
|
||||
$lang->dev->tableList['productplan'] = $lang->productCommon . '计划';
|
||||
$lang->dev->tableList['project'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->executionCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->executionCommon . $lang->SRCommon;
|
||||
$lang->dev->tableList['project'] = $lang->projectCommon;
|
||||
$lang->dev->tableList['projectproduct'] = $lang->projectCommon . $lang->productCommon;
|
||||
$lang->dev->tableList['projectstory'] = $lang->projectCommon . $lang->SRCommon;
|
||||
$lang->dev->tableList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->tableList['release'] = '发布';
|
||||
$lang->dev->tableList['story'] = $lang->SRCommon;
|
||||
$lang->dev->tableList['storyspec'] = "{$lang->SRCommon}描述";
|
||||
@@ -117,17 +118,19 @@ $lang->dev->tableList['job'] = '构建任务';
|
||||
$lang->dev->tableList['searchdict'] = '搜索字典';
|
||||
$lang->dev->tableList['searchindex'] = '搜索索引';
|
||||
|
||||
$lang->dev->groupList['my'] = '我的地盘';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = '测试';
|
||||
$lang->dev->groupList['doc'] = '文档';
|
||||
$lang->dev->groupList['report'] = '统计';
|
||||
$lang->dev->groupList['company'] = '组织';
|
||||
$lang->dev->groupList['repo'] = '持续集成';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = '消息';
|
||||
$lang->dev->groupList['search'] = '搜索';
|
||||
$lang->dev->groupList['my'] = '我的地盘';
|
||||
$lang->dev->groupList['program'] = '项目集';
|
||||
$lang->dev->groupList['product'] = $lang->productCommon;
|
||||
$lang->dev->groupList['project'] = $lang->projectCommon;
|
||||
$lang->dev->groupList['execution'] = $lang->executionCommon;
|
||||
$lang->dev->groupList['qa'] = '测试';
|
||||
$lang->dev->groupList['doc'] = '文档';
|
||||
$lang->dev->groupList['report'] = '统计';
|
||||
$lang->dev->groupList['company'] = '组织';
|
||||
$lang->dev->groupList['repo'] = '持续集成';
|
||||
$lang->dev->groupList['api'] = 'API';
|
||||
$lang->dev->groupList['message'] = '消息';
|
||||
$lang->dev->groupList['search'] = '搜索';
|
||||
|
||||
$lang->dev->endGroupList['admin'] = '后台';
|
||||
$lang->dev->endGroupList['system'] = '系统';
|
||||
|
||||
+20
-19
@@ -13,7 +13,7 @@ class group extends control
|
||||
{
|
||||
/**
|
||||
* Construct function.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -26,7 +26,7 @@ class group extends control
|
||||
|
||||
/**
|
||||
* Browse groups.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -49,7 +49,7 @@ class group extends control
|
||||
|
||||
/**
|
||||
* Create a group.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -70,8 +70,8 @@ class group extends control
|
||||
|
||||
/**
|
||||
* Edit a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -86,6 +86,7 @@ class group extends control
|
||||
|
||||
$title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->edit;
|
||||
$position[] = $this->lang->group->edit;
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->group = $this->group->getById($groupID);
|
||||
@@ -95,8 +96,8 @@ class group extends control
|
||||
|
||||
/**
|
||||
* Copy a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -141,7 +142,7 @@ class group extends control
|
||||
$this->view->position[] = $this->lang->group->manageView;
|
||||
|
||||
$this->view->group = $group;
|
||||
$this->view->programs = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq('0')->andWhere('type')->eq('program')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
$this->view->programs = $this->dao->select('*')->from(TABLE_PROGRAM)->where('deleted')->eq('0')->andWhere('type')->eq('program')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
$this->view->projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq('0')->andWhere('type')->eq('project')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
$this->view->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq('0')->orderBy('order_desc')->fetchPairs('id', 'name');
|
||||
|
||||
@@ -185,7 +186,7 @@ class group extends control
|
||||
|
||||
if($this->config->systemMode == 'classic')
|
||||
{
|
||||
if(isset($groupPrivs['program']['prjbrowse']))
|
||||
if(isset($groupPrivs['project']['browse']))
|
||||
{
|
||||
$groupPrivs['project']['list'] = 'list';
|
||||
}
|
||||
@@ -233,8 +234,8 @@ class group extends control
|
||||
|
||||
/**
|
||||
* Manage members of a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @param int $deptID
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -268,18 +269,18 @@ class group extends control
|
||||
|
||||
/**
|
||||
* Manage members of a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @param int $deptID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function managePRJAdmin($groupID, $deptID = 0)
|
||||
public function manageProjectAdmin($groupID, $deptID = 0)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->group->updatePRJAdmin($groupID);
|
||||
die(js::locate(inlink('managePRJAdmin', "group=$groupID"), 'parent'));
|
||||
$this->group->updateProjectAdmin($groupID);
|
||||
die(js::locate(inlink('manageProjectAdmin', "group=$groupID"), 'parent'));
|
||||
}
|
||||
$group = $this->group->getById($groupID);
|
||||
$groupUsers = $this->group->getUserPairs($groupID);
|
||||
@@ -295,7 +296,7 @@ class group extends control
|
||||
$this->view->allUsers = $allUsers;
|
||||
$this->view->group = $group;
|
||||
$this->view->programs = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('type')->eq('project')->andWhere('deleted')->eq(0)->fetchPairs();
|
||||
$this->view->deptTree = $this->loadModel('dept')->getTreeMenu($rooteDeptID = 0, array('deptModel', 'createManagePRJAdminLink'), $groupID);
|
||||
$this->view->deptTree = $this->loadModel('dept')->getTreeMenu($rooteDeptID = 0, array('deptModel', 'createManageProjectAdminLink'), $groupID);
|
||||
$this->view->groupUsers = $groupUsers;
|
||||
$this->view->userPrograms = $userPrograms;
|
||||
|
||||
@@ -304,8 +305,8 @@ class group extends control
|
||||
|
||||
/**
|
||||
* Delete a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @param string $confirm yes|no
|
||||
* @access public
|
||||
* @return void
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->group->managePrivByGroup = 'Rechte';
|
||||
$lang->group->managePrivByModule = 'Modul Rechte';
|
||||
$lang->group->byModuleTips = '<span class="tips">(SHIFT/STRG für Multi-Select)</span>';
|
||||
$lang->group->manageMember = 'Mitglieder';
|
||||
$lang->group->managePRJAdmin = 'Manage Program Admins';
|
||||
$lang->group->manageProjectAdmin = 'Manage Program Admins';
|
||||
$lang->group->confirmDelete = 'Möchten Sie die Gruppe löschen?';
|
||||
$lang->group->successSaved = 'Gespeichert!';
|
||||
$lang->group->errorNotSaved = 'Fehlgeschlagen. Bitte aktion und Gruppe wählen.';
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->group->managePrivByGroup = 'Manage Privileges by Group';
|
||||
$lang->group->managePrivByModule = 'Manage Privileges by Module';
|
||||
$lang->group->byModuleTips = '<span class="tips">(Press Shift/Ctrl to Multi-select)</span>';
|
||||
$lang->group->manageMember = 'Manage Members';
|
||||
$lang->group->managePRJAdmin = 'Manage Program Admins';
|
||||
$lang->group->manageProjectAdmin = 'Manage Program Admins';
|
||||
$lang->group->confirmDelete = 'Do you want to delete this user group?';
|
||||
$lang->group->successSaved = 'Saved.';
|
||||
$lang->group->errorNotSaved = 'Failed. Please select actions and groups.';
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->group->managePrivByGroup = 'Gérer Privilèges par Groupe';
|
||||
$lang->group->managePrivByModule = 'Gérer Privilèges par Module';
|
||||
$lang->group->byModuleTips = '<span class="tips">(Shift/Ctrl pour sélection multiple)</span>';
|
||||
$lang->group->manageMember = 'Gérer Membres';
|
||||
$lang->group->managePRJAdmin = 'Manage Program Admins';
|
||||
$lang->group->manageProjectAdmin = 'Manage Program Admins';
|
||||
$lang->group->confirmDelete = "Voulez-vous supprimer ce groupe d'utilisateurs ?";
|
||||
$lang->group->successSaved = 'Sauvé.';
|
||||
$lang->group->errorNotSaved = 'Echec. Veuillez sélectionner actions et groupes.';
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->group->managePrivByGroup = 'Quản lý Privileges by Group';
|
||||
$lang->group->managePrivByModule = 'Quản lý Privileges by Module';
|
||||
$lang->group->byModuleTips = '<span class="tips">(Press Shift/Ctrl to Multi-select)</span>';
|
||||
$lang->group->manageMember = 'Quản lý Members';
|
||||
$lang->group->managePRJAdmin = 'Manage Program Admins';
|
||||
$lang->group->manageProjectAdmin = 'Manage Program Admins';
|
||||
$lang->group->confirmDelete = 'Bạn có muốn xóa người dùng này group?';
|
||||
$lang->group->successSaved = 'Đã lưu.';
|
||||
$lang->group->errorNotSaved = 'Thất bại. Vui lòng select actions and groups.';
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->group->managePrivByGroup = '权限维护';
|
||||
$lang->group->managePrivByModule = '按模块分配权限';
|
||||
$lang->group->byModuleTips = '<span class="tips">(可以按住Shift或者Ctrl键进行多选)</span>';
|
||||
$lang->group->manageMember = '成员维护';
|
||||
$lang->group->managePRJAdmin = '维护项目管理员';
|
||||
$lang->group->manageProjectAdmin = '维护项目管理员';
|
||||
$lang->group->confirmDelete = '您确定删除该用户分组吗?';
|
||||
$lang->group->successSaved = '成功保存';
|
||||
$lang->group->errorNotSaved = '没有保存,请确认选择了权限数据。';
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->group->managePrivByGroup = '權限維護';
|
||||
$lang->group->managePrivByModule = '按模組分配權限';
|
||||
$lang->group->byModuleTips = '<span class="tips">(可以按住Shift或者Ctrl鍵進行多選)</span>';
|
||||
$lang->group->manageMember = '成員維護';
|
||||
$lang->group->managePRJAdmin = '維護項目管理員';
|
||||
$lang->group->manageProjectAdmin = '維護項目管理員';
|
||||
$lang->group->confirmDelete = '您確定刪除該用戶分組嗎?';
|
||||
$lang->group->successSaved = '成功保存';
|
||||
$lang->group->errorNotSaved = '沒有保存,請確認選擇了權限數據。';
|
||||
|
||||
+46
-46
@@ -15,14 +15,14 @@ class groupModel extends model
|
||||
{
|
||||
/**
|
||||
* Create a group.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$group = fixer::input('post')->get();
|
||||
if(isset($group->limited))
|
||||
if(isset($group->limited))
|
||||
{
|
||||
unset($group->limited);
|
||||
$group->role = 'limited';
|
||||
@@ -32,8 +32,8 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Update a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -45,8 +45,8 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Copy a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -66,9 +66,9 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Copy privileges.
|
||||
*
|
||||
* @param string $fromGroup
|
||||
* @param string $toGroup
|
||||
*
|
||||
* @param string $fromGroup
|
||||
* @param string $toGroup
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -84,9 +84,9 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Copy user.
|
||||
*
|
||||
* @param string $fromGroup
|
||||
* @param string $toGroup
|
||||
*
|
||||
* @param string $fromGroup
|
||||
* @param string $toGroup
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -102,32 +102,32 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Get group lists.
|
||||
*
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($projectID = 0)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_GROUP)->where('PRJ')->eq($projectID)->orderBy('id')->fetchAll();
|
||||
return $this->dao->select('*')->from(TABLE_GROUP)->where('project')->eq($projectID)->orderBy('id')->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get group pairs.
|
||||
*
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPairs($projectID = 0)
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_GROUP)->where('PRJ')->eq($projectID)->orderBy('id')->fetchPairs();
|
||||
return $this->dao->select('id, name')->from(TABLE_GROUP)->where('project')->eq($projectID)->orderBy('id')->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get group by id.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -141,8 +141,8 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Get group by account.
|
||||
*
|
||||
* @param string $account
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -171,8 +171,8 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Get privileges of a groups.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -186,8 +186,8 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Get user pairs of a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -204,14 +204,14 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Get user programs of a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserPrograms($groupID)
|
||||
{
|
||||
return $this->dao->select('t1.account, t1.PRJ')
|
||||
return $this->dao->select('t1.account, t1.project')
|
||||
->from(TABLE_USERGROUP)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('`group`')->eq((int)$groupID)
|
||||
@@ -258,8 +258,8 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Delete a group.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @param null $null compatible with that of model::delete()
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -396,7 +396,7 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Update privilege by module.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -420,8 +420,8 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Update users.
|
||||
*
|
||||
* @param int $groupID
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -455,13 +455,13 @@ class groupModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Update program admins.
|
||||
*
|
||||
* @param int $groupID
|
||||
* Update project admins.
|
||||
*
|
||||
* @param int $groupID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updatePRJAdmin($groupID)
|
||||
public function updateProjectAdmin($groupID)
|
||||
{
|
||||
$this->loadModel('user');
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->exec();
|
||||
@@ -474,10 +474,10 @@ class groupModel extends model
|
||||
$data = new stdclass();
|
||||
$data->group = $groupID;
|
||||
$data->account = $account;
|
||||
$data->PRJ = implode($programs[$account], ',');
|
||||
$data->project = implode($programs[$account], ',');
|
||||
|
||||
$this->dao->replace(TABLE_USERGROUP)->data($data)->exec();
|
||||
foreach($programs[$account] as $programID)
|
||||
foreach($programs[$account] as $programID)
|
||||
{
|
||||
if(!$programID) continue;
|
||||
$this->user->updateUserView($programID, 'program');
|
||||
@@ -487,10 +487,10 @@ class groupModel extends model
|
||||
if(!dao::isError()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sort resource.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -511,7 +511,7 @@ class groupModel extends model
|
||||
{
|
||||
$this->lang->resource->$key = $resource;
|
||||
}
|
||||
|
||||
|
||||
/* sort methodOrder. */
|
||||
foreach($this->lang->resource as $moduleName => $resources)
|
||||
{
|
||||
@@ -577,9 +577,9 @@ class groupModel extends model
|
||||
|
||||
/**
|
||||
* Judge an action is clickable or not.
|
||||
*
|
||||
* @param object $group
|
||||
* @param string $action
|
||||
*
|
||||
* @param object $group
|
||||
* @param string $action
|
||||
* @static
|
||||
* @access public
|
||||
* @return bool
|
||||
@@ -588,8 +588,8 @@ class groupModel extends model
|
||||
{
|
||||
$action = strtolower($action);
|
||||
|
||||
if($action == 'manageview' and $group->role == 'limited') return false;
|
||||
if($action == 'copy' and $group->role == 'limited') return false;
|
||||
if($action == 'manageview' and $group->role == 'limited') return false;
|
||||
if($action == 'copy' and $group->role == 'limited') return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -42,23 +42,23 @@
|
||||
<td title='<?php echo $group->desc?>'><?php echo $group->desc;?></td>
|
||||
<td title='<?php echo $users;?>' class="text-ellipsis"><?php echo $users;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php $isPRJAdmin = $group->role == 'PRJAdmin';?>
|
||||
<?php $disabled = $isPRJAdmin ? 'disabled' : '';?>
|
||||
<?php $isProjectAdmin = $group->role == 'projectAdmin';?>
|
||||
<?php $disabled = $isProjectAdmin ? 'disabled' : '';?>
|
||||
<?php $lang->group->managepriv = $lang->group->managePrivByGroup;?>
|
||||
<?php common::printIcon('group', 'manageView', "groupID=$group->id", $group, 'list', 'eye', '', "$disabled");?>
|
||||
<?php common::printIcon('group', 'managepriv', "type=byGroup¶m=$group->id", $group, 'list', 'lock');?>
|
||||
<?php $lang->group->managemember = $lang->group->manageMember;?>
|
||||
<?php if($isPRJAdmin):?>
|
||||
<?php common::printIcon('group', 'managePRJAdmin', "groupID=$group->id", $group, 'list', 'persons');?>
|
||||
<?php if($isProjectAdmin):?>
|
||||
<?php common::printIcon('group', 'manageProjectAdmin', "groupID=$group->id", $group, 'list', 'persons');?>
|
||||
<?php else:?>
|
||||
<?php common::printIcon('group', 'managemember', "groupID=$group->id", $group, 'list', 'persons', '', "iframe", true, "data-width='90%'");?>
|
||||
<?php common::printIcon('group', 'manageMember', "groupID=$group->id", $group, 'list', 'persons', '', "iframe", true, "data-width='90%'");?>
|
||||
<?php endif;?>
|
||||
<?php common::printIcon('group', 'edit', "groupID=$group->id", $group, 'list', '', '', "iframe $disabled", true, "data-width='550'");?>
|
||||
<?php common::printIcon('group', 'copy', "groupID=$group->id", $group, 'list', '', '', "iframe $disabled", true, "data-width='550'");?>
|
||||
<?php
|
||||
if(common::hasPriv('group', 'delete'))
|
||||
if(common::hasPriv('group', 'deProjecte'))
|
||||
{
|
||||
if($isPRJAdmin)
|
||||
if($isProjectAdmin)
|
||||
{
|
||||
echo "<button class='btn disabled'><i class='icon icon-trash disabled' title='{$lang->group->delete}'></i></button>";
|
||||
}
|
||||
|
||||
@@ -11,24 +11,24 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->group->create;?></h2>
|
||||
</div>
|
||||
<form method='post' target='hiddenwin' id='dataform'>
|
||||
<table align='center' class='table table-form'>
|
||||
<table align='center' class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->group->name;?></th>
|
||||
<td class='required'><?php echo html::input('name', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->group->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows=5 class=form-control");?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->group->limited;?></th>
|
||||
<td><?php echo html::checkbox('limited', '');?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2 title='<?php echo $group->name;?>'>
|
||||
<span class='label label-id'><?php echo $group->id;?></span>
|
||||
@@ -20,15 +20,15 @@
|
||||
</h2>
|
||||
</div>
|
||||
<form method='post' target='hiddenwin' id='dataform'>
|
||||
<table align='center' class='table table-form'>
|
||||
<table align='center' class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->group->name;?></th>
|
||||
<td class='required'><?php echo html::input('name', $group->name, "class='form-control'");?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->group->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', $group->desc, "rows='5' class='form-control'");?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<div class="main-col">
|
||||
<form class='main-table table-members' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<table class='table table-form'>
|
||||
<?php if($groupUsers):?>
|
||||
<tr>
|
||||
<th class='w-140px'>
|
||||
@@ -60,7 +60,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='2'>
|
||||
<?php
|
||||
<?php
|
||||
echo html::submitButton();
|
||||
echo html::linkButton($lang->goback, $this->createLink('group', 'browse'));
|
||||
echo html::hidden('foo'); // Just a var, to make sure $_POST is not empty.
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
<div class="main-col">
|
||||
<form class='main-table table-members' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<table class='table table-form'>
|
||||
<?php if($userPrograms):?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($userPrograms as $account => $program):?>
|
||||
@@ -70,7 +70,7 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='5'>
|
||||
<?php
|
||||
<?php
|
||||
echo html::submitButton('', '', "btn btn-primary");
|
||||
echo html::linkButton($lang->goback, $this->createLink('group', 'browse'));
|
||||
echo html::hidden('foo'); // Just a var, to make sure $_POST is not empty.
|
||||
@@ -36,12 +36,12 @@ body.menu-hide {padding-left: 0;}
|
||||
#executionList {max-height: 270px; min-height: 270px;}
|
||||
}
|
||||
|
||||
#pages {position: fixed; left: 96px; bottom: 0; right: 0; top: 0;}
|
||||
.page-tab {position: absolute; left: 0; bottom: 40px; right: 0; top: 0; background-color: #efefef;}
|
||||
.menu-hide #pages {left: 40px}
|
||||
#apps {position: fixed; left: 96px; bottom: 0; right: 0; top: 0;}
|
||||
.app-container {position: absolute; left: 0; bottom: 40px; right: 0; top: 0; background-color: #efefef;}
|
||||
.menu-hide #apps {left: 40px}
|
||||
|
||||
#pagesBar {position: fixed; left: 96px; bottom: 0; right: 0; height: 40px; z-index: 1012; background: #fff; border-top: 1px solid #eff1f7;}
|
||||
.menu-hide #pagesBar {left: 40px}
|
||||
#appsBar {position: fixed; left: 96px; bottom: 0; right: 0; height: 40px; z-index: 1012; background: #fff; border-top: 1px solid #eff1f7;}
|
||||
.menu-hide #appsBar {left: 40px}
|
||||
#bars {position: absolute; left: 0; top: 0; bottom: 0; padding: 0 5px}
|
||||
#bars > li {padding: 8px 5px;}
|
||||
#bars > li > a {height: 24px; color: #fff; background: #3c4353; padding: 2px 8px; line-height: 20px; border-radius: 2px;}
|
||||
|
||||
+169
-169
@@ -1,65 +1,65 @@
|
||||
(function()
|
||||
{
|
||||
/* Init variables */
|
||||
var openedTabs = {}; // Key-value to save group-tab pairs
|
||||
var groupsMap = {}; // Key-value to save group-menu pairs
|
||||
var openedTabZIndex = 10; // Last opened tab z-index
|
||||
var defaultTabGroup; // Default tab group
|
||||
var lastOpenedGroup; // Last opened tab group
|
||||
var openedApps = {}; // Key-value to save appCode-app pairs
|
||||
var appsMap = {}; // Key-value to save opened appCode-app pairs
|
||||
var openedAppZIndex = 10; // Last opened app z-index
|
||||
var defaultApp; // Default app code
|
||||
var lastOpenedApp; // Last opened app code
|
||||
|
||||
/**
|
||||
* Init menu list
|
||||
* Init apps menu list
|
||||
*/
|
||||
function initMenuList()
|
||||
function initAppsMenu()
|
||||
{
|
||||
var $helpLink = $('#helpLink');
|
||||
groupsMap.help =
|
||||
appsMap.help =
|
||||
{
|
||||
group: 'help',
|
||||
code: 'help',
|
||||
icon: 'icon-help',
|
||||
url: $helpLink.attr('href'),
|
||||
external: true,
|
||||
text: $helpLink.text(),
|
||||
pageUrl: config.webRoot + '#open=help'
|
||||
appUrl: config.webRoot + '#app=help'
|
||||
};
|
||||
var $menuMainNav = $('#menuMainNav').empty();
|
||||
window.menuItems.forEach(function(item)
|
||||
window.appsMenuItems.forEach(function(item)
|
||||
{
|
||||
if(item === 'divider') return $menuMainNav.append('<li class="divider"></li>');
|
||||
|
||||
var $link= $('<a data-pos="menu"></a>')
|
||||
.attr('data-group', item.group)
|
||||
.attr('class', 'show-in-tab')
|
||||
.attr('data-app', item.code)
|
||||
.attr('class', 'show-in-app')
|
||||
.html(item.title);
|
||||
|
||||
item.icon = ($link.find('.icon').attr('class') || '').replace('icon ', '');
|
||||
item.text = $link.text().trim();
|
||||
$link.html('<i class="icon ' + item.icon + '"></i><span class="text">' + item.text + '</span>');
|
||||
groupsMap[item.group] = item;
|
||||
appsMap[item.code] = item;
|
||||
|
||||
$('<li></li>').attr('data-group', item.group)
|
||||
$('<li></li>').attr('data-app', item.code)
|
||||
.attr('title', item.text)
|
||||
.append($link)
|
||||
.appendTo($menuMainNav);
|
||||
|
||||
if(!defaultTabGroup) defaultTabGroup = item.group;
|
||||
if(!defaultApp) defaultApp = item.code;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get tab group from url
|
||||
* Get app app code from url
|
||||
* @param {String} urlOrModuleName Url string
|
||||
* @return {String}
|
||||
*/
|
||||
function getGroupFromUrl(urlOrModuleName)
|
||||
function getAppCodeFromUrl(urlOrModuleName)
|
||||
{
|
||||
var group = window.navGroup[urlOrModuleName];
|
||||
if(group) return group;
|
||||
var code = window.navGroup[urlOrModuleName];
|
||||
if(code) return code;
|
||||
|
||||
var link = $.parseLink(urlOrModuleName);
|
||||
if(!link.moduleName || link.isOnlyBody) return '';
|
||||
|
||||
if(link.hash && link.hash.indexOf('open=') === 0) return link.hash.substr(5);
|
||||
if(link.hash && link.hash.indexOf('app=') === 0) return link.hash.substr(5);
|
||||
|
||||
/* Handling special situations */
|
||||
var moduleName = link.moduleName;
|
||||
@@ -138,201 +138,201 @@
|
||||
var myMethods = 'todocalendar|effortcalendar|todo|task|story|bug|testtask|testcase|execution|issue|risk|dynamic|profile';
|
||||
if(moduleName === 'user' && myMethods.indexOf(methodLowerCase) != -1) return 'my';
|
||||
|
||||
group = window.navGroup[moduleName] || moduleName || urlOrModuleName;
|
||||
return groupsMap[group] ? group : '';
|
||||
code = window.navGroup[moduleName] || moduleName || urlOrModuleName;
|
||||
return appsMap[code] ? code : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Open tab
|
||||
* @param {string} [url] Url to open in tab
|
||||
* @param {string} [group] The group of target tab to open
|
||||
* Open app
|
||||
* @param {string} [url] Url to open
|
||||
* @param {string} [appCode] The code of target app to open
|
||||
* @return {void}
|
||||
*/
|
||||
function openTab(url, group)
|
||||
function openApp(url, appCode)
|
||||
{
|
||||
/* Check params */
|
||||
if(!group)
|
||||
if(!appCode)
|
||||
{
|
||||
if(groupsMap[url])
|
||||
if(appsMap[url])
|
||||
{
|
||||
group = url;
|
||||
appCode = url;
|
||||
url = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
group = getGroupFromUrl(url);
|
||||
if(!group) return false;
|
||||
appCode = getAppCodeFromUrl(url);
|
||||
if(!appCode) return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set openGroup cookie */
|
||||
$.cookie('openGroup', group, {expires: config.cookieLife, path: config.webRoot});
|
||||
/* Set openApp cookie */
|
||||
$.cookie('openApp', appCode, {expires: config.cookieLife, path: config.webRoot});
|
||||
|
||||
/* Highlight at main menu */
|
||||
var $menuMainNav = $('#menuMainNav');
|
||||
var $lastActiveNav = $menuMainNav.find('li.active');
|
||||
if($lastActiveNav.data('group') !== group)
|
||||
if($lastActiveNav.data('app') !== appCode)
|
||||
{
|
||||
$lastActiveNav.removeClass('active');
|
||||
$menuMainNav.find('li[data-group="' + group + '"]').addClass('active');
|
||||
$menuMainNav.find('li[data-app="' + appCode + '"]').addClass('active');
|
||||
}
|
||||
|
||||
/* Create pate tab object and store it */
|
||||
var tab = openedTabs[group];
|
||||
if(!tab)
|
||||
/* Create pate app object and store it */
|
||||
var app = openedApps[appCode];
|
||||
if(!app)
|
||||
{
|
||||
var $iframe = $(
|
||||
[
|
||||
'<iframe',
|
||||
'id="tabIframe-' + group + '"',
|
||||
'name="tab-' + group + '"',
|
||||
'id="appIframe-' + appCode + '"',
|
||||
'name="app-' + appCode + '"',
|
||||
'frameborder="no"',
|
||||
'allowtransparency="true"',
|
||||
'scrolling="auto"',
|
||||
'style="width: 100%; height: 100%; left: 0px;"',
|
||||
'/>'
|
||||
].join(' '));
|
||||
var $page = $('<div class="page-tab" id="tab-' + group + '"></div>')
|
||||
var $app = $('<div class="app-container" id="app-' + appCode + '"></div>')
|
||||
.append($iframe)
|
||||
.appendTo('#pages');
|
||||
.appendTo('#apps');
|
||||
|
||||
tab = $.extend({$iframe: $iframe, $page: $page, group: group}, groupsMap[group]);
|
||||
openedTabs[group] = tab;
|
||||
app = $.extend({$iframe: $iframe, $app: $app, code: appCode}, appsMap[appCode]);
|
||||
openedApps[appCode] = app;
|
||||
|
||||
/* If first show without url, then use the default url */
|
||||
if(!url) url = groupsMap[group].url;
|
||||
if(!url) url = appsMap[appCode].url;
|
||||
}
|
||||
|
||||
/* Show page tab and update iframe source */
|
||||
if(url) reloadTab(group, url);
|
||||
tab.zIndex = openedTabZIndex++;
|
||||
tab.$page.show().css('z-index', tab.zIndex);
|
||||
/* Show page app and update iframe source */
|
||||
if(url) reloadApp(appCode, url);
|
||||
app.zIndex = openedAppZIndex++;
|
||||
app.$app.show().css('z-index', app.zIndex);
|
||||
|
||||
/* Update task bar */
|
||||
var $bars = $('#bars');
|
||||
var $bar = $('#tabBar-' + group);
|
||||
var $bar = $('#appBar-' + appCode);
|
||||
if(!$bar.length)
|
||||
{
|
||||
var $link= $('<a data-pos="bar"></a>')
|
||||
.attr('data-group', group)
|
||||
.attr('class', 'show-in-tab')
|
||||
.html(tab.text);
|
||||
$bar = $('<li></li>').attr('data-group', group)
|
||||
.attr('id', 'tabBar-' + group)
|
||||
.attr('data-app', appCode)
|
||||
.attr('class', 'show-in-app')
|
||||
.html(app.text);
|
||||
$bar = $('<li></li>').attr('data-app', appCode)
|
||||
.attr('id', 'appBar-' + appCode)
|
||||
.append($link)
|
||||
.appendTo($bars);
|
||||
}
|
||||
var $lastActiveBar = $bars.find('li.active');
|
||||
if($lastActiveBar.data('group') !== group)
|
||||
if($lastActiveBar.data('app') !== appCode)
|
||||
{
|
||||
$lastActiveBar.removeClass('active');
|
||||
$bars.find('li[data-group="' + group + '"]').addClass('active');
|
||||
$bars.find('li[data-app="' + appCode + '"]').addClass('active');
|
||||
}
|
||||
tab.$bar = $bar;
|
||||
app.$bar = $bar;
|
||||
|
||||
/* Update tab state */
|
||||
tab.show = true;
|
||||
if(lastOpenedGroup !== group)
|
||||
/* Update app state */
|
||||
app.show = true;
|
||||
if(lastOpenedApp !== appCode)
|
||||
{
|
||||
lastOpenedGroup = group;
|
||||
updateTabUrl(group);
|
||||
lastOpenedApp = appCode;
|
||||
updateAppUrl(appCode);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get last opened tab
|
||||
* @param {boolean} [onlyShowed] If set to true then only get last tab from tabs are showed
|
||||
* @returns {object} The opened tab info object
|
||||
* Get last opened app
|
||||
* @param {boolean} [onlyShowed] If set to true then only get last app from apps are showed
|
||||
* @returns {object} The opened app info object
|
||||
*/
|
||||
function getLastTab(onlyShowed)
|
||||
function getLastApp(onlyShowed)
|
||||
{
|
||||
var lastShowIndex = 0;
|
||||
var lastTab = null;
|
||||
for(var group in openedTabs)
|
||||
var lastApp = null;
|
||||
for(var appCode in openedApps)
|
||||
{
|
||||
var tab = openedTabs[group];
|
||||
if((!onlyShowed || tab.show) && lastShowIndex < tab.zIndex && !tab.closed)
|
||||
var app = openedApps[appCode];
|
||||
if((!onlyShowed || app.show) && lastShowIndex < app.zIndex && !app.closed)
|
||||
{
|
||||
lastShowIndex = tab.zIndex;
|
||||
lastTab = tab;
|
||||
lastShowIndex = app.zIndex;
|
||||
lastApp = app;
|
||||
}
|
||||
}
|
||||
return lastTab;
|
||||
return lastApp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide tab
|
||||
* @param {string} group The group of target tab to hide
|
||||
* Hide app
|
||||
* @param {string} appCode The app code of target app to hide
|
||||
* @return {void}
|
||||
*/
|
||||
function hideTab(group)
|
||||
function hideApp(appCode)
|
||||
{
|
||||
var tab = openedTabs[group];
|
||||
if(!tab || !tab.show) return;
|
||||
var app = openedApps[appCode];
|
||||
if(!app || !app.show) return;
|
||||
|
||||
tab.$page.hide();
|
||||
tab.show = false;
|
||||
lastOpenedGroup = null;
|
||||
app.$app.hide();
|
||||
app.show = false;
|
||||
lastOpenedApp = null;
|
||||
|
||||
/* Active last tab */
|
||||
var lastTab = getLastTab(true) || getLastTab();
|
||||
showTab(lastTab ? lastTab.group : defaultTabGroup);
|
||||
/* Active last app */
|
||||
var lastApp = getLastApp(true) || getLastApp();
|
||||
showApp(lastApp ? lastApp.code : defaultApp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show tab
|
||||
* @param {string} group The group of target tab to show
|
||||
* Show app
|
||||
* @param {string} appCode The app code of target app to show
|
||||
* @return {void}
|
||||
*/
|
||||
function showTab(group)
|
||||
function showApp(appCode)
|
||||
{
|
||||
return openTab('', group);
|
||||
return openApp('', appCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle tab
|
||||
* @param {string} group The group of target tab to toggle
|
||||
* Toggle app
|
||||
* @param {string} appCode The app code of target app to toggle
|
||||
* @return {void}
|
||||
*/
|
||||
function toggleTab(group)
|
||||
function toggleApp(appCode)
|
||||
{
|
||||
var tab = openedTabs[group];
|
||||
if(!tab || tab.group !== lastOpenedGroup) showTab(group);
|
||||
else hideTab(group);
|
||||
var app = openedApps[appCode];
|
||||
if(!app || app.code !== lastOpenedApp) showApp(appCode);
|
||||
else hideApp(appCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Close tab
|
||||
* @param {string} group The group of target tab to close
|
||||
* Close app
|
||||
* @param {string} appCode The app code of target app to close
|
||||
*/
|
||||
function closeTab(group)
|
||||
function closeApp(appCode)
|
||||
{
|
||||
group = group || lastOpenedGroup;
|
||||
var tab = openedTabs[group];
|
||||
if(!tab) return;
|
||||
appCode = appCode || lastOpenedApp;
|
||||
var app = openedApps[appCode];
|
||||
if(!app) return;
|
||||
|
||||
tab.closed = true;
|
||||
hideTab(group);
|
||||
tab.$page.remove();
|
||||
tab.$bar.remove();
|
||||
delete openedTabs[group];
|
||||
app.closed = true;
|
||||
hideApp(appCode);
|
||||
app.$app.remove();
|
||||
app.$bar.remove();
|
||||
delete openedApps[appCode];
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload tab
|
||||
* @param {string} group The group of target tab to reload
|
||||
* Reload app
|
||||
* @param {string} appCode The app code of target app to reload
|
||||
* @param {string|boolean} [url] The new url to load, it's optional
|
||||
* @return {void}
|
||||
*/
|
||||
function reloadTab(group, url)
|
||||
function reloadApp(appCode, url)
|
||||
{
|
||||
var tab = openedTabs[group];
|
||||
if(!tab) return;
|
||||
var app = openedApps[appCode];
|
||||
if(!app) return;
|
||||
|
||||
if(url === true) url = tab.url;
|
||||
var iframe = tab.$iframe[0];
|
||||
if(url === true) url = app.url;
|
||||
var iframe = app.$iframe[0];
|
||||
|
||||
try
|
||||
{
|
||||
@@ -341,64 +341,64 @@
|
||||
}
|
||||
catch(_)
|
||||
{
|
||||
iframe.src = url || tab.url;
|
||||
iframe.src = url || app.url;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update browser url and title for the given tab
|
||||
* @param {string} group The group of target tab to update url
|
||||
* @param {string|boolean} [url] The new url of the tab
|
||||
* @param {string|boolean} [title] The new title of the tab
|
||||
* Update browser url and title for the given app
|
||||
* @param {string} appCode The app code of target app to update url
|
||||
* @param {string|boolean} [url] The new url of the app
|
||||
* @param {string|boolean} [title] The new title of the app
|
||||
* @return {void}
|
||||
*/
|
||||
function updateTabUrl(group, url, title)
|
||||
function updateAppUrl(appCode, url, title)
|
||||
{
|
||||
var tab = openedTabs[group];
|
||||
if(!tab) return;
|
||||
var app = openedApps[appCode];
|
||||
if(!app) return;
|
||||
|
||||
if(url) tab.pageUrl = url;
|
||||
else url = tab.pageUrl;
|
||||
if(title) tab.pageTitle = title;
|
||||
else title = tab.pageTitle || tab.text;
|
||||
if(url) app.appUrl = url;
|
||||
else url = app.appUrl;
|
||||
if(title) app.appTitle = title;
|
||||
else title = app.appTitle || app.text;
|
||||
|
||||
if(url && url.indexOf('#') < 0) url = url + '#open=' + group;
|
||||
if(lastOpenedGroup === group)
|
||||
if(url && url.indexOf('#') < 0 && getAppCodeFromUrl(url) !== appCode) url = url + '#app=' + appCode;
|
||||
if(lastOpenedApp === appCode)
|
||||
{
|
||||
if(location.url !== url) history.replaceState({}, title, url);
|
||||
if(location.url !== url) history.replaceState({app: appCode}, title, url);
|
||||
document.title = title;
|
||||
}
|
||||
}
|
||||
|
||||
/* Bind helper methods to global object "$.tabs" */
|
||||
$.tabs = window.tabs =
|
||||
/* Bind helper methods to global object "$.apps" */
|
||||
$.apps = window.apps =
|
||||
{
|
||||
show: showTab,
|
||||
open: openTab,
|
||||
hide: hideTab,
|
||||
toggle: toggleTab,
|
||||
close: closeTab,
|
||||
reload: reloadTab,
|
||||
updateUrl: updateTabUrl,
|
||||
getGroup: getGroupFromUrl,
|
||||
getLastTab: getLastTab,
|
||||
openedTabs: openedTabs,
|
||||
groupsMap: groupsMap
|
||||
show: showApp,
|
||||
open: openApp,
|
||||
hide: hideApp,
|
||||
toggle: toggleApp,
|
||||
close: closeApp,
|
||||
reload: reloadApp,
|
||||
updateUrl: updateAppUrl,
|
||||
getAppCode: getAppCodeFromUrl,
|
||||
getLastApp: getLastApp,
|
||||
openedApps: openedApps,
|
||||
appsMap: appsMap
|
||||
};
|
||||
|
||||
/* Init after current page load */
|
||||
$(function()
|
||||
{
|
||||
initMenuList();
|
||||
initAppsMenu();
|
||||
|
||||
/* Bind events */
|
||||
$(document).on('click', '.open-in-tab,.show-in-tab', function(e)
|
||||
$(document).on('click', '.open-in-app,.show-in-app', function(e)
|
||||
{
|
||||
var $link = $(this);
|
||||
if($link.is('[data-modal],[data-toggle],[data-tab],.iframe,.not-in-tab')) return;
|
||||
var url = $link.hasClass('show-in-tab') ? '' : ($link.attr('href') || $link.data('url'));
|
||||
if($link.is('[data-modal],[data-toggle],.iframe,.not-in-app')) return;
|
||||
var url = $link.hasClass('show-in-app') ? '' : ($link.attr('href') || $link.data('url'));
|
||||
if(url && url.indexOf('onlybody=yes') > 0) return;
|
||||
if(openTab(url, $link.data('group')))
|
||||
if(openApp(url, $link.data('app')))
|
||||
{
|
||||
e.preventDefault();
|
||||
if($link.closest('#userNav').length)
|
||||
@@ -407,19 +407,19 @@
|
||||
setTimeout(function(){$menu.removeClass('hidden')}, 200);
|
||||
}
|
||||
}
|
||||
}).on('contextmenu', '.open-in-tab,.show-in-tab', function(event)
|
||||
}).on('contextmenu', '.open-in-app,.show-in-app', function(event)
|
||||
{
|
||||
var $btn = $(this);
|
||||
var group = $btn.data('group');
|
||||
if(!group) return;
|
||||
var appCode = $btn.data('app');
|
||||
if(!appCode) return;
|
||||
|
||||
var lang = window.tabsLang;
|
||||
var tab = openedTabs[group];
|
||||
var items = [{label: lang.open, disabled: tab && lastOpenedGroup === group, onClick: function(){showTab(group)}}];
|
||||
if(tab)
|
||||
var lang = window.appsLang;
|
||||
var app = openedApps[appCode];
|
||||
var items = [{label: lang.open, disabled: app && lastOpenedApp === appCode, onClick: function(){showApp(appCode)}}];
|
||||
if(app)
|
||||
{
|
||||
items.push({label: lang.reload, onClick: function(){reloadTab(group)}});
|
||||
if(group !== 'my') items.push({label: lang.close, onClick: function(){closeTab(group)}});
|
||||
items.push({label: lang.reload, onClick: function(){reloadApp(appCode)}});
|
||||
if(appCode !== 'my') items.push({label: lang.close, onClick: function(){closeApp(appCode)}});
|
||||
}
|
||||
|
||||
var options = {event: event, onClickItem: function(_item, _$item, e){e.preventDefault();}};
|
||||
@@ -430,7 +430,7 @@
|
||||
if(pos === 'bar')
|
||||
{
|
||||
options.x = bounding.left;
|
||||
options.y = bounding.top - (group === 'my' ? 65 : 92);
|
||||
options.y = bounding.top - (appCode === 'my' ? 65 : 92);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -442,14 +442,14 @@
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
/* Redirect or open default tab after document load */
|
||||
/* Redirect or open default app after document load */
|
||||
var defaultOpenUrl = window.defaultOpen;
|
||||
if(!defaultOpenUrl && location.hash.indexOf('#open=') === 0)
|
||||
if(!defaultOpenUrl && location.hash.indexOf('#app=') === 0)
|
||||
{
|
||||
defaultOpenUrl = decodeURIComponent(location.hash.substr(6));
|
||||
defaultOpenUrl = decodeURIComponent(location.hash.substr(5));
|
||||
}
|
||||
if(defaultOpenUrl) openTab(defaultOpenUrl);
|
||||
else openTab(defaultTabGroup);
|
||||
if(defaultOpenUrl) openApp(defaultOpenUrl);
|
||||
else openApp(defaultApp);
|
||||
});
|
||||
}());
|
||||
|
||||
@@ -662,17 +662,17 @@ $(function()
|
||||
/* Change the search object according to the module and method. */
|
||||
function changeSearchObject()
|
||||
{
|
||||
var tabInfo = $.tabs.getLastTab();
|
||||
var tabPageModuleName = tabInfo.$iframe[0].contentWindow.config.currentModule;
|
||||
var tabPageMethodName = tabInfo.$iframe[0].contentWindow.config.currentMethod;
|
||||
var appInfo = $.apps.getLastApp();
|
||||
var appPageModuleName = appInfo.$iframe[0].contentWindow.config.currentModule;
|
||||
var appPageMethodName = appInfo.$iframe[0].contentWindow.config.currentMethod;
|
||||
|
||||
var searchType = tabPageModuleName;
|
||||
if(tabPageModuleName == 'product' && tabPageMethodName == 'browse') var searchType = 'story';
|
||||
var searchType = appPageModuleName;
|
||||
if(appPageModuleName == 'product' && appPageMethodName == 'browse') var searchType = 'story';
|
||||
|
||||
var projectMethod = 'task|story|bug|build';
|
||||
if(tabPageModuleName == 'project' && projectMethod.indexOf(tabPageMethodName) != -1) var searchType = tabPageMethodName;
|
||||
if(appPageModuleName == 'project' && projectMethod.indexOf(appPageMethodName) != -1) var searchType = appPageMethodName;
|
||||
|
||||
if(tabPageModuleName == 'my' || tabPageModuleName == 'user') var searchType = tabPageMethodName;
|
||||
if(appPageModuleName == 'my' || appPageModuleName == 'user') var searchType = appPageMethodName;
|
||||
|
||||
if(searchObjectList.indexOf(',' + searchType + ',') == -1) var searchType = 'bug';
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ $lang->index->common = 'Home';
|
||||
$lang->index->index = 'Home';
|
||||
$lang->index->search = 'Please input';
|
||||
|
||||
$lang->index->tab = new stdClass();
|
||||
$lang->index->tab->open = 'Open';
|
||||
$lang->index->tab->reload = 'Reload';
|
||||
$lang->index->tab->close = 'Close';
|
||||
$lang->index->app = new stdClass();
|
||||
$lang->index->app->open = 'Open';
|
||||
$lang->index->app->reload = 'Reload';
|
||||
$lang->index->app->close = 'Close';
|
||||
|
||||
$lang->index->upgradeVersion = 'New version of Zen Tao';
|
||||
$lang->index->currentVersion = 'Current Version';
|
||||
|
||||
@@ -3,10 +3,10 @@ $lang->index->common = 'Home';
|
||||
$lang->index->index = 'Home';
|
||||
$lang->index->search = 'Please input';
|
||||
|
||||
$lang->index->tab = new stdClass();
|
||||
$lang->index->tab->open = 'Open';
|
||||
$lang->index->tab->reload = 'Reload';
|
||||
$lang->index->tab->close = 'Close';
|
||||
$lang->index->app = new stdClass();
|
||||
$lang->index->app->open = 'Open';
|
||||
$lang->index->app->reload = 'Reload';
|
||||
$lang->index->app->close = 'Close';
|
||||
|
||||
$lang->index->upgradeVersion = 'New version of Zen Tao';
|
||||
$lang->index->currentVersion = 'Current Version';
|
||||
|
||||
@@ -3,10 +3,10 @@ $lang->index->common = 'Accueil';
|
||||
$lang->index->index = 'Accueil';
|
||||
$lang->index->search = 'Please input';
|
||||
|
||||
$lang->index->tab = new stdClass();
|
||||
$lang->index->tab->open = 'Open';
|
||||
$lang->index->tab->reload = 'Reload';
|
||||
$lang->index->tab->close = 'Close';
|
||||
$lang->index->app = new stdClass();
|
||||
$lang->index->app->open = 'Open';
|
||||
$lang->index->app->reload = 'Reload';
|
||||
$lang->index->app->close = 'Close';
|
||||
|
||||
$lang->index->upgradeVersion = 'New version of Zen Tao';
|
||||
$lang->index->currentVersion = 'Current Version';
|
||||
|
||||
@@ -3,10 +3,10 @@ $lang->index->common = 'Trang chủ';
|
||||
$lang->index->index = 'Trang chủ';
|
||||
$lang->index->search = 'Please input';
|
||||
|
||||
$lang->index->tab = new stdClass();
|
||||
$lang->index->tab->open = 'Open';
|
||||
$lang->index->tab->reload = 'Reload';
|
||||
$lang->index->tab->close = 'Close';
|
||||
$lang->index->app = new stdClass();
|
||||
$lang->index->app->open = 'Open';
|
||||
$lang->index->app->reload = 'Reload';
|
||||
$lang->index->app->close = 'Close';
|
||||
|
||||
$lang->index->upgradeVersion = 'New version of Zen Tao';
|
||||
$lang->index->currentVersion = 'Current Version';
|
||||
|
||||
@@ -3,10 +3,10 @@ $lang->index->common = '首页';
|
||||
$lang->index->index = '首页';
|
||||
$lang->index->search = '请输入';
|
||||
|
||||
$lang->index->tab = new stdClass();
|
||||
$lang->index->tab->open = '打开';
|
||||
$lang->index->tab->reload = '刷新';
|
||||
$lang->index->tab->close = '关闭';
|
||||
$lang->index->app = new stdClass();
|
||||
$lang->index->app->open = '打开';
|
||||
$lang->index->app->reload = '刷新';
|
||||
$lang->index->app->close = '关闭';
|
||||
|
||||
$lang->index->upgradeVersion = '禅道新版本';
|
||||
$lang->index->currentVersion = '当前版本';
|
||||
|
||||
@@ -3,10 +3,10 @@ $lang->index->common = '首頁';
|
||||
$lang->index->index = '首頁';
|
||||
$lang->index->search = '請輸入';
|
||||
|
||||
$lang->index->tab = new stdClass();
|
||||
$lang->index->tab->open = '打開';
|
||||
$lang->index->tab->reload = '刷新';
|
||||
$lang->index->tab->close = '關閉';
|
||||
$lang->index->app = new stdClass();
|
||||
$lang->index->app->open = '打開';
|
||||
$lang->index->app->reload = '刷新';
|
||||
$lang->index->app->close = '關閉';
|
||||
|
||||
$lang->index->upgradeVersion = '禪道新版本';
|
||||
$lang->index->currentVersion = '當前版本';
|
||||
|
||||
@@ -15,15 +15,15 @@ $this->app->loadConfig('sso');
|
||||
if(!empty($config->sso->redirect)) js::set('ssoRedirect', $config->sso->redirect);
|
||||
|
||||
js::set('navGroup', $lang->navGroup);
|
||||
js::set('tabsLang', $lang->index->tab);
|
||||
js::set('menuItems', commonModel::getMainNavList($app->rawModule));
|
||||
js::set('appsLang', $lang->index->app);
|
||||
js::set('appsMenuItems', commonModel::getMainNavList($app->rawModule));
|
||||
js::set('defaultOpen', $open);
|
||||
?>
|
||||
<?php if(isset($this->config->bizVersion)):?>
|
||||
<style>#searchbox .dropdown-menu.show-quick-go.with-active {top: -468px; max-height: 465px;}</style>
|
||||
<?php endif;?>
|
||||
<div id='menu'>
|
||||
<nav id='menuNav' data-group='<?php echo $app->rawModule; ?>'>
|
||||
<nav id='menuNav'>
|
||||
<ul class='nav nav-default' id='menuMainNav'>
|
||||
</ul>
|
||||
<ul class='nav nav-default'>
|
||||
@@ -47,9 +47,9 @@ js::set('defaultOpen', $open);
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id='pages'>
|
||||
<div id='apps'>
|
||||
</div>
|
||||
<div id='pagesBar'>
|
||||
<div id='appsBar'>
|
||||
<ul id='bars' class='nav nav-default'></ul>
|
||||
<div id='poweredBy'>
|
||||
<div id="globalBarLogo">
|
||||
|
||||
@@ -157,8 +157,8 @@ class personnel extends control
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => $this->getError()));
|
||||
|
||||
$locateLink = $this->session->whitelistBrowse ? $this->session->whitelistBrowse : $this->createLink($module, 'whitelist', "objectID=$objectID");
|
||||
$openGroup = $module == 'program' ? ($from == 'PRJ' || $from == 'my' ? '#open=project' : '#open=program') : '';
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink . $openGroup));
|
||||
$openApp = $module == 'program' ? ($from == 'PRJ' || $from == 'my' ? '#open=project' : '#open=program') : '';
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink . $openApp));
|
||||
}
|
||||
|
||||
$this->loadModel('dept');
|
||||
|
||||
@@ -12,17 +12,17 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php $openGroup = $module == 'program' ? ($from == 'PRJ' || $from == 'my' ? "data-group='project'" : "data-group='program'") : '';?>
|
||||
<?php $openApp = $module == 'program' ? ($from == 'PRJ' || $from == 'my' ? "data-group='project'" : "data-group='program'") : '';?>
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php if($module == 'program') echo html::a($goback, $lang->goback, '', 'class="btn btn-secondary"');?>
|
||||
<?php $moduleMethod = $module == 'program' ? 'PRJWhitelist' : 'whitelist';?>
|
||||
<?php $vars = $module == 'program' ? "objectID=$objectID&programID=$programID&module=$module&from=$from" : "objectID=$objectID";?>
|
||||
<?php echo html::a($this->createLink($module, $moduleMethod, $vars), '<span class="text">' . $lang->personnel->whitelist . '</span>', '', "class='btn btn-link btn-active-text' $openGroup");?>
|
||||
<?php echo html::a($this->createLink($module, $moduleMethod, $vars), '<span class="text">' . $lang->personnel->whitelist . '</span>', '', "class='btn btn-link btn-active-text' $openApp");?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php $moduleMethod = $module == 'program' ? 'PRJAddWhitelist' : 'addWhitelist';?>
|
||||
<?php $vars = $module == 'program' ? "objectID=$objectID&deptID=0&programID=$programID&from=$from" : "objectID=$objectID";?>
|
||||
<?php common::printLink($module, $moduleMethod, $vars, "<i class='icon icon-plus'></i>" . $lang->personnel->addWhitelist, '', "class='btn btn-primary' $openGroup");?>
|
||||
<?php common::printLink($module, $moduleMethod, $vars, "<i class='icon icon-plus'></i>" . $lang->personnel->addWhitelist, '', "class='btn btn-primary' $openApp");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class='main-row fade'>
|
||||
@@ -61,7 +61,7 @@
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$deleteClass = common::hasPriv($module, 'unbindWhielist') ? 'btn' : 'btn disabled';
|
||||
echo html::a($this->createLink($module, 'unbindWhielist', "id=$user->id&confirm=no"), '<i class="icon-unlink"></i>', 'hiddenwin', "title='{$lang->personnel->delete}' class='{$deleteClass}' $openGroup");
|
||||
echo html::a($this->createLink($module, 'unbindWhielist', "id=$user->id&confirm=no"), '<i class="icon-unlink"></i>', 'hiddenwin', "title='{$lang->personnel->delete}' class='{$deleteClass}' $openApp");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -909,7 +909,7 @@ class product extends control
|
||||
$this->view->products = $products;
|
||||
$this->view->projectID = $moduleGroup == 'project' ? $this->session->PRJ : 0;
|
||||
$this->view->programs = $this->loadModel('program')->getPGMPairs(true);
|
||||
$this->view->openGroup = $moduleGroup;
|
||||
$this->view->openApp = $moduleGroup;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1011,7 +1011,7 @@ class product extends control
|
||||
|
||||
/**
|
||||
* Manage product line.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -27,19 +27,19 @@ foreach($products as $product)
|
||||
{
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
|
||||
$myProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openGroup'");
|
||||
$myProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "class='text-important' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openApp'");
|
||||
}
|
||||
else if($product->status == 'normal' and !($product->PO == $this->app->user->account))
|
||||
{
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
|
||||
$normalProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openGroup'");
|
||||
$normalProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openApp'");
|
||||
}
|
||||
else if($product->status == 'closed')
|
||||
{
|
||||
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
|
||||
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $objectID);
|
||||
$closedProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openGroup'");
|
||||
$closedProductsHtml .= html::a($linkHtml, html::icon($lang->icons['product']) . ' ' . $productName, '', "title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-group='$openApp'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -118,9 +118,9 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-export muted"></i> <span class="text"><?php echo $lang->export ?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" id='exportActionMenu'>
|
||||
<?php
|
||||
$openGroup = $isProjectStory ? 'project' : 'product';
|
||||
$openApp = $isProjectStory ? 'project' : 'product';
|
||||
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('story', 'export') ? "class='export' data-group='$openGroup'" : "class=disabled";
|
||||
$misc = common::hasPriv('story', 'export') ? "class='export' data-group='$openApp'" : "class=disabled";
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType&type=$storyType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
@@ -132,13 +132,13 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<ul class='dropdown-menu'>
|
||||
<li>
|
||||
<?php
|
||||
$openGroup = $isProjectStory ? 'project' : 'product';
|
||||
$openApp = $isProjectStory ? 'project' : 'product';
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID");
|
||||
if($isProjectStory) $wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&moduleID=$moduleID&storyID=&projectID={$this->session->PRJ}");
|
||||
$link = $this->createLink('tutorial', 'wizard', "module=story&method=create¶ms=$wizardParams");
|
||||
echo html::a($link, $lang->story->createCommon, '', "data-group='$openGroup'");
|
||||
echo html::a($link, $lang->story->createCommon, '', "data-group='$openApp'");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -150,7 +150,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
$link = '###';
|
||||
$disabled = 'disabled';
|
||||
}
|
||||
echo html::a($link, $lang->story->createCommon, '', "class='$disabled' data-group='$openGroup'");
|
||||
echo html::a($link, $lang->story->createCommon, '', "class='$disabled' data-group='$openApp'");
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
@@ -159,7 +159,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<?php
|
||||
$batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project=0&plan=0&type=$storyType");
|
||||
if($isProjectStory) $batchLink = $this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=0&project={$this->session->PRJ}");
|
||||
echo html::a($batchLink, $lang->story->batchCreate, '', "data-group='$openGroup'");
|
||||
echo html::a($batchLink, $lang->story->batchCreate, '', "data-group='$openApp'");
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -213,8 +213,8 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<span class="text-muted"><?php echo $storyType == 'story' ? $lang->story->noStory : $lang->story->noRequirement;?></span>
|
||||
<?php if(common::canModify('product', $product) and common::hasPriv('story', 'create')):?>
|
||||
<?php $projectID = $isProjectStory ? $this->session->PRJ : 0;?>
|
||||
<?php $openGroup = $isProjectStory ? 'project' : 'product';?>
|
||||
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=$storyType"), "<i class='icon icon-plus'></i> " . $lang->story->createCommon, '', "class='btn btn-info' data-group='$openGroup'");?>
|
||||
<?php $openApp = $isProjectStory ? 'project' : 'product';?>
|
||||
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=$storyType"), "<i class='icon icon-plus'></i> " . $lang->story->createCommon, '', "class='btn btn-info' data-group='$openApp'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
@@ -270,7 +270,7 @@ $isProjectStory = $this->app->rawModule == 'projectstory';
|
||||
<?php foreach($setting as $key => $value) $this->story->printCell($value, $story, $users, $branches, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table');?>
|
||||
</tr>
|
||||
<?php if(!empty($story->children)):?>
|
||||
<?php $i = 0;?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($story->children as $key => $child):?>
|
||||
<?php $child->from = $from;?>
|
||||
<?php $class = $i == 0 ? ' table-child-top' : '';?>
|
||||
|
||||
@@ -1107,8 +1107,8 @@ class projectModel extends model
|
||||
}
|
||||
|
||||
$from = $project->from == 'PRJ' ? 'PRJ' : 'pgmproject';
|
||||
$openGroup = $project->from == 'PRJ' ? 'project' : 'project';
|
||||
common::printIcon('project', 'edit', "projectID=$project->id&from=$from", $project, 'list', 'edit', '', '', '', "data-group=$openGroup", '', $project->id);
|
||||
$openApp = $project->from == 'PRJ' ? 'project' : 'project';
|
||||
common::printIcon('project', 'edit', "projectID=$project->id&from=$from", $project, 'list', 'edit', '', '', '', "data-app=$openApp", '', $project->id);
|
||||
common::printIcon('project', 'manageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', '', $this->lang->execution->team, $project->id);
|
||||
if($this->config->systemMode == 'new') common::printIcon('project', 'group', "projectID=$project->id&projectID=$projectID", $project, 'list', 'lock', '', '', '', '', '', $project->id);
|
||||
|
||||
@@ -1117,8 +1117,8 @@ class projectModel extends model
|
||||
echo "<div class='btn-group'>";
|
||||
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
|
||||
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
|
||||
common::printIcon('project', 'manageProducts', "projectID=$project->id&projectID=$projectID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openGroup", $this->lang->project->manageProducts, $project->id);
|
||||
if($this->config->systemMode == 'new') common::printIcon('project', 'whitelist', "projectID=$project->id&projectID=$projectID&module=project&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openGroup", '', $project->id);
|
||||
common::printIcon('project', 'manageProducts', "projectID=$project->id&projectID=$projectID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-app=$openApp", $this->lang->project->manageProducts, $project->id);
|
||||
if($this->config->systemMode == 'new') common::printIcon('project', 'whitelist', "projectID=$project->id&projectID=$projectID&module=project&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-app=$openApp", '', $project->id);
|
||||
if(common::hasPriv('project','delete')) echo html::a(inLink("delete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->project->delete}'");
|
||||
echo "</ul>";
|
||||
echo "</div>";
|
||||
|
||||
@@ -547,7 +547,7 @@ class projectrelease extends control
|
||||
$this->config->bug->search['style'] = 'simple';
|
||||
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
|
||||
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, $viewType = 'bug', $startModuleID = 0);
|
||||
$this->config->bug->search['params']['project']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, 0, 'id_desc', $this->session->project);
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product, 0, 'id_desc', $this->session->project);
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product, $branch = 0, $params = '');
|
||||
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
|
||||
if($this->session->currentProductType == 'normal')
|
||||
|
||||
@@ -23,7 +23,7 @@ class projectStory extends control
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=projectstory")));
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class projectStory extends control
|
||||
$this->session->set('storyList',$this->app->getURI(true));
|
||||
if(empty($productID)) $productID = key($this->products);
|
||||
|
||||
$this->lang->menugroup->product = 'projectstory';
|
||||
$this->lang->menugroup->product = 'projectstory';
|
||||
|
||||
$this->lang->story->title = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->title);
|
||||
$this->lang->story->createRequirement = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->createRequirement);
|
||||
@@ -89,7 +89,7 @@ class projectStory extends control
|
||||
public function view($storyID)
|
||||
{
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->PRJ);
|
||||
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->project);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,7 +106,7 @@ class projectStory extends control
|
||||
*/
|
||||
public function linkStory($projectID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 50, $pageID = 1)
|
||||
{
|
||||
echo $this->fetch('project', 'linkStory', "projectID=$projectID&browseType=$browseType¶m=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
echo $this->fetch('execution', 'linkStory', "projectID=$projectID&browseType=$browseType¶m=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,7 +120,7 @@ class projectStory extends control
|
||||
*/
|
||||
public function unlinkStory($projectID, $storyID, $confirm = 'no')
|
||||
{
|
||||
echo $this->fetch('project', 'unlinkStory', "projectID=$projectID&storyID=$storyID&confirm=$confirm");
|
||||
echo $this->fetch('execution', 'unlinkStory', "projectID=$projectID&storyID=$storyID&confirm=$confirm");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class qa extends control
|
||||
parent::__construct();
|
||||
|
||||
/* Set report menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
@@ -40,7 +40,7 @@ class qa extends control
|
||||
|
||||
/**
|
||||
* The index of qa, go to bug's browse page.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
+66
-66
@@ -13,9 +13,9 @@ class release extends control
|
||||
{
|
||||
/**
|
||||
* Common actions.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -37,10 +37,10 @@ class release extends control
|
||||
|
||||
/**
|
||||
* Browse releases.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $type
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -58,9 +58,9 @@ class release extends control
|
||||
|
||||
/**
|
||||
* Create a release.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -88,8 +88,8 @@ class release extends control
|
||||
|
||||
/**
|
||||
* Edit a release.
|
||||
*
|
||||
* @param int $releaseID
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -123,18 +123,18 @@ class release extends control
|
||||
$this->view->release = $release;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* View a release.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @param string $link
|
||||
* @param string $param
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @param string $link
|
||||
* @param string $param
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -200,11 +200,11 @@ class release extends control
|
||||
$this->view->leftBugPager = $leftBugPager;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete a release.
|
||||
*
|
||||
* @param int $releaseID
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $confirm yes|no
|
||||
* @access public
|
||||
* @return void
|
||||
@@ -221,7 +221,7 @@ class release extends control
|
||||
|
||||
$release = $this->dao->select('*')->from(TABLE_RELEASE)->where('id')->eq((int)$releaseID)->fetch();
|
||||
$build = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq((int)$release->build)->fetch();
|
||||
if(empty($build->project)) $this->loadModel('build')->delete(TABLE_BUILD, $build->id);
|
||||
if(empty($build->execution)) $this->loadModel('build')->delete(TABLE_BUILD, $build->id);
|
||||
|
||||
$this->executeHooks($releaseID);
|
||||
|
||||
@@ -248,7 +248,7 @@ class release extends control
|
||||
|
||||
/**
|
||||
* Export the stories of release to HTML.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -357,13 +357,13 @@ class release extends control
|
||||
|
||||
/**
|
||||
* Link stories
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -377,7 +377,7 @@ class release extends control
|
||||
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
|
||||
|
||||
$release = $this->release->getById($releaseID);
|
||||
$build = $this->loadModel('build')->getByID($release->build);
|
||||
$build = $this->loadModel('build')->getByID($release->build);
|
||||
$this->commonAction($release->product);
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('tree');
|
||||
@@ -413,11 +413,11 @@ class release extends control
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allStories = $this->story->getBySearch($release->product, $release->branch, $queryID, 'id', $build->project ? $build->project : '', 'story', $release->stories, $pager);
|
||||
$allStories = $this->story->getBySearch($release->product, $release->branch, $queryID, 'id', $build->execution ? $build->execution : '', 'story', $release->stories, $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
$allStories = $this->story->getProjectStories($build->project, 0, 0, 't1.`order`_desc', 'byProduct', $release->product, 'story', $release->stories, $pager);
|
||||
$allStories = $this->story->getProjectStories($build->execution, 0, 0, 't1.`order`_desc', 'byProduct', $release->product, 'story', $release->stories, $pager);
|
||||
}
|
||||
|
||||
$this->view->allStories = $allStories;
|
||||
@@ -431,10 +431,10 @@ class release extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink story
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $storyID
|
||||
* Unlink story
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -461,9 +461,9 @@ class release extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch unlink story.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* Batch unlink story.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -475,14 +475,14 @@ class release extends control
|
||||
|
||||
/**
|
||||
* Link bugs.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param string $type
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param string $type
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -497,7 +497,7 @@ class release extends control
|
||||
$this->session->set('bugList', inlink('view', "releaseID=$releaseID&type=$type&link=true¶m=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
|
||||
/* Set menu. */
|
||||
$release = $this->release->getByID($releaseID);
|
||||
$build = $this->loadModel('build')->getByID($release->build);
|
||||
$build = $this->loadModel('build')->getByID($release->build);
|
||||
$this->commonAction($release->product);
|
||||
|
||||
/* Load pager. */
|
||||
@@ -513,7 +513,7 @@ class release extends control
|
||||
$this->config->bug->search['style'] = 'simple';
|
||||
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
|
||||
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, $viewType = 'bug', $startModuleID = 0);
|
||||
$this->config->bug->search['params']['project']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product);
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product);
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product, $branch = 0, $params = '');
|
||||
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
|
||||
if($this->session->currentProductType == 'normal')
|
||||
@@ -536,7 +536,7 @@ class release extends control
|
||||
{
|
||||
$allBugs = $this->bug->getBySearch($release->product, $release->branch, $queryID, 'id_desc', $releaseBugs, $pager);
|
||||
}
|
||||
elseif($build->project)
|
||||
elseif($build->execution)
|
||||
{
|
||||
if($type == 'bug')
|
||||
{
|
||||
@@ -560,11 +560,11 @@ class release extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink story
|
||||
*
|
||||
* Unlink story
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $bugID
|
||||
* @param string $type
|
||||
* @param int $bugID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -591,10 +591,10 @@ class release extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch unlink story.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* Batch unlink story.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -606,9 +606,9 @@ class release extends control
|
||||
|
||||
/**
|
||||
* Change status.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $status
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $status
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
+49
-49
@@ -15,8 +15,8 @@ class releaseModel extends model
|
||||
{
|
||||
/**
|
||||
* Get release by id.
|
||||
*
|
||||
* @param int $releaseID
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param bool $setImgSize
|
||||
* @access public
|
||||
* @return object
|
||||
@@ -42,20 +42,20 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Get list of releases.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $type
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($productID, $branch = 0, $type = 'all')
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.name as productName, t3.id as buildID, t3.name as buildName, t3.project, t4.name as PRJName')
|
||||
return $this->dao->select('t1.*, t2.name as productName, t3.id as buildID, t3.name as buildName, t3.project, t4.name as projectName')
|
||||
->from(TABLE_RELEASE)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
|
||||
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.PRJ = t4.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.project = t4.id')
|
||||
->where('t1.product')->eq((int)$productID)
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($type != 'all')->andWhere('t1.status')->eq($type)->fi()
|
||||
@@ -66,11 +66,11 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Get last release.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return bool | object
|
||||
* @return bool | object
|
||||
*/
|
||||
public function getLast($productID, $branch = 0)
|
||||
{
|
||||
@@ -84,9 +84,9 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Get release builds from product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -102,9 +102,9 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Create a release.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
@@ -144,13 +144,13 @@ class releaseModel extends model
|
||||
else
|
||||
{
|
||||
$build = new stdclass();
|
||||
$build->product = (int)$productID;
|
||||
$build->branch = (int)$branch;
|
||||
$build->name = $release->name;
|
||||
$build->date = $release->date;
|
||||
$build->builder = $this->app->user->account;
|
||||
$build->desc = $release->desc;
|
||||
$build->project = 0;
|
||||
$build->product = (int)$productID;
|
||||
$build->branch = (int)$branch;
|
||||
$build->name = $release->name;
|
||||
$build->date = $release->date;
|
||||
$build->builder = $this->app->user->account;
|
||||
$build->desc = $release->desc;
|
||||
$build->execution = 0;
|
||||
|
||||
$build = $this->loadModel('file')->processImgURL($build, $this->config->release->editor->create['id']);
|
||||
$this->app->loadLang('build');
|
||||
@@ -201,8 +201,8 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Update a release.
|
||||
*
|
||||
* @param int $releaseID
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -234,8 +234,8 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Link stories
|
||||
*
|
||||
* @param int $releaseID
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -270,10 +270,10 @@ class releaseModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink story
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $storyID
|
||||
* Unlink story
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -287,8 +287,8 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Batch unlink story.
|
||||
*
|
||||
* @param int $releaseID
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -309,9 +309,9 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Link bugs.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -334,11 +334,11 @@ class releaseModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink bug.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $bugID
|
||||
* @param string $type
|
||||
* Unlink bug.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param int $bugID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -353,9 +353,9 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Batch unlink bug.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -377,9 +377,9 @@ class releaseModel extends model
|
||||
|
||||
/**
|
||||
* Change status.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $status
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $status
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
@@ -63,13 +63,13 @@
|
||||
<tr>
|
||||
<td><?php echo html::a(inlink('view', "releaseID=$release->id"), sprintf('%03d', $release->id));?></td>
|
||||
<td>
|
||||
<?php
|
||||
<?php
|
||||
$flagIcon = $release->marker ? "<icon class='icon icon-flag red' title='{$lang->release->marker}'></icon> " : '';
|
||||
echo html::a(inlink('view', "release=$release->id"), $release->name, '', "title='$release->name'") . $flagIcon;
|
||||
?>
|
||||
</td>
|
||||
<td title='<?php echo $release->PRJName?>'><?php echo $release->PRJName;?></td>
|
||||
<td title='<?php echo $release->buildName?>'><?php echo empty($release->project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
|
||||
<td title='<?php echo $release->projectName?>'><?php echo $release->projectName;?></td>
|
||||
<td title='<?php echo $release->buildName?>'><?php echo empty($release->execution) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<td class='text-center' title='<?php echo zget($branches, $release->branch, '');?>'><?php echo $branches[$release->branch];?></td>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->release->build;?></th>
|
||||
<td title='<?php echo $release->buildName?>'>
|
||||
<?php echo ($release->project) ? html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName, '_blank') : $release->buildName;?>
|
||||
<?php echo ($release->execution) ? html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName, '_blank') : $release->buildName;?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
+75
-75
@@ -12,7 +12,7 @@ class repo extends control
|
||||
{
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ class repo extends control
|
||||
}
|
||||
|
||||
/* Set repo menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->lang->navGroup->repo = 'repo';
|
||||
@@ -150,10 +150,10 @@ class repo extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete repo.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $confirm
|
||||
* Delete repo.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -180,13 +180,13 @@ class repo extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* View repo file.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $entry
|
||||
* @param string $revision
|
||||
* @param string $showBug
|
||||
* @param string $encoding
|
||||
* View repo file.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $entry
|
||||
* @param string $revision
|
||||
* @param string $showBug
|
||||
* @param string $encoding
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -215,12 +215,12 @@ class repo extends control
|
||||
if($info->kind == 'dir') $this->locate($this->repo->createLink('browse', "repoID=$repoID&path=" . $this->repo->encodePath($path) . "&revision=$revision"));
|
||||
$content = $this->scm->cat($entry, $revision);
|
||||
$entry = urldecode($entry);
|
||||
$pathInfo = pathinfo($entry);
|
||||
$pathInfo = pathinfo($entry);
|
||||
$encoding = empty($encoding) ? $repo->encoding : $encoding;
|
||||
$encoding = strtolower(str_replace('_', '-', $encoding));
|
||||
|
||||
$suffix = '';
|
||||
if(isset($pathInfo["extension"])) $suffix = strtolower($pathInfo["extension"]);
|
||||
$suffix = '';
|
||||
if(isset($pathInfo["extension"])) $suffix = strtolower($pathInfo["extension"]);
|
||||
if(!$suffix or (!array_key_exists($suffix, $this->config->program->suffix) and strpos($this->config->repo->images, "|$suffix|") === false)) $suffix = $this->repo->isBinary($content, $suffix) ? 'binary' : 'c';
|
||||
|
||||
if(strpos($this->config->repo->images, "|$suffix|") !== false)
|
||||
@@ -279,12 +279,12 @@ class repo extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse repo.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @param string $revision
|
||||
* @param int $refresh
|
||||
* Browse repo.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @param string $revision
|
||||
* @param int $refresh
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -394,14 +394,14 @@ class repo extends control
|
||||
|
||||
/**
|
||||
* show repo log.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $entry
|
||||
* @param string $revision
|
||||
* @param string $type
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $entry
|
||||
* @param string $revision
|
||||
* @param string $type
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -547,12 +547,12 @@ class repo extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Blame repo file.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $entry
|
||||
* @param string $revision
|
||||
* @param string $encoding
|
||||
* Blame repo file.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $entry
|
||||
* @param string $revision
|
||||
* @param string $encoding
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -593,13 +593,13 @@ class repo extends control
|
||||
|
||||
/**
|
||||
* Show diff.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $entry
|
||||
* @param string $oldRevision
|
||||
* @param string $newRevision
|
||||
* @param string $showBug
|
||||
* @param string $encoding
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $entry
|
||||
* @param string $oldRevision
|
||||
* @param string $newRevision
|
||||
* @param string $showBug
|
||||
* @param string $encoding
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -612,9 +612,9 @@ class repo extends control
|
||||
$repo = $this->repo->getRepoByID($repoID);
|
||||
$entry = $this->repo->decodePath($entry);
|
||||
|
||||
$pathInfo = pathinfo($entry);
|
||||
$suffix = '';
|
||||
if(isset($pathInfo["extension"])) $suffix = strtolower($pathInfo["extension"]);
|
||||
$pathInfo = pathinfo($entry);
|
||||
$suffix = '';
|
||||
if(isset($pathInfo["extension"])) $suffix = strtolower($pathInfo["extension"]);
|
||||
|
||||
$arrange = $this->cookie->arrange ? $this->cookie->arrange : 'inline';
|
||||
if($this->server->request_method == 'POST')
|
||||
@@ -622,7 +622,7 @@ class repo extends control
|
||||
$oldRevision = isset($this->post->revision[1]) ? $this->post->revision[1] : '';
|
||||
$newRevision = isset($this->post->revision[0]) ? $this->post->revision[0] : '';
|
||||
|
||||
if($this->post->arrange)
|
||||
if($this->post->arrange)
|
||||
{
|
||||
$arrange = $this->post->arrange;
|
||||
setcookie('arrange', $arrange);
|
||||
@@ -700,13 +700,13 @@ class repo extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Download repo file.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @param string $fromRevision
|
||||
* @param string $toRevision
|
||||
* @param string $type
|
||||
* Download repo file.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @param string $fromRevision
|
||||
* @param string $toRevision
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -725,7 +725,7 @@ class repo extends control
|
||||
|
||||
/**
|
||||
* Set Rules.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -753,9 +753,9 @@ class repo extends control
|
||||
|
||||
/**
|
||||
* Show sync comment.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $branch
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -778,9 +778,9 @@ class repo extends control
|
||||
|
||||
/**
|
||||
* Ajax sync comment.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $type
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -869,9 +869,9 @@ class repo extends control
|
||||
|
||||
/**
|
||||
* Ajax sync git branch comment.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $branch
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -917,13 +917,13 @@ class repo extends control
|
||||
|
||||
/**
|
||||
* Ajax show side logs.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @param string $type
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @param string $type
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -949,10 +949,10 @@ class repo extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get svn tags
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* Ajax get svn tags
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
+153
-153
@@ -3,8 +3,8 @@ class repoModel extends model
|
||||
{
|
||||
/**
|
||||
* Check repo priv.
|
||||
*
|
||||
* @param object $repo
|
||||
*
|
||||
* @param object $repo
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -26,10 +26,10 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Set menu.
|
||||
*
|
||||
* @param array $repos
|
||||
* @param int $repoID
|
||||
* @param bool $showSeleter
|
||||
*
|
||||
* @param array $repos
|
||||
* @param int $repoID
|
||||
* @param bool $showSeleter
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -104,12 +104,12 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the select code of repos.
|
||||
*
|
||||
* @param array $repos
|
||||
* @param int $repoID
|
||||
* @param string $currentModule
|
||||
* @param string $currentMethod
|
||||
* Create the select code of repos.
|
||||
*
|
||||
* @param array $repos
|
||||
* @param int $repoID
|
||||
* @param string $currentModule
|
||||
* @param string $currentMethod
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -154,7 +154,7 @@ class repoModel extends model
|
||||
foreach($repos as $i => $repo)
|
||||
{
|
||||
$repo->acl = json_decode($repo->acl);
|
||||
if(!$this->checkPriv($repo))
|
||||
if(!$this->checkPriv($repo))
|
||||
{
|
||||
unset($repos[$i]);
|
||||
}
|
||||
@@ -169,8 +169,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get list by SCM.
|
||||
*
|
||||
* @param string $scm
|
||||
*
|
||||
* @param string $scm
|
||||
* @param string $type all|haspriv
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -287,7 +287,7 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get repo pairs.
|
||||
*
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -306,7 +306,7 @@ class repoModel extends model
|
||||
{
|
||||
$repo->acl = json_decode($repo->acl);
|
||||
$scm = $repo->SCM == 'Subversion' ? 'svn' : 'git';
|
||||
if($this->checkPriv($repo))
|
||||
if($this->checkPriv($repo))
|
||||
{
|
||||
if($projectID)
|
||||
{
|
||||
@@ -326,9 +326,9 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get repo by id.
|
||||
*
|
||||
* @param int $repoID
|
||||
* Get repo by id.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -344,8 +344,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get by id list.
|
||||
*
|
||||
* @param array $idList
|
||||
*
|
||||
* @param array $idList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -363,8 +363,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get git branches.
|
||||
*
|
||||
* @param object $repo
|
||||
*
|
||||
* @param object $repo
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -377,7 +377,7 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get commits.
|
||||
*
|
||||
*
|
||||
* @param object $repo
|
||||
* @param string $entry
|
||||
* @param string $revision
|
||||
@@ -444,8 +444,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get latest commit.
|
||||
*
|
||||
* @param int $repoID
|
||||
*
|
||||
* @param int $repoID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
@@ -477,12 +477,12 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get revisions from db.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $limit
|
||||
* @param string $maxRevision
|
||||
* @param string $minRevision
|
||||
* Get revisions from db.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $limit
|
||||
* @param string $maxRevision
|
||||
* @param string $minRevision
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -508,9 +508,9 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get history.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param array $revisions
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param array $revisions
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -526,9 +526,9 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get git revisionName.
|
||||
*
|
||||
* @param string $revision
|
||||
* @param int $commit
|
||||
*
|
||||
* @param string $revision
|
||||
* @param int $commit
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -540,10 +540,10 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get cache file.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @param int $revision
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @param int $revision
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -557,11 +557,11 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Save commit.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param array $logs
|
||||
* @param int $version
|
||||
* @param string $branch
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param array $logs
|
||||
* @param int $version
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
@@ -610,11 +610,11 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Save One Commit.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param object $commit
|
||||
* @param int $version
|
||||
* @param string $branch
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param object $commit
|
||||
* @param int $version
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
@@ -664,9 +664,9 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Save exists log branch.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $branch
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -690,9 +690,9 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Update commit count.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param int $count
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param int $count
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -702,9 +702,9 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get unsync commits
|
||||
*
|
||||
* @param object $repo
|
||||
* Get unsync commits
|
||||
*
|
||||
* @param object $repo
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -742,7 +742,7 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Get pre and next revision.
|
||||
*
|
||||
*
|
||||
* @param object $repo
|
||||
* @param string $entry
|
||||
* @param string $revision
|
||||
@@ -788,24 +788,24 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
$preRevision = false;
|
||||
$preAndNext = new stdclass();
|
||||
$preAndNext->pre = '';
|
||||
$preAndNext->next = '';
|
||||
$preAndNext = new stdclass();
|
||||
$preAndNext->pre = '';
|
||||
$preAndNext->next = '';
|
||||
foreach($revisions as $version => $commit)
|
||||
{
|
||||
/* Get next object. */
|
||||
if($preRevision === true)
|
||||
{
|
||||
{
|
||||
$preAndNext->next = $version;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get pre object. */
|
||||
if($revision == $version)
|
||||
{
|
||||
{
|
||||
if($preRevision) $preAndNext->pre = $preRevision;
|
||||
$preRevision = true;
|
||||
}
|
||||
}
|
||||
if($preRevision !== true) $preRevision = $version;
|
||||
}
|
||||
return $preAndNext;
|
||||
@@ -818,13 +818,13 @@ class repoModel extends model
|
||||
* @param string $params
|
||||
* @param string $viewType
|
||||
* @param bool $onlybody
|
||||
* @param int $PRJID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function createLink($method, $params = '', $viewType = '', $onlybody = false, $PRJID = 0)
|
||||
public function createLink($method, $params = '', $viewType = '', $onlybody = false, $projectID = 0)
|
||||
{
|
||||
if($this->config->requestType == 'GET') return helper::createLink('repo', $method, $params, $viewType, $onlybody, $PRJID);
|
||||
if($this->config->requestType == 'GET') return helper::createLink('repo', $method, $params, $viewType, $onlybody, $projectID);
|
||||
|
||||
$parsedParams = array();
|
||||
parse_str($params, $parsedParams);
|
||||
@@ -841,7 +841,7 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
$params = http_build_query($parsedParams);
|
||||
$link = helper::createLink('repo', $method, $params, $viewType, $onlybody, $PRJID);
|
||||
$link = helper::createLink('repo', $method, $params, $viewType, $onlybody, $projectID);
|
||||
if(empty($pathParams)) return $link;
|
||||
|
||||
$link .= strpos($link, '?') === false ? '?' : '&';
|
||||
@@ -851,9 +851,9 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Set back session/
|
||||
*
|
||||
* @param string $type
|
||||
* @param bool $withOtherModule
|
||||
*
|
||||
* @param string $type
|
||||
* @param bool $withOtherModule
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -875,8 +875,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Set repo branch.
|
||||
*
|
||||
* @param string $branch
|
||||
*
|
||||
* @param string $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -888,8 +888,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Mark synced status.
|
||||
*
|
||||
* @param int $repoID
|
||||
*
|
||||
* @param int $repoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -901,8 +901,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Fix commit.
|
||||
*
|
||||
* @param int $repoID
|
||||
*
|
||||
* @param int $repoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -925,8 +925,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Encode repo path.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @param string $path
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -938,8 +938,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Decode repo path.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @param string $path
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -951,9 +951,9 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Check content is binary.
|
||||
*
|
||||
* @param string $content
|
||||
* @param string $suffix
|
||||
*
|
||||
* @param string $content
|
||||
* @param string $suffix
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -962,17 +962,17 @@ class repoModel extends model
|
||||
if(strpos($this->config->repo->binary, "|$suffix|") !== false) return true;
|
||||
|
||||
$blk = substr($content, 0, 512);
|
||||
return (
|
||||
return (
|
||||
false ||
|
||||
substr_count($blk, "^\r\n")/512 > 0.3 ||
|
||||
substr_count($blk, "^ -~")/512 > 0.3 ||
|
||||
substr_count($blk, "\x00") > 0
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check svn/git client.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -1008,7 +1008,7 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* remove client version file.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -1026,8 +1026,8 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Check connection
|
||||
*
|
||||
* Check connection
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -1078,7 +1078,7 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
exec($command, $output, $result);
|
||||
if($result)
|
||||
if($result)
|
||||
{
|
||||
$message = sprintf($this->lang->repo->error->output, $command, $result, join("<br />", $output));
|
||||
if(stripos($message, 'Expected FS format between') !== false and strpos($message, 'found format') !== false)
|
||||
@@ -1128,8 +1128,8 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Replace comment link.
|
||||
*
|
||||
* @param string $comment
|
||||
*
|
||||
* @param string $comment
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -1162,9 +1162,9 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Add link.
|
||||
*
|
||||
* @param string $matches
|
||||
* @param string $method
|
||||
*
|
||||
* @param string $matches
|
||||
* @param string $method
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -1293,9 +1293,9 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Iconv Comment.
|
||||
*
|
||||
* @param string $comment
|
||||
* @param string $encodings
|
||||
*
|
||||
* @param string $comment
|
||||
* @param string $encodings
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
@@ -1318,7 +1318,7 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Process rules to REG.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -1369,10 +1369,10 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Save action to pms.
|
||||
*
|
||||
* @param array $objects
|
||||
* @param object $log
|
||||
* @param string $repoRoot
|
||||
*
|
||||
* @param array $objects
|
||||
* @param object $log
|
||||
* @param string $repoRoot
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -1393,7 +1393,7 @@ class repoModel extends model
|
||||
if(isset($actions['task']))
|
||||
{
|
||||
$this->loadModel('task');
|
||||
$productsAndProjects = $this->getTaskProductsAndProjects($objects['tasks']);
|
||||
$productsAndExecutions = $this->getTaskProductsAndExecutions($objects['tasks']);
|
||||
foreach($actions['task'] as $taskID => $taskActions)
|
||||
{
|
||||
$task = $this->task->getById($taskID);
|
||||
@@ -1401,8 +1401,8 @@ class repoModel extends model
|
||||
|
||||
$action->objectType = 'task';
|
||||
$action->objectID = $taskID;
|
||||
$action->product = $productsAndProjects[$taskID]['product'];
|
||||
$action->project = $productsAndProjects[$taskID]['project'];
|
||||
$action->product = $productsAndExecutions[$taskID]['product'];
|
||||
$action->execution = $productsAndExecutions[$taskID]['execution'];
|
||||
$action->comment = $this->lang->repo->revisionA . ': #' . $action->extra . "<br />" . $action->comment;
|
||||
foreach($taskActions as $taskAction => $params)
|
||||
{
|
||||
@@ -1445,8 +1445,8 @@ class repoModel extends model
|
||||
$action->action = $scm == 'svn' ? 'svncommited' : 'gitcommited';
|
||||
$action->objectType = 'task';
|
||||
$action->objectID = $taskID;
|
||||
$action->product = $productsAndProjects[$taskID]['product'];
|
||||
$action->project = $productsAndProjects[$taskID]['project'];
|
||||
$action->product = $productsAndExecutions[$taskID]['product'];
|
||||
$action->execution = $productsAndExecutions[$taskID]['execution'];
|
||||
|
||||
$changes = $this->createActionChanges($log, $repoRoot, $scm);
|
||||
$this->saveRecord($action, $changes);
|
||||
@@ -1471,7 +1471,7 @@ class repoModel extends model
|
||||
if(isset($actions['bug']))
|
||||
{
|
||||
$this->loadModel('bug');
|
||||
$productsAndProjects = $this->getBugProductsAndProjects($objects['bugs']);
|
||||
$productsAndExecutions = $this->getBugProductsAndExecutions($objects['bugs']);
|
||||
foreach($actions['bug'] as $bugID => $bugActions)
|
||||
{
|
||||
$bug = $this->bug->getByID($bugID);
|
||||
@@ -1479,8 +1479,8 @@ class repoModel extends model
|
||||
|
||||
$action->objectType = 'bug';
|
||||
$action->objectID = $bugID;
|
||||
$action->product = $productsAndProjects[$bugID]->product;
|
||||
$action->project = $productsAndProjects[$bugID]->project;
|
||||
$action->product = $productsAndExecutions[$bugID]->product;
|
||||
$action->execution = $productsAndExecutions[$bugID]->execution;
|
||||
foreach($bugActions as $bugAction => $params)
|
||||
{
|
||||
$_POST = array();
|
||||
@@ -1507,16 +1507,16 @@ class repoModel extends model
|
||||
|
||||
if($objects['stories'])
|
||||
{
|
||||
$productsAndProjects = $this->getTaskProductsAndProjects($objects['stories']);
|
||||
$productsAndExecutions = $this->getTaskProductsAndExecutions($objects['stories']);
|
||||
foreach($objects['stories'] as $storyID)
|
||||
{
|
||||
$storyID = (int)$storyID;
|
||||
if(!isset($productsAndProjects[$storyID])) continue;
|
||||
if(!isset($productsAndExecutions[$storyID])) continue;
|
||||
|
||||
$action->objectType = 'story';
|
||||
$action->objectID = $storyID;
|
||||
$action->product = $productsAndProjects[$storyID]['product'];
|
||||
$action->project = $productsAndProjects[$storyID]['project'];
|
||||
$action->product = $productsAndExecutions[$storyID]['product'];
|
||||
$action->execution = $productsAndExecutions[$storyID]['execution'];
|
||||
|
||||
$this->saveRecord($action, $changes);
|
||||
}
|
||||
@@ -1524,16 +1524,16 @@ class repoModel extends model
|
||||
|
||||
if($objects['tasks'])
|
||||
{
|
||||
$productsAndProjects = $this->getTaskProductsAndProjects($objects['tasks']);
|
||||
$productsAndExecutions = $this->getTaskProductsAndExecutions($objects['tasks']);
|
||||
foreach($objects['tasks'] as $taskID)
|
||||
{
|
||||
$taskID = (int)$taskID;
|
||||
if(!isset($productsAndProjects[$taskID])) continue;
|
||||
if(!isset($productsAndExecutions[$taskID])) continue;
|
||||
|
||||
$action->objectType = 'task';
|
||||
$action->objectID = $taskID;
|
||||
$action->product = $productsAndProjects[$taskID]['product'];
|
||||
$action->project = $productsAndProjects[$taskID]['project'];
|
||||
$action->product = $productsAndExecutions[$taskID]['product'];
|
||||
$action->execution = $productsAndExecutions[$taskID]['execution'];
|
||||
|
||||
$this->saveRecord($action, $changes);
|
||||
}
|
||||
@@ -1541,16 +1541,16 @@ class repoModel extends model
|
||||
|
||||
if($objects['bugs'])
|
||||
{
|
||||
$productsAndProjects = $this->getBugProductsAndProjects($objects['bugs']);
|
||||
$productsAndExecutions = $this->getBugProductsAndExecutions($objects['bugs']);
|
||||
foreach($objects['bugs'] as $bugID)
|
||||
{
|
||||
$bugID = (int)$bugID;
|
||||
if(!isset($productsAndProjects[$bugID])) continue;
|
||||
if(!isset($productsAndExecutions[$bugID])) continue;
|
||||
|
||||
$action->objectType = 'bug';
|
||||
$action->objectID = $bugID;
|
||||
$action->product = $productsAndProjects[$bugID]->product;
|
||||
$action->project = $productsAndProjects[$bugID]->project;
|
||||
$action->product = $productsAndExecutions[$bugID]->product;
|
||||
$action->execution = $productsAndExecutions[$bugID]->execution;
|
||||
|
||||
$this->saveRecord($action, $changes);
|
||||
}
|
||||
@@ -1561,7 +1561,7 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Save an action to pms.
|
||||
*
|
||||
*
|
||||
* @param object $action
|
||||
* @param object $log
|
||||
* @access public
|
||||
@@ -1601,9 +1601,9 @@ class repoModel extends model
|
||||
|
||||
/**
|
||||
* Create changes for action from a log.
|
||||
*
|
||||
* @param object $log
|
||||
* @param string $repoRoot
|
||||
*
|
||||
* @param object $log
|
||||
* @param string $repoRoot
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -1639,51 +1639,51 @@ class repoModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get products and projects of tasks.
|
||||
*
|
||||
* @param array $tasks
|
||||
* Get products and executions of tasks.
|
||||
*
|
||||
* @param array $tasks
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTaskProductsAndProjects($tasks)
|
||||
public function getTaskProductsAndExecutions($tasks)
|
||||
{
|
||||
$records = array();
|
||||
$products = $this->dao->select('t1.id,t1.project,t2.product')->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.project = t2.project')
|
||||
$products = $this->dao->select('t1.id,t1.execution,t2.product')->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.execution = t2.project')
|
||||
->where('t1.id')->in($tasks)->fetchGroup('id','product');
|
||||
|
||||
$projects = $this->dao->select('id, project')->from(TABLE_TASK)->where('id')->in($tasks)->fetchPairs();
|
||||
$executions = $this->dao->select('id, execution')->from(TABLE_TASK)->where('id')->in($tasks)->fetchPairs();
|
||||
|
||||
foreach($projects as $taskID => $projectID)
|
||||
foreach($executions as $taskID => $executionID)
|
||||
{
|
||||
$record = array();
|
||||
$record['project'] = $projectID;
|
||||
$record['product'] = isset($products[$taskID]) ? "," . join(',', array_keys($products[$taskID])) . "," : ",0,";
|
||||
$record['execution'] = $executionID;
|
||||
$record['product'] = isset($products[$taskID]) ? "," . join(',', array_keys($products[$taskID])) . "," : ",0,";
|
||||
$records[$taskID] = $record;
|
||||
}
|
||||
return $records;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get products and projects of bugs.
|
||||
*
|
||||
* @param array $bugs
|
||||
* Get products and executions of bugs.
|
||||
*
|
||||
* @param array $bugs
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getBugProductsAndProjects($bugs)
|
||||
public function getBugProductsAndExecutions($bugs)
|
||||
{
|
||||
$records = $this->dao->select('id, project, product')->from(TABLE_BUG)->where('id')->in($bugs)->fetchAll('id');
|
||||
$records = $this->dao->select('id, execution, product')->from(TABLE_BUG)->where('id')->in($bugs)->fetchAll('id');
|
||||
foreach($records as $record) $record->product = ",{$record->product},";
|
||||
return $records;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build URL.
|
||||
*
|
||||
* @param string $methodName
|
||||
* @param string $url
|
||||
* @param int $revision
|
||||
*
|
||||
* @param string $methodName
|
||||
* @param string $url
|
||||
* @param int $revision
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -71,14 +71,14 @@ class stakeholder extends control
|
||||
$this->app->rawModule = 'program';
|
||||
$this->app->rawMethod = 'stakeholder';
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->lang->program->switcherMenu = $this->program->getPGMSwitcher($programID, true);
|
||||
$this->program->setPGMViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->program->setViewMenu($programID);
|
||||
|
||||
$this->view->members = $this->program->getPRJTeamMemberPairs($programID);
|
||||
$this->view->members = $this->loadModel('project')->getProjectTeamMemberPairs($programID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->members = $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ);
|
||||
$this->view->members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stakeholder->create;
|
||||
@@ -110,11 +110,11 @@ class stakeholder extends control
|
||||
$this->view->title = $this->lang->stakeholder->batchCreate;
|
||||
$this->view->position[] = $this->lang->stakeholder->batchCreate;
|
||||
|
||||
$this->view->project = $this->loadModel('program')->getPRJByID($this->session->PRJ);
|
||||
$this->view->project = $this->loadModel('project')->getByID($this->session->project);
|
||||
$this->view->users = $this->user->getPairs('all|nodeleted|noclosed');
|
||||
$this->view->deptUsers = $deptUsers;
|
||||
$this->view->dept = $dept;
|
||||
$this->view->projectID = $this->session->PRJ;
|
||||
$this->view->projectID = $this->session->project;
|
||||
$this->view->depts = array('' => '') + $this->dept->getOptionMenu();
|
||||
$this->view->stakeholders = $this->stakeholder->getStakeholders('all', 'id_desc');
|
||||
$this->view->parentStakeholders = $this->program->getStakeholders($parentID, 't1.id_desc');
|
||||
@@ -153,10 +153,10 @@ class stakeholder extends control
|
||||
}
|
||||
|
||||
$users = array('' => '');
|
||||
if($stakeholder->type == 'team') $users = $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ);
|
||||
if($stakeholder->type == 'team') $users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
|
||||
elseif($stakeholder->type == 'company')
|
||||
{
|
||||
$members = $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ);
|
||||
$members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$users = array('' => '') + array_diff($users, $members);
|
||||
}
|
||||
@@ -180,7 +180,7 @@ class stakeholder extends control
|
||||
*/
|
||||
public function ajaxGetMembers($user = '', $programID = 0)
|
||||
{
|
||||
$members = $programID == 0 ? $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ) : $this->loadModel('program')->getPRJTeamMemberPairs($programID);
|
||||
$members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getProjectTeamMemberPairs($programID);
|
||||
die(html::select('user', $members, $user, "class='form-control chosen'"));
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ class stakeholder extends control
|
||||
*/
|
||||
public function ajaxGetCompanyUser($user = '', $programID = 0)
|
||||
{
|
||||
$members = $programID == 0 ? $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ) : $this->loadModel('program')->getPRJTeamMemberPairs($programID);
|
||||
$members = $programID == 0 ? $this->loadModel('execution')->getTeamMemberPairs($this->session->project) : $this->loadModel('project')->getProjectTeamMemberPairs($programID);
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$companyUsers = array('' => '') + array_diff($users, $members);
|
||||
|
||||
@@ -274,7 +274,7 @@ class stakeholder extends control
|
||||
else
|
||||
{
|
||||
$this->stakeholder->delete(TABLE_STAKEHOLDER, $userID);
|
||||
$this->loadModel('user')->updateUserView($this->session->PRJ, 'project');
|
||||
$this->loadModel('user')->updateUserView($this->session->project, 'project');
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,7 @@ class stakeholder extends control
|
||||
$this->view->position[] = $this->lang->stakeholder->view;
|
||||
|
||||
$this->view->user = $this->stakeholder->getByID($userID);
|
||||
$this->view->users = $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ ,'nodeleted');
|
||||
$this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project,'nodeleted');
|
||||
$this->view->expects = $this->stakeholder->getExpectByUser($userID);
|
||||
|
||||
$this->display();
|
||||
@@ -356,7 +356,7 @@ class stakeholder extends control
|
||||
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->communicate;
|
||||
$this->view->position[] = $this->lang->stakeholder->view;
|
||||
$this->view->user = $this->stakeholder->getByID($userID);
|
||||
$this->view->users = $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ ,'nodeleted');
|
||||
$this->view->users = $this->loadModel('execution')->getTeamMemberPairs($this->session->project,'nodeleted');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
class stakeholderModel extends model
|
||||
{
|
||||
/**
|
||||
/**
|
||||
* Create a stakeholder.
|
||||
*
|
||||
* @param int programID
|
||||
@@ -14,37 +14,37 @@ class stakeholderModel extends model
|
||||
$data = fixer::input('post')
|
||||
->setIF($programID == 0, 'objectType', 'project')
|
||||
->setIF($programID != 0, 'objectType', 'program')
|
||||
->setIF($programID == 0, 'objectID', $this->session->PRJ)
|
||||
->setIF($programID == 0, 'objectID', $this->session->project)
|
||||
->setIF($programID != 0, 'objectID', $programID)
|
||||
->setDefault('createdBy', $this->app->user->account)
|
||||
->setDefault('createdDate', helper::today())
|
||||
->stripTags($this->config->stakeholder->editor->create['id'], $this->config->allowedTags)
|
||||
->stripTags($this->config->stakeholder->editor->create['id'], $this->config->allowedTags)
|
||||
->remove('uid')
|
||||
->get();
|
||||
->get();
|
||||
|
||||
$account = isset($data->user) ? $data->user : '';
|
||||
$account = isset($data->user) ? $data->user : '';
|
||||
$stakeholder->user = $account;
|
||||
if($data->from != 'outside')
|
||||
{
|
||||
if(!$account)
|
||||
if(!$account)
|
||||
{
|
||||
dao::$errors[] = $this->lang->stakeholder->userEmpty;
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If it's an outsider and it's added for the first time, insert to user table. */
|
||||
if(!$account)
|
||||
if(!$account)
|
||||
{
|
||||
if(!$data->name)
|
||||
{
|
||||
dao::$errors[] = $this->lang->stakeholder->nameEmpty;
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
$companyID = $data->company;
|
||||
if($data->company and isset($data->new))
|
||||
if($data->company and isset($data->new))
|
||||
{
|
||||
$company = new stdclass();
|
||||
$company->name = $data->company;
|
||||
@@ -53,10 +53,10 @@ class stakeholderModel extends model
|
||||
$companyID = $this->dao->lastInsertID();
|
||||
}
|
||||
|
||||
if(!$companyID)
|
||||
if(!$companyID)
|
||||
{
|
||||
dao::$errors[] = $this->lang->stakeholder->companyEmpty;
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
$user = new stdclass();
|
||||
@@ -105,25 +105,25 @@ class stakeholderModel extends model
|
||||
/**
|
||||
* Batch create stakeholders for a project.
|
||||
*
|
||||
* @access public
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchCreate()
|
||||
public function batchCreate()
|
||||
{
|
||||
$this->loadModel('action');
|
||||
$data = (array)fixer::input('post')->get();
|
||||
$data = (array)fixer::input('post')->get();
|
||||
|
||||
$members = $this->loadModel('project')->getTeamMemberPairs($this->session->PRJ);
|
||||
$members = $this->loadModel('execution')->getTeamMemberPairs($this->session->project);
|
||||
$accounts = array_unique($data['accounts']);
|
||||
$oldJoin = $this->dao->select('`user`, createdDate')->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->PRJ)->andWhere('objectType')->eq('project')->fetchPairs();
|
||||
$this->dao->delete()->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->PRJ)->andWhere('objectType')->eq('project')->exec();
|
||||
$oldJoin = $this->dao->select('`user`, createdDate')->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->project)->andWhere('objectType')->eq('project')->fetchPairs();
|
||||
$this->dao->delete()->from(TABLE_STAKEHOLDER)->where('objectID')->eq((int)$this->session->project)->andWhere('objectType')->eq('project')->exec();
|
||||
|
||||
foreach($accounts as $key => $account)
|
||||
{
|
||||
{
|
||||
if(empty($account)) continue;
|
||||
|
||||
$stakeholder = new stdclass();
|
||||
$stakeholder->objectID = $this->session->PRJ;
|
||||
$stakeholder->objectID = $this->session->project;
|
||||
$stakeholder->objectType = 'project';
|
||||
$stakeholder->user = $account;
|
||||
$stakeholder->type = in_array($account, array_keys($members)) ? 'inside' : 'outside';
|
||||
@@ -134,7 +134,7 @@ class stakeholderModel extends model
|
||||
|
||||
$stakeholderID = $this->dao->lastInsertId();
|
||||
$this->action->create('stakeholder', $stakeholderID, 'added');
|
||||
}
|
||||
}
|
||||
|
||||
/* Only changed account update userview. */
|
||||
$oldAccounts = array_keys($oldJoin);
|
||||
@@ -142,23 +142,23 @@ class stakeholderModel extends model
|
||||
$changedAccounts = array_merge($changedAccounts, array_diff($oldAccounts, $accounts));
|
||||
$changedAccounts = array_unique($changedAccounts);
|
||||
|
||||
$this->loadModel('user')->updateUserView($this->session->PRJ, 'project', $changedAccounts);
|
||||
$this->loadModel('user')->updateUserView($this->session->project, 'project', $changedAccounts);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Edit a stakeholder.
|
||||
*
|
||||
* @param int $stakeholder
|
||||
* @param int $stakeholder
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($stakeholderID)
|
||||
{
|
||||
$oldStakeholder = $this->getByID($stakeholderID);
|
||||
$oldStakeholder = $this->getByID($stakeholderID);
|
||||
$data = fixer::input('post')
|
||||
->stripTags($this->config->stakeholder->editor->edit['id'], $this->config->allowedTags)
|
||||
->stripTags($this->config->stakeholder->editor->edit['id'], $this->config->allowedTags)
|
||||
->remove('uid')
|
||||
->get();
|
||||
->get();
|
||||
|
||||
$user = new stdclass();
|
||||
if($oldStakeholder->from == 'outside')
|
||||
@@ -206,7 +206,7 @@ class stakeholderModel extends model
|
||||
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.objectID=t4.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.objectID')->eq($this->session->PRJ)
|
||||
->andWhere('t1.objectID')->eq($this->session->project)
|
||||
->beginIF($browseType == 'inside')->andWhere('t1.type')->eq('inside')->fi()
|
||||
->beginIF($browseType == 'outside')->andWhere('t1.type')->eq('outside')->fi()
|
||||
->beginIF($browseType == 'key')->andWhere('t1.key')->ne('0')->fi()
|
||||
@@ -230,7 +230,7 @@ class stakeholderModel extends model
|
||||
{
|
||||
$stakeholders = $this->dao->select('id, user')->from(TABLE_STAKEHOLDER)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('objectID')->eq($this->session->PRJ)
|
||||
->andWhere('objectID')->eq($this->session->project)
|
||||
->orderBy('id_desc')
|
||||
->fetchPairs();
|
||||
|
||||
@@ -239,11 +239,11 @@ class stakeholderModel extends model
|
||||
|
||||
/**
|
||||
* Get self stakeholders by object id list.
|
||||
*
|
||||
* @param array $objectIdList
|
||||
* @param string $objectType
|
||||
*
|
||||
* @param array $objectIdList
|
||||
* @param string $objectType
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public function getStakeholderGroup($objectIdList)
|
||||
{
|
||||
@@ -251,8 +251,8 @@ class stakeholderModel extends model
|
||||
|
||||
$stakeholderGroup = array();
|
||||
foreach($stakeholders as $stakeholder)
|
||||
{
|
||||
$stakeholderGroup[$stakeholder->objectID][$stakeholder->user] = $stakeholder->user;
|
||||
{
|
||||
$stakeholderGroup[$stakeholder->objectID][$stakeholder->user] = $stakeholder->user;
|
||||
}
|
||||
|
||||
return $stakeholderGroup;
|
||||
@@ -260,11 +260,11 @@ class stakeholderModel extends model
|
||||
|
||||
/**
|
||||
* Get parent stakeholder group by object id list.
|
||||
*
|
||||
* @param array $objectIdList
|
||||
* @param string $objectType
|
||||
*
|
||||
* @param array $objectIdList
|
||||
* @param string $objectType
|
||||
* @access public
|
||||
* @return array
|
||||
* @return array
|
||||
*/
|
||||
public function getParentStakeholderGroup($objectIdList)
|
||||
{
|
||||
@@ -309,7 +309,7 @@ class stakeholderModel extends model
|
||||
$stakeholders = $this->dao->select('t2.realname as name, t2.account, t1.type, t2.role')->from(TABLE_STAKEHOLDER)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->andWhere('t1.objectID')->eq($this->session->PRJ)
|
||||
->andWhere('t1.objectID')->eq($this->session->project)
|
||||
->fetchGroup('type');
|
||||
|
||||
return $stakeholders;
|
||||
@@ -329,7 +329,7 @@ class stakeholderModel extends model
|
||||
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
|
||||
->where('t1.id')->eq($userID)
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->andWhere('t1.objectID')->eq($this->session->PRJ)
|
||||
->andWhere('t1.objectID')->eq($this->session->project)
|
||||
->fetch();
|
||||
|
||||
return $stakeholder;
|
||||
@@ -342,9 +342,9 @@ class stakeholderModel extends model
|
||||
* @return array
|
||||
*/
|
||||
public function getProcessGroup()
|
||||
{
|
||||
{
|
||||
$group = $this->dao->select('process, activity')->from(TABLE_PROGRAMACTIVITY)
|
||||
->where('PRJ')->eq($this->session->PRJ)
|
||||
->where('project')->eq($this->session->project)
|
||||
->andWhere('result')->eq('yes')
|
||||
->fetchGroup('process');
|
||||
|
||||
@@ -361,7 +361,7 @@ class stakeholderModel extends model
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_PROCESS)
|
||||
->where('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -374,8 +374,8 @@ class stakeholderModel extends model
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_INTERVENTION)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('PRJ')->eq($this->session->PRJ)
|
||||
->fetchAll('activity');
|
||||
->andWhere('project')->eq($this->session->project)
|
||||
->fetchAll('activity');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -389,7 +389,7 @@ class stakeholderModel extends model
|
||||
$stakeholders = $this->getStakeHolderPairs();
|
||||
return $this->dao->select('*')->from(TABLE_ISSUE)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('PRJ')->eq($this->session->PRJ)
|
||||
->andWhere('project')->eq($this->session->project)
|
||||
->andWhere('owner')->in(array_values($stakeholders))
|
||||
->orWhere('activity')->ne('')
|
||||
->orderBy('id_desc')
|
||||
@@ -406,7 +406,7 @@ class stakeholderModel extends model
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_ACTIVITY)
|
||||
->where('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -440,7 +440,7 @@ class stakeholderModel extends model
|
||||
->add('userID', $userID)
|
||||
->add('createdBy', $this->app->user->account)
|
||||
->add('createdDate', date('Y-m-d'))
|
||||
->add('PRJ', $this->session->PRJ)
|
||||
->add('project', $this->session->project)
|
||||
->stripTags($this->config->stakeholder->editor->expect['id'], $this->config->allowedTags)
|
||||
->get();
|
||||
|
||||
@@ -492,7 +492,7 @@ class stakeholderModel extends model
|
||||
$expects = $this->dao->select('t1.*,t2.key,t3.realname')->from(TABLE_EXPECT)->alias('t1')
|
||||
->leftJoin(TABLE_STAKEHOLDER)->alias('t2')->on('t1.userID=t2.id')
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t2.user=t3.account')
|
||||
->where('t1.PRJ')->eq($this->session->PRJ)
|
||||
->where('t1.project')->eq($this->session->project)
|
||||
->beginIF($browseType == 'bysearch')
|
||||
->andWhere($stakeholderQuery)
|
||||
->fi()
|
||||
@@ -565,7 +565,7 @@ class stakeholderModel extends model
|
||||
$users = $this->dao->select("t1.id, CONCAT_WS('/', t3.name,t2.realname) as realname")->from(TABLE_STAKEHOLDER)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
|
||||
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
|
||||
->where('t1.objectID')->eq($this->session->PRJ)
|
||||
->where('t1.objectID')->eq($this->session->project)
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->fetchPairs('id', 'realname');
|
||||
|
||||
@@ -583,7 +583,7 @@ class stakeholderModel extends model
|
||||
$users = $this->dao->select("t1.user, CONCAT_WS('/', t3.name,t2.realname) as realname")->from(TABLE_STAKEHOLDER)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.user=t2.account')
|
||||
->leftJoin(TABLE_COMPANY)->alias('t3')->on('t2.company=t3.id')
|
||||
->where('t1.objectID')->eq($this->session->PRJ)
|
||||
->where('t1.objectID')->eq($this->session->project)
|
||||
->andWhere('t1.deleted')->eq('0')
|
||||
->fetchPairs('user', 'realname');
|
||||
|
||||
@@ -602,7 +602,7 @@ class stakeholderModel extends model
|
||||
return $this->dao->select('*')->from(TABLE_EXPECT)->where('id')->eq($expectID)->andWhere('deleted')->eq('0')->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Build search form.
|
||||
*
|
||||
* @param int $queryID
|
||||
@@ -644,7 +644,7 @@ class stakeholderModel extends model
|
||||
public function getStakeholderIssue($account)
|
||||
{
|
||||
$issueList = $this->dao->select('*')->from(TABLE_ISSUE)
|
||||
->where('PRJ')->eq($this->session->PRJ)
|
||||
->where('project')->eq($this->session->project)
|
||||
->andWhere('owner')->eq($account)
|
||||
->andWhere('deleted')->eq('0')
|
||||
->orderBy('id_desc')
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<?php echo html::a($this->createLink('stakeholder', 'batchcreate', "projectID={$projectID}"), "<span class='text'> {$lang->program->createStakeholder}</span>");?>
|
||||
</span>
|
||||
<div class='input-group space w-200px'>
|
||||
<span class='input-group-addon'><?php echo $lang->project->selectDept?></span>
|
||||
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->project->selectDeptTitle}'");?>
|
||||
<span class='input-group-addon'><?php echo $lang->execution->selectDept?></span>
|
||||
<?php echo html::select('dept', $depts, $dept, "class='form-control chosen' onchange='setDeptUsers(this)' data-placeholder='{$lang->execution->selectDeptTitle}'");?>
|
||||
</div>
|
||||
<?php if($project->parent and $config->systemMode == 'new'):?>
|
||||
<?php echo html::a($this->createLink('stakeholder', 'batchcreate', "dept=&parent=$project->parent"), $lang->program->importStakeholder, '', 'class="btn btn-primary"');?>
|
||||
|
||||
@@ -26,7 +26,7 @@ class story extends control
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('action');
|
||||
|
||||
if($this->app->openGroup == 'project') $this->app->rawModule = 'projectstory';
|
||||
if($this->app->openApp == 'project') $this->app->rawModule = 'projectstory';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -850,7 +850,7 @@ class story extends control
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
/* Set the menu. */
|
||||
$from = $this->app->openGroup;
|
||||
$from = $this->app->openApp;
|
||||
if($from == 'project')
|
||||
{
|
||||
$project = $this->dao->findById((int)$this->session->PRJ)->from(TABLE_PROJECT)->fetch();
|
||||
@@ -2100,7 +2100,7 @@ class story extends control
|
||||
|
||||
/**
|
||||
* Ajax get story status.
|
||||
*
|
||||
*
|
||||
* @param string $method
|
||||
* @param string $params
|
||||
* @access public
|
||||
|
||||
+48
-48
@@ -95,9 +95,9 @@ class storyModel extends model
|
||||
|
||||
/**
|
||||
* Get test stories.
|
||||
*
|
||||
* @param array $storyIdList
|
||||
* @param int $projectID
|
||||
*
|
||||
* @param array $storyIdList
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -168,10 +168,10 @@ class storyModel extends model
|
||||
public function getRequierements($productID)
|
||||
{
|
||||
return $this->dao->select('id,title')->from(TABLE_STORY)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('status')->ne('draft')
|
||||
->andWhere('product')->eq($productID)
|
||||
->andWhere('type')->eq('requirement')
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('status')->ne('draft')
|
||||
->andWhere('product')->eq($productID)
|
||||
->andWhere('type')->eq('requirement')
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
@@ -570,8 +570,8 @@ class storyModel extends model
|
||||
/* IF is requirement changed, notify its relation. */
|
||||
$relations = $this->dao->select('BID')->from(TABLE_RELATION)
|
||||
->where('AType')->eq('requirement')
|
||||
->andWhere('BType')->eq('story')
|
||||
->andWhere('relation')->eq('subdivideinto')
|
||||
->andWhere('BType')->eq('story')
|
||||
->andWhere('relation')->eq('subdivideinto')
|
||||
->andWhere('AID')->eq($story->id)
|
||||
->fetchPairs();
|
||||
|
||||
@@ -774,10 +774,10 @@ class storyModel extends model
|
||||
|
||||
/**
|
||||
* Update parent status.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param int $parentID
|
||||
* @param bool $createAction
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param int $parentID
|
||||
* @param bool $createAction
|
||||
* @access public
|
||||
* @return mixed
|
||||
*/
|
||||
@@ -789,7 +789,7 @@ class storyModel extends model
|
||||
|
||||
$oldParentStory = $this->dao->select('*')->from(TABLE_STORY)->where('id')->eq($parentID)->andWhere('deleted')->eq(0)->fetch();
|
||||
if(empty($oldParentStory)) return $this->dao->update(TABLE_STORY)->set('parent')->eq('0')->where('id')->eq($storyID)->exec();
|
||||
if($oldParentStory->parent != '-1') $this->dao->update(TABLE_STORY)->set('parent')->eq('-1')->where('id')->eq($parentID)->exec();
|
||||
if($oldParentStory->parent != '-1') $this->dao->update(TABLE_STORY)->set('parent')->eq('-1')->where('id')->eq($parentID)->exec();
|
||||
$this->computeEstimate($parentID);
|
||||
|
||||
$childrenStatus = $this->dao->select('id,status')->from(TABLE_STORY)->where('parent')->eq($parentID)->andWhere('deleted')->eq(0)->fetchPairs('status', 'status');
|
||||
@@ -936,8 +936,8 @@ class storyModel extends model
|
||||
|
||||
/**
|
||||
* Compute parent story estimate.
|
||||
*
|
||||
* @param int $storyID
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
@@ -1210,9 +1210,9 @@ class storyModel extends model
|
||||
$now = helper::now();
|
||||
$oldStory = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch();
|
||||
if($oldStory->type == 'requirement')
|
||||
{
|
||||
foreach($stories as $id)
|
||||
{
|
||||
{
|
||||
foreach($stories as $id)
|
||||
{
|
||||
$data = new stdclass();
|
||||
$data->product = $oldStory->product;
|
||||
$data->AType = 'requirement';
|
||||
@@ -1235,7 +1235,7 @@ class storyModel extends model
|
||||
$data->BVersion = $oldStory->version;
|
||||
|
||||
$this->dao->insert(TABLE_RELATION)->data($data)->autoCheck()->exec();
|
||||
}
|
||||
}
|
||||
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
die(js::locate(helper::createLink('product', 'browse', "productID=$oldStory->product&branch=0&browseType=unclosed&queryID=0&type=story"), 'parent.parent'));
|
||||
@@ -1619,8 +1619,8 @@ class storyModel extends model
|
||||
|
||||
/**
|
||||
* Assign story.
|
||||
*
|
||||
* @param int $storyID
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -1920,25 +1920,25 @@ class storyModel extends model
|
||||
$tmpStoryType = $storyType == 'story' ? 'requirement' : 'story';
|
||||
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
{
|
||||
$stories2Link = $this->getBySearch($story->product, $story->branch, $queryID, 'id', '', $tmpStoryType);
|
||||
foreach($stories2Link as $key => $story2Link)
|
||||
{
|
||||
{
|
||||
if($story2Link->id == $storyID) unset($stories2Link[$key]);
|
||||
if(in_array($story2Link->id, explode(',', $story->$type))) unset($stories2Link[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$status = $storyType == 'story' ? 'active' : 'all';
|
||||
$stories2Link = $this->getProductStories($story->product, $story->branch, 0, $status, $tmpStoryType, $orderBy = 'id_desc');
|
||||
}
|
||||
}
|
||||
|
||||
foreach($stories2Link as $id => $story)
|
||||
{
|
||||
{
|
||||
if(in_array($story->id, array_keys($linkedStories))) unset($stories2Link[$id]);
|
||||
if($storyType == 'story' && $story->status == 'draft') unset($stories2Link[$id]);
|
||||
}
|
||||
}
|
||||
|
||||
return $stories2Link;
|
||||
}
|
||||
@@ -2182,7 +2182,7 @@ class storyModel extends model
|
||||
* @param string $orderBy
|
||||
* @param string $projectID
|
||||
* @param string $type requirement|story
|
||||
* @param string $excludeStories
|
||||
* @param string $excludeStories
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -2297,7 +2297,7 @@ class storyModel extends model
|
||||
* @param string $orderBy
|
||||
* @param string $type
|
||||
* @param int $param
|
||||
* @param string $storyType
|
||||
* @param string $storyType
|
||||
* @param string $excludeStories
|
||||
* @param object $pager
|
||||
* @access public
|
||||
@@ -2485,9 +2485,9 @@ class storyModel extends model
|
||||
|
||||
/**
|
||||
* Get parent story pairs.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $append
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $append
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -3196,19 +3196,19 @@ class storyModel extends model
|
||||
if($type == 'requirement')
|
||||
{
|
||||
$relations = $this->dao->select('DISTINCT AID, BID')->from(TABLE_RELATION)
|
||||
->where('AID')->in(array_keys($stories))
|
||||
->andWhere('AType')->eq('requirement')
|
||||
->andWhere('BType')->eq('story')
|
||||
->andWhere('relation')->eq('subdivideinto')
|
||||
->where('AID')->in(array_keys($stories))
|
||||
->andWhere('AType')->eq('requirement')
|
||||
->andWhere('BType')->eq('story')
|
||||
->andWhere('relation')->eq('subdivideinto')
|
||||
->fetchAll();
|
||||
|
||||
$group = array();
|
||||
foreach($relations as $relation) $group[$relation->AID][] = $relation->BID;
|
||||
foreach($relations as $relation) $group[$relation->AID][] = $relation->BID;
|
||||
|
||||
foreach($stories as $story)
|
||||
foreach($stories as $story)
|
||||
{
|
||||
if(!isset($group[$story->id])) continue;
|
||||
$story->children = $this->getByList($group[$story->id]);
|
||||
$story->children = $this->getByList($group[$story->id]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3281,7 +3281,7 @@ class storyModel extends model
|
||||
|
||||
$module = $this->app->rawModule == 'projectstory' ? 'projectstory' : 'story';
|
||||
$canView = common::hasPriv($module, 'view');
|
||||
$openGroup = $this->app->rawModule == 'projectstory' ? 'project' : 'product';
|
||||
$openApp = $this->app->rawModule == 'projectstory' ? 'project' : 'product';
|
||||
$storyLink = helper::createLink($module, 'view', "storyID=$story->id");
|
||||
$account = $this->app->user->account;
|
||||
$id = $col->id;
|
||||
@@ -3347,7 +3347,7 @@ class storyModel extends model
|
||||
case 'id':
|
||||
if($canBatchAction)
|
||||
{
|
||||
echo html::checkbox('storyIdList', array($story->id => '')) . html::a($storyLink, sprintf('%03d', $story->id), '', "data-group='$openGroup'");
|
||||
echo html::checkbox('storyIdList', array($story->id => '')) . html::a($storyLink, sprintf('%03d', $story->id), '', "data-app='$openApp'");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3365,7 +3365,7 @@ class storyModel extends model
|
||||
if($story->branch and isset($branches[$story->branch])) echo "<span class='label label-outline label-badge'>{$branches[$story->branch]}</span> ";
|
||||
if($story->module and isset($modulePairs[$story->module])) echo "<span class='label label-gray label-badge'>{$modulePairs[$story->module]}</span> ";
|
||||
if($story->parent > 0) echo '<span class="label label-badge label-light" title="' . $this->lang->story->children . '">' . $this->lang->story->childrenAB . '</span> ';
|
||||
echo $canView ? html::a($storyLink, $story->title, '', "style='color: $story->color' data-group='$openGroup'") : "<span style='color: $story->color'>{$story->title}</span>";
|
||||
echo $canView ? html::a($storyLink, $story->title, '', "style='color: $story->color' data-app='$openApp'") : "<span style='color: $story->color'>{$story->title}</span>";
|
||||
if(!empty($story->children)) echo '<a class="story-toggle" data-id="' . $story->id . '"><i class="icon icon-angle-double-right"></i></a>';
|
||||
break;
|
||||
case 'plan':
|
||||
@@ -3895,7 +3895,7 @@ class storyModel extends model
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getStoryRelationCounts($storyID, $storyType = '')
|
||||
public function getStoryRelationCounts($storyID, $storyType = '')
|
||||
{
|
||||
$selectField = ($storyType == 'story') ? 'AID' : 'BID';
|
||||
$conditionField = ($storyType == 'story') ? 'BID' : 'AID';
|
||||
@@ -3959,7 +3959,7 @@ class storyModel extends model
|
||||
public function replaceURLang($type)
|
||||
{
|
||||
if($type == 'requirement')
|
||||
{
|
||||
{
|
||||
$storyLang = $this->lang->story;
|
||||
$SRCommon = $this->lang->SRCommon;
|
||||
$URCommon = $this->lang->URCommon;
|
||||
@@ -4000,7 +4000,7 @@ class storyModel extends model
|
||||
|
||||
$storyLang->report->charts['storysPerProduct'] = str_replace($SRCommon, $URCommon, $storyLang->report->charts['storysPerProduct']);
|
||||
$storyLang->report->charts['storysPerModule'] = str_replace($SRCommon, $URCommon, $storyLang->report->charts['storysPerModule']);
|
||||
$storyLang->report->charts['storysPerSource'] = str_replace($SRCommon, $URCommon, $storyLang->report->charts['storysPerSource']);
|
||||
$storyLang->report->charts['storysPerSource'] = str_replace($SRCommon, $URCommon, $storyLang->report->charts['storysPerSource']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php $style = $this->app->rawModule == 'projectstory' ? "style='overflow: unset; text-align: left'" : '';?>
|
||||
<?php $openGroup = $this->app->rawModule == 'projectstory' ? 'project' : 'product';?>
|
||||
<?php $openApp = $this->app->rawModule == 'projectstory' ? 'project' : 'product';?>
|
||||
<?php $module = $this->app->rawModule == 'projectstory' ? 'projectstory' : 'story';?>
|
||||
<div class='main-table' data-ride="table">
|
||||
<table class='table table-bordered' id="trackList">
|
||||
@@ -62,14 +62,14 @@
|
||||
<?php if($key != 'noRequirement'):?>
|
||||
<span class="label label-primary label-outline"><?php echo zget($lang->story->statusList, $requirement->status);?></span>
|
||||
<?php endif;?>
|
||||
<?php echo $key == 'noRequirement' ? $lang->story->noRequirement : html::a($this->createLink($module, 'view', "storyID=$requirement->id"), $requirement->title, '', "title=$requirement->title data-group='$openGroup'");?>
|
||||
<?php echo $key == 'noRequirement' ? $lang->story->noRequirement : html::a($this->createLink($module, 'view', "storyID=$requirement->id"), $requirement->title, '', "title=$requirement->title data-app='$openApp'");?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if(count($track) != 0):?>
|
||||
<?php $i = 1;?>
|
||||
<?php foreach($track as $storyID => $story):?>
|
||||
<?php if($i != 1) echo '<tr>';?>
|
||||
<td style='padding-left: 10px;'><?php echo html::a($this->createLink($module, 'view', "storyID=$storyID"), $story->title, '',"title='$story->title' data-group='$openGroup'");?></td>
|
||||
<td style='padding-left: 10px;'><?php echo html::a($this->createLink($module, 'view', "storyID=$storyID"), $story->title, '',"title='$story->title' data-app='$openApp'");?></td>
|
||||
<td>
|
||||
<?php foreach($story->tasks as $taskID => $task):?>
|
||||
<?php echo html::a($this->createLink('task', 'view', "taskID=$taskID"), $task->name, '', "title='$task->name'") . '<br/>';?>
|
||||
@@ -78,21 +78,21 @@
|
||||
<?php if(isset($config->maxVersion)):?>
|
||||
<td>
|
||||
<?php foreach($story->designs as $designID => $design):?>
|
||||
<?php echo html::a($this->createLink('design', 'view', "designID=$designID"), $design->name, '', "title='$design->name'") . '<br/>';?>
|
||||
<?php echo html::a($this->createLink('design', 'view', "designID=$designID"), $design->name, '', "title='$design->name'") . '<br/>';?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td>
|
||||
<?php foreach($story->cases as $caseID => $case):?>
|
||||
<?php echo html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', false, $case->PRJ), $case->title, '', "title='$case->title'") . '<br/>';?>
|
||||
<?php echo html::a($this->createLink('testcase', 'view', "caseID=$caseID", '', false, $case->PRJ), $case->title, '', "title='$case->title'") . '<br/>';?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<?php if(isset($config->maxVersion)):?>
|
||||
<td>
|
||||
<?php foreach($story->revisions as $revision => $repoID):?>
|
||||
<?php
|
||||
<?php
|
||||
echo html::a($this->createLink('design', 'revision', "repoID=$revision"), '#'. $revision) . '<br/>';
|
||||
?>
|
||||
?>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
<?php if(common::canModify('product', $product)): ?>
|
||||
<?php
|
||||
$otherParam = '';
|
||||
$openGroup = 'product';
|
||||
$openApp = 'product';
|
||||
if($this->app->rawModule == 'projectstory')
|
||||
{
|
||||
$otherParam = "storyID=&projectID={$this->session->PRJ}";
|
||||
$openGroup = 'project';
|
||||
$openApp = 'project';
|
||||
}
|
||||
?>
|
||||
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}&$otherParam", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary' data-group='$openGroup'"); ?>
|
||||
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}&$otherParam", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary' data-app='$openApp'"); ?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -32,7 +32,7 @@ class testsuite extends control
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
/* Set testtask menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
@@ -69,7 +69,7 @@ class testsuite extends control
|
||||
$this->session->set('testsuiteList', $this->app->getURI(true));
|
||||
|
||||
/* Set menu. */
|
||||
$projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->PRJ;
|
||||
$projectID = $this->lang->navGroup->testreport == 'qa' ? 0 : $this->session->project;
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testsuite")));
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
@@ -136,7 +136,7 @@ class testsuite extends control
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$this->testsuite->setMenu($this->products, $productID);
|
||||
|
||||
@@ -169,7 +169,7 @@ class testsuite extends control
|
||||
if($suite->type == 'private' and $suite->addedBy != $this->app->user->account and !$this->app->user->admin) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
$productID = $suite->product;
|
||||
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$this->testsuite->setMenu($this->products, $productID);
|
||||
|
||||
/* Save session. */
|
||||
@@ -239,7 +239,7 @@ class testsuite extends control
|
||||
if($suite->type == 'private' and $suite->addedBy != $this->app->user->account and !$this->app->user->admin) die(js::error($this->lang->error->accessDenied) . js::locate('back'));
|
||||
|
||||
/* Get suite info. */
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$productID = $this->product->saveState($suite->product, $this->products);
|
||||
|
||||
/* Set menu. */
|
||||
@@ -319,7 +319,7 @@ class testsuite extends control
|
||||
$this->session->set('caseList', $this->app->getURI(true));
|
||||
|
||||
/* Get suite and product id. */
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->products = $this->products = $this->loadModel('product')->getProductPairsByProject($this->session->project);
|
||||
$suite = $this->testsuite->getById($suiteID);
|
||||
$productID = $this->product->saveState($suite->product, $this->products);
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class testsuiteModel extends model
|
||||
{
|
||||
$suite = fixer::input('post')
|
||||
->stripTags($this->config->testsuite->editor->create['id'], $this->config->allowedTags)
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa', 'PRJ', $this->session->PRJ)
|
||||
->setIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa', 'project', $this->session->project)
|
||||
->add('product', (int)$productID)
|
||||
->add('addedBy', $this->app->user->account)
|
||||
->add('addedDate', helper::now())
|
||||
@@ -133,7 +133,7 @@ class testsuiteModel extends model
|
||||
{
|
||||
return $this->dao->select("*")->from(TABLE_TESTSUITE)
|
||||
->where('product')->eq((int)$productID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('PRJ')->eq($this->session->PRJ)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere("(`type` = 'public' OR (`type` = 'private' and addedBy = '{$this->app->user->account}'))")
|
||||
->orderBy($orderBy)
|
||||
@@ -242,7 +242,7 @@ class testsuiteModel extends model
|
||||
$cases = $this->dao->select('t1.*,t2.version as caseVersion')->from(TABLE_CASE)->alias('t1')
|
||||
->leftJoin(TABLE_SUITECASE)->alias('t2')->on('t1.id=t2.case')
|
||||
->where('t2.suite')->eq($suiteID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('t1.PRJ')->eq($this->session->PRJ)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('t1.project')->eq($this->session->project)->fi()
|
||||
->andWhere('t1.product')->eq($suite->product)
|
||||
->andWhere('t1.product')->eq($suite->product)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
@@ -286,7 +286,7 @@ class testsuiteModel extends model
|
||||
$linkedCases = $this->getLinkedCases($suite->id, 'id_desc', null, $append = false);
|
||||
$cases = $this->dao->select('*')->from(TABLE_CASE)->where($query)
|
||||
->andWhere('id')->notIN(array_keys($linkedCases))
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('PRJ')->eq($this->session->PRJ)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')
|
||||
->page($pager)
|
||||
@@ -323,7 +323,7 @@ class testsuiteModel extends model
|
||||
{
|
||||
$importedCases = $this->dao->select('fromCaseID')->from(TABLE_CASE)
|
||||
->where('product')->eq($productID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('PRJ')->eq($this->session->PRJ)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->andWhere('lib')->eq($libID)
|
||||
->andWhere('fromCaseID')->ne('')
|
||||
->andWhere('deleted')->eq(0)
|
||||
@@ -357,7 +357,7 @@ class testsuiteModel extends model
|
||||
return $this->dao->select('*')->from(TABLE_CASE)->where('deleted')->eq(0)
|
||||
->beginIF($browseType != 'bysearch')->andWhere('lib')->eq($libID)->fi()
|
||||
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
|
||||
->begin($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('PRJ')->eq($this->session->PRJ)->fi()
|
||||
->begin($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->andWhere('product')->eq(0)
|
||||
->andWhere('id')->notIN($importedCases)
|
||||
->orderBy($orderBy)
|
||||
|
||||
@@ -62,10 +62,10 @@ include '../../common/view/header.lite.html.php';
|
||||
/* Click my site to modify the left navigation. */
|
||||
function changeLeftNavigation()
|
||||
{
|
||||
if(window.parent && window.parent.$.tabs && isOnlybody)
|
||||
if(window.parent && window.parent.$.apps && isOnlybody)
|
||||
{
|
||||
window.parent.$.tabs.close();
|
||||
window.parent.$.tabs.open('my');
|
||||
window.parent.$.apps.close();
|
||||
window.parent.$.apps.open('my');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user