From aa84629f3b7e462e4fe2d997acbd57e3bca291d2 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Fri, 20 Aug 2021 13:17:10 +0800 Subject: [PATCH] * Finish task #41798. --- db/demo.sql | 10 +-- db/endemo.sql | 10 +-- module/block/control.php | 154 +++++++++++++----------------------- module/block/lang/de.php | 28 +++---- module/block/lang/en.php | 28 +++---- module/block/lang/fr.php | 28 +++---- module/block/lang/vi.php | 28 +++---- module/block/lang/zh-cn.php | 28 +++---- module/block/model.php | 42 +++++----- 9 files changed, 156 insertions(+), 200 deletions(-) diff --git a/db/demo.sql b/db/demo.sql index 5e6f3d6366..08ba533c4a 100644 --- a/db/demo.sql +++ b/db/demo.sql @@ -157,7 +157,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (4, 'admin', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (5, 'admin', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (6, 'admin', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(7, 'admin', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(7, 'admin', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (8, 'admin', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (9, 'admin', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0), (10, 'admin', 'project', 'scrum', '项目概况', 'project', 'scrumoverview', '', 1, 8, 0, 0), @@ -179,7 +179,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (26, 'projectManager', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (27, 'projectManager', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (28, 'projectManager', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(29, 'projectManager', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(29, 'projectManager', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (30, 'projectManager', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (31, 'projectManager', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0), (32, 'projectManager', 'qa', '', '测试统计', 'qa', 'statistic', '{\"type\":\"noclosed\",\"count\":\"20\"}', 1, 8, 0, 0), @@ -192,7 +192,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (39, 'dev1', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (40, 'dev1', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (41, 'dev1', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(42, 'dev1', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(42, 'dev1', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (43, 'dev1', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (44, 'dev1', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0), (45, 'dev2', 'my', '', '欢迎', '', 'welcome', '', 1, 8, 0, 0), @@ -201,7 +201,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (48, 'dev2', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (49, 'dev2', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (50, 'dev2', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(51, 'dev2', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(51, 'dev2', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (52, 'dev2', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (53, 'dev2', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0), (54, 'dev3', 'my', '', '欢迎', '', 'welcome', '', 1, 8, 0, 0), @@ -210,7 +210,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (57, 'dev3', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (58, 'dev3', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (59, 'dev3', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(60, 'dev3', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(60, 'dev3', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (61, 'dev3', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (62, 'dev3', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0); INSERT INTO `zt_bug` (`id`, `project`, `product`, `branch`, `module`, `execution`, `plan`, `story`, `storyVersion`, `task`, `toTask`, `toStory`, `title`, `keywords`, `severity`, `pri`, `type`, `os`, `browser`, `hardware`, `found`, `steps`, `status`, `subStatus`, `color`, `confirmed`, `activatedCount`, `activatedDate`, `mailto`, `openedBy`, `openedDate`, `openedBuild`, `assignedTo`, `assignedDate`, `deadline`, `resolvedBy`, `resolution`, `resolvedBuild`, `resolvedDate`, `closedBy`, `closedDate`, `duplicateBug`, `linkBug`, `case`, `caseVersion`, `result`, `repo`, `entry`, `lines`, `v1`, `v2`, `repoType`, `testtask`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES diff --git a/db/endemo.sql b/db/endemo.sql index 5e6f3d6366..08ba533c4a 100644 --- a/db/endemo.sql +++ b/db/endemo.sql @@ -157,7 +157,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (4, 'admin', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (5, 'admin', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (6, 'admin', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(7, 'admin', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(7, 'admin', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (8, 'admin', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (9, 'admin', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0), (10, 'admin', 'project', 'scrum', '项目概况', 'project', 'scrumoverview', '', 1, 8, 0, 0), @@ -179,7 +179,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (26, 'projectManager', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (27, 'projectManager', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (28, 'projectManager', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(29, 'projectManager', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(29, 'projectManager', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (30, 'projectManager', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (31, 'projectManager', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0), (32, 'projectManager', 'qa', '', '测试统计', 'qa', 'statistic', '{\"type\":\"noclosed\",\"count\":\"20\"}', 1, 8, 0, 0), @@ -192,7 +192,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (39, 'dev1', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (40, 'dev1', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (41, 'dev1', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(42, 'dev1', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(42, 'dev1', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (43, 'dev1', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (44, 'dev1', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0), (45, 'dev2', 'my', '', '欢迎', '', 'welcome', '', 1, 8, 0, 0), @@ -201,7 +201,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (48, 'dev2', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (49, 'dev2', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (50, 'dev2', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(51, 'dev2', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(51, 'dev2', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (52, 'dev2', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (53, 'dev2', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0), (54, 'dev3', 'my', '', '欢迎', '', 'welcome', '', 1, 8, 0, 0), @@ -210,7 +210,7 @@ INSERT INTO `zt_block` (`id`, `account`, `module`, `type`, `title`, `source`, `b (57, 'dev3', 'my', '', '项目统计', 'project', 'statistic', '{\"count\":\"20\"}', 4, 8, 0, 0), (58, 'dev3', 'my', '', '我的贡献', '', 'contribute', '', 5, 4, 0, 0), (59, 'dev3', 'my', '', '我近期参与的项目', 'project', 'recentproject', '', 6, 8, 0, 0), -(60, 'dev3', 'my', '', '待处理', '', 'assigntome', '{\"todoNum\":\"20\",\"taskNum\":\"20\",\"bugNum\":\"20\",\"riskNum\":\"20\",\"issueNum\":\"20\",\"storyNum\":\"20\"}', 7, 8, 0, 0), +(60, 'dev3', 'my', '', '待处理', '', 'assigntome', '{\"todoCount\":\"20\",\"taskCount\":\"20\",\"bugCount\":\"20\",\"riskCount\":\"20\",\"issueCount\":\"20\",\"storyCount\":\"20\",\"meetingCount\":\"20\"}', 7, 8, 0, 0), (61, 'dev3', 'my', '', '项目人力投入', 'project', 'projectteam', '', 8, 8, 0, 0), (62, 'dev3', 'my', '', '项目列表', 'project', 'project', '{\"orderBy\":\"id_desc\",\"count\":\"15\"}', 9, 8, 0, 0); INSERT INTO `zt_bug` (`id`, `project`, `product`, `branch`, `module`, `execution`, `plan`, `story`, `storyVersion`, `task`, `toTask`, `toStory`, `title`, `keywords`, `severity`, `pri`, `type`, `os`, `browser`, `hardware`, `found`, `steps`, `status`, `subStatus`, `color`, `confirmed`, `activatedCount`, `activatedDate`, `mailto`, `openedBy`, `openedDate`, `openedBuild`, `assignedTo`, `assignedDate`, `deadline`, `resolvedBy`, `resolution`, `resolvedBuild`, `resolvedDate`, `closedBy`, `closedDate`, `duplicateBug`, `linkBug`, `case`, `caseVersion`, `result`, `repo`, `entry`, `lines`, `v1`, `v2`, `repoType`, `testtask`, `lastEditedBy`, `lastEditedDate`, `deleted`) VALUES diff --git a/module/block/control.php b/module/block/control.php index 7818d4b36d..611701ae73 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1674,87 +1674,72 @@ class block extends control if(common::hasPriv('meeting', 'view') and isset($this->config->maxVersion)) $hasViewPriv['meeting'] = true; if(common::hasPriv('story', 'view')) $hasViewPriv['story'] = true; - $params = $this->get->param; - $params = json_decode(base64_decode($params)); - $count = array(); - - if(isset($hasViewPriv['todo'])) + $params = $this->get->param; + $params = json_decode(base64_decode($params)); + $count = array(); + $objectList = array('todo' => 'todos', 'task' => 'tasks', 'bug' => 'bus', 'story' => 'stories'); + $objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount'); + if(isset($this->config->maxVersion)) { - $this->app->loadClass('date'); - $this->app->loadLang('todo'); - $stmt = $this->dao->select('*')->from(TABLE_TODO) - ->where('assignedTo')->eq($this->app->user->account) - ->andWhere('cycle')->eq(0) - ->andWhere('deleted')->eq(0) - ->andWhere('status')->eq('wait') - ->orderBy('`date` desc'); - if(isset($params->todoNum)) $stmt->limit($params->todoNum); - $todos = $stmt->fetchAll(); + $objectList += array('risk' => 'risks', 'issue' => 'issues'); + $objectCountList += array('risk' => 'riskCount', 'issue' => 'issueCount'); + } - foreach($todos as $key => $todo) + foreach($objectCountList as $objectType => $objectCount) + { + if(!isset($hasViewPriv[$objectType])) continue; + + $table = $this->config->objectTables[$objectType]; + $orderBy = $objectType == 'todo' ? "`date` desc" : 'id_desc'; + $limitCount = isset($params->{$objectCount}) ? $params->{$objectCount} : 0; + $objects = $this->dao->select('*')->from($table) + ->where('deleted')->eq(0) + ->andWhere('assignedTo')->eq($this->app->user->account)->fi() + ->beginIF($objectType == 'todo')->andWhere('cycle')->eq(0)->fi() + ->beginIF($objectType == 'todo')->andWhere('status')->eq('wait')->fi() + ->beginIF($objectType != 'todo')->andWhere('status')->ne('closed')->fi() + ->orderBy($orderBy) + ->beginIF($limitCount)->limit($limitCount)->fi() + ->fetchAll(); + + if($objectType == 'todo') { - if($todo->status == 'done' and $todo->finishedBy == $this->app->user->account) + $this->app->loadClass('date'); + $this->app->loadLang('todo'); + foreach($objects as $key => $todo) { - unset($todos[$key]); - continue; + if($todo->status == 'done' and $todo->finishedBy == $this->app->user->account) + { + unset($objects[$key]); + continue; + } + + $todo->begin = date::formatTime($todo->begin); + $todo->end = date::formatTime($todo->end); } - - $todo->begin = date::formatTime($todo->begin); - $todo->end = date::formatTime($todo->end); } - $count['todo'] = count($todos); - $this->view->todos = $todos; - } - if(isset($hasViewPriv['task'])) - { - $this->app->loadLang('task'); - $this->app->loadLang('execution'); - $stmt = $this->dao->select('*')->from(TABLE_TASK) - ->where('assignedTo')->eq($this->app->user->account) - ->andWhere('deleted')->eq('0') - ->andWhere('status')->ne('closed') - ->orderBy('id_desc'); - if(isset($params->taskNum)) $stmt->limit($params->taskNum); - $tasks = $stmt->fetchAll(); - $count['task'] = count($tasks); - $this->view->tasks = $tasks; - } - if(isset($hasViewPriv['bug'])) - { - $this->app->loadLang('bug'); - $stmt = $this->dao->select('*')->from(TABLE_BUG) - ->where('assignedTo')->eq($this->app->user->account) - ->andWhere('deleted')->eq('0') - ->andWhere('status')->ne('closed') - ->orderBy('id_desc'); - if(isset($params->bugNum)) $stmt->limit($params->bugNum); - $bugs = $stmt->fetchAll(); + if($objectType == 'task') + { + $this->app->loadLang('task'); + $this->app->loadLang('execution'); + } - $count['bug'] = count($bugs); - $this->view->bugs = $bugs; - } - if(isset($hasViewPriv['risk'])) - { - $this->app->loadLang('risk'); - $stmt = $this->dao->select('*')->from(TABLE_RISK) - ->where('assignedTo')->eq($this->app->user->account) - ->andWhere('deleted')->eq('0') - ->andWhere('status')->ne('closed') - ->orderBy('id_desc'); - if(isset($params->riskNum)) $stmt->limit($params->riskNum); - $risks = $stmt->fetchAll(); + if($objectType == 'risk') $this->app->loadLang('risk'); + if($objectType == 'issue') $this->app->loadLang('issue'); - $count['risk'] = count($risks); - $this->view->risks = $risks; + $count[$objectType] = count($objects); + $this->view->{$objectList[$objectType]} = $objects; } + if(isset($hasViewPriv['meeting'])) { $this->app->loadLang('meeting'); - $today = helper::today(); - $now = date('H:i:s', strtotime(helper::now())); + $today = helper::today(); + $now = date('H:i:s', strtotime(helper::now())); + $meetingCount = isset($params->meetingCount) ? isset($params->meetingCount) : 0; - $stmt = $this->dao->select('*')->from(TABLE_MEETING) + $meetings = $this->dao->select('*')->from(TABLE_MEETING) ->Where('deleted')->eq('0') ->andWhere('(date')->gt($today) ->orWhere('(begin')->gt($now) @@ -1763,44 +1748,15 @@ class block extends control ->andwhere('(host')->eq($this->app->user->account) ->orWhere('participant')->in($this->app->user->account) ->markRight(1) - ->orderBy('id_desc'); - - if(isset($params->meetingNum)) $stmt->limit($params->meetingNum); - $meetings = $stmt->fetchAll(); + ->orderBy('id_desc') + ->beginIF($meetingCount)->limit($meetingCount)->fi() + ->fetchAll(); $count['meeting'] = count($meetings); $this->view->meetings = $meetings; $this->view->depts = $this->loadModel('dept')->getOptionMenu(); $this->view->users = $this->loadModel('user')->getPairs('all,noletter'); } - if(isset($hasViewPriv['issue'])) - { - $this->app->loadLang('issue'); - $stmt = $this->dao->select('*')->from(TABLE_ISSUE) - ->where('assignedTo')->eq($this->app->user->account) - ->andWhere('deleted')->eq('0') - ->andWhere('status')->ne('closed') - ->orderBy('id_desc'); - if(isset($params->issueNum)) $stmt->limit($params->issueNum); - $issues = $stmt->fetchAll(); - - $count['issue'] = count($issues); - $this->view->issues = $issues; - } - if(isset($hasViewPriv['story'])) - { - $this->app->loadLang('story'); - $stmt = $this->dao->select('*')->from(TABLE_STORY) - ->where('assignedTo')->eq($this->app->user->account) - ->andWhere('deleted')->eq('0') - ->andWhere('status')->ne('closed') - ->orderBy('id_desc'); - if(isset($params->storyNum)) $stmt->limit($params->storyNum); - $stories = $stmt->fetchAll(); - - $count['story'] = count($stories); - $this->view->stories = $stories; - } $this->view->selfCall = $this->selfCall; $this->view->hasViewPriv = $hasViewPriv; diff --git a/module/block/lang/de.php b/module/block/lang/de.php index 7992ff1b06..4509639519 100644 --- a/module/block/lang/de.php +++ b/module/block/lang/de.php @@ -310,13 +310,13 @@ $lang->block->default['full']['my']['7']['block'] = 'assigntome'; $lang->block->default['full']['my']['7']['source'] = ''; $lang->block->default['full']['my']['7']['grid'] = 8; -$lang->block->default['full']['my']['7']['params']['todoNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['taskNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['bugNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['riskNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['issueNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['storyNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['meetingNum'] = '20'; +$lang->block->default['full']['my']['7']['params']['todoCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['taskCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['bugCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['riskCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['issueCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['storyCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['meetingCount'] = '20'; if($config->systemMode == 'new') { @@ -470,13 +470,13 @@ $lang->block->orderByList->story['status_desc'] = 'Status Absteigend'; $lang->block->orderByList->story['stage_asc'] = 'Phase Aufsteigend'; $lang->block->orderByList->story['stage_desc'] = 'Phase Absteigend'; -$lang->block->todoNum = 'Todos'; -$lang->block->taskNum = 'Aufgaben'; -$lang->block->bugNum = 'Bugs'; -$lang->block->riskNum = 'Risk'; -$lang->block->issueNum = 'Issues'; -$lang->block->storyNum = 'Stories'; -$lang->block->meetingNum = 'Meetings'; +$lang->block->todoCount = 'Todos'; +$lang->block->taskCount = 'Aufgaben'; +$lang->block->bugCount = 'Bugs'; +$lang->block->riskCount = 'Risk'; +$lang->block->issueCount = 'Issues'; +$lang->block->storyCount = 'Stories'; +$lang->block->meetingCount = 'Meetings'; $lang->block->typeList = new stdclass(); diff --git a/module/block/lang/en.php b/module/block/lang/en.php index d3dc6dd148..9dcdb78ecd 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -315,13 +315,13 @@ $lang->block->default['full']['my']['8']['block'] = 'assigntome'; $lang->block->default['full']['my']['8']['source'] = ''; $lang->block->default['full']['my']['8']['grid'] = 8; -$lang->block->default['full']['my']['8']['params']['todoNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['taskNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['bugNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['riskNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['issueNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['storyNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['meetingNum'] = '20'; +$lang->block->default['full']['my']['8']['params']['todoCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['taskCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['bugCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['riskCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['issueCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['storyCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['meetingCount'] = '20'; if($config->systemMode == 'new') { @@ -480,13 +480,13 @@ $lang->block->orderByList->story['status_desc'] = 'Story Status DESC'; $lang->block->orderByList->story['stage_asc'] = 'Story Phase ASC'; $lang->block->orderByList->story['stage_desc'] = 'Story Phase DESC'; -$lang->block->todoNum = 'Todo'; -$lang->block->taskNum = 'Task'; -$lang->block->bugNum = 'Bug'; -$lang->block->riskNum = 'Risk'; -$lang->block->issueNum = 'Issues'; -$lang->block->storyNum = 'Stories'; -$lang->block->meetingNum = 'Meetings'; +$lang->block->todoCount = 'Todo'; +$lang->block->taskCount = 'Task'; +$lang->block->bugCount = 'Bug'; +$lang->block->riskCount = 'Risk'; +$lang->block->issueCount = 'Issues'; +$lang->block->storyCount = 'Stories'; +$lang->block->meetingCount = 'Meetings'; $lang->block->typeList = new stdclass(); diff --git a/module/block/lang/fr.php b/module/block/lang/fr.php index e8d6a3ef0b..4265982c7e 100644 --- a/module/block/lang/fr.php +++ b/module/block/lang/fr.php @@ -310,13 +310,13 @@ $lang->block->default['full']['my']['7']['block'] = 'assigntome'; $lang->block->default['full']['my']['7']['source'] = ''; $lang->block->default['full']['my']['7']['grid'] = 8; -$lang->block->default['full']['my']['7']['params']['todoNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['taskNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['bugNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['riskNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['issueNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['storyNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['meetingNum'] = '20'; +$lang->block->default['full']['my']['7']['params']['todoCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['taskCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['bugCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['riskCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['issueCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['storyCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['meetingCount'] = '20'; if($config->systemMode == 'new') { @@ -470,13 +470,13 @@ $lang->block->orderByList->story['status_desc'] = 'Tri par Statut Story DESC'; $lang->block->orderByList->story['stage_asc'] = 'Tri par Phase Story ASC'; $lang->block->orderByList->story['stage_desc'] = 'Tri par Phase Story DESC'; -$lang->block->todoNum = 'Todo'; -$lang->block->taskNum = 'Task'; -$lang->block->bugNum = 'Bug'; -$lang->block->riskNum = 'Risk'; -$lang->block->issueNum = 'Issues'; -$lang->block->storyNum = 'Stories'; -$lang->block->meetingNum = 'Meetings'; +$lang->block->todoCount = 'Todo'; +$lang->block->taskCount = 'Task'; +$lang->block->bugCount = 'Bug'; +$lang->block->riskCount = 'Risk'; +$lang->block->issueCount = 'Issues'; +$lang->block->storyCount = 'Stories'; +$lang->block->meetingCount = 'Meetings'; $lang->block->typeList = new stdclass(); diff --git a/module/block/lang/vi.php b/module/block/lang/vi.php index a2a8ffedcf..7dc1e57b11 100644 --- a/module/block/lang/vi.php +++ b/module/block/lang/vi.php @@ -310,13 +310,13 @@ $lang->block->default['full']['my']['7']['block'] = 'assigntome'; $lang->block->default['full']['my']['7']['source'] = ''; $lang->block->default['full']['my']['7']['grid'] = 8; -$lang->block->default['full']['my']['7']['params']['todoNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['taskNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['bugNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['riskNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['issueNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['storyNum'] = '20'; -$lang->block->default['full']['my']['7']['params']['meetingNum'] = '20'; +$lang->block->default['full']['my']['7']['params']['todoCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['taskCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['bugCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['riskCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['issueCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['storyCount'] = '20'; +$lang->block->default['full']['my']['7']['params']['meetingCount'] = '20'; if($config->systemMode == 'new') { @@ -470,13 +470,13 @@ $lang->block->orderByList->story['status_desc'] = 'Tình trạng câu chuyện g $lang->block->orderByList->story['stage_asc'] = 'Giai đoạn câu chuyện tăng dần'; $lang->block->orderByList->story['stage_desc'] = 'Giai đoạn câu chuyện giảm dần'; -$lang->block->todoNum = 'Việc làm'; -$lang->block->taskNum = 'Nhiệm vụ'; -$lang->block->bugNum = 'Bug'; -$lang->block->riskNum = 'Risk'; -$lang->block->issueNum = 'Issues'; -$lang->block->storyNum = 'Stories'; -$lang->block->meetingNum = 'Meetings'; +$lang->block->todoCount = 'Việc làm'; +$lang->block->taskCount = 'Nhiệm vụ'; +$lang->block->bugCount = 'Bug'; +$lang->block->riskCount = 'Risk'; +$lang->block->issueCount = 'Issues'; +$lang->block->storyCount = 'Stories'; +$lang->block->meetingCount = 'Meetings'; $lang->block->typeList = new stdclass(); diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index f96eac4a08..187aa9ed9e 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -315,13 +315,13 @@ $lang->block->default['full']['my']['8']['block'] = 'assigntome'; $lang->block->default['full']['my']['8']['source'] = ''; $lang->block->default['full']['my']['8']['grid'] = 8; -$lang->block->default['full']['my']['8']['params']['todoNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['taskNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['bugNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['riskNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['issueNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['storyNum'] = '20'; -$lang->block->default['full']['my']['8']['params']['meetingNum'] = '20'; +$lang->block->default['full']['my']['8']['params']['todoCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['taskCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['bugCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['riskCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['issueCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['storyCount'] = '20'; +$lang->block->default['full']['my']['8']['params']['meetingCount'] = '20'; if($config->systemMode == 'new') { @@ -480,13 +480,13 @@ $lang->block->orderByList->story['status_desc'] = '状态倒序'; $lang->block->orderByList->story['stage_asc'] = '阶段正序'; $lang->block->orderByList->story['stage_desc'] = '阶段倒序'; -$lang->block->todoNum = '待办数'; -$lang->block->taskNum = '任务数'; -$lang->block->bugNum = 'Bug数'; -$lang->block->riskNum = '风险数'; -$lang->block->issueNum = '问题数'; -$lang->block->storyNum = '需求数'; -$lang->block->meetingNum = '会议数'; +$lang->block->todoCount = '待办数'; +$lang->block->taskCount = '任务数'; +$lang->block->bugCount = 'Bug数'; +$lang->block->riskCount = '风险数'; +$lang->block->issueCount = '问题数'; +$lang->block->storyCount = '需求数'; +$lang->block->meetingCount = '会议数'; $lang->block->typeList = new stdclass(); diff --git a/module/block/model.php b/module/block/model.php index dea0389dc2..78066e4746 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -719,36 +719,36 @@ class blockModel extends model */ public function getAssignToMeParams() { - $params->todoNum['name'] = $this->lang->block->todoNum; - $params->todoNum['default'] = 20; - $params->todoNum['control'] = 'input'; + $params->todoCount['name'] = $this->lang->block->todoCount; + $params->todoCount['default'] = 20; + $params->todoCount['control'] = 'input'; - $params->taskNum['name'] = $this->lang->block->taskNum; - $params->taskNum['default'] = 20; - $params->taskNum['control'] = 'input'; + $params->taskCount['name'] = $this->lang->block->taskCount; + $params->taskCount['default'] = 20; + $params->taskCount['control'] = 'input'; - $params->bugNum['name'] = $this->lang->block->bugNum; - $params->bugNum['default'] = 20; - $params->bugNum['control'] = 'input'; + $params->bugCount['name'] = $this->lang->block->bugCount; + $params->bugCount['default'] = 20; + $params->bugCount['control'] = 'input'; if(isset($this->config->maxVersion)) { - $params->riskNum['name'] = $this->lang->block->riskNum; - $params->riskNum['default'] = 20; - $params->riskNum['control'] = 'input'; + $params->riskCount['name'] = $this->lang->block->riskCount; + $params->riskCount['default'] = 20; + $params->riskCount['control'] = 'input'; - $params->issueNum['name'] = $this->lang->block->issueNum; - $params->issueNum['default'] = 20; - $params->issueNum['control'] = 'input'; + $params->issueCount['name'] = $this->lang->block->issueCount; + $params->issueCount['default'] = 20; + $params->issueCount['control'] = 'input'; - $params->meetingNum['name'] = $this->lang->block->meetingNum; - $params->meetingNum['default'] = 20; - $params->meetingNum['control'] = 'input'; + $params->meetingCount['name'] = $this->lang->block->meetingCount; + $params->meetingCount['default'] = 20; + $params->meetingCount['control'] = 'input'; } - $params->storyNum['name'] = $this->lang->block->storyNum; - $params->storyNum['default'] = 20; - $params->storyNum['control'] = 'input'; + $params->storyCount['name'] = $this->lang->block->storyCount; + $params->storyCount['default'] = 20; + $params->storyCount['control'] = 'input'; return json_encode($params); }