* finish task #2107.
This commit is contained in:
@@ -136,6 +136,8 @@ class bug extends control
|
||||
$bug->openedBuild = rtrim($openedBuild, ',');
|
||||
$bug->resolvedBuild = isset($builds[$bug->resolvedBuild]) ? $builds[$bug->resolvedBuild] : $bug->resolvedBuild;
|
||||
}
|
||||
|
||||
$memberPairs = $this->user->getPairs('noletter');
|
||||
|
||||
$title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->common;
|
||||
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
@@ -154,6 +156,7 @@ class bug extends control
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -680,7 +683,7 @@ class bug extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function batchAssignTo($projectID)
|
||||
public function batchAssignTo($projectID, $type = 'project')
|
||||
{
|
||||
if(!empty($_POST) && isset($_POST['bugIDList']))
|
||||
{
|
||||
@@ -696,6 +699,7 @@ class bug extends control
|
||||
$this->sendmail($bugID, $actionID);
|
||||
}
|
||||
}
|
||||
if($type == 'product') die(js::locate($this->createLink('bug', 'browse', "productID=$projectID")));
|
||||
die(js::locate($this->createLink('project', 'bug', "projectID=$projectID")));
|
||||
}
|
||||
|
||||
|
||||
@@ -229,6 +229,21 @@ js::set('moduleID', $moduleID);
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
$canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');
|
||||
if(count($bugs))
|
||||
{
|
||||
if($canBatchAssignTo)
|
||||
{
|
||||
$actionLink = $this->createLink('bug', 'batchAssignTo', "productID={$productID}&type=product");
|
||||
echo "<div class='input-group w-150px'>";
|
||||
echo html::select('assignedTo', $memberPairs, '', 'class="form-control chosen"');
|
||||
echo "<span class='input-group-addon'>";
|
||||
echo html::a("javascript:setFormAction(\"$actionLink\")", $lang->bug->assignTo);
|
||||
echo '</span></div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<div class='text-right'><?php $pager->show();?></div>
|
||||
|
||||
@@ -606,6 +606,7 @@ class project extends control
|
||||
|
||||
/* team member pairs. */
|
||||
$memberPairs = array();
|
||||
$memberPairs['0'] = '';
|
||||
foreach($this->view->teamMembers as $key => $member)
|
||||
{
|
||||
$memberPairs[$key] = $member->realname;
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
echo "<div class='btn-group'>" . html::selectButton() . '</div>';
|
||||
if($canBatchAssignTo)
|
||||
{
|
||||
$actionLink = $this->createLink('bug', 'batchAssignTo', "projectID=$project->id");
|
||||
$actionLink = $this->createLink('bug', 'batchAssignTo', "projectID={$project->id}&type=project");
|
||||
echo "<div class='input-group w-150px'>";
|
||||
echo html::select('assignedTo', $memberPairs, '', 'class="form-control chosen"');
|
||||
echo "<span class='input-group-addon'>";
|
||||
|
||||
Reference in New Issue
Block a user