mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-11 17:32:41 +01:00
84f21c8a20
Summary: Adds mobile support to Audit, converts tables to object item views. I also colored 'concerns' and 'audit required' in the list, but nothing else. We can add more if needed but I'm assuming these are the two most important cases. Test Plan: Tested as much as I could, a little unsure of a few things since my local repo isn't super filled. Will let epriestley run through. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5962
49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
abstract class PhabricatorAuditController extends PhabricatorController {
|
|
|
|
public $filter;
|
|
|
|
public function buildSideNavView() {
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI('/audit/view/'));
|
|
$nav->addLabel(pht('Active'));
|
|
$nav->addFilter('active', pht('Need Attention'));
|
|
|
|
$nav->addLabel(pht('Audits'));
|
|
$nav->addFilter('audits', pht('All'));
|
|
$nav->addFilter('user', pht('By User'));
|
|
$nav->addFilter('project', pht('By Project'));
|
|
$nav->addFilter('package', pht('By Package'));
|
|
$nav->addFilter('repository', pht('By Repository'));
|
|
|
|
$nav->addLabel(pht('Commits'));
|
|
$nav->addFilter('commits', pht('All'));
|
|
$nav->addFilter('author', pht('By Author'));
|
|
$nav->addFilter('packagecommits', pht('By Package'));
|
|
|
|
$this->filter = $nav->selectFilter($this->filter, 'active');
|
|
|
|
return $nav;
|
|
}
|
|
|
|
public function buildApplicationMenu() {
|
|
return $this->buildSideNavView()->getMenu();
|
|
}
|
|
|
|
public function buildStandardPageResponse($view, array $data) {
|
|
|
|
$page = $this->buildStandardPageView();
|
|
|
|
$page->setApplicationName(pht('Audit'));
|
|
$page->setBaseURI('/audit/');
|
|
$page->setTitle(idx($data, 'title'));
|
|
$page->setGlyph("\xE2\x9C\x8D");
|
|
$page->appendChild($view);
|
|
|
|
$response = new AphrontWebpageResponse();
|
|
return $response->setContent($page->render());
|
|
|
|
}
|
|
}
|