diff --git a/config/zentaopms.php b/config/zentaopms.php
index cb771acdae..cc41d94abd 100644
--- a/config/zentaopms.php
+++ b/config/zentaopms.php
@@ -194,7 +194,6 @@ if(!defined('TABLE_PROJECTSPEC')) define('TABLE_PROJECTSPEC', '`' . $conf
if(!defined('TABLE_WORKESTIMATION')) define('TABLE_WORKESTIMATION', '`' . $config->db->prefix . 'workestimation`');
if(!defined('TABLE_DURATIONESTIMATION')) define('TABLE_DURATIONESTIMATION', '`' . $config->db->prefix . 'durationestimation`');
if(!defined('TABLE_BUDGET')) define('TABLE_BUDGET', '`' . $config->db->prefix . 'budget`');
-if(!defined('TABLE_WEEKLYREPORT')) define('TABLE_WEEKLYREPORT', '`' . $config->db->prefix . 'weeklyreport`');
if(!defined('TABLE_SEARCHINDEX')) define('TABLE_SEARCHINDEX', $config->db->prefix . 'searchindex');
if(!defined('TABLE_SEARCHDICT')) define('TABLE_SEARCHDICT', $config->db->prefix . 'searchdict');
diff --git a/db/update15.0.sql b/db/update15.0.sql
index 93a571ed31..2e54dbd49b 100644
--- a/db/update15.0.sql
+++ b/db/update15.0.sql
@@ -277,22 +277,6 @@ CREATE TABLE IF NOT EXISTS `zt_taskspec` (
UNIQUE KEY `task` (`task`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-CREATE TABLE IF NOT EXISTS `zt_weeklyreport`(
- `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
- `PRJ` mediumint(8) unsigned NOT NULL,
- `weekStart` date NOT NULL,
- `pv` float(9,2) NOT NULL,
- `ev` float(9,2) NOT NULL,
- `ac` float(9,2) NOT NULL,
- `sv` float(9,2) NOT NULL,
- `cv` float(9,2) NOT NULL,
- `staff` smallint(5) unsigned NOT NULL,
- `progress` varchar(255) NOT NULL,
- `workload` varchar(255) NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `week` (`PRJ`,`weekStart`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
ALTER TABLE `zt_block` ADD `type` char(30) NOT NULL AFTER `module`;
ALTER TABLE `zt_block` ADD UNIQUE `account_module_type_order` (`account`, `module`, `type`, `order`), DROP INDEX `accountModuleOrder`;
diff --git a/db/zentao.sql b/db/zentao.sql
index 97642c2490..911f168876 100644
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -1363,22 +1363,6 @@ CREATE TABLE IF NOT EXISTS `zt_webhook` (
`deleted` enum('0', '1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--- DROP TABLE IF EXISTS `zt_weeklyreport`;
-CREATE TABLE IF NOT EXISTS `zt_weeklyreport`(
- `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
- `PRJ` mediumint(8) unsigned NOT NULL,
- `weekStart` date NOT NULL,
- `pv` float(9,2) NOT NULL,
- `ev` float(9,2) NOT NULL,
- `ac` float(9,2) NOT NULL,
- `sv` float(9,2) NOT NULL,
- `cv` float(9,2) NOT NULL,
- `staff` smallint(5) unsigned NOT NULL,
- `progress` varchar(255) NOT NULL,
- `workload` varchar(255) NOT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `week` (`PRJ`,`weekStart`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- DROP TABLE IF EXISTS `zt_workestimation`;
CREATE TABLE `zt_workestimation` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
diff --git a/module/block/control.php b/module/block/control.php
index 665b2212aa..06377dddb3 100644
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -856,7 +856,7 @@ class block extends control
}
$today = helper::today();
- $monday = date('Ymd', strtotime($this->loadModel('weekly')->getThisMonday($today)));
+ if(isset($this->config->maxVersion)) $monday = date('Ymd', strtotime($this->loadModel('weekly')->getThisMonday($today)));
$tasks = $this->dao->select("PRJ,
sum(consumed) as totalConsumed,
sum(if(status != 'cancel' and status != 'closed', `left`, 0)) as totalLeft")
@@ -874,7 +874,7 @@ class block extends control
$project->progress = $project->allStories == 0 ? 0 : round($project->doneStories / $project->allStories, 3) * 100;
$project->executions = $this->project->getExecutionStats($projectID, 'all', 0, 0, 30, 'id_asc');
}
- elseif($project->model == 'waterfall')
+ elseif($project->model == 'waterfall' and isset($this->config->maxVersion))
{
$begin = $project->begin;
$weeks = $this->weekly->getWeekPairs($begin);
@@ -1672,8 +1672,8 @@ class block extends control
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true;
- if(common::hasPriv('risk', 'view')) $hasViewPriv['risk'] = true;
- if(common::hasPriv('issue', 'view')) $hasViewPriv['issue'] = true;
+ if(common::hasPriv('risk', 'view') and isset($this->config->maxVersion)) $hasViewPriv['risk'] = true;
+ if(common::hasPriv('issue', 'view') and isset($this->config->maxVersion)) $hasViewPriv['issue'] = true;
if(common::hasPriv('story', 'view')) $hasViewPriv['story'] = true;
$params = $this->get->param;
diff --git a/module/block/view/contribute.html.php b/module/block/view/contribute.html.php
index e384b1051e..97858ccb15 100644
--- a/module/block/view/contribute.html.php
+++ b/module/block/view/contribute.html.php
@@ -30,6 +30,7 @@
block->createdDocs;?>
diff --git a/module/common/lang/de.php b/module/common/lang/de.php
index d90d8ba216..b4eb551631 100644
--- a/module/common/lang/de.php
+++ b/module/common/lang/de.php
@@ -680,7 +680,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
-$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -935,16 +934,8 @@ $lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-$lang->scrum = new stdclass();
-$lang->scrum->subMenu = new stdclass();
-$lang->scrum->subMenu->other = new stdclass();
-$lang->scrum->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
-$lang->scrum->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
-$lang->scrum->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
-
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => 'View|program|prjview|project={PROJECT}');
$lang->scrum->setMenu->products = array('link' => 'Product|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -952,40 +943,11 @@ $lang->scrum->setMenu->group = array('link' => 'Priv Group|program|PRJGroup|
$lang->scrum->setMenu->members = array('link' => 'Member|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
-/* Waterfall menu. */
-$lang->menu->waterfall = new stdclass();
-$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
-$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
-$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
-$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
-$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
-$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
-$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
-$lang->menu->waterfall->ci = 'Code|repo|browse|';
-$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
-$lang->menu->waterfall->qa = 'Index|qa|index';
-$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
-$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
-$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-
-$lang->waterfall = new stdclass();
-$lang->waterfall->subMenu = new stdclass();
-$lang->waterfall->subMenu->other = new stdclass();
-$lang->waterfall->subMenu->other->estimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
-$lang->waterfall->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
-$lang->waterfall->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
-$lang->waterfall->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
-
-$lang->waterfall->setMenu = new stdclass();
-$lang->waterfall->setMenu = $lang->scrum->setMenu;
-
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
-$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1002,7 +964,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
-$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index 608e51e436..b75d99008e 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -680,7 +680,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
-$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -935,16 +934,8 @@ $lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-$lang->scrum = new stdclass();
-$lang->scrum->subMenu = new stdclass();
-$lang->scrum->subMenu->other = new stdclass();
-$lang->scrum->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
-$lang->scrum->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
-$lang->scrum->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
-
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => 'View|program|prjview|project={PROJECT}');
$lang->scrum->setMenu->products = array('link' => 'Product|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -952,40 +943,11 @@ $lang->scrum->setMenu->group = array('link' => 'Priv Group|program|PRJGroup|
$lang->scrum->setMenu->members = array('link' => 'Member|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
-/* Waterfall menu. */
-$lang->menu->waterfall = new stdclass();
-$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
-$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
-$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
-$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
-$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
-$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
-$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
-$lang->menu->waterfall->ci = 'Code|repo|browse|';
-$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
-$lang->menu->waterfall->qa = 'Index|qa|index';
-$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
-$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
-$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-
-$lang->waterfall = new stdclass();
-$lang->waterfall->subMenu = new stdclass();
-$lang->waterfall->subMenu->other = new stdclass();
-$lang->waterfall->subMenu->other->estimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
-$lang->waterfall->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
-$lang->waterfall->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
-$lang->waterfall->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
-
-$lang->waterfall->setMenu = new stdclass();
-$lang->waterfall->setMenu = $lang->scrum->setMenu;
-
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
-$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1002,7 +964,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
-$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php
index 49c63f9628..70d5edfbbf 100644
--- a/module/common/lang/fr.php
+++ b/module/common/lang/fr.php
@@ -680,7 +680,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
-$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -935,16 +934,8 @@ $lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-$lang->scrum = new stdclass();
-$lang->scrum->subMenu = new stdclass();
-$lang->scrum->subMenu->other = new stdclass();
-$lang->scrum->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
-$lang->scrum->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
-$lang->scrum->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
-
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => 'View|program|prjview|project={PROJECT}');
$lang->scrum->setMenu->products = array('link' => 'Product|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -952,40 +943,11 @@ $lang->scrum->setMenu->group = array('link' => 'Priv Group|program|PRJGroup|
$lang->scrum->setMenu->members = array('link' => 'Member|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
-/* Waterfall menu. */
-$lang->menu->waterfall = new stdclass();
-$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
-$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
-$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
-$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
-$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
-$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
-$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
-$lang->menu->waterfall->ci = 'Code|repo|browse|';
-$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
-$lang->menu->waterfall->qa = 'Index|qa|index';
-$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
-$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
-$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-
-$lang->waterfall = new stdclass();
-$lang->waterfall->subMenu = new stdclass();
-$lang->waterfall->subMenu->other = new stdclass();
-$lang->waterfall->subMenu->other->estimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
-$lang->waterfall->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
-$lang->waterfall->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
-$lang->waterfall->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
-
-$lang->waterfall->setMenu = new stdclass();
-$lang->waterfall->setMenu = $lang->scrum->setMenu;
-
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
-$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1002,7 +964,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
-$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
diff --git a/module/common/lang/menuOrder.php b/module/common/lang/menuOrder.php
index f54219a715..88ddd327d5 100644
--- a/module/common/lang/menuOrder.php
+++ b/module/common/lang/menuOrder.php
@@ -22,7 +22,6 @@ $lang->waterfall->menuOrder[40] = 'qa';
$lang->waterfall->menuOrder[45] = 'doc';
$lang->waterfall->menuOrder[50] = 'projectbuild';
$lang->waterfall->menuOrder[55] = 'projectrelease';
-$lang->waterfall->menuOrder[60] = 'weekly';
$lang->waterfall->menuOrder[65] = 'other';
$lang->waterfall->menuOrder[70] = 'projectsetting';
diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php
index 4d87296cad..7115a32b9a 100644
--- a/module/common/lang/vi.php
+++ b/module/common/lang/vi.php
@@ -680,7 +680,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
-$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -935,16 +934,8 @@ $lang->menu->scrum->qa = 'QA|qa|index';
$lang->menu->scrum->ci = 'Code|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->scrum->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-$lang->scrum = new stdclass();
-$lang->scrum->subMenu = new stdclass();
-$lang->scrum->subMenu->other = new stdclass();
-$lang->scrum->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
-$lang->scrum->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
-$lang->scrum->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
-
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => 'View|program|prjview|project={PROJECT}');
$lang->scrum->setMenu->products = array('link' => 'Product|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -952,40 +943,11 @@ $lang->scrum->setMenu->group = array('link' => 'Priv Group|program|PRJGroup|
$lang->scrum->setMenu->members = array('link' => 'Member|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => 'White List|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
-/* Waterfall menu. */
-$lang->menu->waterfall = new stdclass();
-$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
-$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
-$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
-$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
-$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
-$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
-$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
-$lang->menu->waterfall->ci = 'Code|repo|browse|';
-$lang->menu->waterfall->track = array('link' => 'Track|projectstory|track', 'alias' => 'track');
-$lang->menu->waterfall->qa = 'Index|qa|index';
-$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse');
-$lang->menu->waterfall->projectbuild = array('link' => 'Build|projectbuild|browse|project={PROJECT}');
-$lang->menu->waterfall->other = array('link' => 'Other|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
-$lang->menu->waterfall->projectsetting = array('link' => 'Setting|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-
-$lang->waterfall = new stdclass();
-$lang->waterfall->subMenu = new stdclass();
-$lang->waterfall->subMenu->other = new stdclass();
-$lang->waterfall->subMenu->other->estimation = array('link' => 'Estimation|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
-$lang->waterfall->subMenu->other->issue = array('link' => 'Issue|issue|browse|', 'subModule' => 'issue');
-$lang->waterfall->subMenu->other->risk = array('link' => 'Risk|risk|browse|', 'subModule' => 'risk');
-$lang->waterfall->subMenu->other->stakeholder = array('link' => 'Stakeholder|stakeholder|browse|', 'subModule' => 'stakeholder');
-
-$lang->waterfall->setMenu = new stdclass();
-$lang->waterfall->setMenu = $lang->scrum->setMenu;
-
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
-$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1002,7 +964,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
-$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index 84bc24bc62..568b33220a 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -678,7 +678,6 @@ $lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
$lang->navGroup->review = 'project';
$lang->navGroup->reviewissue = 'project';
-$lang->navGroup->weekly = 'project';
$lang->navGroup->milestone = 'project';
$lang->navGroup->pssp = 'project';
$lang->navGroup->design = 'project';
@@ -933,16 +932,8 @@ $lang->menu->scrum->qa = '测试|qa|index';
$lang->menu->scrum->ci = '代码|repo|browse';
$lang->menu->scrum->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
$lang->menu->scrum->projectrelease = array('link' => '发布|projectrelease|browse');
-$lang->menu->scrum->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder');
$lang->menu->scrum->projectsetting = array('link' => '设置|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-$lang->scrum = new stdclass();
-$lang->scrum->subMenu = new stdclass();
-$lang->scrum->subMenu->other = new stdclass();
-$lang->scrum->subMenu->other->issue = array('link' => '问题|issue|browse|', 'subModule' => 'issue');
-$lang->scrum->subMenu->other->risk = array('link' => '风险|risk|browse|', 'subModule' => 'risk');
-$lang->scrum->subMenu->other->stakeholder = array('link' => '干系人|stakeholder|browse|', 'subModule' => 'stakeholder');
-
$lang->scrum->setMenu = new stdclass();
$lang->scrum->setMenu->view = array('link' => '概况|program|prjview|project={PROJECT}', 'alias' => 'prjedit');
$lang->scrum->setMenu->products = array('link' => '产品|program|PRJManageProducts|project={PROJECT}', 'alias' => 'prjmanageproducts');
@@ -950,40 +941,11 @@ $lang->scrum->setMenu->group = array('link' => '权限|program|PRJGroup
$lang->scrum->setMenu->members = array('link' => '团队|program|PRJManageMembers|project={PROJECT}', 'alias' => 'prjmanagemembers');
$lang->scrum->setMenu->whitelist = array('link' => '白名单|program|PRJWhitelist|project={PROJECT}', 'subModule' => 'personnel');
-/* Waterfall menu. */
-$lang->menu->waterfall = new stdclass();
-$lang->menu->waterfall->programindex = array('link' => '仪表盘|program|index|project={PROJECT}');
-$lang->menu->waterfall->programplan = array('link' => '计划|programplan|browse|project={PROJECT}', 'subModule' => 'programplan');
-$lang->menu->waterfall->project = array('link' => $lang->executionCommon . '|project|task|executionID={EXECUTION}', 'subModule' => ',project,task,');
-$lang->menu->waterfall->doc = array('link' => '文档|doc|index|project={PROJECT}');
-$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|project={PROJECT}', 'subModule' => ',milestone,');
-$lang->menu->waterfall->projectstory = array('link' => $lang->SRCommon . '|projectstory|story');
-$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
-$lang->menu->waterfall->ci = '代码|repo|browse|';
-$lang->menu->waterfall->track = array('link' => '矩阵|projectstory|track', 'alias' => 'track');
-$lang->menu->waterfall->qa = '测试|qa|index';
-$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse');
-$lang->menu->waterfall->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
-$lang->menu->waterfall->other = array('link' => '其他|project|other', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'issue,risk,stakeholder,nc,workestimation,durationestimation,budget,pssp,measrecord,report');
-$lang->menu->waterfall->projectsetting = array('link' => '设置|program|prjview|project={PROJECT}', 'alias' => 'prjedit,prjmanageproducts,prjgroup,prjmanagemembers,prjmanageview,prjmanagepriv,prjwhitelist,prjaddwhitelist');
-
-$lang->waterfall = new stdclass();
-$lang->waterfall->subMenu = new stdclass();
-$lang->waterfall->subMenu->other = new stdclass();
-$lang->waterfall->subMenu->other->estimation = array('link' => '估算|workestimation|index|program=%s', 'subModule' => 'workestimation,durationestimation,budget');
-$lang->waterfall->subMenu->other->issue = array('link' => '问题|issue|browse|', 'subModule' => 'issue');
-$lang->waterfall->subMenu->other->risk = array('link' => '风险|risk|browse|', 'subModule' => 'risk');
-$lang->waterfall->subMenu->other->stakeholder = array('link' => '干系人|stakeholder|browse|', 'subModule' => 'stakeholder');
-
-$lang->waterfall->setMenu = new stdclass();
-$lang->waterfall->setMenu = $lang->scrum->setMenu;
-
$lang->waterfallproduct = new stdclass();
$lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
-$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1000,7 +962,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
-$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->design->menu = new stdclass();
$lang->auditplan->menu = new stdclass();
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php
index f5c345aac1..ec6ce63fd9 100644
--- a/module/group/lang/resource.php
+++ b/module/group/lang/resource.php
@@ -1156,10 +1156,6 @@ $lang->resource->subject->browse = 'browse';
$lang->subject->methodOrder[5] = 'browse';
-/* Weekly. */
-$lang->resource->weekly = new stdclass();
-$lang->resource->weekly->index = 'index';
-
/* Custom. */
$lang->resource->custom = new stdclass();
$lang->resource->custom->index = 'index';
diff --git a/module/weekly/control.php b/module/weekly/control.php
deleted file mode 100644
index afbd1bc95e..0000000000
--- a/module/weekly/control.php
+++ /dev/null
@@ -1,80 +0,0 @@
-
- * @package weekly
- * @version $Id$
- * @link http://www.zentao.net
- */
-class weekly extends control
-{
- /**
- * The construct function, load users.
- *
- * @access public
- * @return void
- */
-
- public function __construct()
- {
- parent::__construct();
- $this->view->users = $this->loadModel('user')->getPairs('noletter');
- }
-
- /**
- * Index
- *
- * @param int $program
- * @param string $date
- * @access public
- * @return void
- */
- public function index($program = 0, $date = '')
- {
- $program = $program ? $program : $this->session->PRJ;
- if(!$date) $date = helper::today();
- $date = date('Y-m-d', strtotime($date));
-
- $this->view->title = $this->lang->weekly->common;
-
- $this->view->pv = $this->weekly->getPV($program, $date);
- $this->view->ev = $this->weekly->getEV($program, $date);
- $this->view->ac = $this->weekly->getAC($program, $date);
- $this->view->sv = $this->weekly->getSV($this->view->ev, $this->view->pv);
- $this->view->cv = $this->weekly->getCV($this->view->ev, $this->view->ac);
-
- $this->view->program = $this->loadModel('program')->getPRJByID($program);
- $this->view->weekSN = $this->weekly->getWeekSN($this->view->program->begin, $date);
- $this->view->monday = $this->weekly->getThisMonday($date);
- $this->view->lastDay = $this->weekly->getLastDay($date);
- $this->view->staff = $this->weekly->getStaff($program);
- $this->view->finished = $this->weekly->getFinished($program);
- $this->view->postponed = $this->weekly->getPostponed($program);
- $this->view->nextWeek = $this->weekly->getTasksOfNextWeek($program, $date);
- $this->view->workload = $this->weekly->getWorkloadByType($program, $date);
- $this->weekly->save($program, $date);
-
- $this->lang->modulePageNav = $this->weekly->getPageNav($this->view->program, $date);
- $this->display();
- }
-
- /**
- * ComputeWeekly
- *
- * @access public
- * @return void
- */
- public function computeWeekly()
- {
- $programs = $this->dao->select('id, name')->from(TABLE_PROJECT)
- ->where('deleted')->eq(0)
- ->andWhere('type')->eq('project')
- ->fetchPairs();
- $date = helper::today();
-
- foreach($programs as $programID => $program) $this->weekly->save($programID, $date);
- }
-}
diff --git a/module/weekly/lang/de.php b/module/weekly/lang/de.php
deleted file mode 100644
index 47966d4ec7..0000000000
--- a/module/weekly/lang/de.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- * @package weekly
- * @version $Id
- * @link http://www.zentao.net
- */
-$lang->weekly->common = 'Project Weekly';
-$lang->weekly->index = 'Weekly Overview';
-$lang->weekly->progress = 'Progress';
-$lang->weekly->workload = 'Workload';
-$lang->weekly->total = 'Total';
-
-$lang->weekly->reportTtitle = 'Project: % s Weekly (Week % s)';
-$lang->weekly->summary = 'Project Progress';
-$lang->weekly->finished = 'Work finished this week (100% completed work)';
-$lang->weekly->postponed = 'Work unfinished this week';
-$lang->weekly->nextWeek = 'Work planned for next week';
-$lang->weekly->workloadByType = 'Workload Summary';
-
-$lang->weekly->term = 'Reporting Cycle';
-$lang->weekly->program = 'Project Name';
-$lang->weekly->master = 'Project Manager ';
-$lang->weekly->staff = 'The number of men in this week';
-
-$lang->weekly->weekDesc = 'Week % s (% s ~% s)';
-$lang->weekly->progress = 'Progress of the project';
-$lang->weekly->analysisResult = 'Analysis';
-$lang->weekly->cost = 'Project Cost';
-
-$lang->weekly->pv = 'Planned Value(PV)';
-$lang->weekly->ev = 'Earned Value(EV)';
-$lang->weekly->ac = 'Actual Cost(AC)';
-$lang->weekly->sv = 'Schedule Variance(SV%)';
-$lang->weekly->cv = 'Cost Variance(CV%)';
diff --git a/module/weekly/lang/en.php b/module/weekly/lang/en.php
deleted file mode 100644
index 47966d4ec7..0000000000
--- a/module/weekly/lang/en.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- * @package weekly
- * @version $Id
- * @link http://www.zentao.net
- */
-$lang->weekly->common = 'Project Weekly';
-$lang->weekly->index = 'Weekly Overview';
-$lang->weekly->progress = 'Progress';
-$lang->weekly->workload = 'Workload';
-$lang->weekly->total = 'Total';
-
-$lang->weekly->reportTtitle = 'Project: % s Weekly (Week % s)';
-$lang->weekly->summary = 'Project Progress';
-$lang->weekly->finished = 'Work finished this week (100% completed work)';
-$lang->weekly->postponed = 'Work unfinished this week';
-$lang->weekly->nextWeek = 'Work planned for next week';
-$lang->weekly->workloadByType = 'Workload Summary';
-
-$lang->weekly->term = 'Reporting Cycle';
-$lang->weekly->program = 'Project Name';
-$lang->weekly->master = 'Project Manager ';
-$lang->weekly->staff = 'The number of men in this week';
-
-$lang->weekly->weekDesc = 'Week % s (% s ~% s)';
-$lang->weekly->progress = 'Progress of the project';
-$lang->weekly->analysisResult = 'Analysis';
-$lang->weekly->cost = 'Project Cost';
-
-$lang->weekly->pv = 'Planned Value(PV)';
-$lang->weekly->ev = 'Earned Value(EV)';
-$lang->weekly->ac = 'Actual Cost(AC)';
-$lang->weekly->sv = 'Schedule Variance(SV%)';
-$lang->weekly->cv = 'Cost Variance(CV%)';
diff --git a/module/weekly/lang/fr.php b/module/weekly/lang/fr.php
deleted file mode 100644
index 47966d4ec7..0000000000
--- a/module/weekly/lang/fr.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- * @package weekly
- * @version $Id
- * @link http://www.zentao.net
- */
-$lang->weekly->common = 'Project Weekly';
-$lang->weekly->index = 'Weekly Overview';
-$lang->weekly->progress = 'Progress';
-$lang->weekly->workload = 'Workload';
-$lang->weekly->total = 'Total';
-
-$lang->weekly->reportTtitle = 'Project: % s Weekly (Week % s)';
-$lang->weekly->summary = 'Project Progress';
-$lang->weekly->finished = 'Work finished this week (100% completed work)';
-$lang->weekly->postponed = 'Work unfinished this week';
-$lang->weekly->nextWeek = 'Work planned for next week';
-$lang->weekly->workloadByType = 'Workload Summary';
-
-$lang->weekly->term = 'Reporting Cycle';
-$lang->weekly->program = 'Project Name';
-$lang->weekly->master = 'Project Manager ';
-$lang->weekly->staff = 'The number of men in this week';
-
-$lang->weekly->weekDesc = 'Week % s (% s ~% s)';
-$lang->weekly->progress = 'Progress of the project';
-$lang->weekly->analysisResult = 'Analysis';
-$lang->weekly->cost = 'Project Cost';
-
-$lang->weekly->pv = 'Planned Value(PV)';
-$lang->weekly->ev = 'Earned Value(EV)';
-$lang->weekly->ac = 'Actual Cost(AC)';
-$lang->weekly->sv = 'Schedule Variance(SV%)';
-$lang->weekly->cv = 'Cost Variance(CV%)';
diff --git a/module/weekly/lang/vi.php b/module/weekly/lang/vi.php
deleted file mode 100644
index 47966d4ec7..0000000000
--- a/module/weekly/lang/vi.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- * @package weekly
- * @version $Id
- * @link http://www.zentao.net
- */
-$lang->weekly->common = 'Project Weekly';
-$lang->weekly->index = 'Weekly Overview';
-$lang->weekly->progress = 'Progress';
-$lang->weekly->workload = 'Workload';
-$lang->weekly->total = 'Total';
-
-$lang->weekly->reportTtitle = 'Project: % s Weekly (Week % s)';
-$lang->weekly->summary = 'Project Progress';
-$lang->weekly->finished = 'Work finished this week (100% completed work)';
-$lang->weekly->postponed = 'Work unfinished this week';
-$lang->weekly->nextWeek = 'Work planned for next week';
-$lang->weekly->workloadByType = 'Workload Summary';
-
-$lang->weekly->term = 'Reporting Cycle';
-$lang->weekly->program = 'Project Name';
-$lang->weekly->master = 'Project Manager ';
-$lang->weekly->staff = 'The number of men in this week';
-
-$lang->weekly->weekDesc = 'Week % s (% s ~% s)';
-$lang->weekly->progress = 'Progress of the project';
-$lang->weekly->analysisResult = 'Analysis';
-$lang->weekly->cost = 'Project Cost';
-
-$lang->weekly->pv = 'Planned Value(PV)';
-$lang->weekly->ev = 'Earned Value(EV)';
-$lang->weekly->ac = 'Actual Cost(AC)';
-$lang->weekly->sv = 'Schedule Variance(SV%)';
-$lang->weekly->cv = 'Cost Variance(CV%)';
diff --git a/module/weekly/lang/zh-cn.php b/module/weekly/lang/zh-cn.php
deleted file mode 100644
index 84e8671025..0000000000
--- a/module/weekly/lang/zh-cn.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- * @package weekly
- * @version $Id
- * @link http://www.zentao.net
- */
-$lang->weekly->common = '项目周报';
-$lang->weekly->index = '周报总览';
-$lang->weekly->progress = '完成百分比';
-$lang->weekly->workload = '工作量';
-$lang->weekly->total = '合计';
-
-$lang->weekly->reportTtitle = '项目: %s 周报(第 %s 周)';
-$lang->weekly->summary = '项目进展状况';
-$lang->weekly->finished = '本周工作完成情况(100%完成的工作)';
-$lang->weekly->postponed = '本周未完成工作';
-$lang->weekly->nextWeek = '下周工作计划';
-$lang->weekly->workloadByType = '工作量统计';
-
-$lang->weekly->term = '报告周期';
-$lang->weekly->program = '项目名称';
-$lang->weekly->master = '项目经理 ';
-$lang->weekly->staff = '本周投入人数';
-
-$lang->weekly->weekDesc = '第 %s 周( %s ~ %s)';
-$lang->weekly->progress = '项目当前进展状况';
-$lang->weekly->analysisResult = '分析结果';
-$lang->weekly->cost = '项目成本';
-
-$lang->weekly->pv = '计划完成的工作(PV)';
-$lang->weekly->ev = '实际完成的工作(EV)';
-$lang->weekly->ac = '实际花费的成本(AC)';
-$lang->weekly->sv = '进度偏差率(SV%)';
-$lang->weekly->cv = '成本偏差率(CV%)';
diff --git a/module/weekly/lang/zh-tw.php b/module/weekly/lang/zh-tw.php
deleted file mode 100644
index 4638747b9a..0000000000
--- a/module/weekly/lang/zh-tw.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- * @package weekly
- * @version $Id
- * @link http://www.zentao.net
- */
-$lang->weekly->common = '項目周報';
-$lang->weekly->index = '周報總覽';
-$lang->weekly->progress = '完成百分比';
-$lang->weekly->workload = '工作量';
-$lang->weekly->total = '合計';
-
-$lang->weekly->reportTtitle = '項目: %s 周報(第 %s 周)';
-$lang->weekly->summary = '項目進展狀況';
-$lang->weekly->finished = '本週工作完成情況(100%完成的工作)';
-$lang->weekly->postponed = '本週未完成工作';
-$lang->weekly->nextWeek = '下周工作計劃';
-$lang->weekly->workloadByType = '工作量統計';
-
-$lang->weekly->term = '報告周期';
-$lang->weekly->program = '項目名稱';
-$lang->weekly->master = '項目經理 ';
-$lang->weekly->staff = '本週投入人數';
-
-$lang->weekly->weekDesc = '第 %s 周( %s ~ %s)';
-$lang->weekly->progress = '項目當前進展狀況';
-$lang->weekly->analysisResult = '分析結果';
-$lang->weekly->cost = '項目成本';
-
-$lang->weekly->pv = '計劃完成的工作(PV)';
-$lang->weekly->ev = '實際完成的工作(EV)';
-$lang->weekly->ac = '實際花費的成本(AC)';
-$lang->weekly->sv = '進度偏差率(SV%)';
-$lang->weekly->cv = '成本偏差率(CV%)';
diff --git a/module/weekly/model.php b/module/weekly/model.php
deleted file mode 100644
index dfefddb95e..0000000000
--- a/module/weekly/model.php
+++ /dev/null
@@ -1,511 +0,0 @@
-
- * @package weekly
- * @version $Id$
- * @link http://www.zentao.net
- */
-class weeklyModel extends model
-{
- /**
- * GetPageNav
- *
- * @param int $program
- * @param int $date
- * @access public
- * @return string
- */
- public function getPageNav($program, $date)
- {
- $date = date('Ymd', strtotime($this->getThisMonday($date)));
- $begin = $program->begin;
- $weeks = $this->getWeekPairs($begin);
- $current = zget($weeks, $date, '');
- $selectHtml = "
";
- $selectHtml .= html::a('###', $this->lang->weekly->common . $this->lang->colon . $program->name, '', "class='btn'");
- $selectHtml .= '
';
-
- $selectHtml .= "
';
- return $selectHtml;
-
- }
-
- /**
- * GetWeekPairs
- *
- * @param int $begin
- * @access public
- * @return array
- */
- public function getWeekPairs($begin)
- {
- $sn = $this->getWeekSN($begin, date('Y-m-d'));
- $weeks = array();
- for($i = 0; $i <= $sn; $i++)
- {
- $monday = $this->getThisMonday($begin);
- $sunday = $this->getThisSunday($begin);
- $begin = date('Y-m-d', strtotime("$begin +7 days"));
- $key = date('Ymd', strtotime($monday));
- $weeks[$key] = sprintf($this->lang->weekly->weekDesc, $i + 1, $monday, $sunday);
- }
- krsort($weeks);
- return $weeks;
- }
-
- /**
- * GetFromDB
- *
- * @param int $program
- * @param int $date
- * @access public
- * @return object
- */
- public function getFromDB($program, $date)
- {
- $monday = $this->getThisMonday($date);
- return $this->dao->select('*')
- ->from(TABLE_WEEKLYREPORT)
- ->where('weekStart')->eq($monday)
- ->andWhere('PRJ')->eq($program)
- ->fetch();
- }
-
- /**
- * Save data.
- *
- * @param int $project
- * @param int $date
- * @access public
- * @return void
- */
- public function save($project, $date)
- {
- $report = new stdclass;
- $report->pv = $this->getPV($project, $date);
- $report->ev = $this->getEV($project, $date);
- $report->ac = $this->getAC($project, $date);
- $report->sv = $this->getSV($report->ev, $report->pv);
- $report->cv = $this->getCV($report->ev, $report->ac);
- $report->PRJ = $project;
- $report->weekStart = $this->getThisMonday($date);
- $report->staff = $this->getStaff($project);
- $report->workload = json_encode($this->getWorkloadByType($project, $date));
- $this->dao->replace(TABLE_WEEKLYREPORT)->data($report)->exec();
- }
-
- /**
- * GetWeekSN
- *
- * @param int $begin
- * @param int $date
- * @access public
- * @return int
- */
- public function getWeekSN($begin, $date)
- {
- return ceil((strtotime($date) - strtotime($begin)) / 7 / 86400);
- }
-
- /**
- * Get monday for a date.
- *
- * @param int $date
- * @access public
- * @return date
- */
- public function getThisMonday($date)
- {
- $day = date('w', strtotime($date));
- if($day == 0) $day = 7;
- $days = $day - 1;
- return date('Y-m-d', strtotime("$date - $days days"));
- }
-
- /**
- * GetThisSunday
- *
- * @param int $date
- * @access public
- * @return date
- */
- public function getThisSunday($date)
- {
- $monday = $this->getThisMonday($date);
- return date('Y-m-d', strtotime("$monday +6 days"));
- }
-
- /**
- * GetLastDay
- *
- * @param int $date
- * @access public
- * @return string
- */
- public function getLastDay($date)
- {
- $this->loadModel('project');
- $weekend = zget($this->config->project, 'weekend', 2);
- $monday = $this->getThisMonday($date);
- $sunday = $this->getThisSunday($date);
- $workdays = $this->loadModel('holiday')->getActualWorkingDays($monday, $sunday);
- return end($workdays);
- }
-
- /**
- * GetStaff
- *
- * @param int $program
- * @param string $date
- * @access public
- * @return array
- */
- public function getStaff($program, $date = '')
- {
- if(!$date) $date = date('Y-m-d');
- $monday = $this->getThisMonday($date);
- $sunday = $this->getThisSunday($date);
- $projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
- $projectIdList = array_keys($projects);
-
- return $this->dao->select('count(distinct t1.account) as count')
- ->from(TABLE_TASKESTIMATE)->alias('t1')
- ->leftJoin(TABLE_TASK)->alias('t2')->on('t1.task=t2.id')
- ->where('t2.project')->in($projectIdList)
- ->andWhere('t1.date')->ge($monday)
- ->andWhere('t1.date')->lt($sunday)
- ->fetch('count');
- }
-
- /**
- * GetFinished
- *
- * @param int $program
- * @param string $date
- * @param int $pager
- * @access public
- * @return void
- */
- public function getFinished($program, $date = '', $pager = null)
- {
- if(!$date) $date = date('Y-m-d');
- $monday = $this->getThisMonday($date);
- $sunday = $this->getThisSunday($date);
-
- $projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
- $projectIdList = array_keys($projects);
-
- $tasks = $this->dao->select('*')
- ->from(TABLE_TASK)
- ->where('project')->in($projectIdList)
- ->andWhere("(status='done' or closedReason= 'done')")
- ->andWhere('finishedDate')->ge($monday)
- ->andWhere('finishedDate')->le($sunday)
- ->fetchAll();
- return $this->loadModel('task')->processTasks($tasks);
- }
-
- /**
- * GetPostponed
- *
- * @param int $program
- * @param string $date
- * @access public
- * @return void
- */
- public function getPostponed($program, $date = '')
- {
- if(!$date) $date = date('Y-m-d');
- $monday = $this->getThisMonday($date);
- $sunday = $this->getThisSunday($date);
- $nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
-
- $projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
- $projectIdList = array_keys($projects);
- $unFinished = $this->dao->select('*')
- ->from(TABLE_TASK)
- ->where('project')->in($projectIdList)
- ->andWhere('status')->in('wait,doing,pause')
- ->andWhere('deadline')->ge($monday)
- ->andWhere('deadline')->le($sunday)
- ->fetchAll('id');
-
- $postponed = $this->dao->select('*')
- ->from(TABLE_TASK)
- ->where('project')->in($projectIdList)
- ->andWhere('finishedDate')->gt($nextMonday)
- ->andWhere('deadline')->ge($monday)
- ->andWhere('deadline')->lt($nextMonday)
- ->fetchAll('id');
-
- $tasks = array_merge($unFinished, $postponed);
- return $this->loadModel('task')->processTasks($tasks);
- }
-
- /**
- * GetTasksOfNextWeek
- *
- * @param int $program
- * @param string $date
- * @access public
- * @return void
- */
- public function getTasksOfNextWeek($program, $date = '')
- {
- if(!$date) $date = date('Y-m-d');
- $sunday = $this->getThisSunday($date);
- $nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
- $sencondMondy = date('Y-m-d', strtotime("$sunday +8 days"));
-
- $projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
- $projectIdList = array_keys($projects);
-
- $tasks = $this->dao->select('*')
- ->from(TABLE_TASK)
- ->where('project')->in($projectIdList)
- ->andWhere("((deadline > '$nextMonday' and deadline < '$sencondMondy') or (estStarted > '$nextMonday' and estStarted < '$sencondMondy'))")
- ->fetchAll('id');
-
- return $this->loadModel('task')->processTasks($tasks);
- }
-
- /**
- * GetWorkloadByType
- *
- * @param int $program
- * @param string $date
- * @access public
- * @return object
- */
- public function getWorkloadByType($program, $date = '')
- {
- if(!$date) $date = date('Y-m-d');
-
- $sunday = $this->getThisSunday($date);
- $nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
- $sencondMondy = date('Y-m-d', strtotime("$sunday +8 days"));
-
- $projects = $this->loadModel('project')->getExecutionList($program, 'all', $status = 'all', $limit = 0, $productID = 0, $branch = 0);
- $projectIdList = array_keys($projects);
-
- return $this->dao->select('type, sum(cast(estimate as decimal(10,2))) as workload')
- ->from(TABLE_TASK)
- ->where('project')->in($projectIdList)
- ->groupBy('type')
- ->fetchPairs();
- }
-
- /**
- * GetPlanedTaskByWeek
- *
- * @param int $program
- * @param string $date
- * @access public
- * @return array
- */
- public function getPlanedTaskByWeek($program, $date = '')
- {
- if(!$date) $date = date('Y-m-d');
- $monday = $this->getThisMonday($date);
- $nextMonday = date('Y-m-d', strtotime("$monday +7 days"));
-
- $projects = $this->loadModel('project')->getList($status = 'all', $limit = 0, $productID = 0, $branch = 0, $program);
- $projectIdList = array_keys($projects);
-
- return $this->dao->select('*')
- ->from(TABLE_TASK)
- ->where('project')->in($projectIdList)
- ->andWhere('deadline')->ge($monday)
- ->fetchAll('id');
- }
-
- /**
- * GetPV
- *
- * @param int $program
- * @param string $date
- * @access public
- * @return int
- */
- public function getPV($projectID, $date = '')
- {
- $report = $this->getFromDB($projectID, $date);
- if(!empty($report)) return $report->pv;
-
- if(!$date) $date = date('Y-m-d');
- $monday = $this->getThisMonday($date);
- $sunday = $this->getThisSunday($date);
- $lastDay = $this->getLastDay($date);
- $nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
- $workdays = $this->loadModel('holiday')->getActualWorkingDays($monday, $sunday);
-
- $executions = $this->loadModel('project')->getExecutionList($projectID);
- $executionIdList = array_keys($executions);
-
- $tasks = $this->dao->select('*')->from(TABLE_TASK)
- ->where('project')->in($executionIdList)
- ->andWhere("(estStarted < '$nextMonday' or estStarted='0000-00-00')")
- ->fetchAll('id');
-
- $PV = 0;
- foreach($tasks as $task)
- {
- if($task->estStarted == '0000-00-00') $task->estStarted = date('Y-m-d', strtotime($task->openedDate));
- if($task->deadline < $nextMonday)
- {
- $PV += $task->estimate;
- continue;
- }
-
- $fullDays = $this->loadModel('holiday')->getActualWorkingDays($task->estStarted, $task->deadline);
- $passedDays = $this->loadModel('holiday')->getActualWorkingDays($task->estStarted, $sunday);
-
- if(empty($fullDays) or empty($passedDays) or empty($task->estimate)) continue;
- $PV += count($passedDays) * $task->estimate / count($fullDays);
- }
-
- return round($PV, 2);
- }
-
- /**
- * Get EV data.
- *
- * @param int $projectID
- * @param string $date
- * @access public
- * @return int
- */
- public function getEV($projectID, $date = '')
- {
- $report = $this->getFromDB($projectID, $date);
- if(!empty($report)) return $report->ev;
-
- $executions = $this->loadModel('project')->getExecutionList($projectID);
- $executionIdList = array_keys($executions);
-
- if(!$date) $date = date('Y-m-d');
- $monday = $this->getThisMonday($date);
- $sunday = $this->getThisSunday($date);
- $lastDay = $this->getLastDay($date);
- $nextMonday = date('Y-m-d', strtotime("$sunday +1 days"));
-
- $tasks = $this->dao->select('*')
- ->from(TABLE_TASK)
- ->where('project')->in($executionIdList)
- ->andWhere('consumed')->gt(0)
- ->andWhere('status')->ne('cancel')
- ->fetchAll('id');
-
- $EV = 0;
- foreach($tasks as $task)
- {
- if($task->status == 'done' or $task->closedReason == 'done')
- {
- $EV += $task->estimate;
- }
- else
- {
- $task->progress = round($task->consumed / ($task->consumed + $task->left), 2) * 100;
- $EV += $task->estimate * $task->progress / 100;
- }
- }
- return round($EV, 2);
- }
-
- /**
- * Get AC data.
- *
- * @param int $projectID
- * @param string $date
- * @access public
- * @return int
- */
- public function getAC($projectID, $date = '')
- {
- $report = $this->getFromDB($projectID, $date);
- if(!empty($report)) return $report->ac;
-
- if(!$date) $date = date('Y-m-d');
- $monday = $this->getThisMonday($date);
- $nextMonday = date('Y-m-d', strtotime("$monday +7 days"));
- $executions = $this->loadModel('project')->getExecutionList($projectID);
- $executionIdList = array_keys($executions);
-
- $AC = $this->dao->select('sum(t1.consumed) as consumed')
- ->from(TABLE_TASKESTIMATE)->alias('t1')
- ->leftJoin(TABLE_TASK)->alias('t2')->on('t1.task=t2.id')
- ->where('t2.project')->in($executionIdList)
- ->andWhere('t1.date')->ge($monday)
- ->andWhere('t1.date')->lt($nextMonday)
- ->fetch('consumed');
-
- return round($AC, 2);
- }
-
- /**
- * Get SV data.
- *
- * @param int $ev
- * @param int $pv
- * @access public
- * @return int
- */
- public function getSV($ev, $pv)
- {
- if($pv == 0) return 0;
- $sv = -1 * (1- ($ev / $pv));
- return number_format($sv * 100, 2);
- }
-
- /**
- * GetCV
- *
- * @param int $ev
- * @param int $ac
- * @access public
- * @return int
- */
- public function getCV($ev, $ac)
- {
- if($ac == 0) return 0;
- $cv = -1 * (1 - ($ev / $ac));
- return number_format($cv * 100, 2);
- }
-
- /**
- * GetTips
- *
- * @param string $type
- * @param int $data
- * @access public
- * @return string
- */
- public function getTips($type = 'progress', $data = 0)
- {
- $this->app->loadConfig('custom');
- if($type == 'progress') $tipsConfig = isset($this->config->custom->SV->progressTip) ? $this->config->custom->SV->progressTip : '';
- if($type == 'cost') $tipsConfig = isset($this->config->custom->CV->costTip) ? $this->config->custom->CV->costTip : '';
-
- if(empty($tipsConfig)) return '';
-
- $tipsConfig = json_decode($tipsConfig);
- foreach($tipsConfig as $tipConfig)
- {
- if($tipConfig->min <= $data and $tipConfig->max >= $data) return $tipConfig->tip;
- }
-
- return '';
- }
-}
diff --git a/module/weekly/view/index.html.php b/module/weekly/view/index.html.php
deleted file mode 100644
index f745dbd3b2..0000000000
--- a/module/weekly/view/index.html.php
+++ /dev/null
@@ -1,186 +0,0 @@
-
- * @package ZenTaoPMS
- * @version $Id: index.html.php 5094 2013-07-10 08:46:15Z chencongzhi520@gmail.com $
- */
-?>
-
-
-
-
-
-
- | weekly->term;?> |
- |
- weekly->master;?> |
- PM, '');?> |
-
-
- | weekly->program;?> |
- name;?> |
- weekly->staff;?> |
- |
-
-
-
weekly->summary;?>
-
-
- | weekly->progress;?> |
- |
- weekly->analysisResult;?> |
- |
-
-
- | weekly->pv;?> |
- |
- weekly->progress;?> |
- weekly->getTips('progress', $sv);?> |
-
-
- | weekly->ev;?> |
- |
-
-
- | weekly->ac;?> |
- |
-
-
- | weekly->sv;?> |
- |
-
-
- | weekly->cv;?> |
- |
- weekly->cost;?> |
- config->custom, 'cost', 1);?>
- |
-
-
-
weekly->finished;?>
-
-
-
- | idAB;?> |
- task->name;?> |
- task->estStarted;?> |
- task->deadline;?> |
- task->realStarted;?> |
- task->finishedBy;?> |
-
-
-
-
-
- |
- id);?>
- |
-
- createLink('task', 'view', 'id=' . $task->id), $task->name); ?>
- |
- estStarted;?> |
- deadline;?> |
- realStarted;?> |
- finishedBy);?> |
-
-
-
-
-
-
weekly->postponed;?>
-
-
-
- | idAB;?> |
- task->name;?> |
- task->assignedTo;?> |
- task->estStarted;?> |
- task->deadline;?> |
- task->realStarted;?> |
- task->progress;?> |
-
-
-
-
-
- |
- id);?>
- |
-
- createLink('task', 'view', 'id=' . $task->id), $task->name); ?>
- |
- assignedTo);?> |
- estStarted;?> |
- deadline;?> |
- realStarted;?> |
- progress;?>% |
-
-
-
-
-
-
weekly->nextWeek;?>
-
-
-
- | idAB;?> |
- task->name;?> |
- task->assignedTo;?> |
- task->estStarted;?> |
- task->deadline;?> |
-
-
-
-
-
- |
- id);?>
- |
-
- createLink('task', 'view', 'id=' . $task->id), $task->name); ?>
- |
- assignedTo);?> |
- estStarted;?> |
- deadline;?> |
-
-
-
-
-
-
weekly->workloadByType;?>
-
-
-
- | task->type;?> |
- task->typeList as $type => $name):?>
-
- |
-
- weekly->total;?> |
-
-
-
-
- | weekly->workload;?> |
-
- task->typeList as $type => $name):?>
-
-
- |
-
-
-
- |
-
-
-
-
-
-
-