* Finish task #59641.

This commit is contained in:
liuruogu
2022-07-05 01:39:38 +00:00
parent 236243284a
commit 80a7f810d6
9 changed files with 111 additions and 47 deletions
+17 -5
View File
@@ -1714,9 +1714,10 @@ class block extends control
if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true;
if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true;
if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true;
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['risk'] = true;
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['issue'] = true;
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['meeting'] = true;
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['risk'] = true;
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['issue'] = true;
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['meeting'] = true;
if(common::hasPriv('feedback', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['feedback'] = true;
$params = $this->get->param;
$params = json_decode(base64_decode($params));
@@ -1725,8 +1726,8 @@ class block extends control
$objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount', 'requirement' => 'requirementCount');
if($this->config->edition == 'max')
{
$objectList += array('risk' => 'risks', 'issue' => 'issues');
$objectCountList += array('risk' => 'riskCount', 'issue' => 'issueCount');
$objectList += array('risk' => 'risks', 'issue' => 'issues', 'feedback' => 'feedbacks');
$objectCountList += array('risk' => 'riskCount', 'issue' => 'issueCount', 'feedback' => 'feedbackCount');
}
$tasks = $this->loadModel('task')->getUserSuspendedTasks($this->app->user->account);
@@ -1749,6 +1750,10 @@ class block extends control
->beginIF($objectType == 'story' or $objectType == 'requirement')->andWhere('t2.deleted')->eq('0')->fi()
->beginIF($objectType == 'todo')->andWhere('t1.cycle')->eq(0)->andWhere('t1.status')->eq('wait')->andWhere('t1.vision')->eq($this->config->vision)->fi()
->beginIF($objectType != 'todo')->andWhere('t1.status')->ne('closed')->fi()
->beginIF($objectType == 'feedback')
->andWhere('t1.status')->eq('wait')
->andWhere('t1.assignedTo')->eq($this->app->user->account)
->fi()
->orderBy($orderBy)
->beginIF($limitCount)->limit($limitCount)->fi()
->fetchAll();
@@ -1787,6 +1792,13 @@ class block extends control
if($objectType == 'risk') $this->app->loadLang('risk');
if($objectType == 'issue') $this->app->loadLang('issue');
if($objectType == 'feedback')
{
$this->app->loadLang('feedback');
$this->view->users = $this->loadModel('user')->getPairs('all,noletter');
$this->view->products = $this->loadModel('product')->getPairs();
}
$count[$objectType] = count($objects);
$this->view->{$objectList[$objectType]} = $objects;
}
+9 -7
View File
@@ -357,6 +357,7 @@ $lang->block->availableBlocks->testtask = 'Testaufgaben';
$lang->block->availableBlocks->risk = 'My Risks';
$lang->block->availableBlocks->issue = 'My Issues';
$lang->block->availableBlocks->meeting = 'My Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project';
$lang->block->moduleList['product'] = $lang->productCommon;
@@ -469,13 +470,14 @@ $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->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->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->feedbackCount = 'Feedbacks';
$lang->block->typeList = new stdclass();
+9 -7
View File
@@ -357,6 +357,7 @@ $lang->block->availableBlocks->testtask = 'Requests';
$lang->block->availableBlocks->risk = 'Risks';
$lang->block->availableBlocks->issue = 'Issues';
$lang->block->availableBlocks->meeting = 'Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project';
$lang->block->moduleList['product'] = $lang->productCommon;
@@ -469,13 +470,14 @@ $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->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->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->feedbackCount = 'Feedbacks';
$lang->block->typeList = new stdclass();
+9 -7
View File
@@ -357,6 +357,7 @@ $lang->block->availableBlocks->testtask = 'Recettes';
$lang->block->availableBlocks->risk = 'My Risks';
$lang->block->availableBlocks->issue = 'My Issues';
$lang->block->availableBlocks->meeting = 'My Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project';
$lang->block->moduleList['product'] = $lang->productCommon;
@@ -469,13 +470,14 @@ $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->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->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->feedbackCount = 'Feedbacks';
$lang->block->typeList = new stdclass();
+9 -7
View File
@@ -319,6 +319,7 @@ $lang->block->availableBlocks->testtask = 'Yêu cầu';
$lang->block->availableBlocks->risk = 'My Risks';
$lang->block->availableBlocks->issue = 'My Issues';
$lang->block->availableBlocks->meeting = 'My Meetings';
$lang->block->availableBlocks->feedback = 'My Feedbacks';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = 'Project';
$lang->block->moduleList['product'] = $lang->productCommon;
@@ -431,13 +432,14 @@ $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->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->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->feedbackCount = 'Feedbacks';
$lang->block->typeList = new stdclass();
+9 -7
View File
@@ -357,6 +357,7 @@ $lang->block->availableBlocks->testtask = '测试版本列表';
$lang->block->availableBlocks->risk = '风险';
$lang->block->availableBlocks->issue = '问题';
$lang->block->availableBlocks->meeting = '会议';
$lang->block->availableBlocks->feedback = '反馈';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = '项目';
$lang->block->moduleList['product'] = $lang->productCommon;
@@ -469,13 +470,14 @@ $lang->block->orderByList->story['status_desc'] = '状态倒序';
$lang->block->orderByList->story['stage_asc'] = '阶段正序';
$lang->block->orderByList->story['stage_desc'] = '阶段倒序';
$lang->block->todoCount = '待办数';
$lang->block->taskCount = '任务数';
$lang->block->bugCount = 'Bug数';
$lang->block->riskCount = '风险数';
$lang->block->issueCount = '问题数';
$lang->block->storyCount = '需求数';
$lang->block->meetingCount = '会议数';
$lang->block->todoCount = '待办数';
$lang->block->taskCount = '任务数';
$lang->block->bugCount = 'Bug数';
$lang->block->riskCount = '风险数';
$lang->block->issueCount = '问题数';
$lang->block->storyCount = '需求数';
$lang->block->meetingCount = '会议数';
$lang->block->feedbackCount = '反馈数';
$lang->block->typeList = new stdclass();
+9 -7
View File
@@ -332,6 +332,7 @@ $lang->block->availableBlocks->testtask = '測試版本列表';
$lang->block->availableBlocks->risk = '我的風險';
$lang->block->availableBlocks->issue = '我的問題';
$lang->block->availableBlocks->meeting = '我的會議';
$lang->block->availableBlocks->feedback = '我的反饋';
if($config->systemMode == 'new') $lang->block->moduleList['project'] = '項目';
$lang->block->moduleList['product'] = $lang->productCommon;
@@ -444,13 +445,14 @@ $lang->block->orderByList->story['status_desc'] = '狀態倒序';
$lang->block->orderByList->story['stage_asc'] = '階段正序';
$lang->block->orderByList->story['stage_desc'] = '階段倒序';
$lang->block->todoCount = '待辦數';
$lang->block->taskCount = '任務數';
$lang->block->bugCount = 'Bug數';
$lang->block->riskCount = '風險數';
$lang->block->issueCount = '問題數';
$lang->block->storyCount = '需求數';
$lang->block->meetingCount = '會議數';
$lang->block->todoCount = '待辦數';
$lang->block->taskCount = '任務數';
$lang->block->bugCount = 'Bug數';
$lang->block->riskCount = '風險數';
$lang->block->issueCount = '問題數';
$lang->block->storyCount = '需求數';
$lang->block->meetingCount = '會議數';
$lang->block->feedbackCount = '反饋數';
$lang->block->typeList = new stdclass();
+4
View File
@@ -776,6 +776,10 @@ class blockModel extends model
$params->meetingCount['name'] = $this->lang->block->meetingCount;
$params->meetingCount['default'] = 20;
$params->meetingCount['control'] = 'input';
$params->feedbackCount['name'] = $this->lang->block->feedbackCount;
$params->feedbackCount['default'] = 20;
$params->feedbackCount['control'] = 'input';
}
$params->storyCount['name'] = $this->lang->block->storyCount;
+36
View File
@@ -0,0 +1,36 @@
<?php if(empty($feedbacks)): ?>
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<style>
.block-feedbacks .c-id {width: 50px;}
</style>
<div class='panel-body has-table scrollbar-hover'>
<table class='table table-borderless table-fixed table-fixed-head table-hover tablesorter block-feedbacks <?php if(!$longBlock) echo 'block-sm'?>'>
<thead>
<tr>
<th class='c-id'><?php echo $lang->idAB?></th>
<th class='c-product'><?php echo $lang->feedback->product;?></th>
<th class='c-title'><?php echo $lang->feedback->title?></th>
<th class='c-type'><?php echo $lang->feedback->type;?></th>
<th class='c-openedBy'><?php echo $lang->feedback->openedBy;?></th>
<th class='c-openedDate'><?php echo $lang->feedback->openedDate;?></th>
</tr>
</thead>
<tbody>
<?php foreach($feedbacks as $feedback):?>
<?php
$appid = isset($_GET['entry']) ? "class='app-btn' data-id='{$this->get->entry}'" : '';
?>
<tr>
<td><?php echo sprintf('%03d', $feedback->id);?></td>
<td><?php echo zget($products, $feedback->product);?></td>
<td class='c-title' title='<?php echo $feedback->title?>'><?php echo html::a($this->createLink('feedback', 'view', "feedbackID=$feedback->id"), $feedback->title, '', "data-app='my'")?></td>
<td><?php echo zget($lang->feedback->typeList, $feedback->type)?></td>
<td><?php echo zget($users, $feedback->openedBy)?></td>
<td><?php echo $feedback->openedDate;?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php endif;?>