Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F17899580
D15417.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D15417.diff
View Options
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
@@ -73,8 +73,7 @@
$header = $this->buildHeaderView($task);
$details = $this->buildPropertyView($task, $field_list, $edges, $handles);
$description = $this->buildDescriptionView($task, $engine);
- $actions = $this->buildActionView($task);
- $properties = $this->buildPropertyListView($task, $handles);
+ $curtain = $this->buildCurtain($task);
$title = pht('%s %s', $monogram, $task->getTitle());
@@ -87,14 +86,13 @@
$view = id(new PHUITwoColumnView())
->setHeader($header)
+ ->setCurtain($curtain)
->setMainColumn(array(
$timeline,
$comment_view,
))
->addPropertySection(pht('DETAILS'), $details)
- ->addPropertySection(pht('DESCRIPTION'), $description)
- ->setPropertyList($properties)
- ->setActionList($actions);
+ ->addPropertySection(pht('DESCRIPTION'), $description);
return $this->newPage()
->setTitle($title)
@@ -148,8 +146,8 @@
}
- private function buildActionView(ManiphestTask $task) {
- $viewer = $this->getRequest()->getUser();
+ private function buildCurtain(ManiphestTask $task) {
+ $viewer = $this->getViewer();
$id = $task->getID();
$phid = $task->getPHID();
@@ -159,11 +157,9 @@
$task,
PhabricatorPolicyCapability::CAN_EDIT);
- $view = id(new PhabricatorActionListView())
- ->setUser($viewer)
- ->setObject($task);
+ $curtain = $this->newCurtainView($task);
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName(pht('Edit Task'))
->setIcon('fa-pencil')
@@ -171,7 +167,7 @@
->setDisabled(!$can_edit)
->setWorkflow(!$can_edit));
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName(pht('Merge Duplicates In'))
->setHref("/search/attach/{$phid}/TASK/merge/")
@@ -199,7 +195,7 @@
$edit_uri = $this->getApplicationURI($edit_uri);
}
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName(pht('Create Subtask'))
->setHref($edit_uri)
@@ -207,7 +203,7 @@
->setDisabled(!$can_create)
->setWorkflow(!$can_create));
- $view->addAction(
+ $curtain->addAction(
id(new PhabricatorActionView())
->setName(pht('Edit Blocking Tasks'))
->setHref("/search/attach/{$phid}/TASK/blocks/")
@@ -216,7 +212,30 @@
->setDisabled(!$can_edit)
->setWorkflow(true));
- return $view;
+
+ $owner_phid = $task->getOwnerPHID();
+ if ($owner_phid) {
+ $assigned_to = $viewer
+ ->renderHandle($owner_phid)
+ ->setShowHovercard(true);
+ } else {
+ $assigned_to = phutil_tag('em', array(), pht('None'));
+ }
+
+ $curtain->newPanel()
+ ->setHeaderText(pht('Assigned To'))
+ ->appendChild($assigned_to);
+
+ $author_phid = $task->getAuthorPHID();
+ $author = $viewer
+ ->renderHandle($author_phid)
+ ->setShowHovercard(true);
+
+ $curtain->newPanel()
+ ->setHeaderText(pht('Author'))
+ ->appendChild($author);
+
+ return $curtain;
}
private function buildPropertyView(
@@ -307,37 +326,6 @@
return null;
}
- private function buildPropertyListView(ManiphestTask $task, $handles) {
- $viewer = $this->getRequest()->getUser();
- $view = id(new PHUIPropertyListView())
- ->setUser($viewer)
- ->setObject($task);
-
- $view->invokeWillRenderEvent();
-
- $owner_phid = $task->getOwnerPHID();
- if ($owner_phid) {
- $assigned_to = $handles
- ->renderHandle($owner_phid)
- ->setShowHovercard(true);
- } else {
- $assigned_to = phutil_tag('em', array(), pht('None'));
- }
-
- $view->addProperty(pht('Assigned To'), $assigned_to);
-
- $author_phid = $task->getAuthorPHID();
- $author = $handles
- ->renderHandle($author_phid)
- ->setShowHovercard(true);
-
- $date = phabricator_datetime($task->getDateCreated(), $viewer);
-
- $view->addProperty(pht('Author'), $author);
-
- return $view;
- }
-
private function buildDescriptionView(
ManiphestTask $task,
PhabricatorMarkupEngine $engine) {
diff --git a/src/view/layout/PHUICurtainView.php b/src/view/layout/PHUICurtainView.php
--- a/src/view/layout/PHUICurtainView.php
+++ b/src/view/layout/PHUICurtainView.php
@@ -15,6 +15,17 @@
return $this;
}
+ public function newPanel() {
+ $panel = new PHUICurtainPanelView();
+ $this->addPanel($panel);
+
+ // By default, application panels go at the bottom of the curtain, below
+ // extension panels.
+ $panel->setOrder(100000);
+
+ return $panel;
+ }
+
public function setActionList(PhabricatorActionListView $action_list) {
$this->actionList = $action_list;
return $this;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 30, 8:40 AM (1 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8731547
Default Alt Text
D15417.diff (5 KB)
Attached To
Mode
D15417: Convert Maniphest to curtain view
Attached
Detach File
Event Timeline
Log In to Comment