mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-31 17:08:22 +01:00
Make "Facts" publicly viewable
Summary: Ref T4830. Also deletes some very obsolete code. Test Plan: Looked at Facts as logged out user. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4830 Differential Revision: https://secure.phabricator.com/D9177
This commit is contained in:
parent
dd5d30e643
commit
ba6a5dae61
4 changed files with 22 additions and 17 deletions
|
@ -6,6 +6,10 @@ final class PhabricatorApplicationFact extends PhabricatorApplication {
|
|||
return 'Analyze Data';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Facts');
|
||||
}
|
||||
|
||||
public function getBaseURI() {
|
||||
return '/fact/';
|
||||
}
|
||||
|
|
|
@ -80,8 +80,14 @@ final class PhabricatorFactChartController extends PhabricatorFactController {
|
|||
$panel->setHeader('Count of '.$spec->getName());
|
||||
$panel->appendChild($chart);
|
||||
|
||||
return $this->buildStandardPageResponse(
|
||||
$panel,
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Chart'));
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$panel,
|
||||
),
|
||||
array(
|
||||
'title' => 'Chart',
|
||||
));
|
||||
|
|
|
@ -2,17 +2,4 @@
|
|||
|
||||
abstract class PhabricatorFactController extends PhabricatorController {
|
||||
|
||||
public function buildStandardPageResponse($view, array $data) {
|
||||
$page = $this->buildStandardPageView();
|
||||
|
||||
$page->setBaseURI('/fact/');
|
||||
$page->setTitle(idx($data, 'title'));
|
||||
|
||||
$page->setGlyph("\xCE\xA3");
|
||||
$page->appendChild($view);
|
||||
|
||||
$response = new AphrontWebpageResponse();
|
||||
return $response->setContent($page->render());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
final class PhabricatorFactHomeController extends PhabricatorFactController {
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function processRequest() {
|
||||
$request = $this->getRequest();
|
||||
$user = $request->getUser();
|
||||
|
@ -53,13 +57,17 @@ final class PhabricatorFactHomeController extends PhabricatorFactController {
|
|||
|
||||
$chart_form = $this->buildChartForm();
|
||||
|
||||
return $this->buildStandardPageResponse(
|
||||
$crumbs = $this->buildApplicationCrumbs();
|
||||
$crumbs->addTextCrumb(pht('Home'));
|
||||
|
||||
return $this->buildApplicationPage(
|
||||
array(
|
||||
$crumbs,
|
||||
$chart_form,
|
||||
$panel,
|
||||
),
|
||||
array(
|
||||
'title' => 'Facts!',
|
||||
'title' => 'Facts',
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue