From f5319cee4e079f5bcffa5ccbe1bb0a5ffe9dbfe0 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Thu, 20 Aug 2020 16:27:26 +0800 Subject: [PATCH] * Code for block riskList. --- module/action/lang/de.php | 3 ++ module/action/lang/en.php | 3 ++ module/action/lang/fr.php | 3 ++ module/action/lang/vi.php | 3 ++ module/action/lang/zh-cn.php | 3 ++ module/action/lang/zh-tw.php | 3 ++ module/block/control.php | 7 +++- module/block/view/cmmiriskblock.html.php | 51 ++++++++++++++++++++++++ module/group/lang/resource.php | 24 +++++++++++ module/risk/lang/zh-cn.php | 2 +- module/risk/model.php | 19 +++++++++ 11 files changed, 118 insertions(+), 3 deletions(-) diff --git a/module/action/lang/de.php b/module/action/lang/de.php index 0894b152cc..3dd5720193 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -224,6 +224,8 @@ $lang->action->label->unlinkchildrenstory = "unlinked a child story"; $lang->action->label->linkparentstory = "linked a parent story"; $lang->action->label->unlinkparentstory = "unlink from parent story"; $lang->action->label->deletechildrenstory = "delete children story"; +$lang->action->label->tracked = 'tracked'; +$lang->action->label->hangup = 'hangup'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass; @@ -400,6 +402,7 @@ $lang->action->label->testreport = 'Berichte|testreport|view|report=%s'; $lang->action->label->entry = 'Eintrag|entry|browse|'; $lang->action->label->webhook = 'Webhook|webhook|browse|'; $lang->action->label->space = ' '; +$lang->action->label->risk = 'Risk|risk|view|riskID=%s'; /* Object type. */ $lang->action->search->objectTypeList[''] = ''; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index 8b0ec75269..ba6d92efc9 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -224,6 +224,8 @@ $lang->action->label->unlinkchildrenstory = "unlinked a child story"; $lang->action->label->linkparentstory = "linked a parent story"; $lang->action->label->unlinkparentstory = "unlink from parent story"; $lang->action->label->deletechildrenstory = "delete children story"; +$lang->action->label->tracked = 'tracked'; +$lang->action->label->hangup = 'hangup'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; @@ -400,6 +402,7 @@ $lang->action->label->testreport = 'Report|testreport|view|report=%s'; $lang->action->label->entry = 'Application|entry|browse|'; $lang->action->label->webhook = 'Webhook|webhook|browse|'; $lang->action->label->space = ' '; +$lang->action->label->risk = 'Risk|risk|view|riskID=%s'; /* Object type. */ $lang->action->search->objectTypeList[''] = ''; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index 1e86546ae8..e391d748e1 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -224,6 +224,8 @@ $lang->action->label->unlinkchildrenstory = "unlinked a child story"; $lang->action->label->linkparentstory = "linked a parent story"; $lang->action->label->unlinkparentstory = "unlink from parent story"; $lang->action->label->deletechildrenstory = "delete children story"; +$lang->action->label->tracked = 'tracked'; +$lang->action->label->hangup = 'hangup'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass; @@ -400,6 +402,7 @@ $lang->action->label->testreport = 'Rapport|testreport|view|report=%s'; $lang->action->label->entry = 'Application|entry|browse|'; $lang->action->label->webhook = 'Webhook|webhook|browse|'; $lang->action->label->space = ' '; +$lang->action->label->risk = 'Risk|risk|view|riskID=%s'; /* Object type. */ $lang->action->search->objectTypeList[''] = ''; diff --git a/module/action/lang/vi.php b/module/action/lang/vi.php index cf850adb39..7e99a7a548 100644 --- a/module/action/lang/vi.php +++ b/module/action/lang/vi.php @@ -224,6 +224,8 @@ $lang->action->label->unlinkchildrenstory = "hủy liên kết a child story"; $lang->action->label->linkparentstory = "linked a parent story"; $lang->action->label->unlinkparentstory = "unlink from parent story"; $lang->action->label->deletechildrenstory = "delete children story"; +$lang->action->label->tracked = 'tracked'; +$lang->action->label->hangup = 'hangup'; /* Dynamic information is grouped by object. */ $lang->action->dynamicAction = new stdclass; @@ -400,6 +402,7 @@ $lang->action->label->testreport = 'Báo cáo|testreport|view|report=%s'; $lang->action->label->entry = 'Ứng dụng|entry|browse|'; $lang->action->label->webhook = 'Webhook|webhook|browse|'; $lang->action->label->space = ' '; +$lang->action->label->risk = 'Risk|risk|view|riskID%s'; /* Object type. */ $lang->action->search->objectTypeList[''] = ''; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 71b78ecbc6..db6c3aef0f 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -224,6 +224,8 @@ $lang->action->label->unlinkchildrenstory = "取消关联子需求"; $lang->action->label->linkparentstory = "关联到父需求"; $lang->action->label->unlinkparentstory = "从父需求取消关联"; $lang->action->label->deletechildrenstory = "删除子需求"; +$lang->action->label->tracked = '跟踪了'; +$lang->action->label->hangup = '挂起了'; /* 动态信息按照对象分组 */ $lang->action->dynamicAction = new stdclass(); @@ -400,6 +402,7 @@ $lang->action->label->testreport = '报告|testreport|view|report=%s'; $lang->action->label->entry = '应用|entry|browse|'; $lang->action->label->webhook = 'Webhook|webhook|browse|'; $lang->action->label->space = ' '; +$lang->action->label->risk = '风险|risk|view|riskID=%s'; /* Object type. */ $lang->action->search->objectTypeList[''] = ''; diff --git a/module/action/lang/zh-tw.php b/module/action/lang/zh-tw.php index 6251b07bc5..1718c581d3 100755 --- a/module/action/lang/zh-tw.php +++ b/module/action/lang/zh-tw.php @@ -224,6 +224,8 @@ $lang->action->label->unlinkchildrenstory = "取消關聯子需求"; $lang->action->label->linkparentstory = "關聯到父需求"; $lang->action->label->unlinkparentstory = "從父需求取消關聯"; $lang->action->label->deletechildrenstory = "刪除子需求"; +$lang->action->label->tracked = '跟踪了'; +$lang->action->label->hangup = '挂起了'; /* 動態信息按照對象分組 */ $lang->action->dynamicAction = new stdclass(); @@ -400,6 +402,7 @@ $lang->action->label->testreport = '報告|testreport|view|report=%s'; $lang->action->label->entry = '應用|entry|browse|'; $lang->action->label->webhook = 'Webhook|webhook|browse|'; $lang->action->label->space = ' '; +$lang->action->label->risk = '風險|risk|view|riskID=%s'; /* Object type. */ $lang->action->search->objectTypeList[''] = ''; diff --git a/module/block/control.php b/module/block/control.php index 4a034203b5..6d536d04e2 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1034,7 +1034,7 @@ class block extends control $this->session->set('riskList', $uri); if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die(); $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->issues = $this->loadModel('issue')->getBlockIssues($this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->num, null, $this->params->orderBy); + $this->view->issues = $this->loadModel('issue')->getBlockIssues($this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->num, $this->params->orderBy); } /** @@ -1045,7 +1045,10 @@ class block extends control */ public function printCmmiRiskBlock() { - $this->view->program = $this->loadModel('project')->getByID($this->session->program); + $uri = $this->app->getURI(true); + $this->session->set('riskList', $uri); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->risks = $this->loadModel('risk')->getBlockRisks($this->params->type, $this->viewType == 'json' ? 0 : (int)$this->params->num, $this->params->orderBy); } /** diff --git a/module/block/view/cmmiriskblock.html.php b/module/block/view/cmmiriskblock.html.php index e69de29bb2..039082fdfb 100644 --- a/module/block/view/cmmiriskblock.html.php +++ b/module/block/view/cmmiriskblock.html.php @@ -0,0 +1,51 @@ + +