Add owner to task boards, tidy UI
Summary: Displays task owner, hides grip texture. Test Plan: Visit a board in my sandbox, grab and move things. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8246
This commit is contained in:
@@ -145,7 +145,7 @@ return array(
|
|||||||
'rsrc/css/phui/phui-text.css' => '23e9b4b7',
|
'rsrc/css/phui/phui-text.css' => '23e9b4b7',
|
||||||
'rsrc/css/phui/phui-timeline-view.css' => 'd3ccba00',
|
'rsrc/css/phui/phui-timeline-view.css' => 'd3ccba00',
|
||||||
'rsrc/css/phui/phui-workboard-view.css' => 'bf70dd2e',
|
'rsrc/css/phui/phui-workboard-view.css' => 'bf70dd2e',
|
||||||
'rsrc/css/phui/phui-workpanel-view.css' => '6f8527f6',
|
'rsrc/css/phui/phui-workpanel-view.css' => '97b69459',
|
||||||
'rsrc/css/sprite-actions.css' => '4557baf8',
|
'rsrc/css/sprite-actions.css' => '4557baf8',
|
||||||
'rsrc/css/sprite-apps-large.css' => '0a453d4b',
|
'rsrc/css/sprite-apps-large.css' => '0a453d4b',
|
||||||
'rsrc/css/sprite-apps-xlarge.css' => 'db66c878',
|
'rsrc/css/sprite-apps-xlarge.css' => 'db66c878',
|
||||||
@@ -757,7 +757,7 @@ return array(
|
|||||||
'phui-text-css' => '23e9b4b7',
|
'phui-text-css' => '23e9b4b7',
|
||||||
'phui-timeline-view-css' => 'd3ccba00',
|
'phui-timeline-view-css' => 'd3ccba00',
|
||||||
'phui-workboard-view-css' => 'bf70dd2e',
|
'phui-workboard-view-css' => 'bf70dd2e',
|
||||||
'phui-workpanel-view-css' => '6f8527f6',
|
'phui-workpanel-view-css' => '97b69459',
|
||||||
'policy-css' => '957ea14c',
|
'policy-css' => '957ea14c',
|
||||||
'policy-edit-css' => '05cca26a',
|
'policy-edit-css' => '05cca26a',
|
||||||
'ponder-comment-table-css' => '6cdccea7',
|
'ponder-comment-table-css' => '6cdccea7',
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ final class PhabricatorProjectBoardController
|
|||||||
extends PhabricatorProjectController {
|
extends PhabricatorProjectController {
|
||||||
|
|
||||||
private $id;
|
private $id;
|
||||||
|
private $handles;
|
||||||
|
|
||||||
public function shouldAllowPublic() {
|
public function shouldAllowPublic() {
|
||||||
return true;
|
return true;
|
||||||
@@ -90,6 +91,8 @@ final class PhabricatorProjectBoardController
|
|||||||
'moveURI' => $this->getApplicationURI('move/'.$project->getID().'/'),
|
'moveURI' => $this->getApplicationURI('move/'.$project->getID().'/'),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$this->handles = ManiphestTaskListView::loadTaskHandles($viewer, $tasks);
|
||||||
|
|
||||||
foreach ($columns as $column) {
|
foreach ($columns as $column) {
|
||||||
$panel = id(new PHUIWorkpanelView())
|
$panel = id(new PHUIWorkpanelView())
|
||||||
->setHeader($column->getDisplayName())
|
->setHeader($column->getDisplayName())
|
||||||
@@ -181,6 +184,7 @@ final class PhabricatorProjectBoardController
|
|||||||
private function renderTaskCard(ManiphestTask $task) {
|
private function renderTaskCard(ManiphestTask $task) {
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$viewer = $request->getUser();
|
$viewer = $request->getUser();
|
||||||
|
$handles = $this->handles;
|
||||||
|
|
||||||
$color_map = ManiphestTaskPriority::getColorMap();
|
$color_map = ManiphestTaskPriority::getColorMap();
|
||||||
$bar_color = idx($color_map, $task->getPriority(), 'grey');
|
$bar_color = idx($color_map, $task->getPriority(), 'grey');
|
||||||
@@ -191,23 +195,30 @@ final class PhabricatorProjectBoardController
|
|||||||
$task,
|
$task,
|
||||||
PhabricatorPolicyCapability::CAN_EDIT);
|
PhabricatorPolicyCapability::CAN_EDIT);
|
||||||
|
|
||||||
return id(new PHUIObjectItemView())
|
$card = id(new PHUIObjectItemView())
|
||||||
->setObjectName('T'.$task->getID())
|
->setObjectName('T'.$task->getID())
|
||||||
->setHeader($task->getTitle())
|
->setHeader($task->getTitle())
|
||||||
->setGrippable($can_edit)
|
->setGrippable($can_edit)
|
||||||
->setHref('/T'.$task->getID())
|
->setHref('/T'.$task->getID())
|
||||||
->addSigil('project-card')
|
->addSigil('project-card')
|
||||||
->setMetadata(
|
->setMetadata(
|
||||||
array(
|
array(
|
||||||
'objectPHID' => $task->getPHID(),
|
'objectPHID' => $task->getPHID(),
|
||||||
))
|
))
|
||||||
->addAction(
|
->addAction(
|
||||||
id(new PHUIListItemView())
|
id(new PHUIListItemView())
|
||||||
->setName(pht('Edit'))
|
->setName(pht('Edit'))
|
||||||
->setIcon('edit')
|
->setIcon('edit')
|
||||||
->setHref('/maniphest/task/edit/'.$task->getID().'/')
|
->setHref('/maniphest/task/edit/'.$task->getID().'/')
|
||||||
->setWorkflow(true))
|
->setWorkflow(true))
|
||||||
->setBarColor($bar_color);
|
->setBarColor($bar_color);
|
||||||
|
|
||||||
|
if ($task->getOwnerPHID()) {
|
||||||
|
$owner = $handles[$task->getOwnerPHID()];
|
||||||
|
$card->addAttribute($owner->renderLink());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $card;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,3 +79,21 @@
|
|||||||
.project-column-empty.drag-target-list {
|
.project-column-empty.drag-target-list {
|
||||||
background: rgba(255,255,255,.7);
|
background: rgba(255,255,255,.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* - Workpanel Cards -----------------------------------------------------------
|
||||||
|
|
||||||
|
Slight display changes for how cards work in tight spaces
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
.phui-workpanel-view .phui-object-item-grippable .phui-object-item-frame {
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-workpanel-view .phui-object-item-grip {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.phui-workpanel-view .phui-object-item-attribute a {
|
||||||
|
color: {$bluetext};
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user