1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 10:52:41 +01:00
phorge-phorge/src/applications/drydock/controller/DrydockLeaseListController.php
Chad Little e8bb24fd60 Policy, Status in PHUIHeaderView
Summary: The adds the ability to set 'properties' such as state, privacy, due date to the header of objects.

Test Plan: Implemented in Paste, Pholio. Tested various states.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D7016
2013-09-17 09:12:37 -07:00

49 lines
1.1 KiB
PHP

<?php
final class DrydockLeaseListController extends DrydockController {
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$nav = $this->buildSideNav('lease');
$pager = new AphrontPagerView();
$pager->setURI(new PhutilURI('/drydock/lease/'), 'offset');
$pager->setOffset($request->getInt('offset'));
$leases = id(new DrydockLeaseQuery())
->needResources(true)
->executeWithOffsetPager($pager);
$title = pht('Leases');
$header = id(new PHUIHeaderView())
->setHeader($title);
$lease_list = $this->buildLeaseListView($leases);
$nav->appendChild(
array(
$header,
$lease_list,
$pager,
));
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($title)
->setHref($request->getRequestURI()));
$nav->setCrumbs($crumbs);
return $this->buildApplicationPage(
$nav,
array(
'device' => true,
'title' => $title,
));
}
}