* Finish task #12965.

This commit is contained in:
tianshujie98
2020-10-28 09:46:44 +08:00
parent f9f8d78437
commit 8d3bb923e6
2 changed files with 23 additions and 23 deletions
+19 -19
View File
@@ -405,11 +405,11 @@ class testtask extends control
$project = $this->project->getById($task->project);
if($project->acl == 'private')
{
$assignedTos = $this->project->getTeamMemberPairs($project->id, 'nodeleted');
$assignedToList = $this->project->getTeamMemberPairs($project->id, 'nodeleted');
}
else
{
$assignedTos = $this->loadModel('user')->getPairs('noclosed|noletter|nodeleted|qafirst');
$assignedToList = $this->loadModel('user')->getPairs('noclosed|noletter|nodeleted|qafirst');
}
/* Append id for secend sort. */
@@ -443,23 +443,23 @@ class testtask extends control
$this->view->position[] = $this->lang->testtask->common;
$this->view->position[] = $this->lang->testtask->cases;
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->task = $task;
$this->view->runs = $runs;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|qafirst');
$this->view->assignedTos = $assignedTos;
$this->view->moduleTree = $this->loadModel('tree')->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createTestTaskLink'), $extra = $taskID);
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->taskID = $taskID;
$this->view->moduleID = $moduleID;
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
$this->view->pager = $pager;
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
$this->view->setModule = false;
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->task = $task;
$this->view->runs = $runs;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|qafirst');
$this->view->assignedToList = $assignedToList;
$this->view->moduleTree = $this->loadModel('tree')->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createTestTaskLink'), $extra = $taskID);
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->taskID = $taskID;
$this->view->moduleID = $moduleID;
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
$this->view->pager = $pager;
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
$this->view->setModule = false;
$this->display();
}
+4 -4
View File
@@ -103,13 +103,13 @@
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->testtask->assign;?> <span class="caret"></span></button>
<?php
$withSearch = count($assignedTos) > 10;
$withSearch = count($assignedToList) > 10;
$actionLink = inLink('batchAssign', "taskID=$task->id");
echo html::select('assignedTo', $assignedTos, '', 'class="hidden"');
echo html::select('assignedTo', $assignedToList, '', 'class="hidden"');
?>
<div class="dropdown-menu search-list<?php if($withSearch) echo ' search-box-sink';?>" data-ride="searchList">
<?php if($withSearch):?>
<?php $membersPinYin = common::convert2Pinyin($assignedTos);?>
<?php $membersPinYin = common::convert2Pinyin($assignedToList);?>
<div class="input-control search-box has-icon-left has-icon-right search-example">
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input">
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
@@ -117,7 +117,7 @@
</div>
<?php endif;?>
<div class="list-group">
<?php foreach ($assignedTos as $key => $value):?>
<?php foreach ($assignedToList as $key => $value):?>
<?php
if(empty($key) or $key == 'closed') continue;
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";