* finish task #5060.

This commit is contained in:
Catouse
2018-11-15 14:22:43 +08:00
parent 4cfcbd291e
commit aa5031778d
10 changed files with 193 additions and 53 deletions
+17 -4
View File
@@ -116,23 +116,36 @@
<div class="table-actions btn-toolbar">
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->bug->assignedTo?> <span class="caret"></span></button>
<?php
$withSearch = count($memberPairs) > 10;
<?php
$withSearch = count($memberPairs) > 1;
$actionLink = $this->createLink('bug', 'batchAssignTo', "projectID={$project->id}&type=project");
echo "<div class='dropdown-menu search-list' data-ride='searchList'>";
if($withSearch)
{
echo "<div class='dropdown-menu search-list search-box-sink' data-ride='searchList'>";
echo '<div class="input-control search-box has-icon-left has-icon-right search-example">';
echo '<input id="userSearchBox" type="search" class="form-control search-input" autocomplete="off" />';
echo '<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>';
echo '<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>';
echo '</div>';
$memberNames = array();
foreach($users as $memberId => $member)
{
if(empty($memberId)) continue;
$memberNames[] = $member;
}
$membersPinYin = common::convert2Pinyin($memberNames);
}
else
{
echo "<div class='dropdown-menu search-list'>";
}
echo '<div class="list-group">';
foreach($memberPairs as $key => $value)
{
if(empty($key)) continue;
echo html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\")", $value, '', "data-key='@$key'");
$searchKey = $withSearch ? ('data-key="' . zget($membersPinYin, $value, '') . " @$key\"") : "data-key='@$key'";
echo html::a("javascript:$(\".table-actions #assignedTo\").val(\"$key\");setFormAction(\"$actionLink\")", $value, '', $searchKey);
}
echo "</div>";
echo "</div>";