1
0
Fork 0
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:
epriestley 2014-05-19 12:39:00 -07:00
parent dd5d30e643
commit ba6a5dae61
4 changed files with 22 additions and 17 deletions

View file

@ -6,6 +6,10 @@ final class PhabricatorApplicationFact extends PhabricatorApplication {
return 'Analyze Data';
}
public function getName() {
return pht('Facts');
}
public function getBaseURI() {
return '/fact/';
}

View file

@ -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',
));

View file

@ -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());
}
}

View file

@ -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',
));
}