From 8dbfbdd6dbc18d8abd74dcd01ed720c2b527a320 Mon Sep 17 00:00:00 2001
From: Yagami <976204163@qq.com>
Date: Tue, 22 Sep 2020 09:29:14 +0800
Subject: [PATCH] * Fix product menu.
---
module/block/control.php | 2 +-
module/block/view/programblock.html.php | 8 ++++----
module/block/view/programstatisticblock.html.php | 2 +-
module/common/lang/zh-cn.php | 6 +++---
module/common/model.php | 4 ++++
module/program/control.php | 4 ++--
module/program/lang/zh-cn.php | 2 +-
module/program/model.php | 2 +-
8 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/module/block/control.php b/module/block/control.php
index c9326f5618..8359e1699e 100644
--- a/module/block/control.php
+++ b/module/block/control.php
@@ -832,7 +832,7 @@ class block extends control
}
$today = helper::today();
- $monday = $this->loadModel('weekly')->getThisMonday($today);
+ $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")
diff --git a/module/block/view/programblock.html.php b/module/block/view/programblock.html.php
index 3d071e1536..efd59247a7 100644
--- a/module/block/view/programblock.html.php
+++ b/module/block/view/programblock.html.php
@@ -9,13 +9,13 @@
'>
- | program->name;?> |
- program->PM;?> |
- program->status;?> |
+ program->PGMName;?> |
+ program->PGMPM;?> |
+ program->PGMStatus;?> |
program->teamCount;?> |
task->consumed;?> |
- program->budget;?> |
+ program->PGMBudget;?> |
program->leftStories;?> |
program->leftTasks;?> |
program->leftBugs;?> |
diff --git a/module/block/view/programstatisticblock.html.php b/module/block/view/programstatisticblock.html.php
index b472d222cc..2e3b0190ed 100644
--- a/module/block/view/programstatisticblock.html.php
+++ b/module/block/view/programstatisticblock.html.php
@@ -108,7 +108,7 @@ $(function()
id == $selected) echo "class='active' id='activeProject'";?> programID='id;?>'>
name;?>
- id"), "", '', "class='btn-view' title={$lang->program->index}");?>
+ id"), "", '', "class='btn-view' title={$lang->program->PGMIndex}");?>
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index 0403a2f94b..5e9a4885be 100755
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -145,8 +145,8 @@ $lang->program->viewMenu->project = array('link' => "$lang->projectCommon|progra
/* Scrum menu. */
$lang->product = new stdclass();
$lang->product->menu = new stdclass();
-$lang->product->menu->productindex = '主页|product|index|';
-$lang->product->menu->product = $lang->productCommon . '|product|productlist|';
+$lang->product->menu->home = '主页|product|index|';
+$lang->product->menu->list = $lang->productCommon . '|product|productlist|';
/* System menu. */
$lang->system = new stdclass();
@@ -904,6 +904,6 @@ if($config->URAndSR)
}
$lang->nc->menu = $lang->auditplan->menu;
-$lang->noMenuModule = array('my', 'todo', 'effort', 'program', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'holiday', 'custom', 'auditcl', 'subject', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search');
+$lang->noMenuModule = array('my', 'todo', 'effort', 'program', 'product', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'holiday', 'custom', 'auditcl', 'subject', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search');
include (dirname(__FILE__) . '/menuOrder.php');
diff --git a/module/common/model.php b/module/common/model.php
index be1e313826..2b3f0336fb 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -2190,6 +2190,10 @@ EOD;
{
$lang->menu = $lang->program->menu;
}
+ if($group == 'product')
+ {
+ $lang->menu = $lang->product->menu;
+ }
if($group == 'project')
{
$lang->menu = self::getProgramMainMenu($moduleName);
diff --git a/module/program/control.php b/module/program/control.php
index cf38591a43..af17ea052b 100644
--- a/module/program/control.php
+++ b/module/program/control.php
@@ -20,8 +20,8 @@ class program extends control
$this->lang->navGroup->program = 'program';
$this->lang->program->switcherMenu = $this->program->getPGMCommonAction();
- $this->view->title = $this->lang->program->PGMHome;
- $this->view->position[] = $this->lang->program->PGMHome;
+ $this->view->title = $this->lang->program->PGMIndex;
+ $this->view->position[] = $this->lang->program->PGMIndex;
$this->display();
}
diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php
index e3f330dbf7..34b545dc81 100644
--- a/module/program/lang/zh-cn.php
+++ b/module/program/lang/zh-cn.php
@@ -158,7 +158,7 @@ $lang->program->PRJChildLongTime = "子项目中有长期项目,父项目
/* Actions. */
$lang->program->PGMCommon = '项目集';
-$lang->program->PGMHome = '项目集主页';
+$lang->program->PGMIndex = '项目集主页';
$lang->program->PGMCreate = '添加项目集';
$lang->program->PGMCreateGuide = '选择项目模板';
$lang->program->PGMEdit = '编辑项目集';
diff --git a/module/program/model.php b/module/program/model.php
index aff3ac581f..68c6a5750b 100644
--- a/module/program/model.php
+++ b/module/program/model.php
@@ -665,7 +665,7 @@ class programModel extends model
{
$output = "";
$output .= '';