Differential D20362 Diff 48631 src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | foreach ($dashboards as $dashboard) { | ||||
if ($author_phid) { | if ($author_phid) { | ||||
$phids[] = $author_phid; | $phids[] = $author_phid; | ||||
} | } | ||||
} | } | ||||
$handles = $viewer->loadHandles($phids); | $handles = $viewer->loadHandles($phids); | ||||
$list = id(new PHUIObjectItemListView()) | $list = id(new PHUIObjectItemListView()) | ||||
->setUser($viewer); | ->setViewer($viewer); | ||||
foreach ($dashboards as $dashboard) { | foreach ($dashboards as $dashboard) { | ||||
$id = $dashboard->getID(); | |||||
$item = id(new PHUIObjectItemView()) | $item = id(new PHUIObjectItemView()) | ||||
->setUser($viewer) | ->setViewer($viewer) | ||||
->setObjectName($dashboard->getObjectName()) | |||||
->setHeader($dashboard->getName()) | ->setHeader($dashboard->getName()) | ||||
->setHref($this->getApplicationURI("view/{$id}/")) | ->setHref($dashboard->getURI()) | ||||
->setObject($dashboard); | ->setObject($dashboard); | ||||
$bg_color = 'bg-dark'; | $bg_color = 'bg-dark'; | ||||
if ($dashboard->isArchived()) { | if ($dashboard->isArchived()) { | ||||
$item->setDisabled(true); | $item->setDisabled(true); | ||||
$bg_color = 'bg-grey'; | $bg_color = 'bg-grey'; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |