Move more rendering into SearchEngines for panels

Summary: Ref T4986. Getting closer. Nothing out of the ordinary in this group.

Test Plan:
For each application:

  - Viewed the normal search results.
  - Created a panel version and viewed it.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4986

Differential Revision: https://secure.phabricator.com/D9024
This commit is contained in:
epriestley
2014-05-09 12:25:52 -07:00
parent 78b89711cb
commit 352d9f6b06
26 changed files with 601 additions and 601 deletions

View File

@@ -1,8 +1,7 @@
<?php
final class PhabricatorProjectListController
extends PhabricatorProjectController
implements PhabricatorApplicationSearchResultsControllerInterface {
extends PhabricatorProjectController {
private $queryKey;
@@ -24,33 +23,6 @@ final class PhabricatorProjectListController
return $this->delegateToController($controller);
}
public function renderResultsList(
array $projects,
PhabricatorSavedQuery $query) {
assert_instances_of($projects, 'PhabricatorProject');
$viewer = $this->getRequest()->getUser();
$list = new PHUIObjectItemListView();
$list->setUser($viewer);
foreach ($projects as $project) {
$id = $project->getID();
$item = id(new PHUIObjectItemView())
->setHeader($project->getName())
->setHref($this->getApplicationURI("view/{$id}/"))
->setImageURI($project->getProfileImageURI());
if ($project->getStatus() == PhabricatorProjectStatus::STATUS_ARCHIVED) {
$item->addIcon('delete-grey', pht('Archived'));
$item->setDisabled(true);
}
$list->addItem($item);
}
return $list;
}
public function buildApplicationCrumbs() {
$crumbs = parent::buildApplicationCrumbs();