3 final class PhabricatorPeopleProfileRevisionsController
4 extends PhabricatorPeopleProfileController
{
6 public function handleRequest(AphrontRequest
$request) {
7 $viewer = $this->getViewer();
8 $id = $request->getURIData('id');
10 $user = id(new PhabricatorPeopleQuery())
14 ->needProfileImage(true)
15 ->needAvailability(true)
18 return new Aphront404Response();
21 $class = 'PhabricatorDifferentialApplication';
22 if (!PhabricatorApplication
::isClassInstalledForViewer($class, $viewer)) {
23 return new Aphront404Response();
26 $this->setUser($user);
27 $title = array(pht('Recent Revisions'), $user->getUsername());
28 $header = $this->buildProfileHeader();
29 $commits = $this->buildRevisionsView($user);
31 $crumbs = $this->buildApplicationCrumbs();
32 $crumbs->addTextCrumb(pht('Recent Revisions'));
33 $crumbs->setBorder(true);
35 $nav = $this->newNavigation(
37 PhabricatorPeopleProfileMenuEngine
::ITEM_REVISIONS
);
39 $view = id(new PHUITwoColumnView())
41 ->addClass('project-view-home')
42 ->addClass('project-view-people-home')
47 return $this->newPage()
54 private function buildRevisionsView(PhabricatorUser
$user) {
55 $viewer = $this->getViewer();
57 $revisions = id(new DifferentialRevisionQuery())
59 ->withAuthors(array($user->getPHID()))
66 $list = id(new DifferentialRevisionListView())
69 ->setRevisions($revisions)
70 ->setNoDataString(pht('No recent revisions.'));
72 $view = id(new PHUIObjectBoxView())
73 ->setHeaderText(pht('Recent Revisions'))
74 ->setBackground(PHUIObjectBoxView
::BLUE_PROPERTY
)