Page MenuHomePhabricator

D14597.id35307.diff
No OneTemporary

D14597.id35307.diff

diff --git a/src/applications/maniphest/controller/ManiphestController.php b/src/applications/maniphest/controller/ManiphestController.php
--- a/src/applications/maniphest/controller/ManiphestController.php
+++ b/src/applications/maniphest/controller/ManiphestController.php
@@ -6,21 +6,17 @@
return $this->buildSideNavView(true)->getMenu();
}
- public function buildSideNavView($for_app = false) {
- $user = $this->getRequest()->getUser();
+ public function buildSideNavView() {
+ $viewer = $this->getViewer();
$nav = new AphrontSideNavFilterView();
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
- if ($for_app) {
- $nav->addFilter('task/create/', pht('Create Task'));
- }
-
id(new ManiphestTaskSearchEngine())
- ->setViewer($user)
+ ->setViewer($viewer)
->addNavigationItems($nav->getMenu());
- if ($user->isLoggedIn()) {
+ if ($viewer->isLoggedIn()) {
// For now, don't give logged-out users access to reports.
$nav->addLabel(pht('Reports'));
$nav->addFilter('report', pht('Reports'));
diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
--- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php
@@ -349,19 +349,23 @@
$object_box->addPropertyList($description);
}
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $info_view,
- $object_box,
- $timeline,
- $comment_box,
- $preview_panel,
- ),
- array(
- 'title' => 'T'.$task->getID().' '.$task->getTitle(),
- 'pageObjects' => array($task->getPHID()),
- ));
+ $title = 'T'.$task->getID().' '.$task->getTitle();
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->setPageObjectPHIDs(
+ array(
+ $task->getPHID(),
+ ))
+ ->appendChild(
+ array(
+ $info_view,
+ $object_box,
+ $timeline,
+ $comment_box,
+ $preview_panel,
+ ));
}
private function buildHeaderView(ManiphestTask $task) {
diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php
--- a/src/applications/maniphest/controller/ManiphestTaskEditController.php
+++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php
@@ -741,16 +741,17 @@
$crumbs->addTextCrumb($header_name);
- return $this->buildApplicationPage(
- array(
- $crumbs,
- $form_box,
- $preview,
- ),
- array(
- 'title' => $header_name,
- 'pageObjects' => $page_objects,
- ));
+ $title = $header_name;
+
+ return $this->newPage()
+ ->setTitle($title)
+ ->setCrumbs($crumbs)
+ ->setPageObjectPHIDs($page_objects)
+ ->appendChild(
+ array(
+ $form_box,
+ $preview,
+ ));
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 9, 8:50 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6723143
Default Alt Text
D14597.id35307.diff (3 KB)

Event Timeline