Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/query/ManiphestTaskSearchEngine.php
Show First 20 Lines • Show All 360 Lines • ▼ Show 20 Lines | final class ManiphestTaskSearchEngine | ||||
protected function renderResultList( | protected function renderResultList( | ||||
array $tasks, | array $tasks, | ||||
PhabricatorSavedQuery $saved, | PhabricatorSavedQuery $saved, | ||||
array $handles) { | array $handles) { | ||||
$viewer = $this->requireViewer(); | $viewer = $this->requireViewer(); | ||||
if ($this->isPanelContext()) { | if ($this->isPanelContext()) { | ||||
$can_edit_priority = false; | |||||
$can_bulk_edit = false; | $can_bulk_edit = false; | ||||
} else { | } else { | ||||
$can_edit_priority = true; | |||||
$can_bulk_edit = PhabricatorPolicyFilter::hasCapability( | $can_bulk_edit = PhabricatorPolicyFilter::hasCapability( | ||||
$viewer, | $viewer, | ||||
$this->getApplication(), | $this->getApplication(), | ||||
ManiphestBulkEditCapability::CAPABILITY); | ManiphestBulkEditCapability::CAPABILITY); | ||||
} | } | ||||
$list = id(new ManiphestTaskResultListView()) | $list = id(new ManiphestTaskResultListView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setTasks($tasks) | ->setTasks($tasks) | ||||
->setSavedQuery($saved) | ->setSavedQuery($saved) | ||||
->setCanEditPriority($can_edit_priority) | |||||
->setCanBatchEdit($can_bulk_edit) | ->setCanBatchEdit($can_bulk_edit) | ||||
->setShowBatchControls($this->showBatchControls); | ->setShowBatchControls($this->showBatchControls); | ||||
$result = new PhabricatorApplicationSearchResultView(); | $result = new PhabricatorApplicationSearchResultView(); | ||||
$result->setContent($list); | $result->setContent($list); | ||||
return $result; | return $result; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines |