Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14004940
D14435.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D14435.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -151,7 +151,7 @@
'rsrc/css/phui/phui-timeline-view.css' => '2efceff8',
'rsrc/css/phui/phui-two-column-view.css' => '39ecafb1',
'rsrc/css/phui/phui-workboard-view.css' => '6704d68d',
- 'rsrc/css/phui/phui-workpanel-view.css' => 'adec7699',
+ 'rsrc/css/phui/phui-workpanel-view.css' => 'f83a5f83',
'rsrc/css/sprite-login.css' => '60e8560e',
'rsrc/css/sprite-main-header.css' => 'f07bbb87',
'rsrc/css/sprite-menu.css' => '9dd65b92',
@@ -808,7 +808,7 @@
'phui-timeline-view-css' => '2efceff8',
'phui-two-column-view-css' => '39ecafb1',
'phui-workboard-view-css' => '6704d68d',
- 'phui-workpanel-view-css' => 'adec7699',
+ 'phui-workpanel-view-css' => 'f83a5f83',
'phuix-action-list-view' => 'b5c256b8',
'phuix-action-view' => '8cf6d262',
'phuix-dropdown-menu' => 'bd4c8dca',
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
@@ -371,12 +371,6 @@
->withPHIDs(array($task->getOwnerPHID()))
->executeOne();
}
- $tasks = id(new ProjectBoardTaskCard())
- ->setViewer($viewer)
- ->setTask($task)
- ->setOwner($owner)
- ->setCanEdit(true)
- ->getItem();
$column = id(new PhabricatorProjectColumnQuery())
->setViewer($viewer)
@@ -397,6 +391,18 @@
$remove_from_board = true;
}
+ $handles = ManiphestTaskListView::loadTaskHandles(
+ $viewer, array($task));
+
+ $tasks = id(new ProjectBoardTaskCard())
+ ->setViewer($viewer)
+ ->setTask($task)
+ ->setOwner($owner)
+ ->setProject($column->getProject())
+ ->setCanEdit(true)
+ ->setHandles($handles)
+ ->getItem();
+
$positions = id(new PhabricatorProjectColumnPositionQuery())
->setViewer($viewer)
->withColumns(array($column))
diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php
@@ -342,6 +342,8 @@
->setViewer($viewer)
->setTask($task)
->setOwner($owner)
+ ->setProject($project)
+ ->setHandles($this->handles)
->setCanEdit($can_edit)
->getItem());
}
diff --git a/src/applications/project/controller/PhabricatorProjectMoveController.php b/src/applications/project/controller/PhabricatorProjectMoveController.php
--- a/src/applications/project/controller/PhabricatorProjectMoveController.php
+++ b/src/applications/project/controller/PhabricatorProjectMoveController.php
@@ -149,11 +149,27 @@
->withPHIDs(array($object->getOwnerPHID()))
->executeOne();
}
+
+ $task = id(new ManiphestTaskQuery())
+ ->setViewer($viewer)
+ ->withPHIDs(array($object->getPHID()))
+ ->needProjectPHIDs(true)
+ ->requireCapabilities(
+ array(
+ PhabricatorPolicyCapability::CAN_VIEW,
+ PhabricatorPolicyCapability::CAN_EDIT,
+ ))
+ ->executeOne();
+
+ $handles = ManiphestTaskListView::loadTaskHandles($viewer, [$task]);
+
$card = id(new ProjectBoardTaskCard())
->setViewer($viewer)
- ->setTask($object)
+ ->setTask($task)
->setOwner($owner)
+ ->setProject($project)
->setCanEdit(true)
+ ->setHandles($handles)
->getItem();
return id(new AphrontAjaxResponse())->setContent(
diff --git a/src/applications/project/view/ProjectBoardTaskCard.php b/src/applications/project/view/ProjectBoardTaskCard.php
--- a/src/applications/project/view/ProjectBoardTaskCard.php
+++ b/src/applications/project/view/ProjectBoardTaskCard.php
@@ -5,6 +5,8 @@
private $viewer;
private $task;
private $owner;
+ private $project;
+ private $handles;
private $canEdit;
public function setViewer(PhabricatorUser $viewer) {
@@ -31,6 +33,17 @@
return $this->owner;
}
+ public function setProject(PhabricatorProject $project) {
+ $this->project = $project;
+ return $this;
+ }
+
+ public function setHandles(array $handles) {
+ assert_instances_of($handles, 'PhabricatorObjectHandle');
+ $this->handles = $handles;
+ return $this;
+ }
+
public function setCanEdit($can_edit) {
$this->canEdit = $can_edit;
return $this;
@@ -73,7 +86,28 @@
$card->addAttribute($owner->renderLink());
}
+ $project_handles = $this->getProjectHandles();
+
+ if (!empty($project_handles)) {
+ $card->addAttribute(
+ id(new PHUIHandleTagListView())
+ ->setLimit(4)
+ ->setSlim(true)
+ ->setHandles($project_handles));
+ }
+
+
return $card;
}
+ private function getProjectHandles() {
+ $all_project_phids = $this->getTask()->getProjectPHIDs();
+ $filtered_project_phids = array_diff(
+ $all_project_phids, array($this->project->getPHID()));
+
+ return array_select_keys(
+ $this->handles,
+ $filtered_project_phids);
+ }
+
}
diff --git a/webroot/rsrc/css/phui/phui-workpanel-view.css b/webroot/rsrc/css/phui/phui-workpanel-view.css
--- a/webroot/rsrc/css/phui/phui-workpanel-view.css
+++ b/webroot/rsrc/css/phui/phui-workpanel-view.css
@@ -148,3 +148,17 @@
.phui-workpanel-view .phui-object-item-attribute a {
color: {$bluetext};
}
+
+/* - Item Attributes -----------------------------------------------------------
+
+ Show attributes on separate lines
+
+*/
+
+.phui-workpanel-view .phui-object-item-attribute-spacer {
+ display: none;
+}
+
+.phui-workpanel-view .phui-object-item-attribute {
+ display: block;
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 28, 5:44 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6744489
Default Alt Text
D14435.diff (6 KB)
Attached To
Mode
D14435: Add project handles in workboards
Attached
Detach File
Event Timeline
Log In to Comment