mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 03:12:41 +01:00
c5e7222f9e
Summary: Convert to responsive layout, pht, etc. Test Plan: Test Herald on desktop and mobile. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5976
59 lines
1.5 KiB
PHP
59 lines
1.5 KiB
PHP
<?php
|
|
|
|
final class HeraldRuleEditHistoryController extends HeraldController {
|
|
|
|
private $id;
|
|
|
|
public function willProcessRequest(array $data) {
|
|
$this->id = idx($data, 'id');
|
|
}
|
|
|
|
public function processRequest() {
|
|
$request = $this->getRequest();
|
|
|
|
$edit_query = new HeraldEditLogQuery();
|
|
if ($this->id) {
|
|
$edit_query->withRuleIDs(array($this->id));
|
|
}
|
|
|
|
$pager = new AphrontPagerView();
|
|
$pager->setURI($request->getRequestURI(), 'offset');
|
|
$pager->setOffset($request->getStr('offset'));
|
|
|
|
$edits = $edit_query->executeWithOffsetPager($pager);
|
|
|
|
$need_phids = mpull($edits, 'getEditorPHID');
|
|
$handles = $this->loadViewerHandles($need_phids);
|
|
|
|
$list_view = id(new HeraldRuleEditHistoryView())
|
|
->setEdits($edits)
|
|
->setHandles($handles)
|
|
->setUser($this->getRequest()->getUser());
|
|
|
|
$panel = new AphrontPanelView();
|
|
$panel->setHeader(pht('Edit History'));
|
|
$panel->appendChild($list_view);
|
|
$panel->setNoBackground();
|
|
|
|
$crumbs = $this
|
|
->buildApplicationCrumbs($can_create = false)
|
|
->addCrumb(
|
|
id(new PhabricatorCrumbView())
|
|
->setName(pht('Edit History'))
|
|
->setHref($this->getApplicationURI('herald/history')));
|
|
|
|
$nav = $this->renderNav();
|
|
$nav->selectFilter('history');
|
|
$nav->appendChild($panel);
|
|
$nav->setCrumbs($crumbs);
|
|
|
|
return $this->buildApplicationPage(
|
|
$nav,
|
|
array(
|
|
'title' => pht('Rule Edit History'),
|
|
'device' => true,
|
|
'dust' => true,
|
|
));
|
|
}
|
|
|
|
}
|