* Code for task #44005.
This commit is contained in:
@@ -167,6 +167,7 @@ define('TABLE_USERTPL', '`' . $config->db->prefix . 'usertpl`');
|
||||
define('TABLE_PRODUCT', '`' . $config->db->prefix . 'product`');
|
||||
define('TABLE_BRANCH', '`' . $config->db->prefix . 'branch`');
|
||||
define('TABLE_EXPECT', '`' . $config->db->prefix . 'expect`');
|
||||
define('TABLE_STAGE', '`' . $config->db->prefix . 'stage`');
|
||||
define('TABLE_STAKEHOLDER', '`' . $config->db->prefix . 'stakeholder`');
|
||||
define('TABLE_STORY', '`' . $config->db->prefix . 'story`');
|
||||
define('TABLE_STORYSPEC', '`' . $config->db->prefix . 'storyspec`');
|
||||
@@ -192,6 +193,8 @@ define('TABLE_BURN', '`' . $config->db->prefix . 'burn`');
|
||||
define('TABLE_BUILD', '`' . $config->db->prefix . 'build`');
|
||||
define('TABLE_ACL', '`' . $config->db->prefix . 'acl`');
|
||||
|
||||
define('TABLE_DESIGN', '`' . $config->db->prefix . 'design`');
|
||||
define('TABLE_DESIGNSPEC', '`' . $config->db->prefix . 'designspec`');
|
||||
define('TABLE_DOCLIB', '`' . $config->db->prefix . 'doclib`');
|
||||
define('TABLE_DOC', '`' . $config->db->prefix . 'doc`');
|
||||
define('TABLE_API', '`' . $config->db->prefix . 'api`');
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
-- DROP TABLE IF EXISTS `zt_stage`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_stage` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`percent` varchar(255) NOT NULL,
|
||||
`type` varchar(255) NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_design`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_design` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`project` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`commit` text NOT NULL,
|
||||
`commitedBy` varchar(30) NOT NULL,
|
||||
`execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`name` varchar(255) NOT NULL,
|
||||
`status` varchar(30) NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`assignedTo` varchar(30) NOT NULL,
|
||||
`assignedBy` varchar(30) NOT NULL,
|
||||
`assignedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`story` char(30) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`version` smallint(6) NOT NULL,
|
||||
`type` char(30) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- DROP TABLE IF EXISTS `zt_designspec`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_designspec` (
|
||||
`design` mediumint(8) NOT NULL,
|
||||
`version` smallint(6) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`files` varchar(255) NOT NULL,
|
||||
UNIQUE KEY `design` (`design`,`version`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
+126
-85
@@ -30,99 +30,94 @@ CREATE TABLE IF NOT EXISTS `zt_action` (
|
||||
KEY `objectID` (`objectID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_api_lib_release`;
|
||||
CREATE TABLE `zt_api_lib_release`
|
||||
(
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`lib` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`desc` varchar(255) NOT NULL DEFAULT '',
|
||||
`version` varchar(255) NOT NULL DEFAULT '',
|
||||
`snap` mediumtext NOT NULL,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
CREATE TABLE `zt_api_lib_release` (
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`lib` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`desc` varchar(255) NOT NULL DEFAULT '',
|
||||
`version` varchar(255) NOT NULL DEFAULT '',
|
||||
`snap` mediumtext NOT NULL,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_api`;
|
||||
CREATE TABLE `zt_api`
|
||||
(
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`product` varchar(255) NOT NULL DEFAULT '',
|
||||
`lib` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`module` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`title` varchar(100) NOT NULL DEFAULT '',
|
||||
`path` varchar(255) NOT NULL DEFAULT '',
|
||||
`protocol` varchar(10) NOT NULL DEFAULT '',
|
||||
`method` varchar(10) NOT NULL DEFAULT '',
|
||||
`requestType` varchar(100) NOT NULL DEFAULT '',
|
||||
`responseType` varchar(100) NOT NULL DEFAULT '',
|
||||
`status` varchar(20) NOT NULL DEFAULT '',
|
||||
`owner` varchar(30) NOT NULl DEFAULT 0,
|
||||
`desc` text NULL,
|
||||
`version` smallint UNSIGNED NOT NULL DEFAULT 0,
|
||||
`params` text NULL,
|
||||
`paramsExample` text NUll,
|
||||
`responseExample` text NUll,
|
||||
`response` text NULL,
|
||||
`commonParams` text NULL,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`deleted` enum ('0', '1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
CREATE TABLE `zt_api` (
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`product` varchar(255) NOT NULL DEFAULT '',
|
||||
`lib` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`module` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`title` varchar(100) NOT NULL DEFAULT '',
|
||||
`path` varchar(255) NOT NULL DEFAULT '',
|
||||
`protocol` varchar(10) NOT NULL DEFAULT '',
|
||||
`method` varchar(10) NOT NULL DEFAULT '',
|
||||
`requestType` varchar(100) NOT NULL DEFAULT '',
|
||||
`responseType` varchar(100) NOT NULL DEFAULT '',
|
||||
`status` varchar(20) NOT NULL DEFAULT '',
|
||||
`owner` varchar(30) NOT NULl DEFAULT 0,
|
||||
`desc` text NULL,
|
||||
`version` smallint UNSIGNED NOT NULL DEFAULT 0,
|
||||
`params` text NULL,
|
||||
`paramsExample` text NUll,
|
||||
`responseExample` text NUll,
|
||||
`response` text NULL,
|
||||
`commonParams` text NULL,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`deleted` enum ('0', '1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_apispec`;
|
||||
CREATE TABLE `zt_apispec`
|
||||
(
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`doc` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`module` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`title` varchar(100) NOT NULL DEFAULT '',
|
||||
`path` varchar(255) NOT NULL DEFAULT '',
|
||||
`protocol` varchar(10) NOT NULL DEFAULT '',
|
||||
`method` varchar(10) NOT NULL DEFAULT '',
|
||||
`requestType` varchar(100) NOT NULL DEFAULT '',
|
||||
`responseType` varchar(100) NOT NULL DEFAULT '',
|
||||
`status` varchar(20) NOT NULL DEFAULT '',
|
||||
`owner` varchar(255) NOT NULl DEFAULT 0,
|
||||
`desc` text NULL,
|
||||
`version` smallint UNSIGNED NOT NULL DEFAULT 0,
|
||||
`params` text NULL,
|
||||
`paramsExample` text NUll,
|
||||
`responseExample` text NUll,
|
||||
`response` text NULL,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
CREATE TABLE `zt_apispec` (
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`doc` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`module` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`title` varchar(100) NOT NULL DEFAULT '',
|
||||
`path` varchar(255) NOT NULL DEFAULT '',
|
||||
`protocol` varchar(10) NOT NULL DEFAULT '',
|
||||
`method` varchar(10) NOT NULL DEFAULT '',
|
||||
`requestType` varchar(100) NOT NULL DEFAULT '',
|
||||
`responseType` varchar(100) NOT NULL DEFAULT '',
|
||||
`status` varchar(20) NOT NULL DEFAULT '',
|
||||
`owner` varchar(255) NOT NULl DEFAULT 0,
|
||||
`desc` text NULL,
|
||||
`version` smallint UNSIGNED NOT NULL DEFAULT 0,
|
||||
`params` text NULL,
|
||||
`paramsExample` text NUll,
|
||||
`responseExample` text NUll,
|
||||
`response` text NULL,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_apistruct`;
|
||||
CREATE TABLE `zt_apistruct`
|
||||
(
|
||||
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`lib` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`name` varchar(30) NOT NULL DEFAULT '',
|
||||
`type` varchar(50) NOT NULL DEFAULT '',
|
||||
`desc` varchar(255) NOT NULL DEFAULT '',
|
||||
`version` smallint unsigned NOT NULL DEFAULT 0,
|
||||
`attribute` text NULL,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NOT NULL,
|
||||
`editEdBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`deleted` enum ('0', '1') NOT NULL DEFAULT '0',
|
||||
primary key (`id`)
|
||||
CREATE TABLE `zt_apistruct` (
|
||||
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
||||
`lib` int UNSIGNED NOT NULL DEFAULT 0,
|
||||
`name` varchar(30) NOT NULL DEFAULT '',
|
||||
`type` varchar(50) NOT NULL DEFAULT '',
|
||||
`desc` varchar(255) NOT NULL DEFAULT '',
|
||||
`version` smallint unsigned NOT NULL DEFAULT 0,
|
||||
`attribute` text NULL,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NOT NULL,
|
||||
`editEdBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`deleted` enum ('0', '1') NOT NULL DEFAULT '0',
|
||||
primary key (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_apistruct_spec`;
|
||||
CREATE TABLE `zt_apistruct_spec`
|
||||
(
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL DEFAULT '',
|
||||
`type` varchar(50) NOT NULL DEFAULT '',
|
||||
`desc` varchar(255) NOT NULL DEFAULT '',
|
||||
`attribute` text NULL,
|
||||
`version` smallint unsigned NOT NULL DEFAULT 0,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NOT NULL,
|
||||
primary key (`id`)
|
||||
CREATE TABLE `zt_apistruct_spec` (
|
||||
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL DEFAULT '',
|
||||
`type` varchar(50) NOT NULL DEFAULT '',
|
||||
`desc` varchar(255) NOT NULL DEFAULT '',
|
||||
`attribute` text NULL,
|
||||
`version` smallint unsigned NOT NULL DEFAULT 0,
|
||||
`addedBy` varchar(30) NOT NULL DEFAULT 0,
|
||||
`addedDate` datetime NOT NULL,
|
||||
primary key (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_block`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_block` (
|
||||
@@ -393,6 +388,39 @@ CREATE TABLE IF NOT EXISTS `zt_dept` (
|
||||
KEY `parent` (`parent`),
|
||||
KEY `path` (`path`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_design`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_design` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`project` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`commit` text NOT NULL,
|
||||
`commitedBy` varchar(30) NOT NULL,
|
||||
`execution` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||
`name` varchar(255) NOT NULL,
|
||||
`status` varchar(30) NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`assignedTo` varchar(30) NOT NULL,
|
||||
`assignedBy` varchar(30) NOT NULL,
|
||||
`assignedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`story` char(30) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`version` smallint(6) NOT NULL,
|
||||
`type` char(30) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_designspec`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_designspec` (
|
||||
`design` mediumint(8) NOT NULL,
|
||||
`version` smallint(6) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`files` varchar(255) NOT NULL,
|
||||
UNIQUE KEY `design` (`design`,`version`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_doc`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_doc` (
|
||||
`id` mediumint(8) unsigned NOT NULL auto_increment,
|
||||
@@ -1016,6 +1044,19 @@ CREATE TABLE IF NOT EXISTS `zt_searchindex` (
|
||||
FULLTEXT KEY `content` (`content`),
|
||||
FULLTEXT KEY `title` (`title`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_stage`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_stage` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`percent` varchar(255) NOT NULL,
|
||||
`type` varchar(255) NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime NOT NULL,
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime NOT NULL,
|
||||
`deleted` enum('0','1') NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
-- DROP TABLE IF EXISTS `zt_stakeholder`;
|
||||
CREATE TABLE IF NOT EXISTS `zt_stakeholder` (
|
||||
`id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
|
||||
@@ -6,6 +6,8 @@ $lang->todo = new stdclass();
|
||||
$lang->program = new stdclass();
|
||||
$lang->product = new stdclass();
|
||||
$lang->project = new stdclass();
|
||||
$lang->design = new stdclass();
|
||||
$lang->stage = new stdclass();
|
||||
$lang->scrum = new stdclass();
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->execution = new stdclass();
|
||||
|
||||
+39
-30
@@ -44,35 +44,38 @@ $lang->runInfo = "<div class='row'><div class='u-1 a-center' id='debugbar
|
||||
$lang->agreement = "I have read and agreed to the terms and conditions of <a href='http://zpl.pub/page/zplv12.html' target='_blank'> Z PUBLIC LICENSE 1.2 </a>. <span class='text-danger'>Without authorization, I should not remove, hide or cover any logos/links of ZenTao.</span>";
|
||||
$lang->designedByAIUX = "<a href='https://api.zentao.net/goto.php?item=aiux' class='link-aiux' target='_blank'><i class='icon icon-aiux'></i> AIUX</a>";
|
||||
|
||||
$lang->reset = 'Reset';
|
||||
$lang->cancel = 'Cancel';
|
||||
$lang->refresh = 'Refresh';
|
||||
$lang->create = 'Create';
|
||||
$lang->edit = 'Edit';
|
||||
$lang->delete = 'Delete';
|
||||
$lang->close = 'Close';
|
||||
$lang->unlink = 'Unlink';
|
||||
$lang->import = 'Import';
|
||||
$lang->export = 'Export';
|
||||
$lang->setFileName = 'File Name';
|
||||
$lang->submitting = 'Saving...';
|
||||
$lang->save = 'Save';
|
||||
$lang->confirm = 'Confirm';
|
||||
$lang->preview = 'View';
|
||||
$lang->goback = 'Back';
|
||||
$lang->goPC = 'PC';
|
||||
$lang->more = 'More';
|
||||
$lang->moreLink = 'MORE';
|
||||
$lang->day = ' Day';
|
||||
$lang->customConfig = 'Custom Config';
|
||||
$lang->public = 'Public';
|
||||
$lang->trunk = 'Trunk';
|
||||
$lang->sort = 'Order';
|
||||
$lang->required = 'Required';
|
||||
$lang->noData = 'No data.';
|
||||
$lang->fullscreen = 'Fullscreen';
|
||||
$lang->retrack = 'Retrack';
|
||||
$lang->whitelist = 'Access whitelist';
|
||||
$lang->reset = 'Reset';
|
||||
$lang->cancel = 'Cancel';
|
||||
$lang->refresh = 'Refresh';
|
||||
$lang->create = 'Create';
|
||||
$lang->edit = 'Edit';
|
||||
$lang->delete = 'Delete';
|
||||
$lang->close = 'Close';
|
||||
$lang->unlink = 'Unlink';
|
||||
$lang->import = 'Import';
|
||||
$lang->export = 'Export';
|
||||
$lang->setFileName = 'File Name';
|
||||
$lang->submitting = 'Saving...';
|
||||
$lang->save = 'Save';
|
||||
$lang->confirm = 'Confirm';
|
||||
$lang->preview = 'View';
|
||||
$lang->goback = 'Back';
|
||||
$lang->goPC = 'PC';
|
||||
$lang->more = 'More';
|
||||
$lang->moreLink = 'MORE';
|
||||
$lang->day = ' Day';
|
||||
$lang->customConfig = 'Custom Config';
|
||||
$lang->public = 'Public';
|
||||
$lang->trunk = 'Trunk';
|
||||
$lang->sort = 'Order';
|
||||
$lang->required = 'Required';
|
||||
$lang->noData = 'No data.';
|
||||
$lang->fullscreen = 'Fullscreen';
|
||||
$lang->retrack = 'Retrack';
|
||||
$lang->whitelist = 'Access whitelist';
|
||||
$lang->globalSetting = 'Global Setting';
|
||||
$lang->waterfallModel= 'Waterfall';
|
||||
$lang->all = 'All';
|
||||
|
||||
$lang->actions = 'Action';
|
||||
$lang->restore = 'Reset';
|
||||
@@ -161,6 +164,13 @@ $lang->dept->common = 'Dept';
|
||||
$lang->upgrade->common = 'Update';
|
||||
$lang->program->list = 'Program List';
|
||||
$lang->program->kanban = 'Program Kanban';
|
||||
$lang->design->common = 'Design';
|
||||
$lang->design->HLDS = 'HLDS';
|
||||
$lang->design->DDS = 'DDS';
|
||||
$lang->design->DBDS = 'DBDS';
|
||||
$lang->design->ADS = 'ADS';
|
||||
$lang->stage->common = 'Stage';
|
||||
$lang->stage->list = 'Stage List';
|
||||
$lang->execution->list = "{$lang->executionCommon} List";
|
||||
|
||||
$lang->personnel->common = 'Member';
|
||||
@@ -190,7 +200,6 @@ $lang->settings = 'Settings';
|
||||
$lang->overview = 'Overview';
|
||||
$lang->module = 'Module';
|
||||
$lang->priv = 'Privilege';
|
||||
$lang->design = 'Design';
|
||||
$lang->other = 'Other';
|
||||
$lang->estimation = 'Estimation';
|
||||
$lang->issue = 'Issue';
|
||||
|
||||
@@ -238,6 +238,48 @@ $lang->scrum->menu->settings['subMenu']->whitelist = array('link' => "{$lang->
|
||||
$lang->scrum->menu->settings['subMenu']->stakeholder = array('link' => "{$lang->stakeholder->common}|stakeholder|browse|project=%s", 'subModule' => 'stakeholder');
|
||||
$lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang->priv}|project|group|project=%s", 'alias' => 'group,manageview,managepriv');
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->waterfall->menu = new stdclass();
|
||||
$lang->waterfall->menu->programplan = array('link' => "{$lang->productplan->shortCommon}|programplan|browse|project=%s&productID=0&type=lists", 'subModule' => 'programplan');
|
||||
$lang->waterfall->menu->execution = array('link' => "{$lang->stage->common}|project|execution|status=all&projectID=%s");
|
||||
$lang->waterfall->menu->story = array('link' => "$lang->SRCommon|projectstory|story|project=%s", 'subModule' => 'projectstory,tree', 'exclude' => 'projectstory-track');
|
||||
$lang->waterfall->menu->design = array('link' => "{$lang->design->common}|design|browse|project=%s");
|
||||
$lang->waterfall->menu->devops = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&branchID=&objectID=%s", 'subModule' => 'repo');
|
||||
$lang->waterfall->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s");
|
||||
$lang->waterfall->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|project=%s", 'subModule' => 'projectrelease');
|
||||
$lang->waterfall->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
|
||||
|
||||
$lang->waterfall->menu->settings = $lang->scrum->menu->settings;
|
||||
$lang->waterfall->dividerMenu = ',build,dynamic,';
|
||||
|
||||
/* Waterfall menu order. */
|
||||
$lang->waterfall->menuOrder[15] = 'programplan';
|
||||
$lang->waterfall->menuOrder[20] = 'execution';
|
||||
$lang->waterfall->menuOrder[25] = 'story';
|
||||
$lang->waterfall->menuOrder[30] = 'design';
|
||||
$lang->waterfall->menuOrder[35] = 'devops';
|
||||
$lang->waterfall->menuOrder[60] = 'doc';
|
||||
$lang->waterfall->menuOrder[65] = 'build';
|
||||
$lang->waterfall->menuOrder[70] = 'release';
|
||||
$lang->waterfall->menuOrder[80] = 'dynamic';
|
||||
|
||||
$lang->waterfall->menu->doc['subMenu'] = new stdclass();
|
||||
|
||||
$lang->waterfall->menu->programplan['subMenu'] = new stdclass();
|
||||
$lang->waterfall->menu->programplan['subMenu']->lists = array('link' => "{$lang->stage->list}|programplan|browse|projectID=%s&productID=0&type=lists", 'alias' => 'create');
|
||||
|
||||
$lang->waterfall->menu->qa['subMenu'] = new stdclass();
|
||||
$lang->waterfall->menu->qa['subMenu']->bug = array('link' => "{$lang->bug->common}|project|bug|projectID=%s", 'subModule' => 'bug');
|
||||
$lang->waterfall->menu->qa['subMenu']->testcase = array('link' => "{$lang->testcase->shortCommon}|project|testcase|projectID=%s", 'subModule' => 'testsuite,testcase,caselib,tree');
|
||||
$lang->waterfall->menu->qa['subMenu']->testtask = array('link' => "{$lang->testtask->common}|project|testtask|projectID=%s", 'subModule' => 'testtask', 'class' => 'dropdown dropdown-hover');
|
||||
|
||||
$lang->waterfall->menu->design['subMenu'] = new stdclass();
|
||||
$lang->waterfall->menu->design['subMenu']->all = array("link' => '$lang->all|design|browse|projectID=%s&productID=0&browseType=all");
|
||||
$lang->waterfall->menu->design['subMenu']->hlds = array("link' => '{$lang->design->HLDS}|design|browse|projectID=%s&productID=0&browseType=HLDS");
|
||||
$lang->waterfall->menu->design['subMenu']->dds = array("link' => '{$lang->design->DDS}|design|browse|projectID=%s&productID=0&browseType=DDS");
|
||||
$lang->waterfall->menu->design['subMenu']->dbds = array("link' => '{$lang->design->DBDS}|design|browse|projectID=%s&productID=0&browseType=DBDS");
|
||||
$lang->waterfall->menu->design['subMenu']->ads = array("link' => {$lang->design->ADS}|design|browse|projectID=%s&productID=0&browseType=ADS");
|
||||
$lang->waterfall->menu->design['subMenu']->bysearch = array('link' => '<a href="javascript:;" class="querybox-toggle"><i class="icon-search icon"></i> ' . $lang->searchAB . '</a>');
|
||||
|
||||
/* Execution menu. */
|
||||
$lang->execution->homeMenu = new stdclass();
|
||||
@@ -414,13 +456,26 @@ $lang->company->menuOrder[30] = 'addUser';
|
||||
$lang->admin->menu = new stdclass();
|
||||
$lang->admin->menu->index = array('link' => "$lang->indexPage|admin|index", 'alias' => 'register,certifytemail,certifyztmobile,ztcompany');
|
||||
$lang->admin->menu->company = array('link' => "{$lang->personnel->common}|company|browse|", 'subModule' => ',user,dept,group,');
|
||||
$lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'subModule' => 'holiday');
|
||||
$lang->admin->menu->model = array('link' => "$lang->model|custom|browsestoryconcept|", 'class' => 'dropdown dropdown-hover', 'exclude' => 'custom-index,custom-set,custom-product,custom-execution,custom-required,custom-flow,custom-score,custom-feedback,custom-timezone,custom-mode');
|
||||
$lang->admin->menu->custom = array('link' => "{$lang->custom->common}|custom|index", 'exclude' => 'custom-browsestoryconcept,custom-timezone,custom-estimate');
|
||||
$lang->admin->menu->extension = array('link' => "{$lang->extension->common}|extension|browse", 'subModule' => 'extension');
|
||||
$lang->admin->menu->dev = array('link' => "$lang->redev|dev|api", 'alias' => 'db', 'subModule' => 'dev,editor,entry');
|
||||
$lang->admin->menu->message = array('link' => "{$lang->message->common}|message|index", 'subModule' => 'message,mail,webhook');
|
||||
$lang->admin->menu->system = array('link' => "{$lang->admin->system}|backup|index", 'subModule' => 'cron,backup,action,admin,search', 'exclude' => 'admin-index,admin-xuanxuan,admin-register,admin-ztcompany');
|
||||
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->admin->menu->model['dropMenu'] = new stdclass();
|
||||
$lang->admin->menu->model['dropMenu']->allModel = array('link' => "{$lang->globalSetting}|custom|browsestoryconcept|", 'subModule' => 'subject,custom,meetingroom,baseline');
|
||||
$lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,measurement,auditcl,cmcl,process,activity,zoutput,classify,sqlbuilder,reviewcl,reviewsetting,report');
|
||||
|
||||
$lang->admin->menu->allModel['subMenu'] = new stdclass();
|
||||
$lang->admin->menu->allModel['subMenu']->storyConcept = array('link' => '需求概念|custom|browsestoryconcept|');
|
||||
|
||||
$lang->admin->menu->waterfall['subMenu'] = new stdclass();
|
||||
$lang->admin->menu->waterfall['subMenu']->stage = array('link' => '阶段|stage|setType|', 'subModule' => 'stage');
|
||||
}
|
||||
|
||||
/* Admin menu order. */
|
||||
$lang->admin->menuOrder[5] = 'index';
|
||||
$lang->admin->menuOrder[10] = 'company';
|
||||
@@ -506,6 +561,8 @@ $lang->navGroup->story = 'product';
|
||||
|
||||
$lang->navGroup->project = 'project';
|
||||
$lang->navGroup->deploy = 'project';
|
||||
$lang->navGroup->programplan = 'project';
|
||||
$lang->navGroup->design = 'project';
|
||||
$lang->navGroup->stakeholder = 'project';
|
||||
|
||||
$lang->navGroup->projectbuild = 'project';
|
||||
|
||||
@@ -44,35 +44,38 @@ $lang->runInfo = "<div class='row'><div class='u-1 a-center' id='debugbar
|
||||
$lang->agreement = "已阅读并同意<a href='http://zpl.pub/page/zplv12.html' target='_blank'>《Z PUBLIC LICENSE授权协议1.2》</a>。<span class='text-danger'>未经许可,不得去除、隐藏或遮掩禅道软件的任何标志及链接。</span>";
|
||||
$lang->designedByAIUX = "<a href='https://api.zentao.net/goto.php?item=aiux' class='link-aiux' target='_blank'><i class='icon icon-aiux'></i> 艾体验设计</a>";
|
||||
|
||||
$lang->reset = '重填';
|
||||
$lang->cancel = '取消';
|
||||
$lang->refresh = '刷新';
|
||||
$lang->create = '新建';
|
||||
$lang->edit = '编辑';
|
||||
$lang->delete = '删除';
|
||||
$lang->close = '关闭';
|
||||
$lang->unlink = '移除';
|
||||
$lang->import = '导入';
|
||||
$lang->export = '导出';
|
||||
$lang->setFileName = '文件名:';
|
||||
$lang->submitting = '稍候...';
|
||||
$lang->save = '保存';
|
||||
$lang->confirm = '确认';
|
||||
$lang->preview = '查看';
|
||||
$lang->goback = '返回';
|
||||
$lang->goPC = 'PC版';
|
||||
$lang->more = '更多';
|
||||
$lang->moreLink = 'More';
|
||||
$lang->day = '天';
|
||||
$lang->customConfig = '自定义';
|
||||
$lang->public = '公共';
|
||||
$lang->trunk = '主干';
|
||||
$lang->sort = '排序';
|
||||
$lang->required = '必填';
|
||||
$lang->noData = '暂无';
|
||||
$lang->fullscreen = '全屏';
|
||||
$lang->retrack = '收起';
|
||||
$lang->whitelist = '访问白名单';
|
||||
$lang->reset = '重填';
|
||||
$lang->cancel = '取消';
|
||||
$lang->refresh = '刷新';
|
||||
$lang->create = '新建';
|
||||
$lang->edit = '编辑';
|
||||
$lang->delete = '删除';
|
||||
$lang->close = '关闭';
|
||||
$lang->unlink = '移除';
|
||||
$lang->import = '导入';
|
||||
$lang->export = '导出';
|
||||
$lang->setFileName = '文件名:';
|
||||
$lang->submitting = '稍候...';
|
||||
$lang->save = '保存';
|
||||
$lang->confirm = '确认';
|
||||
$lang->preview = '查看';
|
||||
$lang->goback = '返回';
|
||||
$lang->goPC = 'PC版';
|
||||
$lang->more = '更多';
|
||||
$lang->moreLink = 'More';
|
||||
$lang->day = '天';
|
||||
$lang->customConfig = '自定义';
|
||||
$lang->public = '公共';
|
||||
$lang->trunk = '主干';
|
||||
$lang->sort = '排序';
|
||||
$lang->required = '必填';
|
||||
$lang->noData = '暂无';
|
||||
$lang->fullscreen = '全屏';
|
||||
$lang->retrack = '收起';
|
||||
$lang->whitelist = '访问白名单';
|
||||
$lang->globalSetting = '全局设置';
|
||||
$lang->waterfallModel= '瀑布模型';
|
||||
$lang->all = '所有';
|
||||
|
||||
$lang->actions = '操作';
|
||||
$lang->restore = '恢复默认';
|
||||
@@ -161,6 +164,13 @@ $lang->dept->common = '部门';
|
||||
$lang->upgrade->common = '升级';
|
||||
$lang->program->list = '项目集列表';
|
||||
$lang->program->kanban = '项目集看板';
|
||||
$lang->design->common = '设计';
|
||||
$lang->design->HLDS = '概要设计';
|
||||
$lang->design->DDS = '详细设计';
|
||||
$lang->design->DBDS = '数据库设计';
|
||||
$lang->design->ADS = '接口设计';
|
||||
$lang->stage->common = '阶段';
|
||||
$lang->stage->list = '阶段列表';
|
||||
$lang->execution->list = "{$lang->executionCommon}列表";
|
||||
|
||||
$lang->personnel->common = '人员';
|
||||
@@ -190,7 +200,6 @@ $lang->settings = '设置';
|
||||
$lang->overview = '概况';
|
||||
$lang->module = '模块';
|
||||
$lang->priv = '权限';
|
||||
$lang->design = '设计';
|
||||
$lang->other = '其他';
|
||||
$lang->estimation = '估算';
|
||||
$lang->issue = '问题';
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
$config->design = new stdclass();
|
||||
$config->design->editor = new stdclass();
|
||||
$config->design->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->design->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->design->editor->assignto = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
|
||||
$config->design->create = new stdclass();
|
||||
$config->design->edit = new stdclass();
|
||||
$config->design->create->requiredFields = 'name,type';
|
||||
$config->design->edit->requiredFields = 'name,type';
|
||||
|
||||
$config->design->affectedFixedNum = 7;
|
||||
|
||||
global $lang;
|
||||
$config->design->search['module'] = 'design';
|
||||
$config->design->search['fields']['id'] = $lang->design->id;
|
||||
$config->design->search['fields']['type'] = $lang->design->type;
|
||||
$config->design->search['fields']['name'] = $lang->design->name;
|
||||
$config->design->search['fields']['commit'] = $lang->design->submission;
|
||||
$config->design->search['fields']['createdBy'] = $lang->design->createdBy;
|
||||
$config->design->search['fields']['createdDate'] = $lang->design->createdDate;
|
||||
$config->design->search['fields']['assignedTo'] = $lang->design->assignedTo;
|
||||
$config->design->search['fields']['story'] = $lang->design->story;
|
||||
|
||||
$config->design->search['params']['type'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->design->typeList);
|
||||
$config->design->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->design->search['params']['commit'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->design->search['params']['createdBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->design->search['params']['createdDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->design->search['params']['assignedTo'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
|
||||
$config->design->search['params']['story'] = array('operator' => '=', 'control' => 'select', 'values' => '');
|
||||
@@ -0,0 +1,485 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: control.php 5107 2020-09-02 09:46:12Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class design extends control
|
||||
{
|
||||
/**
|
||||
* Construct function, load module auto.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('project');
|
||||
$this->loadModel('task');
|
||||
}
|
||||
|
||||
/**
|
||||
* Design common action.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param int $designID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function commonAction($projectID = 0, $productID = 0, $designID = 0)
|
||||
{
|
||||
$products = $this->product->getProductPairsByProject($projectID);
|
||||
$productID = $this->product->saveState($productID, $products);
|
||||
|
||||
$this->lang->modulePageNav = $this->design->setMenu($projectID, $products, $productID);
|
||||
$this->project->setMenu($projectID);
|
||||
$this->view->products = $products;
|
||||
|
||||
return $productID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse designs.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param string $type all|bySearch|HLDS|DDS|DBDS|ADS
|
||||
* @param string $param
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($projectID = 0, $productID = 0, $type = 'all', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$productID = $this->commonAction($projectID, $productID);
|
||||
|
||||
/* Save session for design list and process product id. */
|
||||
$this->session->set('designList', $this->app->getURI(true), 'project');
|
||||
|
||||
/* Build the search form. */
|
||||
$queryID = ($type == 'bySearch') ? (int)$param : 0;
|
||||
$actionURL = $this->createLink('design', 'browse', "projectID=$projectID&productID=$productID&type=bySearch&queryID=myQueryID");
|
||||
$this->design->buildSearchForm($queryID, $actionURL);
|
||||
|
||||
/* Print top and right actions. */
|
||||
$this->lang->TRActions = '<div class="btn-group dropdown">';
|
||||
$this->lang->TRActions .= html::a(inlink('create', "projectID=$projectID&productID=$productID&type=$type"), "<i class='icon-plus'></i> {$this->lang->design->create}", '', "class='btn btn-primary'");
|
||||
$this->lang->TRActions .= "<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span>";
|
||||
$this->lang->TRActions .= '</button>';
|
||||
$this->lang->TRActions .= "<ul class='dropdown-menu pull-right' id='createActionMenu'>";
|
||||
|
||||
if(common::hasPriv('design', 'create')) $this->lang->TRActions .= '<li>' . html::a($this->createLink('design', 'create', "projectID=$projectID&productID=$productID&type=$type"), $this->lang->design->create, '', "class='btn btn-link'") . '</li>';
|
||||
if(common::hasPriv('design', 'batchCreate')) $this->lang->TRActions .= '<li>' . html::a($this->createLink('design', 'batchCreate', "projectID=$projectID&productID=$productID&type=$type"), $this->lang->design->batchCreate, '', "class='btn btn-link'") . '</li>';
|
||||
|
||||
$this->lang->TRActions .= '</ul>';
|
||||
$this->lang->TRActions .= '</div>';
|
||||
|
||||
/* Init pager and get designs. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init(0, $recPerPage, $pageID);
|
||||
$designs = $this->design->getList($projectID, $productID, $type, $queryID, $orderBy, $pager);
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->browse;
|
||||
$this->view->position[] = $this->lang->design->browse;
|
||||
|
||||
$this->view->designs = $designs;
|
||||
$this->view->type = $type;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a design.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($projectID = 0, $productID = 0, $type = 'all')
|
||||
{
|
||||
$productID = $this->commonAction($projectID, $productID);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$designID = $this->design->create($projectID);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->loadModel('action')->create('design', $designID, 'created');
|
||||
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
$response['locate'] = $this->createLink('design', 'browse', "projectID=$projectID&productID=$productID");
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->create;
|
||||
$this->view->position[] = $this->lang->design->create;
|
||||
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productID);
|
||||
$this->view->productID = $productID;
|
||||
$this->view->type = $type;
|
||||
$this->view->project = $this->loadModel('project')->getByID($projectID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch create designs.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchCreate($projectID = 0, $productID = 0, $type = 'all')
|
||||
{
|
||||
$productID = $this->commonAction($projectID, $productID);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$this->design->batchCreate($projectID, $productID);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
$response['locate'] = inlink('browse', "projectID=$projectID&productID=$productID");
|
||||
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->batchCreate;
|
||||
$this->view->position[] = $this->lang->design->batchCreate;
|
||||
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$this->view->type = $type;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* View a design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function view($designID = 0)
|
||||
{
|
||||
$design = $this->design->getByID($designID);
|
||||
$productID = $this->commonAction($design->project, $design->product, $designID);
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->view;
|
||||
$this->view->position[] = $this->lang->design->view;
|
||||
|
||||
$this->view->design = $design;
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($design->product);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('design', $design->id);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($designID = 0)
|
||||
{
|
||||
$design = $this->design->getByID($designID);
|
||||
$design = $this->design->getAffectedScope($design);
|
||||
$productID = $this->commonAction($design->project, $design->product, $designID);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$changes = $this->design->update($designID);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
if(!empty($changes))
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('design', $designID, 'changed');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
$response['locate'] = $this->createLink('design', 'view', "id=$design->id");
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->edit;
|
||||
$this->view->position[] = $this->lang->design->edit;
|
||||
|
||||
$this->view->design = $design;
|
||||
$this->view->project = $this->loadModel('project')->getByID($design->project);
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($design->product);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Design link commits.
|
||||
*
|
||||
* @param int $designID
|
||||
* @param int $repoID
|
||||
* @param string $begin
|
||||
* @param string $end
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkCommit($designID = 0, $repoID = 0, $begin = '', $end = '', $recTotal = 0, $recPerPage = 50, $pageID = 1)
|
||||
{
|
||||
$design = $this->design->getById($designID);
|
||||
$productID = $this->commonAction($design->project, $design->product, $designID);
|
||||
|
||||
/* Get project and date. */
|
||||
$project = $this->loadModel('project')->getByID($design->project);
|
||||
$begin = $begin ? date('Y-m-d', strtotime($begin)) : $project->begin;
|
||||
$end = $end ? date('Y-m-d', strtotime($end)) : helper::today();
|
||||
|
||||
/* Get the repository information through the repoID. */
|
||||
$repos = $this->loadModel('repo')->getRepoPairs($design->project);
|
||||
$repoID = $repoID ? $repoID : key($repos);
|
||||
|
||||
if(empty($repoID)) die(js::locate(helper::createLink('repo', 'create', "objectID=$design->project")));
|
||||
|
||||
$repo = $this->loadModel('repo')->getRepoByID($repoID);
|
||||
$revisions = $this->repo->getCommits($repo, '', 'HEAD', '', '', $begin, $end);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$this->design->linkCommit($designID, $repoID);
|
||||
|
||||
$result['result'] = 'success';
|
||||
$result['message'] = $this->lang->saveSuccess;
|
||||
$result['locate'] = 'parent';
|
||||
return $this->send($result);
|
||||
}
|
||||
|
||||
/* Linked submission. */
|
||||
$linkedRevisions = array();
|
||||
$relations = $this->loadModel('common')->getRelations('design', $designID, 'commit');
|
||||
foreach($relations as $relation) $linkedRevisions[$relation->BID] = $relation->BID;
|
||||
|
||||
foreach($revisions as $id => $commit)
|
||||
{
|
||||
if(isset($linkedRevisions[$commit->id])) unset($revisions[$id]);
|
||||
}
|
||||
|
||||
/* Init pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$recTotal = count($revisions);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$revisions = array_chunk($revisions, $pager->recPerPage);
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->linkCommit;
|
||||
$this->view->position[] = $this->lang->design->linkCommit;
|
||||
|
||||
$this->view->repos = $repos;
|
||||
$this->view->repoID = $repoID;
|
||||
$this->view->repo = $repo;
|
||||
$this->view->revisions = empty($revisions) ? $revisions : $revisions[$pageID - 1];
|
||||
$this->view->designID = $designID;
|
||||
$this->view->begin = $begin;
|
||||
$this->view->end = $end;
|
||||
$this->view->design = $this->design->getByID($designID);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Design unlink commits.
|
||||
*
|
||||
* @param int $designID
|
||||
* @param int $commitID
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkCommit($designID = 0, $commitID = 0, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->design->confirmUnlink, inlink('unlinkCommit', "designID=$designID&commitID=$commitID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->design->unlinkCommit($designID, $commitID);
|
||||
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* View a design's commit.
|
||||
*
|
||||
* @param int $designID
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function viewCommit($designID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$design = $this->design->getByID($designID);
|
||||
$productID = $this->commonAction($design->project, $design->product, $designID);
|
||||
|
||||
/* Init pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init(0, $recPerPage, $pageID);
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->submission;
|
||||
$this->view->position[] = $this->lang->design->submission;
|
||||
|
||||
$this->view->design = $this->design->getCommit($designID, $pager);
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* A version of the repository.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function revision($repoID = 0, $projectID = 0)
|
||||
{
|
||||
$repo = $this->dao->select('*')->from(TABLE_REPOHISTORY)->where('id')->eq($repoID)->fetch();
|
||||
$repoURL = $this->createLink('repo', 'revision', "repoID=$repo->repo&objectID=$projectID&revistion=$repo->revision");
|
||||
header("location:" . $repoURL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get design drop menu.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetDropMenu($projectID, $productID)
|
||||
{
|
||||
$products = $this->loadModel('product')->getProducts($projectID);
|
||||
|
||||
$this->view->link = helper::createLink('design', 'browse', "projectID=$projectID&productID=%s");
|
||||
$this->view->productID = $productID;
|
||||
$this->view->products = $products;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($designID = 0, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->design->confirmDelete, inlink('delete', "designID=$designID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->design->delete(TABLE_DESIGN, $designID);
|
||||
$this->dao->delete()->from(TABLE_RELATION)->where('Atype')->eq('design')->andWhere('AID')->eq($designID)->andWhere('Btype')->eq('commit')->andwhere('relation')->eq('completedin')->exec();
|
||||
$this->dao->delete()->from(TABLE_RELATION)->where('Atype')->eq('commit')->andWhere('BID')->eq($designID)->andWhere('Btype')->eq('design')->andwhere('relation')->eq('completedfrom')->exec();
|
||||
|
||||
die(js::locate($this->session->designList, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update assign of design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function assignTo($designID = 0)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$changes = $this->design->assign($designID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action');
|
||||
if(!empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('design', $designID, 'Assigned', $this->post->comment, $this->post->assignedTo);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
|
||||
die(js::locate($this->createLink('design', 'browse'), 'parent'));
|
||||
}
|
||||
|
||||
$design = $this->design->getByID($designID);
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->assignedTo;
|
||||
$this->view->position[] = $this->lang->design->assignedTo;
|
||||
|
||||
$this->view->design = $design;
|
||||
$this->view->users = $this->loadModel('project')->getTeamMemberPairs($design->project);
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
#featurebar {display:inline-block;}
|
||||
#querybox #searchform {border-bottom: 1px solid #ddd; margin-bottom: 20px;}
|
||||
#designTable td {white-space:nowrap; text-overflow:ellipsis; overflow: hidden}
|
||||
@@ -0,0 +1 @@
|
||||
.tabs .tab-pane .table{border: 1px solid #ddd; border-top: none}
|
||||
@@ -0,0 +1,8 @@
|
||||
#mainContent {min-height: 350px;}
|
||||
.searchBox{min-height: 45px;}
|
||||
.searchBox .srearch-date{float: left; width: 20%}
|
||||
.searchBox h4{float:left;display: inline-block}
|
||||
.searchBox span{float:left;line-height:30px}
|
||||
#logForm .table thead th{background: #efefef}
|
||||
#begin{margin-right:5px}
|
||||
#end{margin-left:5px}
|
||||
@@ -0,0 +1,4 @@
|
||||
$(function()
|
||||
{
|
||||
$('#subNavbar .nav li[data-id=' + type.toLowerCase() + ']').addClass('active');
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
$(function()
|
||||
{
|
||||
$('#subNavbar .nav li').removeClass('active');
|
||||
$('#subNavbar .nav li[data-id=' + type + ']').addClass('active');
|
||||
})
|
||||
@@ -0,0 +1,16 @@
|
||||
$(document).on('click', '.ajaxPager', function()
|
||||
{
|
||||
$('#logBox').load($(this).attr('href'));
|
||||
return false;
|
||||
})
|
||||
$('#product').change(function()
|
||||
{
|
||||
productID = $(this).val();
|
||||
var link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID);
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#story').replaceWith(data);
|
||||
$('#story_chosen').remove();
|
||||
$('#story').chosen();
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
$(function()
|
||||
{
|
||||
$('#subNavbar .nav li[data-id=' + type.toLowerCase() + ']').addClass('active');
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
$(function()
|
||||
{
|
||||
$('#subNavbar .nav li[data-id=' + type.toLowerCase() + ']').addClass('active');
|
||||
})
|
||||
@@ -0,0 +1,28 @@
|
||||
$('#begin, #end, #repo').change(function()
|
||||
{
|
||||
var begin = $('#begin').val();
|
||||
var end = $('#end').val();
|
||||
var repo = $('#repo').val();
|
||||
|
||||
if(begin.indexOf('-') != -1)
|
||||
{
|
||||
var beginarray = begin.split("-");
|
||||
var begin = '';
|
||||
for(i = 0; i < beginarray.length; i++) begin = begin + beginarray[i];
|
||||
}
|
||||
if(end.indexOf('-') != -1)
|
||||
{
|
||||
var endarray = end.split("-");
|
||||
var end = '';
|
||||
for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i];
|
||||
}
|
||||
|
||||
if(begin > end)
|
||||
{
|
||||
alert(errorDate);
|
||||
location.href = createLink('design', 'linkCommit', "designID=" + designID + '&repoID=' + repo);
|
||||
die;
|
||||
}
|
||||
|
||||
location.href = createLink('design', 'linkCommit', "designID=" + designID + '&repoID=' + repo + '&begin=' + begin + '&end=' + end);
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
$(function()
|
||||
{
|
||||
$('#subNavbar .nav li[data-id=' + type.toLowerCase() + ']').addClass('active');
|
||||
})
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* The English file of design module.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: en.php 4729 2020-09-01 07:53:55Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* 字段列表. */
|
||||
$lang->design->id = 'ID';
|
||||
$lang->design->name = 'Name';
|
||||
$lang->design->story = 'Story';
|
||||
$lang->design->type = 'Type';
|
||||
$lang->design->ditto = 'Ditto';
|
||||
$lang->design->submission = 'Commit';
|
||||
$lang->design->version = 'Revision';
|
||||
$lang->design->assignedTo = 'AssignedTo';
|
||||
$lang->design->actions = 'Actions';
|
||||
$lang->design->byQuery = 'Search';
|
||||
$lang->design->products = 'Linked Product';
|
||||
$lang->design->story = 'Linked Story';
|
||||
$lang->design->file = 'File';
|
||||
$lang->design->desc = 'Description';
|
||||
$lang->design->range = 'Impact';
|
||||
$lang->design->product = 'Linked Product';
|
||||
$lang->design->basicInfo = 'Basic Information';
|
||||
$lang->design->commitBy = 'Commit By';
|
||||
$lang->design->commitDate = 'Committed Date';
|
||||
$lang->design->affectedStory = "{$lang->SRCommon}";
|
||||
$lang->design->affectedTasks = 'Task';
|
||||
$lang->design->reviewObject = 'Review Object';
|
||||
$lang->design->createdBy = 'CreatedBy';
|
||||
$lang->design->createdDate = 'CreatedDate';
|
||||
$lang->design->basicInfo = 'Basic Information';
|
||||
$lang->design->noAssigned = 'Unassigned';
|
||||
$lang->design->comment = 'Comment';
|
||||
|
||||
/* 动作列表. */
|
||||
$lang->design->common = 'Design';
|
||||
$lang->design->create = 'Create Design';
|
||||
$lang->design->batchCreate = 'Batch Create';
|
||||
$lang->design->edit = 'Edit';
|
||||
$lang->design->delete = 'Delete';
|
||||
$lang->design->view = 'View';
|
||||
$lang->design->browse = 'List';
|
||||
$lang->design->viewCommit = 'View Commit';
|
||||
$lang->design->linkCommit = 'Link Commit';
|
||||
$lang->design->unlinkCommit = 'Unlink Commit';
|
||||
$lang->design->submit = 'Submit Review';
|
||||
$lang->design->assignTo = 'Assign';
|
||||
$lang->design->revision = 'Linked Code';
|
||||
|
||||
/* 字段取值. */
|
||||
$lang->design->typeList = array();
|
||||
$lang->design->typeList[''] = '';
|
||||
$lang->design->typeList['HLDS'] = 'High-Level';
|
||||
$lang->design->typeList['DDS'] = 'Detailed';
|
||||
$lang->design->typeList['DBDS'] = 'Database';
|
||||
$lang->design->typeList['ADS'] = 'API';
|
||||
|
||||
$lang->design->rangeList = array();
|
||||
$lang->design->rangeList['all'] = 'All';
|
||||
$lang->design->rangeList['assign'] = 'Selected';
|
||||
|
||||
$lang->design->featureBar['all'] = 'All';
|
||||
$lang->design->featureBar += $lang->design->typeList;
|
||||
|
||||
/* 提示信息. */
|
||||
$lang->design->errorSelection = 'No record selected!';
|
||||
$lang->design->noDesign = 'No record.';
|
||||
$lang->design->noCommit = 'No record commited.';
|
||||
$lang->design->confirmDelete = 'Do you want to delete this design?';
|
||||
$lang->design->confirmUnlink = 'Are you sure you want to remove this submission?';
|
||||
$lang->design->errorDate = 'The start date can not be greater than the end date.';
|
||||
$lang->design->deleted = 'Deleted';
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* The English file of design module.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: en.php 4729 2020-09-01 07:53:55Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* 字段列表. */
|
||||
$lang->design->id = 'ID';
|
||||
$lang->design->name = 'Name';
|
||||
$lang->design->story = 'Story';
|
||||
$lang->design->type = 'Type';
|
||||
$lang->design->ditto = 'Ditto';
|
||||
$lang->design->submission = 'Commit';
|
||||
$lang->design->version = 'Revision';
|
||||
$lang->design->assignedTo = 'AssignedTo';
|
||||
$lang->design->actions = 'Actions';
|
||||
$lang->design->byQuery = 'Search';
|
||||
$lang->design->products = 'Linked Product';
|
||||
$lang->design->story = 'Linked Story';
|
||||
$lang->design->file = 'File';
|
||||
$lang->design->desc = 'Description';
|
||||
$lang->design->range = 'Impact';
|
||||
$lang->design->product = 'Linked Product';
|
||||
$lang->design->basicInfo = 'Basic Information';
|
||||
$lang->design->commitBy = 'Commit By';
|
||||
$lang->design->commitDate = 'Committed Date';
|
||||
$lang->design->affectedStory = "{$lang->SRCommon}";
|
||||
$lang->design->affectedTasks = 'Task';
|
||||
$lang->design->reviewObject = 'Review Object';
|
||||
$lang->design->createdBy = 'CreatedBy';
|
||||
$lang->design->createdDate = 'CreatedDate';
|
||||
$lang->design->basicInfo = 'Basic Information';
|
||||
$lang->design->noAssigned = 'Unassigned';
|
||||
$lang->design->comment = 'Comment';
|
||||
|
||||
/* 动作列表. */
|
||||
$lang->design->common = 'Design';
|
||||
$lang->design->create = 'Create Design';
|
||||
$lang->design->batchCreate = 'Batch Create';
|
||||
$lang->design->edit = 'Edit';
|
||||
$lang->design->delete = 'Delete';
|
||||
$lang->design->view = 'View';
|
||||
$lang->design->browse = 'List';
|
||||
$lang->design->viewCommit = 'View Commit';
|
||||
$lang->design->linkCommit = 'Link Commit';
|
||||
$lang->design->unlinkCommit = 'Unlink Commit';
|
||||
$lang->design->submit = 'Submit Review';
|
||||
$lang->design->assignTo = 'Assign';
|
||||
$lang->design->revision = 'Linked Code';
|
||||
|
||||
$lang->design->browseAction = 'Design List';
|
||||
|
||||
/* 字段取值. */
|
||||
$lang->design->typeList = array();
|
||||
$lang->design->typeList[''] = '';
|
||||
$lang->design->typeList['HLDS'] = 'High-Level';
|
||||
$lang->design->typeList['DDS'] = 'Detailed';
|
||||
$lang->design->typeList['DBDS'] = 'Database';
|
||||
$lang->design->typeList['ADS'] = 'API';
|
||||
|
||||
$lang->design->rangeList = array();
|
||||
$lang->design->rangeList['all'] = 'All';
|
||||
$lang->design->rangeList['assign'] = 'Selected';
|
||||
|
||||
$lang->design->featureBar['all'] = 'All';
|
||||
$lang->design->featureBar += $lang->design->typeList;
|
||||
|
||||
/* 提示信息. */
|
||||
$lang->design->errorSelection = 'No record selected!';
|
||||
$lang->design->noDesign = 'No record.';
|
||||
$lang->design->noCommit = 'No record commited.';
|
||||
$lang->design->confirmDelete = 'Do you want to delete this design?';
|
||||
$lang->design->confirmUnlink = 'Are you sure you want to remove this submission?';
|
||||
$lang->design->errorDate = 'The start date can not be greater than the end date.';
|
||||
$lang->design->deleted = 'Deleted';
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* The English file of design module.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: en.php 4729 2020-09-01 07:53:55Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* 字段列表. */
|
||||
$lang->design->id = 'ID';
|
||||
$lang->design->name = 'Name';
|
||||
$lang->design->story = 'Story';
|
||||
$lang->design->type = 'Type';
|
||||
$lang->design->ditto = 'Ditto';
|
||||
$lang->design->submission = 'Commit';
|
||||
$lang->design->version = 'Revision';
|
||||
$lang->design->assignedTo = 'AssignedTo';
|
||||
$lang->design->actions = 'Actions';
|
||||
$lang->design->byQuery = 'Search';
|
||||
$lang->design->products = 'Linked Product';
|
||||
$lang->design->story = 'Linked Story';
|
||||
$lang->design->file = 'File';
|
||||
$lang->design->desc = 'Description';
|
||||
$lang->design->range = 'Impact';
|
||||
$lang->design->product = 'Linked Product';
|
||||
$lang->design->basicInfo = 'Basic Information';
|
||||
$lang->design->commitBy = 'Commit By';
|
||||
$lang->design->commitDate = 'Committed Date';
|
||||
$lang->design->affectedStory = "{$lang->SRCommon}";
|
||||
$lang->design->affectedTasks = 'Task';
|
||||
$lang->design->reviewObject = 'Review Object';
|
||||
$lang->design->createdBy = 'CreatedBy';
|
||||
$lang->design->createdDate = 'CreatedDate';
|
||||
$lang->design->basicInfo = 'Basic Information';
|
||||
$lang->design->noAssigned = 'Unassigned';
|
||||
$lang->design->comment = 'Comment';
|
||||
|
||||
/* 动作列表. */
|
||||
$lang->design->common = 'Design';
|
||||
$lang->design->create = 'Create Design';
|
||||
$lang->design->batchCreate = 'Batch Create';
|
||||
$lang->design->edit = 'Edit';
|
||||
$lang->design->delete = 'Delete';
|
||||
$lang->design->view = 'View';
|
||||
$lang->design->browse = 'List';
|
||||
$lang->design->viewCommit = 'View Commit';
|
||||
$lang->design->linkCommit = 'Link Commit';
|
||||
$lang->design->unlinkCommit = 'Unlink Commit';
|
||||
$lang->design->submit = 'Submit Review';
|
||||
$lang->design->assignTo = 'Assign';
|
||||
$lang->design->revision = 'Linked Code';
|
||||
|
||||
/* 字段取值. */
|
||||
$lang->design->typeList = array();
|
||||
$lang->design->typeList[''] = '';
|
||||
$lang->design->typeList['HLDS'] = 'High-Level';
|
||||
$lang->design->typeList['DDS'] = 'Detailed';
|
||||
$lang->design->typeList['DBDS'] = 'Database';
|
||||
$lang->design->typeList['ADS'] = 'API';
|
||||
|
||||
$lang->design->rangeList = array();
|
||||
$lang->design->rangeList['all'] = 'All';
|
||||
$lang->design->rangeList['assign'] = 'Selected';
|
||||
|
||||
$lang->design->featureBar['all'] = 'All';
|
||||
$lang->design->featureBar += $lang->design->typeList;
|
||||
|
||||
/* 提示信息. */
|
||||
$lang->design->errorSelection = 'No record selected!';
|
||||
$lang->design->noDesign = 'No record.';
|
||||
$lang->design->noCommit = 'No record commited.';
|
||||
$lang->design->confirmDelete = 'Do you want to delete this design?';
|
||||
$lang->design->confirmUnlink = 'Are you sure you want to remove this submission?';
|
||||
$lang->design->errorDate = 'The start date can not be greater than the end date.';
|
||||
$lang->design->deleted = 'Deleted';
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* The English file of design module.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: en.php 4729 2020-09-01 07:53:55Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* 字段列表. */
|
||||
$lang->design->id = 'ID';
|
||||
$lang->design->name = 'Name';
|
||||
$lang->design->story = 'Story';
|
||||
$lang->design->type = 'Type';
|
||||
$lang->design->ditto = 'Ditto';
|
||||
$lang->design->submission = 'Commit';
|
||||
$lang->design->version = 'Revision';
|
||||
$lang->design->assignedTo = 'AssignedTo';
|
||||
$lang->design->actions = 'Actions';
|
||||
$lang->design->byQuery = 'Search';
|
||||
$lang->design->products = 'Linked Product';
|
||||
$lang->design->story = 'Linked Story';
|
||||
$lang->design->file = 'File';
|
||||
$lang->design->desc = 'Description';
|
||||
$lang->design->range = 'Impact';
|
||||
$lang->design->product = 'Linked Product';
|
||||
$lang->design->basicInfo = 'Basic Information';
|
||||
$lang->design->commitBy = 'Commit By';
|
||||
$lang->design->commitDate = 'Committed Date';
|
||||
$lang->design->affectedStory = "{$lang->SRCommon}";
|
||||
$lang->design->affectedTasks = 'Task';
|
||||
$lang->design->reviewObject = 'Review Object';
|
||||
$lang->design->createdBy = 'CreatedBy';
|
||||
$lang->design->createdDate = 'CreatedDate';
|
||||
$lang->design->basicInfo = 'Basic Information';
|
||||
$lang->design->noAssigned = 'Unassigned';
|
||||
$lang->design->comment = 'Comment';
|
||||
|
||||
/* 动作列表. */
|
||||
$lang->design->common = 'Design';
|
||||
$lang->design->create = 'Create Design';
|
||||
$lang->design->batchCreate = 'Batch Create';
|
||||
$lang->design->edit = 'Edit';
|
||||
$lang->design->delete = 'Delete';
|
||||
$lang->design->view = 'View';
|
||||
$lang->design->browse = 'List';
|
||||
$lang->design->viewCommit = 'View Commit';
|
||||
$lang->design->linkCommit = 'Link Commit';
|
||||
$lang->design->unlinkCommit = 'Unlink Commit';
|
||||
$lang->design->submit = 'Submit Review';
|
||||
$lang->design->assignTo = 'Assign';
|
||||
$lang->design->revision = 'Linked Code';
|
||||
|
||||
/* 字段取值. */
|
||||
$lang->design->typeList = array();
|
||||
$lang->design->typeList[''] = '';
|
||||
$lang->design->typeList['HLDS'] = 'High-Level';
|
||||
$lang->design->typeList['DDS'] = 'Detailed';
|
||||
$lang->design->typeList['DBDS'] = 'Database';
|
||||
$lang->design->typeList['ADS'] = 'API';
|
||||
|
||||
$lang->design->rangeList = array();
|
||||
$lang->design->rangeList['all'] = 'All';
|
||||
$lang->design->rangeList['assign'] = 'Selected';
|
||||
|
||||
$lang->design->featureBar['all'] = 'All';
|
||||
$lang->design->featureBar += $lang->design->typeList;
|
||||
|
||||
/* 提示信息. */
|
||||
$lang->design->errorSelection = 'No record selected!';
|
||||
$lang->design->noDesign = 'No record.';
|
||||
$lang->design->noCommit = 'No record commited.';
|
||||
$lang->design->confirmDelete = 'Do you want to delete this design?';
|
||||
$lang->design->confirmUnlink = 'Are you sure you want to remove this submission?';
|
||||
$lang->design->errorDate = 'The start date can not be greater than the end date.';
|
||||
$lang->design->deleted = 'Deleted';
|
||||
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* The zh-cn file of design module.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: zh-cn.php 4729 2020-09-01 07:53:55Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* 字段列表. */
|
||||
$lang->design->id = '编号';
|
||||
$lang->design->name = '设计名称';
|
||||
$lang->design->story = '需求';
|
||||
$lang->design->type = '设计类型';
|
||||
$lang->design->ditto = '同上';
|
||||
$lang->design->submission = '相关提交';
|
||||
$lang->design->version = '版本号';
|
||||
$lang->design->assignedTo = '指派给';
|
||||
$lang->design->actions = '操作';
|
||||
$lang->design->byQuery = '搜索';
|
||||
$lang->design->products = '所属产品';
|
||||
$lang->design->story = '相关需求';
|
||||
$lang->design->file = '附件';
|
||||
$lang->design->desc = '设计描述';
|
||||
$lang->design->range = '影响范围';
|
||||
$lang->design->product = '所属产品';
|
||||
$lang->design->basicInfo = '基础信息';
|
||||
$lang->design->commitBy = '由谁提交';
|
||||
$lang->design->commitDate = '提交时间';
|
||||
$lang->design->affectedStory = "影响{$lang->SRCommon}";
|
||||
$lang->design->affectedTasks = '影响任务';
|
||||
$lang->design->reviewObject = '评审对象';
|
||||
$lang->design->createdBy = '由谁创建';
|
||||
$lang->design->createdDate = '创建时间';
|
||||
$lang->design->basicInfo = '基本信息';
|
||||
$lang->design->noAssigned = '未指派';
|
||||
$lang->design->comment = '注释';
|
||||
|
||||
/* 动作列表. */
|
||||
$lang->design->common = '设计';
|
||||
$lang->design->create = '创建设计';
|
||||
$lang->design->batchCreate = '批量创建';
|
||||
$lang->design->edit = '变更';
|
||||
$lang->design->delete = '删除';
|
||||
$lang->design->view = '设计概况';
|
||||
$lang->design->browse = '浏览列表';
|
||||
$lang->design->viewCommit = '查看提交';
|
||||
$lang->design->linkCommit = '关联提交';
|
||||
$lang->design->unlinkCommit = '取消关联';
|
||||
$lang->design->submit = '提交评审';
|
||||
$lang->design->assignTo = '指派';
|
||||
$lang->design->revision = '查看关联代码';
|
||||
|
||||
$lang->design->browseAction = '设计列表';
|
||||
|
||||
/* 字段取值. */
|
||||
$lang->design->typeList = array();
|
||||
$lang->design->typeList[''] = '';
|
||||
$lang->design->typeList['HLDS'] = '概要设计';
|
||||
$lang->design->typeList['DDS'] = '详细设计';
|
||||
$lang->design->typeList['DBDS'] = '数据库设计';
|
||||
$lang->design->typeList['ADS'] = '接口设计';
|
||||
|
||||
$lang->design->rangeList = array();
|
||||
$lang->design->rangeList['all'] = '全部记录';
|
||||
$lang->design->rangeList['assign'] = '选中记录';
|
||||
|
||||
$lang->design->featureBar['all'] = '所有';
|
||||
$lang->design->featureBar += $lang->design->typeList;
|
||||
|
||||
/* 提示信息. */
|
||||
$lang->design->errorSelection = '还没有选中记录!';
|
||||
$lang->design->noDesign = '暂时没有记录';
|
||||
$lang->design->noCommit = '暂时没有提交记录';
|
||||
$lang->design->confirmDelete = '您确定要删除这个设计吗?';
|
||||
$lang->design->confirmUnlink = '您确定要移除这个提交吗?';
|
||||
$lang->design->errorDate = '开始日期不能大于结束日期';
|
||||
$lang->design->deleted = '已删除';
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* The zh-tw file of design module.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: zh-tw.php 4729 2020-09-01 07:53:55Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* 欄位列表. */
|
||||
$lang->design->id = '編號';
|
||||
$lang->design->name = '設計名稱';
|
||||
$lang->design->story = '需求';
|
||||
$lang->design->type = '設計類型';
|
||||
$lang->design->ditto = '同上';
|
||||
$lang->design->submission = '相關提交';
|
||||
$lang->design->version = '版本號';
|
||||
$lang->design->assignedTo = '指派給';
|
||||
$lang->design->actions = '操作';
|
||||
$lang->design->byQuery = '搜索';
|
||||
$lang->design->products = '所屬產品';
|
||||
$lang->design->story = '相關需求';
|
||||
$lang->design->file = '附件';
|
||||
$lang->design->desc = '設計描述';
|
||||
$lang->design->range = '影響範圍';
|
||||
$lang->design->product = '所屬產品';
|
||||
$lang->design->basicInfo = '基礎信息';
|
||||
$lang->design->commitBy = '由誰提交';
|
||||
$lang->design->commitDate = '提交時間';
|
||||
$lang->design->affectedStory = "影響{$lang->SRCommon}";
|
||||
$lang->design->affectedTasks = '影響任務';
|
||||
$lang->design->reviewObject = '評審對象';
|
||||
$lang->design->createdBy = '由誰創建';
|
||||
$lang->design->createdDate = '創建時間';
|
||||
$lang->design->basicInfo = '基本信息';
|
||||
$lang->design->noAssigned = '未指派';
|
||||
$lang->design->comment = '註釋';
|
||||
|
||||
/* 動作列表. */
|
||||
$lang->design->common = '設計';
|
||||
$lang->design->create = '創建設計';
|
||||
$lang->design->batchCreate = '批量創建';
|
||||
$lang->design->edit = '變更';
|
||||
$lang->design->delete = '刪除';
|
||||
$lang->design->view = '設計概況';
|
||||
$lang->design->browse = '瀏覽列表';
|
||||
$lang->design->viewCommit = '查看提交';
|
||||
$lang->design->linkCommit = '關聯提交';
|
||||
$lang->design->unlinkCommit = '取消關聯';
|
||||
$lang->design->submit = '提交評審';
|
||||
$lang->design->assignTo = '指派';
|
||||
$lang->design->revision = '查看關聯代碼';
|
||||
|
||||
/* 欄位取值. */
|
||||
$lang->design->typeList = array();
|
||||
$lang->design->typeList[''] = '';
|
||||
$lang->design->typeList['HLDS'] = '概要設計';
|
||||
$lang->design->typeList['DDS'] = '詳細設計';
|
||||
$lang->design->typeList['DBDS'] = '資料庫設計';
|
||||
$lang->design->typeList['ADS'] = '介面設計';
|
||||
|
||||
$lang->design->rangeList = array();
|
||||
$lang->design->rangeList['all'] = '全部記錄';
|
||||
$lang->design->rangeList['assign'] = '選中記錄';
|
||||
|
||||
$lang->design->featureBar['all'] = '所有';
|
||||
$lang->design->featureBar += $lang->design->typeList;
|
||||
|
||||
/* 提示信息. */
|
||||
$lang->design->errorSelection = '還沒有選中記錄!';
|
||||
$lang->design->noDesign = '暫時沒有記錄';
|
||||
$lang->design->noCommit = '暫時沒有提交記錄';
|
||||
$lang->design->confirmDelete = '您確定要刪除這個設計嗎?';
|
||||
$lang->design->confirmUnlink = '您確定要移除這個提交嗎?';
|
||||
$lang->design->errorDate = '開始日期不能大於結束日期';
|
||||
$lang->design->deleted = '已刪除';
|
||||
@@ -0,0 +1,465 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: model.php 5107 2020-09-02 09:46:12Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class designModel extends model
|
||||
{
|
||||
/**
|
||||
* Create a design.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($projectID)
|
||||
{
|
||||
$design = fixer::input('post')
|
||||
->stripTags('desc', $this->config->allowedTags)
|
||||
->add('createdBy', $this->app->user->account)
|
||||
->add('createdDate', helper::now())
|
||||
->add('project', $projectID)
|
||||
->add('version', 1)
|
||||
->remove('files,labels')
|
||||
->get();
|
||||
|
||||
$design = $this->loadModel('file')->processImgURL($design, 'desc', $this->post->uid);
|
||||
$this->dao->insert(TABLE_DESIGN)->data($design)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->design->create->requiredFields, 'notempty')
|
||||
->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
$designID = $this->dao->lastInsertID();
|
||||
$this->file->updateObjectID($this->post->uid, $designID, 'design');
|
||||
$files = $this->file->saveUpload('design', $designID);
|
||||
|
||||
$spec = new stdclass();
|
||||
$spec->design = $designID;
|
||||
$spec->version = 1;
|
||||
$spec->name = $design->name;
|
||||
$spec->desc = $design->desc;
|
||||
$spec->files = empty($files) ? '' : implode(',', array_keys($files));
|
||||
$this->dao->insert(TABLE_DESIGNSPEC)->data($spec)->exec();
|
||||
|
||||
return $designID;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch create designs.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function batchCreate($projectID = 0, $productID = 0)
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
|
||||
$this->loadModel('action');
|
||||
foreach($data->name as $i => $name)
|
||||
{
|
||||
if(!trim($name)) continue;
|
||||
|
||||
$design = new stdclass();
|
||||
$design->story = isset($data->story[$i]) ? $data->story[$i] : '';
|
||||
$design->type = $data->type[$i];
|
||||
$design->name = $name;
|
||||
$design->product = $productID;
|
||||
$design->project = $projectID;
|
||||
$design->createdBy = $this->app->user->account;
|
||||
$design->createdDate = helper::now();
|
||||
|
||||
$this->dao->insert(TABLE_DESIGN)->data($design)->autoCheck()->batchCheck($this->config->design->create->requiredFields, 'notempty')->exec();
|
||||
|
||||
$designID = $this->dao->lastInsertID();
|
||||
$this->action->create('design', $designID, 'Opened');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function update($designID = 0)
|
||||
{
|
||||
$oldDesign = $this->getByID($designID);
|
||||
$design = fixer::input('post')
|
||||
->add('editedBy', $this->app->user->account)
|
||||
->add('editedDate', helper::now())
|
||||
->stripTags($this->config->design->editor->edit['id'], $this->config->allowedTags)
|
||||
->remove('file,files,labels,children,toList')
|
||||
->get();
|
||||
|
||||
$design = $this->loadModel('file')->processImgURL($design, 'desc', $this->post->uid);
|
||||
$this->dao->update(TABLE_DESIGN)->data($design)->autoCheck()->batchCheck('name,type', 'notempty')->where('id')->eq($designID)->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
$this->file->updateObjectID($this->post->uid, $designID, 'design');
|
||||
$files = $this->file->saveUpload('design', $designID);
|
||||
$designChanged = ($oldDesign->name != $design->name || $oldDesign->desc != $design->desc || !empty($files));
|
||||
|
||||
if($designChanged)
|
||||
{
|
||||
$design = $this->getByID($designID);
|
||||
$version = $design->version + 1;
|
||||
$spec = new stdclass();
|
||||
$spec->design = $designID;
|
||||
$spec->version = $version;
|
||||
$spec->name = $design->name;
|
||||
$spec->desc = $design->desc;
|
||||
$spec->files = empty($files) ? '' : implode(',', array_keys($files));
|
||||
$this->dao->insert(TABLE_DESIGNSPEC)->data($spec)->exec();
|
||||
|
||||
$this->dao->update(TABLE_DESIGN)->set('version')->eq($version)->where('id')->eq($designID)->exec();
|
||||
}
|
||||
|
||||
return common::createChanges($oldDesign, $design);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @access public
|
||||
* @return array|bool
|
||||
*/
|
||||
public function assign($designID = 0)
|
||||
{
|
||||
$oldDesign = $this->getByID($designID);
|
||||
|
||||
$design = fixer::input('post')
|
||||
->add('editedBy', $this->app->user->account)
|
||||
->add('editedDate', helper::today())
|
||||
->setDefault('assignedDate', helper::today())
|
||||
->stripTags($this->config->design->editor->assignto['id'], $this->config->allowedTags)
|
||||
->remove('uid,comment,files,label')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_DESIGN)->data($design)->autoCheck()->where('id')->eq((int)$designID)->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldDesign, $design);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* LinkCommit a design.
|
||||
*
|
||||
* @param int $designID
|
||||
* @param int $repoID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function linkCommit($designID = 0, $repoID = 0)
|
||||
{
|
||||
$revisions = $_POST['revision'];
|
||||
|
||||
foreach($revisions as $revision)
|
||||
{
|
||||
$data = new stdclass();
|
||||
$data->project = $this->session->project;
|
||||
$data->product = $this->session->product;
|
||||
$data->AType = 'design';
|
||||
$data->AID = $designID;
|
||||
$data->BType = 'commit';
|
||||
$data->BID = $revision;
|
||||
$data->relation = 'completedin';
|
||||
$data->extra = $repoID;
|
||||
|
||||
$this->dao->replace(TABLE_RELATION)->data($data)->autoCheck()->exec();
|
||||
|
||||
$data->AType = 'commit';
|
||||
$data->AID = $revision;
|
||||
$data->BType = 'design';
|
||||
$data->BID = $designID;
|
||||
$data->relation = 'completedfrom';
|
||||
|
||||
$this->dao->replace(TABLE_RELATION)->data($data)->autoCheck()->exec();
|
||||
}
|
||||
|
||||
$oldCommit = $this->dao->findByID($designID)->from(TABLE_DESIGN)->fetch('commit');
|
||||
$revisions = join(',', $revisions);
|
||||
$commit = $oldCommit ? $oldCommit . ',' . $revisions : $revisions;
|
||||
|
||||
$design = new stdclass();
|
||||
$design->commit = $commit;
|
||||
$design->commitedBy = $this->app->user->account;
|
||||
$this->dao->update(TABLE_DESIGN)->data($design)->autoCheck()->where('id')->eq($designID)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink commit.
|
||||
*
|
||||
* @param int $designID
|
||||
* @param int $commitID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function unlinkCommit($designID = 0, $commitID = 0)
|
||||
{
|
||||
/* Delete data in the zt_relation.*/
|
||||
$this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('design')->andwhere('AID')->eq($designID)->andwhere('BType')->eq('commit')->andwhere('relation')->eq('completedin')->andWhere('BID')->eq($commitID)->exec();
|
||||
$this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('commit')->andwhere('BID')->eq($designID)->andwhere('BType')->eq('design')->andwhere('relation')->eq('completedfrom')->andWhere('AID')->eq($commitID)->exec();
|
||||
|
||||
/* Commit after unlinking. */
|
||||
$commit = $this->dao->select('BID')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('AID')->eq($designID)->andWhere('BType')->eq('commit')->andwhere('relation')->eq('completedin')->fetchAll('BID');
|
||||
$commit = implode(",", array_keys($commit));
|
||||
|
||||
$this->dao->update(TABLE_DESIGN)->set('commit')->eq($commit)->where('id')->eq($designID)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a design by id.
|
||||
*
|
||||
* @param int $designID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByID($designID = 0)
|
||||
{
|
||||
$design = $this->dao->select('*')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetch();
|
||||
if(!$design) return false;
|
||||
|
||||
$design->files = $this->loadModel('file')->getByObject('design', $designID);
|
||||
$design->productName = $this->dao->findByID($design->product)->from(TABLE_PRODUCT)->fetch('name');
|
||||
|
||||
|
||||
$design->commit = '';
|
||||
$relations = $this->loadModel('common')->getRelations('design', $designID, 'commit');
|
||||
foreach($relations as $relation) $design->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID&projectID={$design->project}"), "#$relation->BID", '_blank');
|
||||
|
||||
return $this->loadModel('file')->replaceImgURL($design, 'desc');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get design pairs.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $type all|HLDS|DDS|DBDS|ADS
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getPairs($productID = 0, $type = 'all')
|
||||
{
|
||||
$designs = $this->dao->select('id, name')->from(TABLE_DESIGN)
|
||||
->where('product')->eq($productID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('type')->eq($type)
|
||||
->fetchPairs();
|
||||
foreach($designs as $id => $name) $designs[$id] = $id . ':' . $name;
|
||||
|
||||
return $designs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get affected scope.
|
||||
*
|
||||
* @param int $design
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getAffectedScope($design = 0)
|
||||
{
|
||||
/* Get affected tasks. */
|
||||
$design->tasks = $this->dao->select('*')->from(TABLE_TASK)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('status')->ne('closed')
|
||||
->andWhere('design')->eq($design->id)
|
||||
->orderBy('id desc')->fetchAll();
|
||||
|
||||
return $design;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get design list.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $projectID
|
||||
* @param string $type all|bySearch|HLDS|DDS|DBDS|ADS
|
||||
* @param int $param
|
||||
* @param string $orderBy
|
||||
* @param int $pager
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getList($projectID = 0, $productID = 0, $type = 'all', $param = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
if($type == 'bySearch')
|
||||
{
|
||||
$designs = $this->getBySearch($projectID, $productID, $param, $orderBy, $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
$designs = $this->dao->select('*')->from(TABLE_DESIGN)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF($type != 'all')->andWhere('type')->in($type)->fi()
|
||||
->andWhere('product')->eq($productID)
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
return $designs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get commit.
|
||||
*
|
||||
* @param int $designID
|
||||
* @param int $pager
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getCommit($designID = 0, $pager = null)
|
||||
{
|
||||
$design = $this->dao->select('*')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetch();
|
||||
|
||||
$design->commit = $this->dao->select('*')->from(TABLE_REPOHISTORY)->where('id')->in($design->commit)->page($pager)->fetchAll('id');
|
||||
|
||||
return $design;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get designs by search.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param int $queryID
|
||||
* @param string $orderBy
|
||||
* @param int $pager
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getBySearch($projectID = 0, $productID = 0, $queryID = 0, $orderBy = 'id_desc', $pager = null)
|
||||
{
|
||||
if($queryID)
|
||||
{
|
||||
$query = $this->loadModel('search')->getQuery($queryID);
|
||||
if($query)
|
||||
{
|
||||
$this->session->set('designQuery', $query->sql);
|
||||
$this->session->set('designForm', $query->form);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set('designQuery', ' 1 = 1');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->session->designQuery == false) $this->session->set('designQuery', ' 1 = 1');
|
||||
}
|
||||
|
||||
$designQuery = $this->session->designQuery;
|
||||
|
||||
$designs = $this->dao->select('*')->from(TABLE_DESIGN)
|
||||
->where($designQuery)
|
||||
->andWhere('deleted')->eq('0')
|
||||
->andWhere('project')->eq($projectID)
|
||||
->andWhere('product')->eq($productID)
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
|
||||
return $designs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set design menu.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $products
|
||||
* @param int $productID
|
||||
* @param string $currentModule
|
||||
* @param string $currentMethod
|
||||
* @param string $extra
|
||||
* @param int $branch
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setMenu($projectID = 0, $products, $productID = 0)
|
||||
{
|
||||
if($this->app->rawMethod != 'browse') unset($this->lang->waterfall->menu->design['subMenu']->bysearch);
|
||||
if(empty($products) || !$productID) return '';
|
||||
$currentProduct = $this->loadModel('product')->getById($productID);
|
||||
setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
$output = '';
|
||||
if(!empty($products))
|
||||
{
|
||||
$dropMenuLink = helper::createLink('design', 'ajaxGetDropMenu', "projectID=$projectID&productID=$productID");
|
||||
$output = "<div class='btn-group angle-btn'><div class='btn-group'><button data-toggle='dropdown' type='button' class='btn btn-limit' id='currentItem' title='{$currentProduct->name}'><span class='text'>{$currentProduct->name}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div></div>";
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build search form.
|
||||
*
|
||||
* @param int $queryID
|
||||
* @param string $actionURL
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function buildSearchForm($queryID = 0, $actionURL = '')
|
||||
{
|
||||
$this->config->design->search['actionURL'] = $actionURL;
|
||||
$this->config->design->search['queryID'] = $queryID;
|
||||
|
||||
$this->loadModel('search')->setSearchParams($this->config->design->search);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print assignedTo html.
|
||||
*
|
||||
* @param object $design
|
||||
* @param array $users
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function printAssignedHtml($design = '', $users = '')
|
||||
{
|
||||
$btnTextClass = '';
|
||||
$assignedToText = zget($users, $design->assignedTo);
|
||||
|
||||
if(empty($design->assignedTo))
|
||||
{
|
||||
$btnTextClass = 'text-primary';
|
||||
$assignedToText = $this->lang->design->noAssigned;
|
||||
}
|
||||
if($design->assignedTo == $this->app->user->account) $btnTextClass = 'text-red';
|
||||
|
||||
$btnClass = $design->assignedTo == 'closed' ? ' disabled' : '';
|
||||
$btnClass = "iframe btn btn-icon-left btn-sm {$btnClass}";
|
||||
$assignToLink = helper::createLink('design', 'assignTo', "designID=$design->id", '', true);
|
||||
$assignToHtml = html::a($assignToLink, "<i class='icon icon-hand-right'></i> <span title='" . zget($users, $design->assignedTo) . "' class='{$btnTextClass}'>{$assignedToText}</span>", '', "class='$btnClass'");
|
||||
|
||||
echo !common::hasPriv('design', 'assignTo', $design) ? "<span style='padding-left: 21px' class='{$btnTextClass}'>{$assignedToText}</span>" : $assignToHtml;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
<?php js::set('productID', $productID);?>
|
||||
<?php
|
||||
$iCharges = 0;
|
||||
$others = 0;
|
||||
$closeds = 0;
|
||||
$tab = 'project';
|
||||
$productNames = array();
|
||||
|
||||
foreach($products as $product)
|
||||
{
|
||||
if($product->status == 'normal' and $product->PO == $this->app->user->account) $iCharges++;
|
||||
if($product->status == 'normal' and !($product->PO == $this->app->user->account)) $others++;
|
||||
if($product->status == 'closed') $closeds++;
|
||||
$productNames[] = $product->name;
|
||||
}
|
||||
$productsPinYin = common::convert2Pinyin($productNames);
|
||||
$myProductsHtml = '';
|
||||
$normalProductsHtml = '';
|
||||
$closedProductsHtml = '';
|
||||
|
||||
foreach($products as $product)
|
||||
{
|
||||
$selected = $product->id == $productID ? 'selected' : '';
|
||||
$productName = $product->name;
|
||||
$linkHtml = sprintf($link, $product->id);
|
||||
if($product->status == 'normal' and $product->PO == $this->app->user->account)
|
||||
{
|
||||
$myProductsHtml .= html::a($linkHtml, $productName, '', "class='text-important $selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$tab'");
|
||||
}
|
||||
else if($product->status == 'normal' and !($product->PO == $this->app->user->account))
|
||||
{
|
||||
$normalProductsHtml .= html::a($linkHtml, $productName, '', "class='$selected' title='{$productName}' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$tab'");
|
||||
}
|
||||
else if($product->status == 'closed')
|
||||
{
|
||||
$closedProductsHtml .= html::a($linkHtml, $productName, '', "class='$selected' title='{$productName}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "' data-app='$tab'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
<div class="table-col col-left">
|
||||
<div class='list-group'>
|
||||
<?php
|
||||
if(!empty($myProductsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->product->mine}</div>";
|
||||
echo $myProductsHtml;
|
||||
if(!empty($myProductsHtml))
|
||||
{
|
||||
echo "<div class='heading'>{$lang->product->other}</div>";
|
||||
}
|
||||
}
|
||||
echo $normalProductsHtml;
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->product->closed?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-col col-right">
|
||||
<div class='list-group'><?php echo $closedProductsHtml;?></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>scrollToSelected();</script>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* The assignTo of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: assignto.html.php 4903 2020-09-02 09:32:59Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include "../../common/view/header.html.php";?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='prefix label-id'><strong><?php echo $design->id;?></strong></span>
|
||||
<?php echo "<span title='$design->name'>" . $design->name . '</span>';?>
|
||||
</h2>
|
||||
</div>
|
||||
<form class='load-indicator main-form' method='post' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->design->assignedTo;?></th>
|
||||
<td><?php echo html::select('assignedTo', $users, $design->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->comment;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('comment', '', "rows='6' class='form-control kindeditor' hidefocus='true'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-center form-actions' colspan='3'><?php echo html::submitButton(); ?></td> </tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include "../../common/view/footer.html.php";?>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* The batchCreate view of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: batchcreate.html.php 4903 2020-09-02 09:32:59Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('type', $type);?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="main-header"><h2><?php echo $lang->design->batchCreate;?></h2></div>
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->design->id;?></th>
|
||||
<th class='w-200px'><?php echo $lang->design->story;?></th>
|
||||
<th class='w-200px required'><?php echo $lang->design->type;?></th>
|
||||
<th class='required'><?php echo $lang->design->name;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for($i = 1; $i <= 10; $i ++):?>
|
||||
<tr>
|
||||
<td><?php echo $i;?></td>
|
||||
<td><?php echo html::select("story[$i]", $stories, '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select("type[$i]", $lang->design->typeList, '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::input("name[$i]", '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
<tr>
|
||||
<td colspan='4' class='form-actions text-center'>
|
||||
<?php echo html::submitButton() . html::backButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view file of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: browse.html.php 5102 2020-09-03 10:59:54Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/sortable.html.php';?>
|
||||
<?php js::set('type', strtolower($type));?>
|
||||
<style>
|
||||
.btn-group a i.icon-plus {font-size: 16px;}
|
||||
.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.3);}
|
||||
.btn-group button.dropdown-toggle.btn-primary {padding:6px;}
|
||||
</style>
|
||||
<div class="cell<?php if($type == 'bySearch') echo ' show';?>" id="queryBox" data-module='design'></div>
|
||||
<div id="mainContent" class="main-table">
|
||||
<?php if(empty($designs)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->design->noDesign;?></span></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form id='designFrom' method='post' class="main-table">
|
||||
<table class='table has-sort-head table-fixrd' id="designTable">
|
||||
<?php $vars = "projectID=$projectID&productID=$productID&type=$type¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left w-60px"> <?php common::printOrderLink('id', $orderBy, $vars, $lang->design->id);?></th>
|
||||
<th class="text-left w-100px"> <?php common::printOrderLink('type', $orderBy, $vars, $lang->design->type);?></th>
|
||||
<th class="text-left"> <?php common::printOrderLink('name', $orderBy, $vars, $lang->design->name);?></th>
|
||||
<th class="text-left w-120px"> <?php common::printOrderLink('createdBy', $orderBy, $vars, $lang->design->createdBy);?></th>
|
||||
<th class="text-left w-150px"> <?php common::printOrderLink('createdDate', $orderBy, $vars, $lang->design->createdDate);?></th>
|
||||
<th class="c-assignedTo w-120px"><?php common::printOrderLink('assignedTo', $orderBy, $vars, $lang->design->assignedTo);?></th>
|
||||
<th class="text-center w-100px"> <?php echo $lang->design->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($designs as $design):?>
|
||||
<tr>
|
||||
<td calss="c-id"> <?php printf('%03d', $design->id);?></td>
|
||||
<td class="c-type"> <?php echo zget($lang->design->typeList, $design->type);?></td>
|
||||
<td class="c-name" title="<?php echo $design->name;?>"><?php echo html::a($this->createLink('design', 'view', "id={$design->id}"), $design->name);?></td>
|
||||
<td class="c-createdBy"> <?php echo zget($users, $design->createdBy);?></td>
|
||||
<td class="c-createdDate"><?php echo substr($design->createdDate, 0, 11);?></td>
|
||||
<td class="c-assignedTo"> <?php echo $this->design->printAssignedHtml($design, $users);?></td>
|
||||
<td class='c-actions text-center'>
|
||||
<?php
|
||||
$vars = "design={$design->id}";
|
||||
common::printIcon('design', 'edit', $vars, $design, 'list', 'alter', '', '', '', '', '', $design->project);
|
||||
common::printIcon('design', 'viewCommit', $vars, $design, 'list', 'list-alt', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->project);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer table-statistic'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: create.html.php 4903 2020-09-02 09:32:59Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('type', $type);?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->design->create;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->design->product;?></th>
|
||||
<td><?php echo html::select('product', $products, $productID, "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->design->story;?></th>
|
||||
<td><?php echo html::select('story', empty($stories) ? '' : $stories, '', "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->type;?></th>
|
||||
<td><?php echo html::select('type', $lang->design->typeList, '', "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', '', "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->file;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.85');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: edit.html.php 4903 2020-09-02 09:32:59Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('type', $design->type);?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->design->edit;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->design->product;?></th>
|
||||
<td><?php echo html::select('product', $products, $design->product, "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-120px'><?php echo $lang->design->story;?></th>
|
||||
<td><?php echo html::select('story', empty($stories) ? '' : $stories, $design->story, "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->type;?></th>
|
||||
<td><?php echo html::select('type', $lang->design->typeList, $design->type, "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->name;?></th>
|
||||
<td><?php echo html::input('name', $design->name, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', $design->desc, 'class="form-control"');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->file;?></th>
|
||||
<td colspan='2'><?php echo $this->fetch('file', 'buildform', 'fileCount=1&percent=0.85');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->checkAffection;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='tabs'>
|
||||
<ul class='nav nav-tabs'>
|
||||
<li class='active'><a data-toggle='tab' href='#affectedTasks'><?php echo $lang->design->affectedTasks;?><span class='label label-danger label-badge label-circle'><?php echo count($design->tasks);?></span></a></li>
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div class='tab-pane active' id='affectedTasks'>
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id'> <?php echo $lang->task->id;?></th>
|
||||
<th class='c-name'> <?php echo $lang->task->name;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->task->assignedTo;?></th>
|
||||
<th class='c-status'><?php echo $lang->task->status;?></th>
|
||||
<th class='w-100px'> <?php echo $lang->task->consumed;?></th>
|
||||
<th class='w-90px'> <?php echo $lang->task->left;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($design->tasks as $task):?>
|
||||
<tr class='text-center'>
|
||||
<td><?php $task->id?></td>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name, '_blank');?></td>;
|
||||
<td><?php echo zget($users, $task->assignedTo);?></td>
|
||||
<td><span class='status-task status-<?php echo $task->status;?>'><?php $this->processStatus('task', $task);?></span></td>
|
||||
<td><?php echo $task->consumed;?></td>
|
||||
<td><?php echo $task->left;?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='3' class='text-center form-actions'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* The linkCommit view of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: linkcommit.html.php 4903 2020-09-02 09:32:59Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div class='main-content' id='mainContent'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $design->id;?></span>
|
||||
<span title='<?php echo $design->name?>'><?php echo $design->name?></span>
|
||||
<small><?php echo $lang->arrow . $lang->design->linkCommit;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
<?php if(empty($repoID)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->design->noCommit;?></span></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='searchBox'>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="w-100px"><h4><?php echo $lang->repo->maintain . ': ';?></h4></td>
|
||||
<td><?php echo html::select('repo', $repos, $repoID, "class='form-control chosen'");?></td>
|
||||
<td>
|
||||
<h4><?php echo $lang->design->commitDate . ':';?></h4>
|
||||
<?php echo html::input('begin', $begin, "class='form-control form-date srearch-date'");?>
|
||||
<span>~</span>
|
||||
<?php echo html::input('end', $end, "class='form-control form-date srearch-date'");?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form id='logForm' class='main-table form-ajax' data-ride='table' action=<?php echo inlink('linkCommit', "designID=$designID&repoID=$repoID");?> method='post'>
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-40px'></th>
|
||||
<th class='w-100px'><?php echo $lang->repo->revisionA?></th>
|
||||
<?php if(isset($repo->SCM) and $repo->SCM == 'Git'):?>
|
||||
<th class='w-70px'><?php echo $lang->repo->commit?></th>
|
||||
<?php endif;?>
|
||||
<th class='w-120px'><?php echo $lang->repo->time?></th>
|
||||
<th class='w-100px'><?php echo $lang->repo->committer?></th>
|
||||
<th><?php echo $lang->repo->comment?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($revisions as $log):?>
|
||||
<tr>
|
||||
<td class='c-name'>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' name='revision[]' value="<?php echo $log->id?>"/>
|
||||
<label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td class='versions c-name' title="<?php echo $repo->SCM == 'Git' ? substr($log->revision, 0, 10) : $log->revision;?>"><span class="revision"><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&revision={$log->revision}"), $repo->SCM == 'Git' ? substr($log->revision, 0, 10) : $log->revision);?></span></td>
|
||||
<?php if($repo->SCM == 'Git'):?>
|
||||
<td><?php echo $log->commit?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo substr($log->time, 0, 10);?></td>
|
||||
<td><?php echo zget($users, $log->committer, $log->committer);?></td>
|
||||
<?php $comment = htmlspecialchars($log->comment, ENT_QUOTES);?>
|
||||
<td title='<?php echo $comment?>' class='comment c-name'><?php echo $log->comment?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton('', '', 'btn btn-primary')?>
|
||||
</div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php js::set('designID', $designID);?>
|
||||
<?php js::set('errorDate', $lang->design->errorDate);?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* The view of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: view.html.php 4903 2020-09-02 09:32:59Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('type', $design->type);?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php $browseLink = $app->session->designList != false ? $app->session->designList : $this->createLink('design', 'browse', "productID=$design->product");?>
|
||||
<?php if(!isonlybody()) echo html::a($browseLink, '<i class="icon icon-back icon-sm"></i> ' . $lang->goback, '', "class='btn btn-secondary'");?>
|
||||
<div class="divider"></div>
|
||||
<div class="page-title">
|
||||
<span class="label label-id"><?php echo $design->id?></span>
|
||||
<span class="text" title="<?php echo $design->name;?>"><?php echo $design->name;?></span>
|
||||
<?php if($design->deleted):?>
|
||||
<span class='label label-danger'><?php echo $lang->design->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row">
|
||||
<div class="main-col col-8">
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<div class="detail-title"><?php echo $lang->design->desc;?></div>
|
||||
<div class="detail-content article-content">
|
||||
<?php echo $design->desc;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $design->files, 'fieldset' => 'true'));?>
|
||||
</div>
|
||||
<div class='cell'><?php include '../../common/view/action.html.php';?></div>
|
||||
<div class='main-actions'>
|
||||
<div class="btn-toolbar">
|
||||
<?php common::printBack($this->session->designList);?>
|
||||
<?php if(!isonlybody()) echo "<div class='divider'></div>";?>
|
||||
<?php if(!$design->deleted):?>
|
||||
<?php
|
||||
common::printIcon('design', 'assignTo', "designID=$design->id", $design, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('design', 'linkCommit', "designID=$design->id", $design, 'button', 'link', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('design', 'edit', "designID=$design->id", $design, 'button', 'alter');
|
||||
common::printIcon('design', 'delete', "designID=$design->id", $design, 'button', 'trash', 'hiddenwin');
|
||||
?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='side-col col-4'>
|
||||
<div class='cell'>
|
||||
<div class="detail">
|
||||
<div class='detail-title'><?php echo $lang->design->basicInfo;?></div>
|
||||
<div class='detail-content'>
|
||||
<table class='table table-data'>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->type;?></th>
|
||||
<td><?php echo zget($lang->design->typeList, $design->type);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->product;?></th>
|
||||
<td><?php echo $design->productName;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->story;?></th>
|
||||
<td><?php echo $design->story ? html::a($this->createLink('story', 'view', "id=$design->story"), zget($stories, $design->story)) : '';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->submission;?></th>
|
||||
<td><?php echo $design->commit;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->createdBy;?></th>
|
||||
<td><?php echo zget($users, $design->createdBy);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->design->createdDate;?></th>
|
||||
<td><?php echo substr($design->createdDate, 0, 11);?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* The viewCommit view of design module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package design
|
||||
* @version $Id: viewcommit.html.php 4903 2020-09-02 09:32:59Z tianshujie@easycorp.ltd $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>
|
||||
#mainContent .pull-right{margin-bottom: 10px}
|
||||
.table{border: 1px solid #ddd;}
|
||||
</style>
|
||||
<div id="mainContent">
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<span class='label label-id'><?php echo $design->id;?></span>
|
||||
<span title='<?php echo $design->name?>'><?php echo $design->name?></span>
|
||||
<small><?php echo $lang->arrow . $lang->design->submission;?></small>
|
||||
</h2>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php common::printLink('design', 'linkCommit', "designID=$design->id", "<i class='icon icon-plus'></i>" . $lang->design->linkCommit, '_blank', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
<?php if(empty($design->commit)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->design->noCommit;?></span></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<table class='table'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-100px"><?php echo $lang->design->submission;?></th>
|
||||
<th class='w-120px'><?php echo $lang->design->commitBy;?></th>
|
||||
<th class='w-100px'><?php echo $lang->design->commitDate;?></th>
|
||||
<th><?php echo $lang->design->comment;?></th>
|
||||
<th class="text-center w-50px"> <?php echo $lang->design->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($design->commit as $commit):?>
|
||||
<tr>
|
||||
<td title="<?php echo $commit->id;?>"><?php echo html::a(helper::createLink('design', 'revision', "repoID=$commit->id"), "#$commit->id", '_blank');?></td>
|
||||
<td><?php echo zget($users, $commit->committer, $commit->committer);?></td>
|
||||
<td><?php echo substr($commit->time, 0, 11);?></td>
|
||||
<td title="<?php echo $commit->comment;?>"><?php echo $commit->comment;?></td>
|
||||
<td class="c-actions text-center">
|
||||
<?php common::printIcon('design', 'unlinkCommit', "designID=$design->id&commitID=$commit->id", $design, 'list', 'unlink', 'hiddenwin', 'iframe showinonlybody', true);?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer table-statistic'>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -96,3 +96,5 @@ ol, ul {margin-bottom: 0}
|
||||
.c-product, .c-execution, .c-lib {width: 80px !important;}
|
||||
|
||||
.header-btn .btn > .text {text-overflow: unset !important;}
|
||||
|
||||
.tree li.active > .tree-group a {font-weight: 700; color: #0c64eb;}
|
||||
|
||||
@@ -26,8 +26,10 @@ $lang->moduleOrder[45] = 'project';
|
||||
$lang->moduleOrder[50] = 'projectstory';
|
||||
$lang->moduleOrder[55] = 'execution';
|
||||
$lang->moduleOrder[56] = 'kanban';
|
||||
$lang->moduleOrder[57] = 'programplan';
|
||||
$lang->moduleOrder[60] = 'task';
|
||||
$lang->moduleOrder[65] = 'build';
|
||||
$lang->moduleOrder[66] = 'design';
|
||||
|
||||
$lang->moduleOrder[70] = 'qa';
|
||||
$lang->moduleOrder[75] = 'bug';
|
||||
@@ -47,6 +49,7 @@ $lang->moduleOrder[130] = 'group';
|
||||
$lang->moduleOrder[135] = 'user';
|
||||
|
||||
$lang->moduleOrder[140] = 'admin';
|
||||
$lang->moduleOrder[142] = 'stage';
|
||||
$lang->moduleOrder[145] = 'extension';
|
||||
$lang->moduleOrder[150] = 'custom';
|
||||
$lang->moduleOrder[155] = 'action';
|
||||
@@ -161,6 +164,32 @@ if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->resource->my->project = 'project';
|
||||
|
||||
/* Design. */
|
||||
$lang->resource->design = new stdclass();
|
||||
$lang->resource->design->browse = 'browse';
|
||||
$lang->resource->design->view = 'view';
|
||||
$lang->resource->design->create = 'create';
|
||||
$lang->resource->design->batchCreate = 'batchCreate';
|
||||
$lang->resource->design->edit = 'edit';
|
||||
$lang->resource->design->assignTo = 'assignTo';
|
||||
$lang->resource->design->delete = 'delete';
|
||||
$lang->resource->design->linkCommit = 'linkCommit';
|
||||
$lang->resource->design->viewCommit = 'viewCommit';
|
||||
$lang->resource->design->unlinkCommit = 'unlinkCommit';
|
||||
$lang->resource->design->revision = 'revision';
|
||||
|
||||
$lang->design->methodOrder[5] = 'browse';
|
||||
$lang->design->methodOrder[10] = 'view';
|
||||
$lang->design->methodOrder[15] = 'create';
|
||||
$lang->design->methodOrder[20] = 'batchCreate';
|
||||
$lang->design->methodOrder[25] = 'edit';
|
||||
$lang->design->methodOrder[30] = 'assignTo';
|
||||
$lang->design->methodOrder[35] = 'delete';
|
||||
$lang->design->methodOrder[40] = 'linkCommit';
|
||||
$lang->design->methodOrder[45] = 'viewCommit';
|
||||
$lang->design->methodOrder[50] = 'unlinkCommit';
|
||||
$lang->design->methodOrder[55] = 'revision';
|
||||
|
||||
/* Program. */
|
||||
$lang->resource->program = new stdclass();
|
||||
$lang->resource->program->browse = 'browse';
|
||||
@@ -204,6 +233,16 @@ if($config->systemMode == 'new')
|
||||
$lang->program->methodOrder[95] = 'export';
|
||||
$lang->program->methodOrder[100] = 'updateOrder';
|
||||
|
||||
/* Program plan. */
|
||||
$lang->resource->programplan = new stdclass();
|
||||
$lang->resource->programplan->browse = 'browse';
|
||||
$lang->resource->programplan->create = 'create';
|
||||
$lang->resource->programplan->edit = 'edit';
|
||||
|
||||
$lang->programplan->methodOrder[5] = 'browse';
|
||||
$lang->programplan->methodOrder[10] = 'create';
|
||||
$lang->programplan->methodOrder[15] = 'edit';
|
||||
|
||||
/* Project. */
|
||||
$lang->resource->project = new stdclass();
|
||||
$lang->resource->project->index = 'index';
|
||||
@@ -336,6 +375,22 @@ if($config->systemMode == 'new')
|
||||
$lang->projectrelease->methodOrder[65] = 'batchUnlinkBug';
|
||||
$lang->projectrelease->methodOrder[70] = 'changeStatus';
|
||||
|
||||
/* Stage. */
|
||||
$lang->resource->stage = new stdclass();
|
||||
$lang->resource->stage->browse = 'browse';
|
||||
$lang->resource->stage->create = 'create';
|
||||
$lang->resource->stage->batchCreate = 'batchCreate';
|
||||
$lang->resource->stage->edit = 'edit';
|
||||
$lang->resource->stage->setType = 'setType';
|
||||
$lang->resource->stage->delete = 'delete';
|
||||
|
||||
$lang->stage->methodOrder[5] = 'browse';
|
||||
$lang->stage->methodOrder[10] = 'create';
|
||||
$lang->stage->methodOrder[15] = 'batchCreate';
|
||||
$lang->stage->methodOrder[20] = 'edit';
|
||||
$lang->stage->methodOrder[25] = 'setType';
|
||||
$lang->stage->methodOrder[30] = 'delete';
|
||||
|
||||
/* Stakeholer. */
|
||||
$lang->resource->stakeholder = new stdclass();
|
||||
$lang->resource->stakeholder->browse = 'browse';
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
$config->programplan->create = new stdclass();
|
||||
$config->programplan->edit = new stdclass();
|
||||
$config->programplan->create->requiredFields = 'name,begin,end';
|
||||
$config->programplan->edit->requiredFields = 'name,begin,end';
|
||||
|
||||
$config->programplan->datatable = new stdclass();
|
||||
$config->programplan->datatable->defaultField = array('id', 'name', 'percent', 'attribute', 'begin', 'end', 'realBegan', 'realEnd', 'actions');
|
||||
|
||||
$config->programplan->datatable->fieldList['id']['title'] = 'idAB';
|
||||
$config->programplan->datatable->fieldList['id']['fixed'] = 'left';
|
||||
$config->programplan->datatable->fieldList['id']['width'] = '70';
|
||||
$config->programplan->datatable->fieldList['id']['required'] = 'yes';
|
||||
|
||||
$config->programplan->datatable->fieldList['name']['title'] = 'name';
|
||||
$config->programplan->datatable->fieldList['name']['fixed'] = 'left';
|
||||
$config->programplan->datatable->fieldList['name']['width'] = 'auto';
|
||||
$config->programplan->datatable->fieldList['name']['required'] = 'yes';
|
||||
|
||||
$config->programplan->datatable->fieldList['percent']['title'] = 'percent';
|
||||
$config->programplan->datatable->fieldList['percent']['fixed'] = 'no';
|
||||
$config->programplan->datatable->fieldList['percent']['width'] = '100';
|
||||
$config->programplan->datatable->fieldList['percent']['required'] = 'no';
|
||||
|
||||
$config->programplan->datatable->fieldList['attribute']['title'] = 'attribute';
|
||||
$config->programplan->datatable->fieldList['attribute']['fixed'] = 'no';
|
||||
$config->programplan->datatable->fieldList['attribute']['width'] = '90';
|
||||
$config->programplan->datatable->fieldList['attribute']['required'] = 'no';
|
||||
|
||||
$config->programplan->datatable->fieldList['begin']['title'] = 'begin';
|
||||
$config->programplan->datatable->fieldList['begin']['fixed'] = 'no';
|
||||
$config->programplan->datatable->fieldList['begin']['width'] = '90';
|
||||
$config->programplan->datatable->fieldList['begin']['required'] = 'no';
|
||||
|
||||
$config->programplan->datatable->fieldList['end']['title'] = 'end';
|
||||
$config->programplan->datatable->fieldList['end']['fixed'] = 'no';
|
||||
$config->programplan->datatable->fieldList['end']['width'] = '90';
|
||||
$config->programplan->datatable->fieldList['end']['required'] = 'no';
|
||||
|
||||
$config->programplan->datatable->fieldList['realBegan']['title'] = 'realBegan';
|
||||
$config->programplan->datatable->fieldList['realBegan']['fixed'] = 'no';
|
||||
$config->programplan->datatable->fieldList['realBegan']['width'] = '90';
|
||||
$config->programplan->datatable->fieldList['realBegan']['required'] = 'no';
|
||||
|
||||
$config->programplan->datatable->fieldList['realEnd']['title'] = 'realEnd';
|
||||
$config->programplan->datatable->fieldList['realEnd']['fixed'] = 'no';
|
||||
$config->programplan->datatable->fieldList['realEnd']['width'] = '90';
|
||||
$config->programplan->datatable->fieldList['realEnd']['required'] = 'no';
|
||||
|
||||
$config->programplan->datatable->fieldList['actions']['title'] = 'actions';
|
||||
$config->programplan->datatable->fieldList['actions']['fixed'] = 'right';
|
||||
$config->programplan->datatable->fieldList['actions']['width'] = '150';
|
||||
$config->programplan->datatable->fieldList['actions']['required'] = 'yes';
|
||||
$config->programplan->datatable->fieldList['actions']['sort'] = 'no';
|
||||
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of programplan currentModule of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: control.php 5107 2013-07-12 01:46:12Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class programplan extends control
|
||||
{
|
||||
/**
|
||||
* __construct
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Common action.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param string $extra
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function commonAction($projectID, $productID = 0, $extra = '')
|
||||
{
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($projectID);
|
||||
$productID = $this->product->saveState($productID, $products);
|
||||
|
||||
$this->productID = $productID;
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Browse program plans.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param string $type
|
||||
* @param string $orderBy
|
||||
* @param int $baselineID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($projectID = 0, $productID = 0, $type = 'gantt', $orderBy = 'id_asc', $baselineID = 0)
|
||||
{
|
||||
$this->app->loadLang('stage');
|
||||
$this->commonAction($projectID, $productID, $type);
|
||||
$this->session->set('projectPlanList', $this->app->getURI(true), 'project');
|
||||
|
||||
if(!defined('RUN_MODE') || RUN_MODE != 'api') $projectID = $this->project->saveState((int)$projectID, $this->project->getPairsByProgram());
|
||||
|
||||
$products = $this->project->getProducts($projectID);
|
||||
$this->lang->modulePageNav = $this->product->select($products, $this->productID, 'programplan', 'browse', $type, 0, 0, '', false);
|
||||
|
||||
if(common::hasPriv('programplan', 'create')) $this->lang->TRActions = html::a($this->createLink('programplan', 'create', "projectID=$projectID"), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->programplan->create, '', "class='btn btn-primary'");
|
||||
|
||||
$selectCustom = 0; // Display date and task settings.
|
||||
$dateDetails = 1; // Gantt chart detail date display.
|
||||
if($type == 'gantt')
|
||||
{
|
||||
$owner = $this->app->user->account;
|
||||
$module = 'programplan';
|
||||
$section = 'browse';
|
||||
$object = 'stageCustom';
|
||||
$selectCustom = $this->loadModel('setting')->getItem("owner={$owner}&module={$module}§ion={$section}&key={$object}");
|
||||
if(strpos($selectCustom, 'date') !== false) $dateDetails = 0;
|
||||
|
||||
$plans = $this->programplan->getDataForGantt($projectID, $this->productID, $baselineID);
|
||||
}
|
||||
|
||||
if($type == 'lists')
|
||||
{
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
$this->loadModel('datatable');
|
||||
$plans = $this->programplan->getPlans($projectID, $this->productID, $sort);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->programplan->browse;
|
||||
$this->view->position[] = $this->lang->programplan->browse;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->productID = $this->productID;
|
||||
$this->view->type = $type;
|
||||
$this->view->plans = $plans;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->selectCustom = $selectCustom;
|
||||
$this->view->dateDetails = $dateDetails;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a project plan.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($projectID = 0, $productID = 0, $planID = 0)
|
||||
{
|
||||
$this->commonAction($projectID, $productID);
|
||||
$this->app->loadLang('project');
|
||||
if($_POST)
|
||||
{
|
||||
$this->programplan->create($projectID, $this->productID, $planID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$locate = $this->session->projectPlanList ? $this->session->projectPlanList : $this->createLink('programplan', 'browse', "projectID=$projectID");
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
$this->app->loadLang('stage');
|
||||
$project = $this->loadModel('project')->getById($projectID);
|
||||
|
||||
$this->view->title = $this->lang->programplan->create . $this->lang->colon . $project->name;
|
||||
$this->view->position[] = html::a($this->createLink('programplan', 'browse', "projectID=$projectID"), $project->name);
|
||||
$this->view->position[] = $this->lang->programplan->create;
|
||||
|
||||
$this->view->project = $project;
|
||||
$this->view->stages = empty($planID) ? $this->loadModel('stage')->getStages('id_asc') : array();
|
||||
$this->view->programPlan = $this->project->getById($planID, 'stage');
|
||||
$this->view->plans = $this->programplan->getStage($planID ? $planID : $projectID, $this->productID, 'parent');
|
||||
$this->view->planID = $planID;
|
||||
$this->view->type = 'lists';
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a project plan.
|
||||
*
|
||||
* @param int $planID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($planID = 0, $projectID = 0)
|
||||
{
|
||||
$this->app->loadLang('project');
|
||||
$plan = $this->programplan->getByID($planID);
|
||||
if($_POST)
|
||||
{
|
||||
$changes = $this->programplan->update($planID, $projectID);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if($changes)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('execution', $planID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$locate = isonlybody() ? 'parent' : inlink('browse', "program=$plan->program&type=lists");
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
$this->app->loadLang('stage');
|
||||
$this->view->title = $this->lang->programplan->edit;
|
||||
$this->view->position[] = $this->lang->programplan->edit;
|
||||
$this->view->parentStage = $this->programplan->getParentStageList($this->session->project, $planID, $plan->product);
|
||||
$this->view->isCreateTask = $this->programplan->isCreateTask($planID);
|
||||
$this->view->plan = $plan;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save custom settings via ajax.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxCustom()
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$owner = $this->app->user->account;
|
||||
$module = 'programplan';
|
||||
$section = 'browse';
|
||||
$object = 'stageCustom';
|
||||
$setting = $this->loadModel('setting');
|
||||
$custom = empty($data->stageCustom) ? '' : implode(',', $data->stageCustom);
|
||||
$setting->setItem("$owner.$module.$section.$object", $custom);
|
||||
|
||||
$response = array();
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
return $this->send($response);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
$(function()
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
fixScroll();
|
||||
}, 500);
|
||||
})
|
||||
|
||||
function fixScroll()
|
||||
{
|
||||
var $scrollwrapper = $('div.datatable').first().find('.scroll-wrapper:first');
|
||||
if($scrollwrapper.size() == 0)return;
|
||||
|
||||
var $tfoot = $('div.datatable').first().find('table tfoot:last');
|
||||
var scrollOffset = $scrollwrapper.offset().top + $scrollwrapper.find('.scroll-slide').height();
|
||||
if($tfoot.size() > 0) scrollOffset += $tfoot.height();
|
||||
if($('div.datatable.head-fixed').size() == 0) scrollOffset -= '29';
|
||||
var windowH = $(window).height();
|
||||
if(scrollOffset > windowH + $(window).scrollTop()) $scrollwrapper.css({'position': 'fixed', 'bottom': 50 + 'px'});
|
||||
$(window).scroll(function()
|
||||
{
|
||||
newBottom = $tfoot.hasClass('fixedTfootAction') ? 50 + $tfoot.height() : 50;
|
||||
if(typeof(ssoRedirect) != "undefined") newBottom = 50;
|
||||
if(scrollOffset <= windowH + $(window).scrollTop())
|
||||
{
|
||||
$scrollwrapper.css({'position':'relative', 'bottom': '0px'});
|
||||
}
|
||||
else if($scrollwrapper.css('position') != 'fixed')
|
||||
{
|
||||
$scrollwrapper.css({'position': 'fixed', 'bottom': newBottom + 'px'});
|
||||
bottom = newBottom;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
function addItem(obj)
|
||||
{
|
||||
var item = $('#addItem').html().replace(/%i%/g, i);
|
||||
$(obj).closest('tr').after('<tr class="addedItem">' + item + '</tr>');
|
||||
var newItem = $('#names' + i).closest('tr');
|
||||
newItem.find('.form-date').datepicker();
|
||||
$("#output" + i).chosen();
|
||||
$("#output_i__chosen").remove();
|
||||
i ++;
|
||||
}
|
||||
|
||||
function deleteItem(obj)
|
||||
{
|
||||
if($('#planForm .table tbody').children().length < 2) return false;
|
||||
$(obj).closest('tr').remove();
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The programplan module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: en.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->programplan->common = 'Program Plan';
|
||||
$lang->programplan->browse = 'Program Plan';
|
||||
$lang->programplan->gantt = 'Gantt Chart';
|
||||
$lang->programplan->list = 'Stage List';
|
||||
$lang->programplan->create = 'Create';
|
||||
$lang->programplan->edit = 'Edit';
|
||||
$lang->programplan->delete = 'Delete Stage';
|
||||
$lang->programplan->createSubPlan = 'Create Sub Plan';
|
||||
|
||||
$lang->programplan->parent = 'Parent Stage';
|
||||
$lang->programplan->emptyParent = 'N/A';
|
||||
$lang->programplan->name = 'Stage Name';
|
||||
$lang->programplan->subStageName = 'Sub Stage Name';
|
||||
$lang->programplan->percent = 'Workload Ratio';
|
||||
$lang->programplan->percentAB = 'Workload Ratio';
|
||||
$lang->programplan->planPercent = 'Workload';
|
||||
$lang->programplan->attribute = 'Stage Type';
|
||||
$lang->programplan->milestone = 'Milestone';
|
||||
$lang->programplan->taskProgress = 'Task Progress';
|
||||
$lang->programplan->task = 'Task';
|
||||
$lang->programplan->begin = 'Begin';
|
||||
$lang->programplan->end = 'End';
|
||||
$lang->programplan->realBegan = 'Actual Started';
|
||||
$lang->programplan->realEnd = 'Actual End';
|
||||
$lang->programplan->ac = 'Actual cost';
|
||||
$lang->programplan->sv = 'Schedule Variance';
|
||||
$lang->programplan->cv = 'Cost Variance';
|
||||
$lang->programplan->planDateRange = 'Planned Start';
|
||||
$lang->programplan->realDateRange = 'Actual Start';
|
||||
$lang->programplan->output = 'Output';
|
||||
$lang->programplan->openedBy = 'Created By';
|
||||
$lang->programplan->openedDate = 'Created Date';
|
||||
$lang->programplan->editedBy = 'Edited By';
|
||||
$lang->programplan->editedDate = 'Edited Date';
|
||||
$lang->programplan->duration = 'Duration';
|
||||
$lang->programplan->version = 'Version';
|
||||
$lang->programplan->full = 'Full Screen';
|
||||
$lang->programplan->today = 'Today';
|
||||
$lang->programplan->exporting = 'Exporting';
|
||||
$lang->programplan->exportFail = 'Export failed';
|
||||
$lang->programplan->hideCriticalPath = 'Hide Critical Path';
|
||||
$lang->programplan->showCriticalPath = 'Show Critical Path';
|
||||
|
||||
$lang->programplan->milestoneList[1] = 'Yes';
|
||||
$lang->programplan->milestoneList[0] = 'No';
|
||||
|
||||
$lang->programplan->noData = 'No Data';
|
||||
$lang->programplan->children = 'Sub Plan';
|
||||
$lang->programplan->childrenAB = 'Child';
|
||||
$lang->programplan->confirmDelete = 'Do you want to delete the current plan?';
|
||||
$lang->programplan->workloadTips = 'The proportion of the sub stage workload is divided by 100%.';
|
||||
|
||||
$lang->programplan->stageCustom = new stdClass();
|
||||
$lang->programplan->stageCustom->date = 'Show Date';
|
||||
$lang->programplan->stageCustom->task = 'Show Task';
|
||||
|
||||
$lang->programplan->error = new stdclass();
|
||||
$lang->programplan->error->percentNumber = '"Workload %" must be digits.';
|
||||
$lang->programplan->error->planFinishSmall = 'The "End" date must be > the "Begin" date.';
|
||||
$lang->programplan->error->percentOver = 'The sum of "Workload %" cannot exceed 100%.';
|
||||
$lang->programplan->error->createdTask = 'The task has been decomposed. Sub phases cannot be added.';
|
||||
$lang->programplan->error->parentWorkload = 'The sum of the workload of the child phase cannot be greater than that of the parent phase: %s.';
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The programplan module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: en.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->programplan->common = 'Program Plan';
|
||||
$lang->programplan->browse = 'Program Plan';
|
||||
$lang->programplan->gantt = 'Gantt Chart';
|
||||
$lang->programplan->list = 'Stage List';
|
||||
$lang->programplan->create = 'Create';
|
||||
$lang->programplan->edit = 'Edit';
|
||||
$lang->programplan->delete = 'Delete Stage';
|
||||
$lang->programplan->createSubPlan = 'Create Sub Plan';
|
||||
|
||||
$lang->programplan->parent = 'Parent Stage';
|
||||
$lang->programplan->emptyParent = 'N/A';
|
||||
$lang->programplan->name = 'Stage Name';
|
||||
$lang->programplan->subStageName = 'Sub Stage Name';
|
||||
$lang->programplan->percent = 'Workload Ratio';
|
||||
$lang->programplan->percentAB = 'Workload Ratio';
|
||||
$lang->programplan->planPercent = 'Workload';
|
||||
$lang->programplan->attribute = 'Stage Type';
|
||||
$lang->programplan->milestone = 'Milestone';
|
||||
$lang->programplan->taskProgress = 'Task Progress';
|
||||
$lang->programplan->task = 'Task';
|
||||
$lang->programplan->begin = 'Begin';
|
||||
$lang->programplan->end = 'End';
|
||||
$lang->programplan->realBegan = 'Actual Started';
|
||||
$lang->programplan->realEnd = 'Actual End';
|
||||
$lang->programplan->ac = 'Actual cost';
|
||||
$lang->programplan->sv = 'Schedule Variance';
|
||||
$lang->programplan->cv = 'Cost Variance';
|
||||
$lang->programplan->planDateRange = 'Planned Start';
|
||||
$lang->programplan->realDateRange = 'Actual Start';
|
||||
$lang->programplan->output = 'Output';
|
||||
$lang->programplan->openedBy = 'Created By';
|
||||
$lang->programplan->openedDate = 'Created Date';
|
||||
$lang->programplan->editedBy = 'Edited By';
|
||||
$lang->programplan->editedDate = 'Edited Date';
|
||||
$lang->programplan->duration = 'Duration';
|
||||
$lang->programplan->version = 'Version';
|
||||
$lang->programplan->full = 'Full Screen';
|
||||
$lang->programplan->today = 'Today';
|
||||
$lang->programplan->exporting = 'Exporting';
|
||||
$lang->programplan->exportFail = 'Export failed';
|
||||
$lang->programplan->hideCriticalPath = 'Hide Critical Path';
|
||||
$lang->programplan->showCriticalPath = 'Show Critical Path';
|
||||
|
||||
$lang->programplan->milestoneList[1] = 'Yes';
|
||||
$lang->programplan->milestoneList[0] = 'No';
|
||||
|
||||
$lang->programplan->noData = 'No Data';
|
||||
$lang->programplan->children = 'Sub Plan';
|
||||
$lang->programplan->childrenAB = 'Child';
|
||||
$lang->programplan->confirmDelete = 'Do you want to delete the current plan?';
|
||||
$lang->programplan->workloadTips = 'The proportion of the sub stage workload is divided by 100%.';
|
||||
|
||||
$lang->programplan->stageCustom = new stdClass();
|
||||
$lang->programplan->stageCustom->date = 'Show Date';
|
||||
$lang->programplan->stageCustom->task = 'Show Task';
|
||||
|
||||
$lang->programplan->error = new stdclass();
|
||||
$lang->programplan->error->percentNumber = '"Workload %" must be digits.';
|
||||
$lang->programplan->error->planFinishSmall = 'The "End" date must be > the "Begin" date.';
|
||||
$lang->programplan->error->percentOver = 'The sum of "Workload %" cannot exceed 100%.';
|
||||
$lang->programplan->error->createdTask = 'The task has been decomposed. Sub phases cannot be added.';
|
||||
$lang->programplan->error->parentWorkload = 'The sum of the workload of the child phase cannot be greater than that of the parent phase: %s.';
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The programplan module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: en.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->programplan->common = 'Program Plan';
|
||||
$lang->programplan->browse = 'Program Plan';
|
||||
$lang->programplan->gantt = 'Gantt Chart';
|
||||
$lang->programplan->list = 'Stage List';
|
||||
$lang->programplan->create = 'Create';
|
||||
$lang->programplan->edit = 'Edit';
|
||||
$lang->programplan->delete = 'Delete Stage';
|
||||
$lang->programplan->createSubPlan = 'Create Sub Plan';
|
||||
|
||||
$lang->programplan->parent = 'Parent Stage';
|
||||
$lang->programplan->emptyParent = 'N/A';
|
||||
$lang->programplan->name = 'Stage Name';
|
||||
$lang->programplan->subStageName = 'Sub Stage Name';
|
||||
$lang->programplan->percent = 'Workload Ratio';
|
||||
$lang->programplan->percentAB = 'Workload Ratio';
|
||||
$lang->programplan->planPercent = 'Workload';
|
||||
$lang->programplan->attribute = 'Stage Type';
|
||||
$lang->programplan->milestone = 'Milestone';
|
||||
$lang->programplan->taskProgress = 'Task Progress';
|
||||
$lang->programplan->task = 'Task';
|
||||
$lang->programplan->begin = 'Begin';
|
||||
$lang->programplan->end = 'End';
|
||||
$lang->programplan->realBegan = 'Actual Started';
|
||||
$lang->programplan->realEnd = 'Actual End';
|
||||
$lang->programplan->ac = 'Actual cost';
|
||||
$lang->programplan->sv = 'Schedule Variance';
|
||||
$lang->programplan->cv = 'Cost Variance';
|
||||
$lang->programplan->planDateRange = 'Planned Start';
|
||||
$lang->programplan->realDateRange = 'Actual Start';
|
||||
$lang->programplan->output = 'Output';
|
||||
$lang->programplan->openedBy = 'Created By';
|
||||
$lang->programplan->openedDate = 'Created Date';
|
||||
$lang->programplan->editedBy = 'Edited By';
|
||||
$lang->programplan->editedDate = 'Edited Date';
|
||||
$lang->programplan->duration = 'Duration';
|
||||
$lang->programplan->version = 'Version';
|
||||
$lang->programplan->full = 'Full Screen';
|
||||
$lang->programplan->today = 'Today';
|
||||
$lang->programplan->exporting = 'Exporting';
|
||||
$lang->programplan->exportFail = 'Export failed';
|
||||
$lang->programplan->hideCriticalPath = 'Hide Critical Path';
|
||||
$lang->programplan->showCriticalPath = 'Show Critical Path';
|
||||
|
||||
$lang->programplan->milestoneList[1] = 'Yes';
|
||||
$lang->programplan->milestoneList[0] = 'No';
|
||||
|
||||
$lang->programplan->noData = 'No Data';
|
||||
$lang->programplan->children = 'Sub Plan';
|
||||
$lang->programplan->childrenAB = 'Child';
|
||||
$lang->programplan->confirmDelete = 'Do you want to delete the current plan?';
|
||||
$lang->programplan->workloadTips = 'The proportion of the sub stage workload is divided by 100%.';
|
||||
|
||||
$lang->programplan->stageCustom = new stdClass();
|
||||
$lang->programplan->stageCustom->date = 'Show Date';
|
||||
$lang->programplan->stageCustom->task = 'Show Task';
|
||||
|
||||
$lang->programplan->error = new stdclass();
|
||||
$lang->programplan->error->percentNumber = '"Workload %" must be digits.';
|
||||
$lang->programplan->error->planFinishSmall = 'The "End" date must be > the "Begin" date.';
|
||||
$lang->programplan->error->percentOver = 'The sum of "Workload %" cannot exceed 100%.';
|
||||
$lang->programplan->error->createdTask = 'The task has been decomposed. Sub phases cannot be added.';
|
||||
$lang->programplan->error->parentWorkload = 'The sum of the workload of the child phase cannot be greater than that of the parent phase: %s.';
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The programplan module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: en.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->programplan->common = 'Program Plan';
|
||||
$lang->programplan->browse = 'Program Plan';
|
||||
$lang->programplan->gantt = 'Gantt Chart';
|
||||
$lang->programplan->list = 'Stage List';
|
||||
$lang->programplan->create = 'Create';
|
||||
$lang->programplan->edit = 'Edit';
|
||||
$lang->programplan->delete = 'Delete Stage';
|
||||
$lang->programplan->createSubPlan = 'Create Sub Plan';
|
||||
|
||||
$lang->programplan->parent = 'Parent Stage';
|
||||
$lang->programplan->emptyParent = 'N/A';
|
||||
$lang->programplan->name = 'Stage Name';
|
||||
$lang->programplan->subStageName = 'Sub Stage Name';
|
||||
$lang->programplan->percent = 'Workload Ratio';
|
||||
$lang->programplan->percentAB = 'Workload Ratio';
|
||||
$lang->programplan->planPercent = 'Workload';
|
||||
$lang->programplan->attribute = 'Stage Type';
|
||||
$lang->programplan->milestone = 'Milestone';
|
||||
$lang->programplan->taskProgress = 'Task Progress';
|
||||
$lang->programplan->task = 'Task';
|
||||
$lang->programplan->begin = 'Begin';
|
||||
$lang->programplan->end = 'End';
|
||||
$lang->programplan->realBegan = 'Actual Started';
|
||||
$lang->programplan->realEnd = 'Actual End';
|
||||
$lang->programplan->ac = 'Actual cost';
|
||||
$lang->programplan->sv = 'Schedule Variance';
|
||||
$lang->programplan->cv = 'Cost Variance';
|
||||
$lang->programplan->planDateRange = 'Planned Start';
|
||||
$lang->programplan->realDateRange = 'Actual Start';
|
||||
$lang->programplan->output = 'Output';
|
||||
$lang->programplan->openedBy = 'Created By';
|
||||
$lang->programplan->openedDate = 'Created Date';
|
||||
$lang->programplan->editedBy = 'Edited By';
|
||||
$lang->programplan->editedDate = 'Edited Date';
|
||||
$lang->programplan->duration = 'Duration';
|
||||
$lang->programplan->version = 'Version';
|
||||
$lang->programplan->full = 'Full Screen';
|
||||
$lang->programplan->today = 'Today';
|
||||
$lang->programplan->exporting = 'Exporting';
|
||||
$lang->programplan->exportFail = 'Export failed';
|
||||
$lang->programplan->hideCriticalPath = 'Hide Critical Path';
|
||||
$lang->programplan->showCriticalPath = 'Show Critical Path';
|
||||
|
||||
$lang->programplan->milestoneList[1] = 'Yes';
|
||||
$lang->programplan->milestoneList[0] = 'No';
|
||||
|
||||
$lang->programplan->noData = 'No Data';
|
||||
$lang->programplan->children = 'Sub Plan';
|
||||
$lang->programplan->childrenAB = 'Child';
|
||||
$lang->programplan->confirmDelete = 'Do you want to delete the current plan?';
|
||||
$lang->programplan->workloadTips = 'The proportion of the sub stage workload is divided by 100%.';
|
||||
|
||||
$lang->programplan->stageCustom = new stdClass();
|
||||
$lang->programplan->stageCustom->date = 'Show Date';
|
||||
$lang->programplan->stageCustom->task = 'Show Task';
|
||||
|
||||
$lang->programplan->error = new stdclass();
|
||||
$lang->programplan->error->percentNumber = '"Workload %" must be digits.';
|
||||
$lang->programplan->error->planFinishSmall = 'The "End" date must be > the "Begin" date.';
|
||||
$lang->programplan->error->percentOver = 'The sum of "Workload %" cannot exceed 100%.';
|
||||
$lang->programplan->error->createdTask = 'The task has been decomposed. Sub phases cannot be added.';
|
||||
$lang->programplan->error->parentWorkload = 'The sum of the workload of the child phase cannot be greater than that of the parent phase: %s.';
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The programplan module zh-cn file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: zh-cn.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->programplan->common = '项目计划';
|
||||
$lang->programplan->browse = '浏览阶段计划';
|
||||
$lang->programplan->gantt = '甘特图';
|
||||
$lang->programplan->list = '阶段列表';
|
||||
$lang->programplan->create = '设置阶段';
|
||||
$lang->programplan->edit = '编辑';
|
||||
$lang->programplan->delete = '删除阶段';
|
||||
$lang->programplan->createSubPlan = '创建二级阶段';
|
||||
|
||||
$lang->programplan->parent = '父阶段';
|
||||
$lang->programplan->emptyParent = '无';
|
||||
$lang->programplan->name = '阶段名称';
|
||||
$lang->programplan->subStageName = '子阶段名称';
|
||||
$lang->programplan->percent = '工作量占比';
|
||||
$lang->programplan->percentAB = '工作量占比';
|
||||
$lang->programplan->planPercent = '工作量';
|
||||
$lang->programplan->attribute = '阶段类型';
|
||||
$lang->programplan->milestone = '里程碑';
|
||||
$lang->programplan->taskProgress = '任务进度';
|
||||
$lang->programplan->task = '任务';
|
||||
$lang->programplan->begin = '计划开始';
|
||||
$lang->programplan->end = '计划完成';
|
||||
$lang->programplan->realBegan = '实际开始';
|
||||
$lang->programplan->realEnd = '实际完成';
|
||||
$lang->programplan->ac = '实际花费';
|
||||
$lang->programplan->sv = '进度偏差率';
|
||||
$lang->programplan->cv = '成本偏差率';
|
||||
$lang->programplan->planDateRange = '计划起始日期';
|
||||
$lang->programplan->realDateRange = '实际起始日期';
|
||||
$lang->programplan->output = '输出';
|
||||
$lang->programplan->openedBy = '由谁创建';
|
||||
$lang->programplan->openedDate = '创建日期';
|
||||
$lang->programplan->editedBy = '由谁编辑';
|
||||
$lang->programplan->editedDate = '编辑日期';
|
||||
$lang->programplan->duration = '工期';
|
||||
$lang->programplan->version = '版本号';
|
||||
$lang->programplan->full = '全屏';
|
||||
$lang->programplan->today = '今天';
|
||||
$lang->programplan->exporting = '导出';
|
||||
$lang->programplan->exportFail = '导出失败';
|
||||
$lang->programplan->hideCriticalPath = '隐藏关键路径';
|
||||
$lang->programplan->showCriticalPath = '显示关键路径';
|
||||
|
||||
$lang->programplan->milestoneList[1] = '是';
|
||||
$lang->programplan->milestoneList[0] = '否';
|
||||
|
||||
$lang->programplan->noData = '暂无数据。';
|
||||
$lang->programplan->children = '二级计划';
|
||||
$lang->programplan->childrenAB = '子';
|
||||
$lang->programplan->confirmDelete = '确定要删除当前计划吗?';
|
||||
$lang->programplan->workloadTips = '子阶段工作量占比按百分百的比例进行拆分';
|
||||
|
||||
$lang->programplan->stageCustom = new stdClass();
|
||||
$lang->programplan->stageCustom->date = '显示日期';
|
||||
$lang->programplan->stageCustom->task = '显示任务';
|
||||
|
||||
$lang->programplan->error = new stdclass();
|
||||
$lang->programplan->error->percentNumber = '"工作量比例"必须为数字';
|
||||
$lang->programplan->error->planFinishSmall = '"计划完成时间"必须大于"计划开始时间"';
|
||||
$lang->programplan->error->percentOver = '工作量占比累计不应当超过100%';
|
||||
$lang->programplan->error->createdTask = '已分解任务,不可添加子阶段';
|
||||
$lang->programplan->error->parentWorkload = '子阶段的工作量之和不能大于父阶段的工作量:%s';
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The programplan module zh-tw file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: zh-tw.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
$lang->programplan->common = '項目計劃';
|
||||
$lang->programplan->browse = '瀏覽階段計劃';
|
||||
$lang->programplan->gantt = '甘特圖';
|
||||
$lang->programplan->list = '階段列表';
|
||||
$lang->programplan->create = '設置階段';
|
||||
$lang->programplan->edit = '編輯';
|
||||
$lang->programplan->delete = '刪除';
|
||||
$lang->programplan->createSubPlan = '創建二級階段';
|
||||
|
||||
$lang->programplan->parent = '父階段';
|
||||
$lang->programplan->emptyParent = '無';
|
||||
$lang->programplan->name = '階段名稱';
|
||||
$lang->programplan->subStageName = '子階段名稱';
|
||||
$lang->programplan->percent = '工作量占比';
|
||||
$lang->programplan->percentAB = '工作量占比';
|
||||
$lang->programplan->planPercent = '工作量';
|
||||
$lang->programplan->attribute = '階段類型';
|
||||
$lang->programplan->milestone = '里程碑';
|
||||
$lang->programplan->taskProgress = '任務進度';
|
||||
$lang->programplan->task = '任務';
|
||||
$lang->programplan->begin = '計劃開始';
|
||||
$lang->programplan->end = '計劃完成';
|
||||
$lang->programplan->realBegan = '實際開始';
|
||||
$lang->programplan->realEnd = '實際完成';
|
||||
$lang->programplan->ac = '實際花費';
|
||||
$lang->programplan->sv = '進度偏差率';
|
||||
$lang->programplan->cv = '成本偏差率';
|
||||
$lang->programplan->planDateRange = '計划起始日期';
|
||||
$lang->programplan->realDateRange = '實際起始日期';
|
||||
$lang->programplan->output = '輸出';
|
||||
$lang->programplan->openedBy = '由誰創建';
|
||||
$lang->programplan->openedDate = '創建日期';
|
||||
$lang->programplan->editedBy = '由誰編輯';
|
||||
$lang->programplan->editedDate = '編輯日期';
|
||||
$lang->programplan->duration = '計劃工期';
|
||||
$lang->programplan->version = '版本號';
|
||||
$lang->programplan->full = '全屏';
|
||||
$lang->programplan->today = '今天';
|
||||
$lang->programplan->exporting = '導出';
|
||||
$lang->programplan->exportFail = '導出失敗';
|
||||
$lang->programplan->hideCriticalPath = '隱藏關鍵路徑';
|
||||
$lang->programplan->showCriticalPath = '顯示關鍵路徑';
|
||||
|
||||
$lang->programplan->milestoneList[1] = '是';
|
||||
$lang->programplan->milestoneList[0] = '否';
|
||||
|
||||
$lang->programplan->noData = '暫無數據。';
|
||||
$lang->programplan->children = '二級計劃';
|
||||
$lang->programplan->childrenAB = '子';
|
||||
$lang->programplan->confirmDelete = '確定要刪除當前計劃嗎?';
|
||||
$lang->programplan->workloadTips = '子階段工作量占比按百分百的比例進行拆分';
|
||||
|
||||
$lang->programplan->stageCustom = new stdClass();
|
||||
$lang->programplan->stageCustom->date = '顯示日期';
|
||||
$lang->programplan->stageCustom->task = '顯示任務';
|
||||
|
||||
$lang->programplan->error = new stdclass();
|
||||
$lang->programplan->error->percentNumber = '"工作量比例"必須為數字';
|
||||
$lang->programplan->error->planFinishSmall = '"計劃完成時間"必須大於"計劃開始時間"';
|
||||
$lang->programplan->error->percentOver = '工作量占比累計不應當超過100%';
|
||||
$lang->programplan->error->createdTask = '已分解任務,不可添加子階段';
|
||||
$lang->programplan->error->parentWorkload = '子階段的工作量之和不能大於父階段的工作量:%s';
|
||||
@@ -0,0 +1,918 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of programplan module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: model.php 5079 2013-07-10 00:44:34Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class programplanModel extends model
|
||||
{
|
||||
/**
|
||||
* Set menu.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function setMenu($projectID, $productID)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plan by id.
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByID($planID)
|
||||
{
|
||||
$plan = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($planID)->fetch();
|
||||
|
||||
return $this->processPlan($plan);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plans list.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $productID
|
||||
* @param string $browseType all|parent
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStage($executionID = 0, $productID = 0, $browseType = 'all', $orderBy = 'id_asc')
|
||||
{
|
||||
if(empty($executionID) || empty($productID)) return array();
|
||||
|
||||
$plans = $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
->andWhere('t2.type')->eq('stage')
|
||||
->beginIF($browseType == 'all')->andWhere('t2.project')->eq($executionID)->fi()
|
||||
->beginIF($browseType == 'parent')->andWhere('t2.parent')->eq($executionID)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->orderBy($orderBy)
|
||||
->fetchAll('id');
|
||||
|
||||
return $this->processPlans($plans);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plans by idList.
|
||||
*
|
||||
* @param array $idList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getByList($idList = array())
|
||||
{
|
||||
$plans = $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
->where('id')->in($idList)
|
||||
->andWhere('type')->eq('project')
|
||||
->fetchAll('id');
|
||||
|
||||
return $this->processPlans($plans);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plans.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPlans($executionID = 0, $productID = 0, $orderBy = 'id_asc')
|
||||
{
|
||||
$plans = $this->getStage($executionID, $productID, 'all', $orderBy);
|
||||
|
||||
$parents = array();
|
||||
$children = array();
|
||||
foreach($plans as $planID => $plan)
|
||||
{
|
||||
$plan->grade == 1 ? $parents[$planID] = $plan : $children[$plan->parent][] = $plan;
|
||||
}
|
||||
|
||||
foreach($parents as $planID => $plan) $parents[$planID]->children = isset($children[$planID]) ? $children[$planID] : array();
|
||||
|
||||
return $parents;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pairs.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $productID
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPairs($executionID, $productID = 0, $type = 'all')
|
||||
{
|
||||
$plans = $this->getPlans($executionID, $productID);
|
||||
|
||||
$pairs = array(0 => '');
|
||||
foreach($plans as $plan)
|
||||
{
|
||||
$pairs[$plan->id] = $plan->name;
|
||||
if(!empty($plan->children))
|
||||
{
|
||||
foreach($plan->children as $child) $pairs[$child->id] = $plan->name . '/' . $child->name;
|
||||
}
|
||||
}
|
||||
|
||||
return $pairs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get gantt data.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $productID
|
||||
* @param int $baselineID
|
||||
* @param string $selectCustom
|
||||
* @param bool $returnJson
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getDataForGantt($executionID, $productID, $baselineID = 0, $selectCustom = '', $returnJson = true)
|
||||
{
|
||||
$this->loadModel('stage');
|
||||
|
||||
$plans = $this->getStage($executionID, $productID);
|
||||
if($baselineID)
|
||||
{
|
||||
$baseline = $this->loadModel('cm')->getByID($baselineID);
|
||||
$oldData = json_decode($baseline->data);
|
||||
$oldPlans = $oldData->stage;
|
||||
foreach($oldPlans as $id => $oldPlan)
|
||||
{
|
||||
if(!isset($plans[$id])) continue;
|
||||
$plans[$id]->version = $oldPlan->version;
|
||||
$plans[$id]->name = $oldPlan->name;
|
||||
$plans[$id]->milestone = $oldPlan->milestone;
|
||||
$plans[$id]->begin = $oldPlan->begin;
|
||||
$plans[$id]->end = $oldPlan->end;
|
||||
}
|
||||
}
|
||||
|
||||
$datas = array();
|
||||
$planIDList = array();
|
||||
$isMilestone = "<icon class='icon icon-flag icon-sm red'></icon> ";
|
||||
$stageIndex = array();
|
||||
foreach($plans as $plan)
|
||||
{
|
||||
$planIDList[$plan->id] = $plan->id;
|
||||
|
||||
$start = helper::isZeroDate($plan->begin) ? '' : $plan->begin;
|
||||
$end = helper::isZeroDate($plan->end) ? '' : $plan->end;
|
||||
|
||||
$data = new stdclass();
|
||||
$data->id = $plan->id;
|
||||
$data->type = 'plan';
|
||||
$data->text = empty($plan->milestone) ? $plan->name : $plan->name . $isMilestone ;
|
||||
$data->percent = $plan->percent;
|
||||
$data->attribute = zget($this->lang->stage->typeList, $plan->attribute);
|
||||
$data->milestone = zget($this->lang->programplan->milestoneList, $plan->milestone);
|
||||
$data->begin = $start;
|
||||
$data->deadline = $end;
|
||||
$data->realBegan = helper::isZeroDate($plan->realBegan) ? '' : substr($plan->realBegan, 0, 10);
|
||||
$data->realEnd = helper::isZeroDate($plan->realEnd) ? '' : substr($plan->realEnd, 0, 10);
|
||||
$data->parent = $plan->grade == 1 ? 0 :$plan->parent;
|
||||
$data->open = true;
|
||||
$data->start_date = $data->realBegan ? $data->realBegan : $data->begin;
|
||||
$data->endDate = $data->realEnd ? $data->realEnd : $data->deadline;
|
||||
$data->duration = 0;
|
||||
|
||||
if($data->endDate > $data->start_date) $data->duration = helper::diffDate($data->endDate, $data->start_date) + 1;
|
||||
if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date));
|
||||
if($data->start_date == '' or $data->endDate == '') $data->duration = 0;
|
||||
|
||||
$datas['data'][] = $data;
|
||||
$stageIndex[] = array('planID' => $plan->id, 'progress' => array('totalConsumed' => 0, 'totalReal' => 0));
|
||||
}
|
||||
|
||||
$taskSign = "<span>[ T ] </span>";
|
||||
$taskPri = "<span class='label-pri label-pri-%s' title='%s'>%s</span> ";
|
||||
|
||||
/* Judge whether to display tasks under the stage. */
|
||||
$owner = $this->app->user->account;
|
||||
$module = 'programplan';
|
||||
$section = 'browse';
|
||||
$object = 'stageCustom';
|
||||
|
||||
if(empty($selectCustom)) $selectCustom = $this->loadModel('setting')->getItem("owner={$owner}&module={$module}§ion={$section}&key={$object}");
|
||||
|
||||
$tasks = array();
|
||||
if(strpos($selectCustom, 'task') !== false)
|
||||
{
|
||||
$tasks = $this->dao->select('*')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in($planIDList)->fetchAll('id');
|
||||
}
|
||||
|
||||
if($baselineID)
|
||||
{
|
||||
$oldTasks = $oldData->task;
|
||||
foreach($oldTasks as $id => $oldTask)
|
||||
{
|
||||
if(!isset($tasks->$id)) continue;
|
||||
$tasks->$id->version = $oldTask->version;
|
||||
$tasks->$id->name = $oldTask->name;
|
||||
$tasks->$id->estStarted = $oldTask->estStarted;
|
||||
$tasks->$id->deadline = $oldTask->deadline;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
$start = helper::isZeroDate($task->estStarted) ? '' : $task->estStarted;
|
||||
$end = helper::isZeroDate($task->deadline) ? '' : $task->deadline;
|
||||
|
||||
$realBegan = helper::isZeroDate($task->realStarted) ? '' : substr($task->realStarted, 0, 10);
|
||||
$realEnd = helper::isZeroDate($task->finishedDate) ? '' : substr($task->finishedDate, 0, 10);
|
||||
$priIcon = sprintf($taskPri, $task->pri, $task->pri, $task->pri);
|
||||
|
||||
$data = new stdclass();
|
||||
$data->id = $task->execution . '-' . $task->id;
|
||||
$data->type = 'task';
|
||||
$data->text = $taskSign . $priIcon . $task->name;
|
||||
$data->percent = '';
|
||||
$data->attribute = '';
|
||||
$data->milestone = '';
|
||||
$data->begin = $start;
|
||||
$data->deadline = $end;
|
||||
$data->realBegan = $realBegan;
|
||||
$data->realEnd = $realEnd;
|
||||
$data->parent = $task->parent > 0 ? $task->execution . '-' . $task->parent : $task->execution;
|
||||
$data->open = true;
|
||||
$progress = $task->consumed ? round($task->consumed / ($task->left + $task->consumed), 3) * 100 : 0;
|
||||
$data->taskProgress = $progress . '%';
|
||||
$data->start_date = $data->realBegan ? $data->realBegan : $data->begin;
|
||||
$data->endDate = $data->realEnd ? $data->realEnd : $data->deadline;
|
||||
$data->duration = 0;
|
||||
|
||||
if($data->endDate > $data->start_date) $data->duration = helper::diffDate($data->endDate, $data->start_date) + 1;
|
||||
if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date));
|
||||
if($data->start_date == '' or $data->endDate == '') $data->duration = 0;
|
||||
|
||||
$datas['data'][] = $data;
|
||||
foreach($stageIndex as $index => $stage)
|
||||
{
|
||||
if($stage['planID'] == $task->execution)
|
||||
{
|
||||
$stageIndex[$index]['progress']['totalConsumed'] += $task->consumed;
|
||||
$stageIndex[$index]['progress']['totalReal'] += ($task->left + $task->consumed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Calculate the progress of the phase. */
|
||||
foreach($stageIndex as $index => $stage)
|
||||
{
|
||||
$progress = empty($stage['progress']['totalConsumed']) ? 0 : round($stage['progress']['totalConsumed'] / $stage['progress']['totalReal'], 3) * 100;
|
||||
$progress .= '%';
|
||||
$datas['data'][$index]->taskProgress = $progress;
|
||||
}
|
||||
|
||||
return $returnJson ? json_encode($datas) : $datas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get total percent.
|
||||
*
|
||||
* @param object $stage
|
||||
* @param object $parent
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getTotalPercent($stage, $parent = false)
|
||||
{
|
||||
/* When parent is equal to true, query the total workload of the subphase. */
|
||||
$executionID = $parent ? $stage->id : $stage->project;
|
||||
$plans = $this->getStage($executionID, $stage->product, 'parent');
|
||||
|
||||
$totalPercent = 0;
|
||||
$stageID = $stage->id;
|
||||
foreach($plans as $id => $stage)
|
||||
{
|
||||
if($id == $stageID) continue;
|
||||
$totalPercent += $stage->percent;
|
||||
}
|
||||
|
||||
return $totalPercent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process plans.
|
||||
*
|
||||
* @param int $plans
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function processPlans($plans)
|
||||
{
|
||||
foreach($plans as $planID => $plan) $plans[$planID] = $this->processPlan($plan);
|
||||
return $plans;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process plan.
|
||||
*
|
||||
* @param int $plan
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function processPlan($plan)
|
||||
{
|
||||
$plan->setMilestone = true;
|
||||
|
||||
if($plan->parent)
|
||||
{
|
||||
$attribute = $this->dao->select('attribute')->from(TABLE_PROJECT)->where('id')->eq($plan->parent)->fetch('attribute');
|
||||
$plan->attribute = $attribute == 'develop' ? $attribute : $plan->attribute;
|
||||
}
|
||||
else
|
||||
{
|
||||
$milestones = $this->dao->select('count(*) AS count')->from(TABLE_PROJECT)
|
||||
->where('parent')->eq($plan->id)
|
||||
->andWhere('milestone')->eq(1)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetch('count');
|
||||
if($milestones > 0)
|
||||
{
|
||||
$plan->milestone = 0;
|
||||
$plan->setMilestone = false;
|
||||
}
|
||||
}
|
||||
|
||||
$plan->begin = $plan->begin == '0000-00-00' ? '' : $plan->begin;
|
||||
$plan->end = $plan->end == '0000-00-00' ? '' : $plan->end;
|
||||
$plan->realBegan = $plan->realBegan == '0000-00-00' ? '' : $plan->realBegan;
|
||||
$plan->realEnd = $plan->realEnd == '0000-00-00' ? '' : $plan->realEnd;
|
||||
|
||||
$plan->product = $this->loadModel('product')->getProductIDByProject($plan->id);
|
||||
$plan->productName = $this->dao->findByID($plan->product)->from(TABLE_PRODUCT)->fetch('name');
|
||||
|
||||
return $plan;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get duration.
|
||||
*
|
||||
* @param int $begin
|
||||
* @param int $end
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getDuration($begin, $end)
|
||||
{
|
||||
$duration = $this->loadModel('holiday')->getActualWorkingDays($begin, $end);
|
||||
return count($duration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a plan.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param int $parentID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function create($projectID = 0, $productID = 0, $parentID = 0)
|
||||
{
|
||||
$data = (array)fixer::input('post')->get();
|
||||
extract($data);
|
||||
|
||||
/* Determine if a task has been created under the parent phase. */
|
||||
if(!$this->isCreateTask($parentID)) return dao::$errors['message'][] = $this->lang->programplan->error->createdTask;
|
||||
|
||||
/* The child phase type setting is the same as the parent phase. */
|
||||
$parentAttribute = '';
|
||||
$parentPercent = 0;
|
||||
if($parentID)
|
||||
{
|
||||
$parentStage = $this->getByID($parentID);
|
||||
$parentAttribute = $parentStage->attribute;
|
||||
$parentPercent = $parentStage->percent;
|
||||
$parentACL = $parentStage->acl;
|
||||
}
|
||||
|
||||
$attributes = array_values($attributes);
|
||||
$milestone = array_values($milestone);
|
||||
$datas = array();
|
||||
foreach($names as $key => $name)
|
||||
{
|
||||
if(empty($name)) continue;
|
||||
|
||||
$plan = new stdclass();
|
||||
$plan->id = isset($planIDList[$key]) ? $planIDList[$key] : '';
|
||||
$plan->type = 'stage';
|
||||
$plan->project = $projectID;
|
||||
$plan->parent = $parentID ? $parentID : $projectID;
|
||||
$plan->name = $names[$key];
|
||||
$plan->percent = $percents[$key];
|
||||
$plan->attribute = empty($parentID) ? $attributes[$key] : $parentAttribute;
|
||||
$plan->milestone = $milestone[$key];
|
||||
$plan->begin = empty($begin[$key]) ? '0000-00-00' : $begin[$key];
|
||||
$plan->end = empty($end[$key]) ? '0000-00-00' : $end[$key];
|
||||
$plan->realBegan = empty($realBegan[$key]) ? '0000-00-00' : $realBegan[$key];
|
||||
$plan->realEnd = empty($realEnd[$key]) ? '0000-00-00' : $realEnd[$key];
|
||||
$plan->output = empty($output[$key]) ? '' : implode(',', $output[$key]);
|
||||
$plan->acl = empty($parentID) ? $acl[$key] : $parentACL;
|
||||
|
||||
$datas[] = $plan;
|
||||
}
|
||||
|
||||
$totalPercent = 0;
|
||||
$totalDevType = 0;
|
||||
$milestone = 0;
|
||||
foreach($datas as $plan)
|
||||
{
|
||||
if($plan->percent and !preg_match("/^[0-9]+(.[0-9]{1,3})?$/", $plan->percent))
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->programplan->error->percentNumber;
|
||||
return false;
|
||||
}
|
||||
if($plan->end != '0000-00-00' and $plan->end < $plan->begin)
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->programplan->error->planFinishSmall;
|
||||
return false;
|
||||
}
|
||||
|
||||
if($plan->begin == '0000-00-00') $plan->begin = '';
|
||||
if($plan->end == '0000-00-00') $plan->end = '';
|
||||
foreach(explode(',', $this->config->programplan->create->requiredFields) as $field)
|
||||
{
|
||||
$field = trim($field);
|
||||
if($field and empty($plan->$field))
|
||||
{
|
||||
dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->$field);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$plan->percent = (float)$plan->percent;
|
||||
$totalPercent += $plan->percent;
|
||||
|
||||
if($plan->milestone) $milestone = 1;
|
||||
}
|
||||
|
||||
if($totalPercent > 100) return dao::$errors['message'][] = $this->lang->programplan->error->percentOver;
|
||||
|
||||
$this->loadModel('action');
|
||||
$this->loadModel('user');
|
||||
$this->loadModel('execution');
|
||||
$this->app->loadLang('doc');
|
||||
$account = $this->app->user->account;
|
||||
$now = helper::now();
|
||||
foreach($datas as $data)
|
||||
{
|
||||
/* Set planDuration and realDuration. */
|
||||
$data->planDuration = $this->getDuration($data->begin, $data->end);
|
||||
$data->realDuration = $this->getDuration($data->realBegan, $data->realEnd);
|
||||
|
||||
$projectChanged = false;
|
||||
$data->days = helper::diffDate($data->end, $data->begin) + 1;
|
||||
if($data->id)
|
||||
{
|
||||
$stageID = $data->id;
|
||||
unset($data->id);
|
||||
|
||||
$oldStage = $this->getByID($stageID);
|
||||
$planChanged = ($oldStage->name != $data->name || $oldStage->milestone != $data->milestone || $oldStage->begin != $data->begin || $oldStage->end != $data->end);
|
||||
|
||||
if($planChanged) $data->version = $oldStage->version + 1;
|
||||
$this->dao->update(TABLE_PROJECT)->data($data)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->programplan->edit->requiredFields, 'notempty')
|
||||
->checkIF($plan->percent != '', 'percent', 'float')
|
||||
->where('id')->eq($stageID)
|
||||
->exec();
|
||||
|
||||
if($data->acl != 'open') $this->user->updateUserView($stageID, 'sprint');
|
||||
|
||||
/* Record version change information. */
|
||||
if($planChanged)
|
||||
{
|
||||
$spec = new stdclass();
|
||||
$spec->project = $stageID;
|
||||
$spec->version = $data->version;
|
||||
$spec->name = $data->name;
|
||||
$spec->milestone = $data->milestone;
|
||||
$spec->begin = $data->begin;
|
||||
$spec->end = $data->end;
|
||||
$this->dao->insert(TABLE_PROJECTSPEC)->data($spec)->exec();
|
||||
}
|
||||
|
||||
$changes = common::createChanges($oldStage, $data);
|
||||
$actionID = $this->action->create('execution', $stageID, 'edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($data->id);
|
||||
$data->status = 'wait';
|
||||
$data->version = 1;
|
||||
$data->parentVersion = $data->parent == 0 ? 0 : $this->dao->findByID($data->parent)->from(TABLE_PROJECT)->fetch('version');
|
||||
$data->team = substr($data->name,0, 30);
|
||||
$data->openedBy = $account;
|
||||
$data->openedDate = $now;
|
||||
$data->openedVersion = $this->config->version;
|
||||
if(!isset($data->acl)) $data->acl = $this->dao->findByID($data->parent)->from(TABLE_PROJECT)->fetch('acl');
|
||||
$this->dao->insert(TABLE_PROJECT)->data($data)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->programplan->create->requiredFields, 'notempty')
|
||||
->checkIF($plan->percent != '', 'percent', 'float')
|
||||
->exec();
|
||||
|
||||
if(!dao::isError())
|
||||
{
|
||||
$stageID = $this->dao->lastInsertID();
|
||||
|
||||
if($data->acl != 'open') $this->user->updateUserView($stageID, 'sprint');
|
||||
$this->dao->update(TABLE_PROJECT)->set('`order`')->eq($stageID * 5)->where('id')->eq($stageID)->exec();
|
||||
|
||||
/* Create doc lib. */
|
||||
$lib = new stdclass();
|
||||
$lib->execution = $stageID;
|
||||
$lib->name = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->doclib->main['execution']);
|
||||
$lib->type = 'execution';
|
||||
$lib->main = '1';
|
||||
$lib->acl = 'default';
|
||||
$this->dao->insert(TABLE_DOCLIB)->data($lib)->exec();
|
||||
|
||||
/* Add creators to stage teams and execution teams. */
|
||||
$member = new stdclass();
|
||||
$member->root = $stageID;
|
||||
$member->account = $account;
|
||||
$member->role = $this->lang->user->roleList[$this->app->user->role];
|
||||
$member->join = $now;
|
||||
$member->type = $data->type;
|
||||
$member->days = $data->days;
|
||||
$member->hours = $this->config->execution->defaultWorkhours;
|
||||
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
|
||||
$this->execution->addProjectMembers($data->project, array($member));
|
||||
|
||||
$this->setTreePath($stageID);
|
||||
if($data->acl != 'open') $this->user->updateUserView($stageID, 'sprint');
|
||||
|
||||
$this->post->set('products', array(0 => $productID));
|
||||
$this->execution->updateProducts($stageID);
|
||||
|
||||
/* Record version change information. */
|
||||
$spec = new stdclass();
|
||||
$spec->project = $stageID;
|
||||
$spec->version = $data->version;
|
||||
$spec->name = $data->name;
|
||||
$spec->milestone = $data->milestone;
|
||||
$spec->begin = $data->begin;
|
||||
$spec->end = $data->end;
|
||||
$this->dao->insert(TABLE_PROJECTSPEC)->data($spec)->exec();
|
||||
|
||||
$this->action->create('execution', $stageID, 'opened', '', join(',', $_POST['products']));
|
||||
}
|
||||
}
|
||||
|
||||
/* If child plans has milestone, update parent plan set milestone eq 0 . */
|
||||
if($parentID and $milestone) $this->dao->update(TABLE_PROJECT)->set('milestone')->eq(0)->where('id')->eq($parentID)->exec();
|
||||
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set stage tree path.
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function setTreePath($planID)
|
||||
{
|
||||
$stage = $this->dao->select('id,type,parent,path,grade')->from(TABLE_PROJECT)->where('id')->eq($planID)->fetch();
|
||||
$parent = $this->dao->select('id,type,parent,path,grade')->from(TABLE_PROJECT)->where('id')->eq($stage->parent)->fetch();
|
||||
|
||||
if($parent->type == 'project')
|
||||
{
|
||||
$path['path'] = ",{$parent->id},{$stage->id},";
|
||||
$path['grade'] = 1;
|
||||
}
|
||||
elseif($parent->type == 'stage')
|
||||
{
|
||||
$path['path'] = $parent->path . "{$stage->id},";
|
||||
$path['grade'] = $parent->grade + 1;
|
||||
}
|
||||
$this->dao->update(TABLE_PROJECT)->set('path')->eq($path['path'])->set('grade')->eq($path['grade'])->where('id')->eq($stage->id)->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a plan.
|
||||
*
|
||||
* @param int $planID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return bool|array
|
||||
*/
|
||||
public function update($planID = 0, $projectID = 0)
|
||||
{
|
||||
/* Get oldPlan and the data from the post. */
|
||||
$oldPlan = $this->getByID($planID);
|
||||
$plan = fixer::input('post')
|
||||
->setDefault('begin', '0000-00-00')
|
||||
->setDefault('end', '0000-00-00')
|
||||
->setDefault('realBegan', '0000-00-00')
|
||||
->setDefault('realEnd', '0000-00-00')
|
||||
->join('output', ',')
|
||||
->get();
|
||||
|
||||
/* Judgment of required items. */
|
||||
if($plan->begin == '0000-00-00') dao::$errors['begin'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->begin);
|
||||
if($plan->end == '0000-00-00') dao::$errors['end'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->end);
|
||||
|
||||
$planChanged = ($oldPlan->name != $plan->name || $oldPlan->milestone != $plan->milestone || $oldPlan->begin != $plan->begin || $oldPlan->end != $plan->end);
|
||||
|
||||
if($plan->parent > 0)
|
||||
{
|
||||
$parentStage = $this->getByID($plan->parent);
|
||||
$plan->attribute = $parentStage->attribute;
|
||||
$plan->acl = $parentStage->acl;
|
||||
$parentPercent = $parentStage->percent;
|
||||
|
||||
$childrenTotalPercent = $this->getTotalPercent($parentStage, true);
|
||||
$childrenTotalPercent = $plan->parent == $oldPlan->parent ? ($childrenTotalPercent - $oldPlan->percent + $plan->percent) : ($childrenTotalPercent + $plan->percent);
|
||||
if($childrenTotalPercent > 100) return dao::$errors['percent'][] = $this->lang->programplan->error->percentOver;
|
||||
|
||||
/* If child plan has milestone, update parent plan set milestone eq 0 . */
|
||||
if($plan->milestone and $parentStage->milestone) $this->dao->update(TABLE_PROJECT)->set('milestone')->eq(0)->where('id')->eq($oldPlan->parent)->exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Synchronously update sub-phase permissions. */
|
||||
$childrenIDList = $this->dao->select('*')->from(TABLE_PROJECT)->where('parent')->eq($oldPlan->id)->fetch('id');
|
||||
if(!empty($childrenIDList)) $this->dao->update(TABLE_PROJECT)->set('acl')->eq($plan->acl)->where('id')->in($childrenIDList)->exec();
|
||||
|
||||
/* The workload of the parent plan cannot exceed 100%. */
|
||||
$oldPlan->parent = $plan->parent;
|
||||
$totalPercent = $this->getTotalPercent($oldPlan);
|
||||
$totalPercent = $totalPercent + $plan->percent;
|
||||
if($totalPercent > 100) return dao::$errors['percent'][] = $this->lang->programplan->error->percentOver;
|
||||
}
|
||||
|
||||
/* Set planDuration and realDuration. */
|
||||
$plan->planDuration = $this->getDuration($plan->begin, $plan->end);
|
||||
$plan->realDuration = $this->getDuration($plan->realBegan, $plan->realEnd);
|
||||
|
||||
if($planChanged) $plan->version = $oldPlan->version + 1;
|
||||
if(empty($plan->parent)) $plan->parent = $projectID;
|
||||
|
||||
$this->dao->update(TABLE_PROJECT)->data($plan)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->programplan->edit->requiredFields, 'notempty')
|
||||
->checkIF($plan->end != '0000-00-00', 'end', 'ge', $plan->begin)
|
||||
->checkIF($plan->percent != false, 'percent', 'float')
|
||||
->where('id')->eq($planID)
|
||||
->exec();
|
||||
|
||||
if(dao::isError()) return false;
|
||||
$this->setTreePath($planID);
|
||||
if($plan->acl != 'open') $this->loadModel('user')->updateUserView($planID, 'sprint');
|
||||
|
||||
if($planChanged)
|
||||
{
|
||||
$spec = new stdclass();
|
||||
$spec->project = $planID;
|
||||
$spec->version = $plan->version;
|
||||
$spec->name = $plan->name;
|
||||
$spec->milestone = $plan->milestone;
|
||||
$spec->begin = $plan->begin;
|
||||
$spec->end = $plan->end;
|
||||
|
||||
$this->dao->insert(TABLE_PROJECTSPEC)->data($spec)->exec();
|
||||
}
|
||||
|
||||
return common::createChanges($oldPlan, $plan);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print cell.
|
||||
*
|
||||
* @param int $col
|
||||
* @param int $plan
|
||||
* @param int $users
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function printCell($col, $plan, $users, $projectID)
|
||||
{
|
||||
$id = $col->id;
|
||||
if($col->show)
|
||||
{
|
||||
$class = 'c-' . $id;
|
||||
$title = '';
|
||||
$idList = array('id','name','output','percent','attribute','version','begin','end','realBegan','realEnd', 'openedBy', 'openedDate');
|
||||
if(in_array($id,$idList))
|
||||
{
|
||||
$class .= ' text-left';
|
||||
$title = "title='{$plan->$id}'";
|
||||
if($id == 'output') $class .= ' text-ellipsis';
|
||||
if(!empty($plan->children)) $class .= ' has-child';
|
||||
}
|
||||
else
|
||||
{
|
||||
$class .= ' text-center';
|
||||
}
|
||||
if($id == 'actions') $class .= ' c-actions';
|
||||
|
||||
echo "<td class='{$class}' {$title}>";
|
||||
if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('programplan', $plan, $id);
|
||||
switch($id)
|
||||
{
|
||||
case 'id':
|
||||
echo sprintf('%03d', $plan->id);
|
||||
break;
|
||||
case 'name':
|
||||
$milestoneFlag = $plan->milestone ? " <i class='icon icon-flag red' title={$this->lang->programplan->milestone}'></i>" : '';
|
||||
if($plan->grade > 1) echo '<span class="label label-badge label-light" title="' . $this->lang->programplan->children . '">' . $this->lang->programplan->childrenAB . '</span> ';
|
||||
echo $plan->name . $milestoneFlag;
|
||||
if(!empty($plan->children)) echo '<a class="plan-toggle" data-id="' . $plan->id . '"><i class="icon icon-angle-double-right"></i></a>';
|
||||
break;
|
||||
case 'percent':
|
||||
echo $plan->percent . '%';
|
||||
break;
|
||||
case 'attribute':
|
||||
echo zget($this->lang->stage->typeList, $plan->attribute, '');
|
||||
break;
|
||||
case 'begin':
|
||||
echo $plan->begin;
|
||||
break;
|
||||
case 'end':
|
||||
echo $plan->end;
|
||||
break;
|
||||
case 'realBegan':
|
||||
echo $plan->realBegan;
|
||||
break;
|
||||
case 'realEnd':
|
||||
echo $plan->realEnd;
|
||||
break;
|
||||
case 'output':
|
||||
echo $plan->output;
|
||||
break;
|
||||
case 'version':
|
||||
echo $plan->version;
|
||||
break;
|
||||
case 'editedBy':
|
||||
echo zget($users, $plan->editedBy);
|
||||
break;
|
||||
case 'editedDate':
|
||||
echo substr($plan->editedDate, 5, 11);
|
||||
break;
|
||||
case 'openedBy':
|
||||
echo zget($users, $plan->openedBy);
|
||||
break;
|
||||
case 'openedDate':
|
||||
echo substr($plan->openedDate, 5, 11);
|
||||
break;
|
||||
case 'actions':
|
||||
common::printIcon('execution', 'start', "executionID={$plan->id}", $plan, 'list', '', '', 'iframe', true);
|
||||
$class = !empty($plan->children) ? 'disabled' : '';
|
||||
common::printIcon('task', 'create', "executionID={$plan->id}", $plan, 'list', '', '', $class, false, "data-app='execution'");
|
||||
|
||||
if($plan->grade == 1 && $this->isCreateTask($plan->id))
|
||||
{
|
||||
common::printIcon('programplan', 'create', "program={$plan->parent}&productID=$plan->product&planID=$plan->id", $plan, 'list', 'split', '', '', '', '', $this->lang->programplan->createSubPlan);
|
||||
}
|
||||
else
|
||||
{
|
||||
$disabled = ($plan->grade == 2) ? ' disabled' : '';
|
||||
echo html::a('javascript:alert("' . $this->lang->programplan->error->createdTask . '");', '<i class="icon-programplan-create icon-split"></i>', '', 'class="btn ' . $disabled . '"');
|
||||
}
|
||||
|
||||
common::printIcon('programplan', 'edit', "planID=$plan->id&projectID=$projectID", $plan, 'list', '', '', 'iframe', true);
|
||||
|
||||
$disabled = !empty($plan->children) ? ' disabled' : '';
|
||||
if(common::hasPriv('execution', 'delete', $plan))
|
||||
{
|
||||
common::printIcon('execution', 'delete', "planID=$plan->id&confirm=no", $plan, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete);
|
||||
}
|
||||
break;
|
||||
}
|
||||
echo '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is create task.
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function isCreateTask($planID)
|
||||
{
|
||||
$task = $this->dao->select('*')->from(TABLE_TASK)->where('execution')->eq($planID)->limit(1)->fetch();
|
||||
return empty($task) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is clickable.
|
||||
*
|
||||
* @param int $plan
|
||||
* @param int $action
|
||||
* @static
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public static function isClickable($plan, $action)
|
||||
{
|
||||
$action = strtolower($action);
|
||||
|
||||
if($action == 'create' and $plan->grade > 1) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the stage set to milestone.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getMilestones($projectID = 0)
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_PROJECT)
|
||||
->where('project')->eq($projectID)
|
||||
->andWhere('type')->eq('stage')
|
||||
->andWhere('milestone')->eq(1)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id_desc')
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get milestone by product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getMilestoneByProduct($productID)
|
||||
{
|
||||
return $this->dao->select('t1.id, t1.name')->from(TABLE_PROJECT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t2')->on('t1.id=t2.project')
|
||||
->where('t2.product')->eq($productID)
|
||||
->andWhere('t1.type')->eq('stage')
|
||||
->andWhere('t1.milestone')->eq(1)
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.begin asc')
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parent stage list.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param int $planID
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getParentStageList($executionID, $planID, $productID)
|
||||
{
|
||||
$parentStage = $this->dao->select('t2.id, t2.name')->from(TABLE_PROJECTPRODUCT)
|
||||
->alias('t1')->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
->andWhere('t2.project')->eq($executionID)
|
||||
->andWhere('t2.grade')->eq(1)
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
|
||||
->orderBy('t2.id desc')
|
||||
->fetchPairs();
|
||||
|
||||
/* Remove the currently edited stage. */
|
||||
if(isset($parentStage[$planID])) unset($parentStage[$planID]);
|
||||
|
||||
$plan = $this->getByID($planID);
|
||||
foreach($parentStage as $key => $stage)
|
||||
{
|
||||
$isCreate = $this->isCreateTask($key);
|
||||
if($isCreate === false and $key != $plan->parent) unset($parentStage[$key]);
|
||||
}
|
||||
$parentStage[0] = $this->lang->programplan->emptyParent;
|
||||
ksort($parentStage);
|
||||
|
||||
return $parentStage;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse of programplan module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: browse.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>#dropMenu{z-index:99999;}</style>
|
||||
<?php js::set('browseType', $type);?>
|
||||
<div id='mainContent' class='main-table'>
|
||||
<?php if(empty($plans)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->programplan->noData;?></span>
|
||||
<?php if(common::hasPriv('programplan', 'create')):?>
|
||||
<?php echo html::a($this->createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), "<i class='icon icon-plus'></i> " . $lang->programplan->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php if($type == 'gantt') include './gantt.html.php';?>
|
||||
<?php if($type == 'lists') include './list.html.php';?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<script>
|
||||
$('#subNavbar').find('ul li').each(function()
|
||||
{
|
||||
var that = $(this);
|
||||
if(that.attr('data-id') != browseType) that.removeClass('active');
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
/**
|
||||
* The create of programplan module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: create.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('browseType', $type);?>
|
||||
<style>.icon-help{margin-left: 3px;}</style>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div class='btn-toolbar pull-left'>
|
||||
<span class='btn btn-link btn-active-text'>
|
||||
<?php
|
||||
$title = $lang->programplan->create;
|
||||
if($planID) $title = $programPlan->name . $lang->project->stage . '(' . $programPlan->begin . $lang->project->to . $programPlan->end . ')';
|
||||
echo "<span class='text'>{$title}</span>";
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php $hideAttribute = $planID == 0 ? '' : ' hidden'?>
|
||||
<?php $class = $planID == 0 ? '' : "disabled='disabled'"?>
|
||||
<?php $name = $planID == 0 ? $lang->programplan->name : $lang->programplan->subStageName;?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form class='main-form form-ajax' method='post' id='planForm' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='required'><?php echo $name;?></th>
|
||||
<th class='w-110px'>
|
||||
<?php echo $lang->programplan->percent;?>
|
||||
<?php if($planID):?>
|
||||
<i class='icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-container="body" data-content="<?php echo $lang->programplan->workloadTips;?>"></i>
|
||||
<?php endif;?>
|
||||
</th>
|
||||
<th class='w-110px <?php echo $hideAttribute?>'><?php echo $lang->programplan->attribute;?></th>
|
||||
<th class='w-110px'><?php echo $lang->project->acl;?></th>
|
||||
<th class='w-110px'><?php echo $lang->programplan->milestone;?></th>
|
||||
<th class='w-110px required'><?php echo $lang->programplan->begin;?></th>
|
||||
<th class='w-110px required'><?php echo $lang->programplan->end;?></th>
|
||||
<th class='w-110px'><?php echo $lang->programplan->realBegan;?></th>
|
||||
<th class='w-110px'><?php echo $lang->programplan->realEnd;?></th>
|
||||
<?php if(isset($this->config->qcVersion)):?>
|
||||
<th class='w-110px'><?php echo $lang->programplan->output;?></th>
|
||||
<?php endif;?>
|
||||
<th class="w-70px text-center"> <?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $i = 0;?>
|
||||
<?php if(empty($plans) and $planID == 0):?>
|
||||
<?php foreach($stages as $stage):?>
|
||||
<tr>
|
||||
<td><input type='text' name='names[]' id='names<?php echo $i;?>' value='<?php echo $stage->name;?>' class='form-control' /></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<input type='text' name='percents[]' id='percent<?php echo $i;?>' value='<?php echo $stage->percent;?>' class='form-control'/>
|
||||
<span class='input-group-addon'>%</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, $stage->type, "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
|
||||
<td><input type='text' name='begin[]' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='realBegan[]' id='realBegan<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='realEnd[]' id='realEnd<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<?php if(isset($this->config->qcVersion)):?>
|
||||
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control chosen' multiple");?></td>
|
||||
<?php endif;?>
|
||||
<td class='c-actions text-left'>
|
||||
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
|
||||
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(!empty($plans)):?>
|
||||
<?php foreach($plans as $plan):?>
|
||||
<?php $disabled = $plan->setMilestone ? '' : "disabled='disabled'"?>
|
||||
<?php echo html::hidden('planIDList[]', $plan->id);?>
|
||||
<tr>
|
||||
<td><input type='text' name="names[]" id='names<?php echo $i;?>' value='<?php echo $plan->name;?>' class='form-control' /></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<input type='text' name='percents[]' id='percent<?php echo $i;?>' value='<?php echo $plan->percent;?>' class='form-control' />
|
||||
<span class='input-group-addon'>%</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, $plan->attribute, "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, $plan->acl, "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, $plan->milestone, $disabled);?></td>
|
||||
<td><input type='text' name='begin[] ' id='begin<?php echo $i;?>' value='<?php echo $plan->begin;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' value='<?php echo $plan->end;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='realBegan[] ' id='realBegan<?php echo $i;?>' value='<?php echo $plan->realBegan;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='realEnd[]' id='realEnd<?php echo $i;?>' value='<?php echo $plan->realEnd;?>' class='form-control form-date' /></td>
|
||||
<?php if(isset($this->config->qcVersion)):?>
|
||||
<?php $option = empty($plan->output) ? 0 : explode(',', $plan->output);?>
|
||||
<td><?php echo html::select("output[$i][]", $documentList, $option, "class='form-control chosen' multiple");?></td>
|
||||
<?php endif;?>
|
||||
<td class='c-actions text-left'>
|
||||
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
|
||||
<?php for($j = 0; $j < 5; $j ++):?>
|
||||
<tr class='addedItem'>
|
||||
<td><input type='text' name='names[]' id='names<?php echo $i;?>' value='' class='form-control' /></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<input type='text' name='percents[]' id='percent<?php echo $i;?>' value='' class='form-control' />
|
||||
<span class='input-group-addon'>%</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
|
||||
<td><input type='text' name='begin[] ' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='realBegan[] ' id='realBegan<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='realEnd[]' id='realEnd<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<?php if(isset($this->config->qcVersion)):?>
|
||||
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control chosen' multiple");?></td>
|
||||
<?php endif;?>
|
||||
<td class='c-actions text-left'>
|
||||
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
|
||||
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
<?php endfor;?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php $colspan = $planID == 0 ? 9 : 8;?>
|
||||
<td colspan='<?php echo $colspan?>' class='text-center form-actions'><?php echo html::submitButton() . ' ' . html::backButton(); ?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php js::set('i', $i);?>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<?php $i = '%i%';?>
|
||||
<table class='hidden'>
|
||||
<tr id='addItem' class='hidden'>
|
||||
<td><input type='text' name='names[]' id='names<?php echo $i;?>' class='form-control' /></td>
|
||||
<?php echo html::hidden('planIDList[]', 0);?>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<input type='text' name='percents[]' id='percent<?php echo $i;?>' class='form-control' />
|
||||
<span class='input-group-addon'>%</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
|
||||
<td><input type='text' name='begin[] ' id='begin<?php echo $i;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='realBegan[] ' id='realBegan<?php echo $i;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='realEnd[]' id='realEnd<?php echo $i;?>' class='form-control form-date' /></td>
|
||||
<?php if(isset($this->config->qcVersion)):?>
|
||||
<td><?php echo html::select("output[$i][]", $documentList, '', "class='form-control chosen ' multiple");?></td>
|
||||
<?php endif;?>
|
||||
<td class='c-actions text-center'>
|
||||
<a href='javascript:;' onclick='addItem(this)' class='btn btn-link'><i class='icon-plus'></i></a>
|
||||
<a href='javascript:;' onclick='deleteItem(this)' class='btn btn-link'><i class='icon icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script>$('[data-toggle="popover"]').popover();</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit of programplan module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: edit.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->programplan->edit;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="w-100px"><?php echo $lang->programplan->parent;?></th>
|
||||
<td colspan='2'><?php echo html::select('parent', $parentStage, $plan->parent, "class='form-control chosen '");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->programplan->name;?> </th>
|
||||
<td colspan='2'><?php echo html::input('name', $plan->name, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->programplan->percent;?> </th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('percent', $plan->percent, "class='form-control'");?>
|
||||
<div class='input-group-addon'>%</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="<?php if($plan->grade == 2) echo "hidden";?>" id="attributeType">
|
||||
<th><?php echo $lang->programplan->attribute;?> </th>
|
||||
<td colspan='2'><?php echo html::select('attribute', $lang->stage->typeList, $plan->attribute, "class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php if($plan->setMilestone):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->programplan->milestone;?> </th>
|
||||
<td colspan='2'><?php echo html::radio('milestone', $lang->programplan->milestoneList, $plan->milestone);?></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<?php echo html::hidden('milestone', $plan->milestone);?>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?> </th>
|
||||
<?php $class = $plan->grade == 2 ? "disabled='disabled'" : '';?>
|
||||
<td colspan='2'><?php echo html::select('acl', $lang->project->aclList, $plan->acl, "class='form-control' $class");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->programplan->planDateRange;?> </th>
|
||||
<td colspan='2'>
|
||||
<div class="input-group title-group">
|
||||
<?php echo html::input('begin', $plan->begin, "class='form-control form-date'");?>
|
||||
<span class="input-group-addon fix-border br-0"><?php echo $lang->project->to;?></span>
|
||||
<?php echo html::input('end', $plan->end, "class='form-control form-date'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->programplan->realDateRange;?> </th>
|
||||
<td colspan='2'>
|
||||
<div class="input-group title-group">
|
||||
<?php echo html::input('realBegan', $plan->realBegan, "class='form-control form-date'");?>
|
||||
<span class="input-group-addon fix-border br-0"><?php echo $lang->project->to;?></span>
|
||||
<?php echo html::input('realEnd', $plan->realEnd, "class='form-control form-date'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(isset($this->config->qcVersion)):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->programplan->output;?> </th>
|
||||
<td colspan='4'><?php echo html::select('output[]', $documentList, $plan->output, "class='form-control chosen ' multiple");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<td colspan='4' class='form-actions text-center'><?php echo html::submitButton() . html::backButton()?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("#parent").change(function()
|
||||
{
|
||||
var parent = $(this).children("option:selected").val();
|
||||
if(parent == 0)
|
||||
{
|
||||
$("#attributeType").removeClass('hidden');
|
||||
$("#acl").attr('disabled', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#attributeType").addClass('hidden');
|
||||
$("#acl").attr('disabled', true);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,436 @@
|
||||
<?php
|
||||
/**
|
||||
* The gantt of programplan module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: gantt.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/ext/view/gantt.html.php';?>
|
||||
<style>
|
||||
#ganttView {height: 600px;}
|
||||
#mainContent:before {background: #fff;}
|
||||
.gantt-fullscreen #header,
|
||||
.gantt-fullscreen #mainMenu,
|
||||
.gantt-fullscreen #footer {display: none!important;}
|
||||
.gantt-fullscreen #mainContent {position: fixed; top: 0; right: 0; bottom: 0; left: 0}
|
||||
.gantt_task_content{display: none;}
|
||||
.checkbox-primary {margin-top: 0px; margin-left: 10px;}
|
||||
form {display: block; margin-top: 0em; margin-block-end: 1em;}
|
||||
</style>
|
||||
<?php js::set('customUrl', $this->createLink('programplan', 'ajaxCustom'));?>
|
||||
<?php js::set('dateDetails', $dateDetails);?>
|
||||
<?php js::set('module', $app->rawModule);?>
|
||||
<?php js::set('method', $app->rawMethod);?>
|
||||
|
||||
<div id='mainContent' class='main-content load-indicator' data-loading='<?php echo $lang->programplan->exporting;?>'>
|
||||
<form class="main-form form-ajax">
|
||||
<div class="example">
|
||||
<?php echo html::commonButton($lang->programplan->full, 'id="fullScreenBtn"', 'btn btn-primary btn-sm')?>
|
||||
<?php if($app->rawModule == 'review' and $app->rawMethod == 'assess') unset($lang->programplan->stageCustom->date); ?>
|
||||
<?php echo html::checkbox('stageCustom', $lang->programplan->stageCustom, $selectCustom);?>
|
||||
</div>
|
||||
</form>
|
||||
<div id='ganttContainer'>
|
||||
<div class='gantt' id='ganttView'></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var scriptLoadedMap = {};
|
||||
var loadingPrefixText = '<?php echo $lang->programplan->exporting;?>';
|
||||
function getRemoteScript(url, successCallback, errorCallback)
|
||||
{
|
||||
if(scriptLoadedMap[url]) return successCallback && successCallback();
|
||||
$.getScript(url, function()
|
||||
{
|
||||
scriptLoadedMap[url] = true;
|
||||
if(successCallback) successCallback();
|
||||
}).fail(function()
|
||||
{
|
||||
if(errorCallback) errorCallback('Cannot load "' + url + '".');
|
||||
});
|
||||
}
|
||||
function updateProgress(progress)
|
||||
{
|
||||
var progressText = loadingPrefixText;
|
||||
if(progress < 1) progressText += Math.floor(progress * 100) + '%';
|
||||
$('#mainContent').attr('data-loading', progressText);
|
||||
}
|
||||
function drawGanttToCanvas(exportType, successCallback, errorCallback)
|
||||
{
|
||||
updateProgress(0);
|
||||
exportType = exportType || 'image';
|
||||
var $ganttView = $('#ganttView');
|
||||
var oldHeight = $ganttView.css('height');
|
||||
var $ganttContainer = $('#ganttContainer');
|
||||
var $ganttDataArea = $ganttView.find('.gantt_data_area');
|
||||
var $ganttDridData = $ganttView.find('.gantt_grid_data');
|
||||
var ganttHeight = $ganttView.find('.gantt_task_bg').outerHeight() + $ganttView.find('.gantt_grid_scale').outerHeight() + 1;
|
||||
var ganttWidth = $ganttDataArea.outerWidth() + $ganttDridData.outerWidth();
|
||||
|
||||
$ganttContainer.css(
|
||||
{
|
||||
height: ganttHeight + $('#ganttHeader').outerHeight() + 80,
|
||||
width: ganttWidth + 93
|
||||
});
|
||||
$ganttView.css('height', ganttHeight);
|
||||
gantt.render();
|
||||
updateProgress(0.1);
|
||||
getRemoteScript('<?php echo $jsRoot . 'html2canvas/min.js';?>', function()
|
||||
{
|
||||
updateProgress(0.2);
|
||||
var afterFinish = function(canvas)
|
||||
{
|
||||
$ganttContainer.css(
|
||||
{
|
||||
width: '',
|
||||
height: ''
|
||||
});
|
||||
$ganttView.css('height', oldHeight);
|
||||
if(canvas) canvas.remove();
|
||||
};
|
||||
var delayTime = Math.max(1000, Math.floor(10 * (ganttHeight * ganttWidth) / 100000));
|
||||
var progressTimer;
|
||||
if(delayTime > 1500)
|
||||
{
|
||||
var startProgress = 0.2;
|
||||
var deltaProgress = 0.5 / Math.floor(delayTime/1000);
|
||||
progressTimer = setInterval(function()
|
||||
{
|
||||
startProgress += deltaProgress;
|
||||
updateProgress(Math.min(0.7, startProgress));
|
||||
}, 1000);
|
||||
}
|
||||
setTimeout(function()
|
||||
{
|
||||
if(progressTimer) clearInterval(progressTimer);
|
||||
updateProgress(0.7);
|
||||
html2canvas($ganttContainer[0], {logging: false}).then(function(canvas)
|
||||
{
|
||||
var isExportPDF = exportType === 'pdf';
|
||||
updateProgress(isExportPDF ? 0.8 : 0.9);
|
||||
canvas.onerror = function()
|
||||
{
|
||||
afterFinish(canvas);
|
||||
if(errorCallback) errorCallback('Cannot convert image to blob.');
|
||||
};
|
||||
if(isExportPDF)
|
||||
{
|
||||
var width = canvas.width;
|
||||
var height = canvas.height;
|
||||
getRemoteScript('<?php echo $jsRoot . 'pdfjs/min.js';?>', function()
|
||||
{
|
||||
updateProgress(0.8);
|
||||
var pdf = new jsPDF(
|
||||
{
|
||||
format: [width, height],
|
||||
unit: 'px',
|
||||
orientation: width > height ? 'l' : 'p'
|
||||
});
|
||||
pdf.addImage(canvas, 0, 0, pdf.internal.pageSize.getWidth(), pdf.internal.pageSize.getHeight());
|
||||
pdf.save('gantt-export-<?php echo $projectID;?>.pdf');
|
||||
if(successCallback) successCallback(pdf);
|
||||
afterFinish();
|
||||
}, function(error)
|
||||
{
|
||||
afterFinish(canvas);
|
||||
if(errorCallback) errorCallback(error);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
canvas.toBlob(function(blob)
|
||||
{
|
||||
updateProgress(0.95);
|
||||
var imageUrl = URL.createObjectURL(blob);
|
||||
$('#ganttDownload').attr({href: imageUrl})[0].click();
|
||||
if(successCallback) successCallback(imageUrl);
|
||||
afterFinish(canvas);
|
||||
});
|
||||
}
|
||||
}).catch(function(error)
|
||||
{
|
||||
afterFinish();
|
||||
if(errorCallback) errorCallback('Cannot draw graphic to canvas.');
|
||||
});
|
||||
}, delayTime);
|
||||
}, errorCallback);
|
||||
}
|
||||
|
||||
function exportGantt(exportType)
|
||||
{
|
||||
var $mainContent = $('#mainContent');
|
||||
$mainContent.addClass('loading').css('height', Math.max(200, Math.floor($(window).height() - $('#footer').outerHeight() - $('#header').outerHeight() - $('#mainMenu').outerHeight() - 38)));
|
||||
$('#ganttExportDate').text(new Date().format('yyyy-MM-dd hh:mm:ss'));
|
||||
var afterFinish = function(url)
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
$mainContent.css('height', '').removeClass('loading');
|
||||
}, 300);
|
||||
updateProgress(1);
|
||||
};
|
||||
drawGanttToCanvas(exportType, afterFinish, function(errorText)
|
||||
{
|
||||
afterFinish();
|
||||
$.zui.messager.danger('<?php echo $lang->programplan->exportFail;?>' + (errorText || ''));
|
||||
});
|
||||
}
|
||||
|
||||
function getByIdForGantt(list, id)
|
||||
{
|
||||
for (var i = 0; i < list.length; i++)
|
||||
{
|
||||
if (list[i].key == id) return list[i].label || "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function zoomTasks(node)
|
||||
{
|
||||
switch(node.value)
|
||||
{
|
||||
case "day":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scales = [{unit: 'day', step: 1, format: '%m-%d'}];
|
||||
gantt.config.scale_height = 35;
|
||||
break;
|
||||
case "week":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scales = [{unit: 'week', step: 1, format: "<?php echo $lang->project->gantt->zooming['week'];?> #%W"}, {unit:"day", step:1, date:"%D"}]
|
||||
gantt.config.scale_height = 60;
|
||||
break;
|
||||
case "month":
|
||||
gantt.config.min_column_width = 70;
|
||||
gantt.config.scale_height = 60;
|
||||
gantt.config.scales = [{unit: 'month', step: 1, format: '%M'}, {unit:"week", step:1, date:"<?php echo $lang->project->gantt->zooming['week'];?> #%W"}];
|
||||
break;
|
||||
}
|
||||
gantt.render();
|
||||
}
|
||||
|
||||
function updateCriticalPath()
|
||||
{
|
||||
gantt.config.highlight_critical_path = !gantt.config.highlight_critical_path;
|
||||
if(gantt.config.highlight_critical_path)
|
||||
{
|
||||
$('#criticalPath').html(<?php echo json_encode($lang->programplan->hideCriticalPath);?>);
|
||||
gantt.config.highlight_critical_path = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#criticalPath').html(<?php echo json_encode($lang->programplan->showCriticalPath);?>);
|
||||
gantt.config.highlight_critical_path = false;
|
||||
}
|
||||
gantt.render();
|
||||
}
|
||||
|
||||
$("#fullScreenBtn").on("click", function()
|
||||
{
|
||||
$("#mainContent").css("z-index", "9999");
|
||||
$("#ganttView").css("z-index", "9999");
|
||||
});
|
||||
|
||||
function exitHandler()
|
||||
{
|
||||
if (module == 'review' && method == 'assess' && !document.fullscreenElement && !document.webkitIsFullScreen && !document.mozFullScreen && !document.msFullscreenElement) {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
document.addEventListener('fullscreenchange', exitHandler);
|
||||
var layout;
|
||||
|
||||
// Set gantt view height
|
||||
var resizeGanttView = function()
|
||||
{
|
||||
if(gantt.getState().fullscreen) return false;
|
||||
$('#ganttView').css('height', Math.max(200, Math.floor($(window).height() - $('#footer').outerHeight() - $('#header').outerHeight() - $('#mainMenu').outerHeight() - 80)));
|
||||
};
|
||||
|
||||
var ganttData = $.parseJSON(<?php echo json_encode($plans);?>);
|
||||
if(!ganttData.data) ganttData.data = [];
|
||||
|
||||
gantt.config.readonly = true;
|
||||
gantt.config.row_height = 25;
|
||||
gantt.config.min_column_width = 40;
|
||||
gantt.config.details_on_create = false;
|
||||
gantt.config.scales = [{unit: 'day', step: 1, format: '%m-%d'}];
|
||||
gantt.config.duration_unit = "day";
|
||||
|
||||
gantt.config.columns = [
|
||||
{name: 'text', width: '*', tree: true, resize: true, width:200},
|
||||
{name: 'begin', align: 'center', resize: true, width: 80},
|
||||
{name: 'deadline', align: 'center', resize: true, width: 80},
|
||||
{name: 'duration', align: 'center', resize: true, width: 60},
|
||||
{name: 'percent', align: 'center', resize: true, width:70, template: function(plan)
|
||||
{
|
||||
if(plan.percent) return Math.round(plan.percent) + '%';
|
||||
}
|
||||
},
|
||||
{name: 'taskProgress', align: 'center', resize: true, width: 60},
|
||||
{name: 'realBegan', align: 'center', resize: true, width: 80},
|
||||
{name: 'realEnd', align: 'center', width: 80}
|
||||
];
|
||||
|
||||
gantt.locale.labels.column_text = "<?php echo $lang->programplan->name;?>";
|
||||
gantt.locale.labels.column_percent = "<?php echo $lang->programplan->percentAB;?>";
|
||||
gantt.locale.labels.column_taskProgress = "<?php echo $lang->programplan->taskProgress;?>";
|
||||
gantt.locale.labels.column_begin = "<?php echo $lang->programplan->begin;?>";
|
||||
gantt.locale.labels.column_deadline = "<?php echo $lang->programplan->end;?>";
|
||||
gantt.locale.labels.column_realBegan = "<?php echo $lang->programplan->realBegan;?>";
|
||||
gantt.locale.labels.column_realEnd = "<?php echo $lang->programplan->realEnd;?>";
|
||||
gantt.locale.labels.column_duration = "<?php echo $lang->programplan->duration;?>";
|
||||
|
||||
if((module == 'review' && method == 'assess') || dateDetails)
|
||||
{
|
||||
layout = gantt.config.layout;
|
||||
|
||||
gantt.config.layout = {
|
||||
css: "gantt_container",
|
||||
cols: [
|
||||
{
|
||||
rows:[
|
||||
{view: "grid", scrollX: "gridScroll", scrollable: true, scrollY: "scrollVer"},
|
||||
{view: "scrollbar", id: "gridScroll", group:"horizontal"}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
var date2Str = gantt.date.date_to_str(gantt.config.task_date);
|
||||
var today = new Date();
|
||||
var todayTips = "<?php echo $lang->programplan->today;?>";
|
||||
gantt.addMarker({
|
||||
start_date: today,
|
||||
css: "today",
|
||||
text: todayTips,
|
||||
title: todayTips + ": " + date2Str(today)
|
||||
});
|
||||
|
||||
gantt.templates.scale_cell_class = function(date)
|
||||
{
|
||||
if(date.getDay() == 0 || date.getDay() == 6) return 'weekend';
|
||||
};
|
||||
|
||||
gantt.templates.timeline_cell_class = function(item, date)
|
||||
{
|
||||
if(date.getDay() == 0 || date.getDay() == 6) return 'weekend';
|
||||
};
|
||||
|
||||
gantt.attachEvent('onTemplatesReady', function()
|
||||
{
|
||||
$('#fullScreenBtn').click(function()
|
||||
{
|
||||
if(module == 'review' && method == 'assess')
|
||||
{
|
||||
gantt.config.layout = layout;
|
||||
gantt.init('ganttView');
|
||||
}
|
||||
gantt.expand();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var isGanttExpand = false;
|
||||
var delayTimer = null;
|
||||
var handleFullscreen = function()
|
||||
{
|
||||
if(isGanttExpand)
|
||||
{
|
||||
$('body').addClass('gantt-fullscreen');
|
||||
$('#ganttView').css('height', $(window).height() - 40);
|
||||
isGanttExpand = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('body').removeClass('gantt-fullscreen');
|
||||
resizeGanttView();
|
||||
}
|
||||
delayTimer = null;
|
||||
};
|
||||
var delayHandleFullscreen = function()
|
||||
{
|
||||
if(delayTimer) clearTimeout(delayTimer);
|
||||
delayTimer = setTimeout(handleFullscreen, 50);
|
||||
};
|
||||
gantt.attachEvent('onBeforeExpand', function()
|
||||
{
|
||||
$('body').addClass('gantt-fullscreen');
|
||||
isGanttExpand = true;
|
||||
return true;
|
||||
});
|
||||
if(document.addEventListener)
|
||||
{
|
||||
document.addEventListener('webkitfullscreenchange', delayHandleFullscreen, false);
|
||||
document.addEventListener('mozfullscreenchange', delayHandleFullscreen, false);
|
||||
document.addEventListener('fullscreenchange', delayHandleFullscreen, false);
|
||||
document.addEventListener('MSFullscreenChange', delayHandleFullscreen, false);
|
||||
}
|
||||
|
||||
resizeGanttView();
|
||||
$(window).resize(resizeGanttView);
|
||||
|
||||
gantt.templates.grid_folder = function(item) {
|
||||
return "";
|
||||
};
|
||||
|
||||
gantt.templates.grid_file = function(item) {
|
||||
return "";
|
||||
};
|
||||
|
||||
gantt.init('ganttView');
|
||||
gantt.parse(ganttData);
|
||||
gantt.showDate(new Date());
|
||||
|
||||
// Show task in modal on click task
|
||||
var taskModalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '80%'});
|
||||
gantt.attachEvent('onTaskClick', function(id, e)
|
||||
{
|
||||
if($(e.srcElement).hasClass('gantt_close') || $(e.srcElement).hasClass('gantt_open')) return false;
|
||||
|
||||
if(typeof id === 'string') id = parseInt(id);
|
||||
if(!isNaN(id) && id > 0)
|
||||
{
|
||||
//taskModalTrigger.show({url: createLink('task', 'view', 'taskID=' + id, 'html', true)});
|
||||
}
|
||||
});
|
||||
|
||||
// Make folder can open or close by click
|
||||
$('#ganttView').on('click', '.gantt_close,.gantt_open', function()
|
||||
{
|
||||
var $task = $(this).closest('.gantt_row_task');
|
||||
var task = gantt.getTask($task.attr('task_id'));
|
||||
if(task) gantt[task.$open ? 'close' : 'open'](task.id);
|
||||
});
|
||||
|
||||
$(".checkbox-primary").on('click', function()
|
||||
{
|
||||
var stageCustom = [];
|
||||
$("input[name='stageCustom[]']:checked").each(function()
|
||||
{
|
||||
var custom = $(this).val();
|
||||
stageCustom.push(custom);
|
||||
});
|
||||
|
||||
if(stageCustom.length == 0) stageCustom = 0;
|
||||
$.ajax({
|
||||
url: customUrl,
|
||||
dataType: "json",
|
||||
data: {stageCustom: stageCustom},
|
||||
type: "post",
|
||||
success: function(result)
|
||||
{
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* The list of programplan module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package programplan
|
||||
* @version $Id: list.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
include '../../common/view/datatable.fix.html.php';
|
||||
js::set('confirmDelete', $lang->programplan->confirmDelete);
|
||||
?>
|
||||
<style>
|
||||
#tableCustomBtn{display: none;}
|
||||
|
||||
.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;}
|
||||
.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;}
|
||||
.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;}
|
||||
.table td.has-child > a:not(.plan-toggle) {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
|
||||
.table td.has-child > .plan-toggle {color: #838a9d; position: relative; top: 1px;}
|
||||
.table td.has-child > .plan-toggle:hover {color: #006af1; cursor: pointer;}
|
||||
.table td.has-child > .plan-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s; -ms-transform:rotate(-90deg); -moz-transform:rotate(-90deg); -o-transform:rotate(-90deg); -webkit-transform:rotate(-90deg); transform: rotate(-90deg);}
|
||||
.table td.has-child > .plan-toggle > .icon:before {text-align: left;}
|
||||
.table td.has-child > .plan-toggle.collapsed > .icon {-ms-transform:rotate(90deg); -moz-transform:rotate(90deg); -o-transform:rotate(90deg); -webkit-transform:rotate(90deg); transform: rotate(90deg);}
|
||||
.main-table tbody > tr.table-children > td:first-child::before {width: 3px;}
|
||||
@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;}}
|
||||
</style>
|
||||
<form class='main-table table-programplan' id='programplanForm' method='post'>
|
||||
<div class="table-header fixed-right">
|
||||
<nav class="btn-toolbar pull-right"></nav>
|
||||
</div>
|
||||
<?php
|
||||
$vars = "projectID=$projectID&productID=$productID&type=lists&orderBy=%s";
|
||||
$setting = $this->datatable->getSetting('programplan');
|
||||
$widths = $this->datatable->setFixedFieldWidth($setting);
|
||||
$widths['leftWidth'] = 300;
|
||||
$columns = 0;
|
||||
?>
|
||||
<table class='table has-sort-head' id='programplanList' data-fixed-left-width='<?php echo $widths['leftWidth']?>' data-fixed-right-width='<?php echo $widths['rightWidth']?>' data-checkbox-name='programplanList[]'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->programplan->name);?></th>
|
||||
<th class='w-90px'><?php common::printOrderLink('percent', $orderBy, $vars, $lang->programplan->percent);?></th>
|
||||
<th class='w-80px'><?php common::printOrderLink('attribute', $orderBy, $vars, $lang->programplan->attribute);?></th>
|
||||
<th class='w-90px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->programplan->begin);?></th>
|
||||
<th class='w-90px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->programplan->end);?></th>
|
||||
<th class='w-90px'><?php common::printOrderLink('realBegan', $orderBy, $vars, $lang->programplan->realBegan);?></th>
|
||||
<th class='w-90px'><?php common::printOrderLink('realEnd', $orderBy, $vars, $lang->programplan->realEnd);?></th>
|
||||
<th class='w-150px text-center'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($plans as $plan):?>
|
||||
<tr data-id='<?php echo $plan->id?>'>
|
||||
<?php foreach($setting as $key => $value) $this->programplan->printCell($value, $plan, $users, $projectID);?>
|
||||
</tr>
|
||||
<?php if(!empty($plan->children)):?>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($plan->children as $key => $child):?>
|
||||
<?php $class = $i == 0 ? ' table-child-top' : '';?>
|
||||
<?php $class .= ($i + 1 == count($plan->children)) ? ' table-child-bottom' : '';?>
|
||||
<tr class='table-children<?php echo $class;?> parent-<?php echo $plan->id;?>' data-id='<?php echo $child->id?>'>
|
||||
<?php foreach($setting as $key => $value) $this->programplan->printCell($value, $child, $users, $projectID);?>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<script>
|
||||
$(function(){$('#programplanForm').table();})
|
||||
$(document).on('click', '.plan-toggle', function(e)
|
||||
{
|
||||
var $toggle = $(this);
|
||||
var id = $(this).data('id');
|
||||
var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed');
|
||||
$toggle.closest('[data-ride="table"]').find('tr.parent-' + id).toggle(!isCollapsed);
|
||||
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
});
|
||||
</script>
|
||||
@@ -1427,10 +1427,18 @@ class projectModel extends model
|
||||
{
|
||||
$canOrder = common::hasPriv('project', 'updateOrder');
|
||||
$canBatchEdit = common::hasPriv('project', 'batchEdit');
|
||||
$projectLink = $this->config->systemMode == 'new' ? helper::createLink('project', 'index', "projectID=$project->id", '', '', $project->id) : helper::createLink('execution', 'task', "projectID=$project->id");
|
||||
$account = $this->app->user->account;
|
||||
$id = $col->id;
|
||||
|
||||
if($project->model == 'waterfall')
|
||||
{
|
||||
$projectLink = helper::createLink('programplan', 'browse', "projectID=$project->id&productID=0&type=lists", '', '', $project->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$projectLink = $this->config->systemMode == 'new' ? helper::createLink('project', 'index', "projectID=$project->id", '', '', $project->id) : helper::createLink('execution', 'task', "projectID=$project->id");
|
||||
}
|
||||
|
||||
if($col->show)
|
||||
{
|
||||
$title = '';
|
||||
@@ -1480,11 +1488,8 @@ class projectModel extends model
|
||||
case 'name':
|
||||
$prefix = '';
|
||||
$suffix = '';
|
||||
if(isset($this->config->maxVersion))
|
||||
{
|
||||
if($project->model === 'waterfall') $prefix = "<span class='project-type-label label label-outline label-warning'>{$this->lang->project->waterfall}</span> ";
|
||||
if($project->model === 'scrum') $prefix = "<span class='project-type-label label label-outline label-info'>{$this->lang->project->scrum}</span> ";
|
||||
}
|
||||
if($project->model === 'waterfall') $prefix = "<span class='project-type-label label label-outline label-warning'>{$this->lang->project->waterfall}</span> ";
|
||||
if($project->model === 'scrum') $prefix = "<span class='project-type-label label label-outline label-info'>{$this->lang->project->scrum}</span> ";
|
||||
if(isset($project->delay)) $suffix = "<span class='label label-danger label-badge'>{$this->lang->project->statusList['delay']}</span>";
|
||||
if(!empty($suffix) || !empty($prefix)) echo '<div class="project-name' . (empty($prefix) ? '' : ' has-prefix') . (empty($suffix) ? '' : ' has-suffix') . '">';
|
||||
if(!empty($prefix)) echo $prefix;
|
||||
@@ -1938,6 +1943,15 @@ class projectModel extends model
|
||||
global $lang;
|
||||
$project = $this->getByID($objectID);
|
||||
|
||||
if(isset($project->model) and $project->model == 'waterfall')
|
||||
{
|
||||
global $lang;
|
||||
$this->loadModel('execution');
|
||||
$lang->executionCommon = $lang->project->stage;
|
||||
|
||||
include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php';
|
||||
}
|
||||
|
||||
$model = 'scrum';
|
||||
if($project) $model = $project->model;
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<?php echo html::a('#',"<i class='icon-cards-view'></i> ", '', "class='btn btn-icon' title='{$lang->project->bycard}' id='switchButton' data-type='bycard'");?>
|
||||
</div>
|
||||
<?php common::printLink('project', 'export', "status=$browseType&orderBy=$orderBy", "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export'")?>
|
||||
<?php if(isset($this->config->maxVersion) and !defined('TUTORIAL')):?>
|
||||
<?php if(!defined('TUTORIAL')):?>
|
||||
<?php common::printLink('project', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->project->create, '', 'class="btn btn-primary create-project-btn" data-toggle="modal"');?>
|
||||
<?php else:?>
|
||||
<?php common::printLink('project', 'create', "mode=scrum&programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->project->create, '', 'class="btn btn-primary create-project-btn"');?>
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->project->empty;?></span>
|
||||
<?php if(isset($this->config->maxVersion) and !defined('TUTORIAL')):?>
|
||||
<?php if(!defined('TUTORIAL')):?>
|
||||
<?php common::printLink('project', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->project->create, '', 'class="btn btn-info" data-toggle="modal"');?>
|
||||
<?php elseif($this->config->systemMode == 'new'):?>
|
||||
<?php common::printLink('project', 'create', "mode=scrum&programID=$programID", '<i class="icon icon-plus"></i> ' . $lang->project->create, '', 'class="btn btn-info"');?>
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
<?php
|
||||
/**
|
||||
* The control file of stage currentModule of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: control.php 5107 2013-07-12 01:46:12Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class stage extends control
|
||||
{
|
||||
/**
|
||||
* Browse stages.
|
||||
*
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($orderBy = "id_asc")
|
||||
{
|
||||
$this->view->stages = $this->stage->getStages($orderBy);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->title = $this->lang->stage->common . $this->lang->colon . $this->lang->stage->browse;
|
||||
$this->view->position[] = $this->lang->stage->common;
|
||||
$this->view->position[] = $this->lang->stage->browse;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a stage.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$stageID = $this->stage->create();
|
||||
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
if(!$stageID)
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->loadModel('action')->create('stage', $stageID, 'Opened');
|
||||
$response['locate'] = inlink('browse');
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stage->common . $this->lang->colon . $this->lang->stage->create;
|
||||
$this->view->position[] = $this->lang->stage->common;
|
||||
$this->view->position[] = $this->lang->stage->create;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch create stages.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchCreate()
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->stage->batchCreate();
|
||||
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$response['locate'] = inlink('browse');
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stage->common . $this->lang->colon . $this->lang->stage->batchCreate;
|
||||
$this->view->position[] = $this->lang->stage->common;
|
||||
$this->view->position[] = $this->lang->stage->batchCreate;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a stage.
|
||||
*
|
||||
* @param int $stageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit($stageID = 0)
|
||||
{
|
||||
$stage = $this->stage->getByID($stageID);
|
||||
if($_POST)
|
||||
{
|
||||
$changes = $this->stage->update($stageID);
|
||||
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = $this->lang->saveSuccess;
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$actionID = $this->loadModel('action')->create('stage', $stageID, 'Edited');
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
$response['locate'] = inlink('browse');
|
||||
return $this->send($response);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stage->common . $this->lang->colon . $this->lang->stage->edit;
|
||||
$this->view->position[] = $this->lang->stage->common;
|
||||
$this->view->position[] = $this->lang->stage->edit;
|
||||
$this->view->stage = $stage;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set type.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setType()
|
||||
{
|
||||
$this->loadModel('custom');
|
||||
if($_POST)
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$this->custom->deleteItems("lang=all&module=stage§ion=typeList");
|
||||
foreach($data->keys as $index => $key)
|
||||
{
|
||||
$value = $data->values[$index];
|
||||
if(!$value or !$key) continue;
|
||||
$this->custom->setItem("all.stage.typeList.{$key}", $value);
|
||||
}
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('stage', 'settype')));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->stage->common . $this->lang->colon . $this->lang->stage->setType;
|
||||
$this->view->position[] = $this->lang->stage->common;
|
||||
$this->view->position[] = $this->lang->stage->setType;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a stage.
|
||||
*
|
||||
* @param int $stageID
|
||||
* @param string $confirm
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($stageID, $confirm = 'no')
|
||||
{
|
||||
$stage = $this->stage->getById($stageID);
|
||||
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->stage->confirmDelete, inlink('delete', "stageID=$stageID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->stage->delete(TABLE_STAGE, $stageID);
|
||||
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<script> $('#toList').closest('tr').remove(); </script>
|
||||
@@ -0,0 +1 @@
|
||||
<script> $('#toList').closest('tr').remove(); </script>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* The stage module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: en.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* Actions. */
|
||||
$lang->stage->browse = 'Stage List';
|
||||
$lang->stage->create = 'Create Stage';
|
||||
$lang->stage->batchCreate = 'Batch Create';
|
||||
$lang->stage->edit = 'Edit';
|
||||
$lang->stage->delete = 'Delete';
|
||||
$lang->stage->view = 'Details';
|
||||
|
||||
/* Fields. */
|
||||
$lang->stage->common = 'Stage';
|
||||
$lang->stage->id = 'ID';
|
||||
$lang->stage->name = 'Name';
|
||||
$lang->stage->type = 'Type';
|
||||
$lang->stage->percent = 'Workload %';
|
||||
$lang->stage->setType = 'Set Type';
|
||||
|
||||
$lang->stage->typeList['request'] = 'Story';
|
||||
$lang->stage->typeList['design'] = 'Design';
|
||||
$lang->stage->typeList['dev'] = 'Development';
|
||||
$lang->stage->typeList['qa'] = 'Test';
|
||||
$lang->stage->typeList['release'] = 'Release';
|
||||
$lang->stage->typeList['review'] = 'Review';
|
||||
$lang->stage->typeList['other'] = 'Other';
|
||||
|
||||
$lang->stage->viewList = 'Stage List';
|
||||
$lang->stage->noStage = 'No stage yet';
|
||||
$lang->stage->confirmDelete = 'Do you want to delete it?';
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* The stage module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: en.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* Actions. */
|
||||
$lang->stage->browse = 'Stage List';
|
||||
$lang->stage->create = 'Create Stage';
|
||||
$lang->stage->batchCreate = 'Batch Create';
|
||||
$lang->stage->edit = 'Edit';
|
||||
$lang->stage->delete = 'Delete';
|
||||
$lang->stage->view = 'Details';
|
||||
|
||||
/* Fields. */
|
||||
$lang->stage->common = 'Stage';
|
||||
$lang->stage->id = 'ID';
|
||||
$lang->stage->name = 'Name';
|
||||
$lang->stage->type = 'Type';
|
||||
$lang->stage->percent = 'Workload %';
|
||||
$lang->stage->setType = 'Set Type';
|
||||
|
||||
$lang->stage->typeList['request'] = 'Story';
|
||||
$lang->stage->typeList['design'] = 'Design';
|
||||
$lang->stage->typeList['dev'] = 'Development';
|
||||
$lang->stage->typeList['qa'] = 'Test';
|
||||
$lang->stage->typeList['release'] = 'Release';
|
||||
$lang->stage->typeList['review'] = 'Review';
|
||||
$lang->stage->typeList['other'] = 'Other';
|
||||
|
||||
$lang->stage->viewList = 'Stage List';
|
||||
$lang->stage->noStage = 'No stage yet';
|
||||
$lang->stage->confirmDelete = 'Do you want to delete it?';
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* The stage module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: en.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* Actions. */
|
||||
$lang->stage->browse = 'Stage List';
|
||||
$lang->stage->create = 'Create Stage';
|
||||
$lang->stage->batchCreate = 'Batch Create';
|
||||
$lang->stage->edit = 'Edit';
|
||||
$lang->stage->delete = 'Delete';
|
||||
$lang->stage->view = 'Details';
|
||||
|
||||
/* Fields. */
|
||||
$lang->stage->common = 'Stage';
|
||||
$lang->stage->id = 'ID';
|
||||
$lang->stage->name = 'Name';
|
||||
$lang->stage->type = 'Type';
|
||||
$lang->stage->percent = 'Workload %';
|
||||
$lang->stage->setType = 'Set Type';
|
||||
|
||||
$lang->stage->typeList['request'] = 'Story';
|
||||
$lang->stage->typeList['design'] = 'Design';
|
||||
$lang->stage->typeList['dev'] = 'Development';
|
||||
$lang->stage->typeList['qa'] = 'Test';
|
||||
$lang->stage->typeList['release'] = 'Release';
|
||||
$lang->stage->typeList['review'] = 'Review';
|
||||
$lang->stage->typeList['other'] = 'Other';
|
||||
|
||||
$lang->stage->viewList = 'Stage List';
|
||||
$lang->stage->noStage = 'No stage yet';
|
||||
$lang->stage->confirmDelete = 'Do you want to delete it?';
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* The stage module English file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: en.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* Actions. */
|
||||
$lang->stage->browse = 'Stage List';
|
||||
$lang->stage->create = 'Create Stage';
|
||||
$lang->stage->batchCreate = 'Batch Create';
|
||||
$lang->stage->edit = 'Edit';
|
||||
$lang->stage->delete = 'Delete';
|
||||
$lang->stage->view = 'Details';
|
||||
|
||||
/* Fields. */
|
||||
$lang->stage->common = 'Stage';
|
||||
$lang->stage->id = 'ID';
|
||||
$lang->stage->name = 'Name';
|
||||
$lang->stage->type = 'Type';
|
||||
$lang->stage->percent = 'Workload %';
|
||||
$lang->stage->setType = 'Set Type';
|
||||
|
||||
$lang->stage->typeList['request'] = 'Story';
|
||||
$lang->stage->typeList['design'] = 'Design';
|
||||
$lang->stage->typeList['dev'] = 'Development';
|
||||
$lang->stage->typeList['qa'] = 'Test';
|
||||
$lang->stage->typeList['release'] = 'Release';
|
||||
$lang->stage->typeList['review'] = 'Review';
|
||||
$lang->stage->typeList['other'] = 'Other';
|
||||
|
||||
$lang->stage->viewList = 'Stage List';
|
||||
$lang->stage->noStage = 'No stage yet';
|
||||
$lang->stage->confirmDelete = 'Do you want to delete it?';
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* The stage module zh-cn file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: zh-cn.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* Actions. */
|
||||
$lang->stage->browse = '阶段列表';
|
||||
$lang->stage->create = '新建';
|
||||
$lang->stage->batchCreate = '批量新建';
|
||||
$lang->stage->edit = '编辑';
|
||||
$lang->stage->delete = '删除';
|
||||
$lang->stage->view = '阶段详情';
|
||||
|
||||
/* Fields. */
|
||||
$lang->stage->common = '阶段';
|
||||
$lang->stage->id = '编号';
|
||||
$lang->stage->name = '阶段名称';
|
||||
$lang->stage->type = '阶段分类';
|
||||
$lang->stage->percent = '工作量占比';
|
||||
$lang->stage->setType = '阶段类型';
|
||||
|
||||
$lang->stage->typeList['request'] = '需求';
|
||||
$lang->stage->typeList['design'] = '设计';
|
||||
$lang->stage->typeList['dev'] = '开发';
|
||||
$lang->stage->typeList['qa'] = '测试';
|
||||
$lang->stage->typeList['release'] = '发布';
|
||||
$lang->stage->typeList['review'] = '总结评审';
|
||||
$lang->stage->typeList['other'] = '其他';
|
||||
|
||||
$lang->stage->viewList = '浏览列表';
|
||||
$lang->stage->noStage = '暂时没有阶段';
|
||||
$lang->stage->confirmDelete = '您确定要执行删除操作吗?';
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* The stage module zh-tw file of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青島易軟天創網絡科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: zh-tw.php 4729 2013-05-03 07:53:55Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
/* Actions. */
|
||||
$lang->stage->browse = '階段列表';
|
||||
$lang->stage->create = '新建';
|
||||
$lang->stage->batchCreate = '批量新建';
|
||||
$lang->stage->edit = '編輯';
|
||||
$lang->stage->delete = '刪除';
|
||||
$lang->stage->view = '階段詳情';
|
||||
|
||||
/* Fields. */
|
||||
$lang->stage->common = '階段';
|
||||
$lang->stage->id = '編號';
|
||||
$lang->stage->name = '階段名稱';
|
||||
$lang->stage->type = '階段分類';
|
||||
$lang->stage->percent = '工作量占比';
|
||||
$lang->stage->setType = '階段類型';
|
||||
|
||||
$lang->stage->typeList['request'] = '需求';
|
||||
$lang->stage->typeList['design'] = '設計';
|
||||
$lang->stage->typeList['dev'] = '開發';
|
||||
$lang->stage->typeList['qa'] = '測試';
|
||||
$lang->stage->typeList['release'] = '發佈';
|
||||
$lang->stage->typeList['review'] = '總結評審';
|
||||
$lang->stage->typeList['other'] = '其他';
|
||||
|
||||
$lang->stage->viewList = '瀏覽列表';
|
||||
$lang->stage->noStage = '暫時沒有階段';
|
||||
$lang->stage->confirmDelete = '您確定要執行刪除操作嗎?';
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of stage module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: model.php 5079 2013-07-10 00:44:34Z chencongzhi520@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php
|
||||
class stageModel extends model
|
||||
{
|
||||
/**
|
||||
* Create a stage.
|
||||
*
|
||||
* @access public
|
||||
* @return int|bool
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$stage = fixer::input('post')
|
||||
->add('createdBy', $this->app->user->account)
|
||||
->add('createdDate', helper::today())
|
||||
->get();
|
||||
|
||||
$this->dao->insert(TABLE_STAGE)->data($stage)->autoCheck()->exec();
|
||||
|
||||
if(!dao::isError()) return $this->dao->lastInsertID();
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch create stages.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function batchCreate()
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
|
||||
$this->loadModel('action');
|
||||
foreach($data->name as $i => $name)
|
||||
{
|
||||
if(!$name) continue;
|
||||
|
||||
$stage = new stdclass();
|
||||
$stage->name = $name;
|
||||
$stage->percent = $data->percent[$i];
|
||||
$stage->type = $data->type[$i];
|
||||
$stage->createdBy = $this->app->user->account;
|
||||
$stage->createdDate = helper::today();
|
||||
|
||||
$this->dao->insert(TABLE_STAGE)->data($stage)->autoCheck()->exec();
|
||||
|
||||
$stageID = $this->dao->lastInsertID();
|
||||
$this->action->create('stage', $stageID, 'Opened');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a stage.
|
||||
*
|
||||
* @param int $stageID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function update($stageID)
|
||||
{
|
||||
$oldStage = $this->dao->select('*')->from(TABLE_STAGE)->where('id')->eq((int)$stageID)->fetch();
|
||||
|
||||
$stage = fixer::input('post')
|
||||
->add('editedBy', $this->app->user->account)
|
||||
->add('editedDate', helper::today())
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_STAGE)->data($stage)->autoCheck()->where('id')->eq((int)$stageID)->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldStage, $stage);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get stages.
|
||||
*
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStages($orderBy = 'id_desc')
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_STAGE)->where('deleted')->eq(0)->orderBy($orderBy)->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pairs of stage.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPairs()
|
||||
{
|
||||
$stages = $this->getStages();
|
||||
|
||||
$pairs = array();
|
||||
foreach($stages as $stageID => $stage)
|
||||
{
|
||||
$pairs[$stageID] = $stage->name;
|
||||
}
|
||||
|
||||
return $pairs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a stage by id.
|
||||
*
|
||||
* @param int $stageID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getByID($stageID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_STAGE)->where('deleted')->eq(0)->andWhere('id')->eq((int)$stageID)->fetch();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* The batchCreate view of stage module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: batchCreate.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->stage->batchCreate;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->stage->id;?></th>
|
||||
<th><?php echo $lang->stage->name;?></th>
|
||||
<th class='w-200px'><?php echo $lang->stage->percent;?></th>
|
||||
<th class='w-200px'><?php echo $lang->stage->type;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for($i = 1; $i <= 10; $i ++):?>
|
||||
<tr>
|
||||
<td><?php echo $i;?></td>
|
||||
<td><?php echo html::input("name[$i]", '', "class='form-control'");?></td>
|
||||
<td><?php echo html::input("percent[$i]", '', "class='form-control'");?></td>
|
||||
<td><?php echo html::select("type[$i]", $lang->stage->typeList, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endfor;?>
|
||||
<tr>
|
||||
<td colspan='4' class='form-actions text-center'>
|
||||
<?php echo html::submitButton() . html::backButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* The browse view of stage module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: browse.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('stage', 'batchCreate', "", "<i class='icon icon-plus'></i>" . $lang->stage->batchCreate, '', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('stage', 'create', "", "<i class='icon icon-plus'></i>" . $lang->stage->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class='main-row'>
|
||||
<?php if(empty($stages)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->stage->noStage;?></span>
|
||||
<?php if(common::hasPriv('stage', 'create')):?>
|
||||
<?php echo html::a($this->createLink('stage', 'create'), "<i class='icon icon-plus'></i> " . $lang->stage->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='side-col'>
|
||||
<div class='panel'>
|
||||
<div class='panel-body'>
|
||||
<div class="list-group">
|
||||
<?php echo html::a(inlink('setType'), $lang->stage->setType);?>
|
||||
<?php echo html::a(inlink('browse'), $lang->stage->browse, '', "class='selected'");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main-col main-table'>
|
||||
<table class="table has-sort-head" id='stageList'>
|
||||
<?php $vars = "orderBy=%s";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='text-left w-60px'><?php common::printOrderLink('id', $orderBy, $vars, $lang->stage->id);?></th>
|
||||
<th class='text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->stage->name);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('percent', $orderBy, $vars, $lang->stage->percent);?></th>
|
||||
<th class='w-120px'><?php common::printOrderLink('type', $orderBy, $vars, $lang->stage->type);?></th>
|
||||
<th class='w-120px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($stages as $stage):?>
|
||||
<tr>
|
||||
<td><?php echo $stage->id;?></td>
|
||||
<td><?php echo $stage->name;?></td>
|
||||
<td class='text-center'><?php echo $stage->percent;?></td>
|
||||
<td><?php echo zget($lang->stage->typeList, $stage->type);?></td>
|
||||
<td class="c-actions">
|
||||
<?php
|
||||
common::printIcon('stage', 'edit', "stageID=$stage->id", "", "list");
|
||||
common::printIcon('stage', 'delete', "stageID=$stage->id", "", "list", '', 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* The create view of stage module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: create.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->stage->create;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->stage->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control'");?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->stage->percent;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('percent', '', "class='form-control'");?>
|
||||
<span class='input-group-addon'>%</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->stage->type;?></th>
|
||||
<td><?php echo html::select('type', $lang->stage->typeList, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan='3' class='form-actions'>
|
||||
<?php echo html::submitButton() . html::backButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* The edit view of stage module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: edit.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->stage->edit;?></h2>
|
||||
</div>
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?php echo $lang->stage->name;?></th>
|
||||
<td><?php echo html::input('name', $stage->name, "class='form-control'");?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->stage->percent;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('percent', $stage->percent, "class='form-control'");?>
|
||||
<span class='input-group-addon'>%</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->stage->type;?></th>
|
||||
<td><?php echo html::select('type', $lang->stage->typeList, $stage->type, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan='3' class='form-actions'>
|
||||
<?php echo html::submitButton() . html::backButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
* The setType view of stage module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @package stage
|
||||
* @version $Id: setType.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php
|
||||
$itemRow = <<<EOT
|
||||
<tr class='text-left'>
|
||||
<td>
|
||||
<input type='text' class="form-control" autocomplete="off" value="" name="keys[]">
|
||||
</td>
|
||||
<td>
|
||||
<input type='text' class="form-control" value="" autocomplete="off" name="values[]">
|
||||
</td>
|
||||
<td class='c-actions'>
|
||||
<a href="javascript:void(0)" class='btn btn-link' onclick="addItem(this)"><i class='icon-plus'></i></a>
|
||||
<a href="javascript:void(0)" class='btn btn-link' onclick="delItem(this)"><i class='icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
EOT;
|
||||
?>
|
||||
<?php js::set('itemRow', $itemRow)?>
|
||||
<div id='mainContent' class='main-row'>
|
||||
<div class='side-col'>
|
||||
<div class='panel'>
|
||||
<div class='panel-body'>
|
||||
<div class="list-group">
|
||||
<?php echo html::a(inlink('setType'), $lang->stage->setType, '', "class='selected'");?>
|
||||
<?php echo html::a(inlink('browse'), $lang->stage->browse);?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main-col main-content'>
|
||||
<form class="load-indicator main-form form-ajax" method='post'>
|
||||
<table class='table table-form active-disabled table-condensed mw-600px'>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-70px'><?php echo $lang->custom->key;?></th>
|
||||
<th class='w-250px'><?php echo $lang->custom->value;?></th>
|
||||
<th class='w-100px'></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($lang->stage->typeList as $key => $value):?>
|
||||
<tr class='text-center'>
|
||||
<td class='w-70px'>
|
||||
<?php echo $key;?>
|
||||
<?php echo html::hidden('keys[]', $key) ?>
|
||||
</td>
|
||||
<td class='w-200px'><?php echo html::input('values[]', $value, 'class="form-control"');?></td>
|
||||
<td class='c-actions text-left'>
|
||||
<a href="javascript:void(0)" onclick="addItem(this)" class='btn btn-link'><i class='icon-plus'></i></a>
|
||||
<a href="javascript:void(0)" class='btn btn-link' onclick="delItem(this)"><i class='icon-close'></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan='2' class='form-actions'><?php echo html::submitButton() . html::backButton();?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function addItem(clickedButton)
|
||||
{
|
||||
$(clickedButton).parent().parent().after(itemRow);
|
||||
}
|
||||
|
||||
function delItem(clickedButton)
|
||||
{
|
||||
$(clickedButton).parent().parent().remove();
|
||||
}
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user