Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13997109
D14935.id36563.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
D14935.id36563.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
@@ -153,7 +153,7 @@
'rsrc/css/phui/phui-timeline-view.css' => '2efceff8',
'rsrc/css/phui/phui-two-column-view.css' => 'c75bfc5b',
'rsrc/css/phui/workboards/phui-workboard.css' => 'b07a5524',
- 'rsrc/css/phui/workboards/phui-workcard.css' => 'ffb55371',
+ 'rsrc/css/phui/workboards/phui-workcard.css' => '1115dd9d',
'rsrc/css/phui/workboards/phui-workpanel.css' => 'e9339dc3',
'rsrc/css/sprite-login.css' => '60e8560e',
'rsrc/css/sprite-menu.css' => '9dd65b92',
@@ -830,7 +830,7 @@
'phui-timeline-view-css' => '2efceff8',
'phui-two-column-view-css' => 'c75bfc5b',
'phui-workboard-view-css' => 'b07a5524',
- 'phui-workcard-view-css' => 'ffb55371',
+ 'phui-workcard-view-css' => '1115dd9d',
'phui-workpanel-view-css' => 'e9339dc3',
'phuix-action-list-view' => 'b5c256b8',
'phuix-action-view' => '8cf6d262',
diff --git a/src/applications/maniphest/editor/ManiphestEditEngine.php b/src/applications/maniphest/editor/ManiphestEditEngine.php
--- a/src/applications/maniphest/editor/ManiphestEditEngine.php
+++ b/src/applications/maniphest/editor/ManiphestEditEngine.php
@@ -294,6 +294,7 @@
$column_tasks = id(new ManiphestTaskQuery())
->setViewer($viewer)
->withPHIDs($task_phids)
+ ->needProjectPHIDs(true)
->execute();
if ($order == PhabricatorProjectColumn::ORDER_NATURAL) {
@@ -333,6 +334,7 @@
->setViewer($viewer)
->setTask($task)
->setOwner($owner)
+ ->setProject($column->getProject())
->setCanEdit(true)
->getItem();
diff --git a/src/applications/phid/view/PHUIHandleTagListView.php b/src/applications/phid/view/PHUIHandleTagListView.php
--- a/src/applications/phid/view/PHUIHandleTagListView.php
+++ b/src/applications/phid/view/PHUIHandleTagListView.php
@@ -9,7 +9,7 @@
private $slim;
private $showHovercards;
- public function setHandles(array $handles) {
+ public function setHandles($handles) {
$this->handles = $handles;
return $this;
}
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
@@ -304,6 +304,7 @@
$can_edit = idx($task_can_edit_map, $task->getPHID(), false);
$cards->addItem(id(new ProjectBoardTaskCard())
->setViewer($viewer)
+ ->setProject($project)
->setTask($task)
->setOwner($owner)
->setCanEdit($can_edit)
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
@@ -26,9 +26,10 @@
return new Aphront404Response();
}
- $object = id(new PhabricatorObjectQuery())
+ $object = id(new ManiphestTaskQuery())
->setViewer($viewer)
->withPHIDs(array($object_phid))
+ ->needProjectPHIDs(true)
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
@@ -95,6 +96,7 @@
$tasks = id(new ManiphestTaskQuery())
->setViewer($viewer)
->withPHIDs($task_phids)
+ ->needProjectPHIDs(true)
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
@@ -149,11 +151,13 @@
->withPHIDs(array($object->getOwnerPHID()))
->executeOne();
}
+
$card = id(new ProjectBoardTaskCard())
->setViewer($viewer)
->setTask($object)
->setOwner($owner)
->setCanEdit(true)
+ ->setProject($project)
->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
@@ -3,6 +3,7 @@
final class ProjectBoardTaskCard extends Phobject {
private $viewer;
+ private $project;
private $task;
private $owner;
private $canEdit;
@@ -15,6 +16,14 @@
return $this->viewer;
}
+ public function setProject(PhabricatorProject $project) {
+ $this->project = $project;
+ return $this;
+ }
+ public function getProject() {
+ return $this->project;
+ }
+
public function setTask(ManiphestTask $task) {
$this->task = $task;
return $this;
@@ -44,13 +53,14 @@
$task = $this->getTask();
$owner = $this->getOwner();
$can_edit = $this->getCanEdit();
+ $viewer = $this->getViewer();
$color_map = ManiphestTaskPriority::getColorMap();
$bar_color = idx($color_map, $task->getPriority(), 'grey');
$card = id(new PHUIObjectItemView())
->setObject($task)
- ->setUser($this->getViewer())
+ ->setUser($viewer)
->setObjectName('T'.$task->getID())
->setHeader($task->getTitle())
->setGrippable($can_edit)
@@ -73,6 +83,18 @@
$card->addAttribute($owner->renderLink());
}
+ $project_phids = array_fuse($task->getProjectPHIDs());
+ unset($project_phids[$this->project->getPHID()]);
+
+ $handle_list = $viewer->loadHandles($project_phids);
+ $tag_list = id(new PHUIHandleTagListView())
+ ->setSlim(true)
+ ->setHandles($handle_list);
+
+ if (!$tag_list->isEmpty()) {
+ $card->addAttribute($tag_list);
+ }
+
return $card;
}
diff --git a/src/view/AphrontTagView.php b/src/view/AphrontTagView.php
--- a/src/view/AphrontTagView.php
+++ b/src/view/AphrontTagView.php
@@ -77,6 +77,10 @@
return $this->id;
}
+ public function isEmpty() {
+ return empty($this->getTagContent());
+ }
+
protected function getTagName() {
return 'div';
}
diff --git a/webroot/rsrc/css/phui/workboards/phui-workcard.css b/webroot/rsrc/css/phui/workboards/phui-workcard.css
--- a/webroot/rsrc/css/phui/workboards/phui-workcard.css
+++ b/webroot/rsrc/css/phui/workboards/phui-workcard.css
@@ -89,6 +89,10 @@
background-color: {$sh-greybackground};
}
+.phui-workboard-view .phui-object-item.drag-dragging .phui-list-item-href {
+ display: none;
+}
+
.phui-workboard-view .drag-dragging.phui-object-item-bar-color-red {
background-color: {$sh-redbackground};
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 25, 2:10 AM (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6747655
Default Alt Text
D14935.id36563.diff (6 KB)
Attached To
Mode
D14935: Add project tags to workboard cards
Attached
Detach File
Event Timeline
Log In to Comment