1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
phorge-phorge/src/applications/drydock/controller/DrydockResourceListController.php
epriestley 53c1483ee5 Make most Drydock web interfaces work with mobile
Summary: The logs bits still need some work but add crumbs/lists to everything else. Also build a propery DrydockResourceQuery.

Test Plan: Looked at lease list/detail; resource list/detail.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D4221
2012-12-17 14:47:21 -08:00

45 lines
1 KiB
PHP

<?php
final class DrydockResourceListController extends DrydockController {
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$title = pht('Resources');
$resource_header = id(new PhabricatorHeaderView())
->setHeader($title);
$pager = new AphrontPagerView();
$pager->setURI(new PhutilURI('/drydock/resource/'), 'offset');
$resources = id(new DrydockResourceQuery())
->executeWithOffsetPager($pager);
$resource_list = $this->buildResourceListView($resources);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($title)
->setHref($request->getRequestURI()));
$nav = $this->buildSideNav('resource');
$nav->setCrumbs($crumbs);
$nav->appendChild(
array(
$resource_header,
$resource_list,
$pager,
));
return $this->buildApplicationPage(
$nav,
array(
'title' => $title,
'device' => true,
));
}
}