mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 18:22:41 +01:00
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:
parent
32cff58cd2
commit
1c3373d77d
3 changed files with 48 additions and 19 deletions
|
@ -145,7 +145,7 @@ return array(
|
|||
'rsrc/css/phui/phui-text.css' => '23e9b4b7',
|
||||
'rsrc/css/phui/phui-timeline-view.css' => 'd3ccba00',
|
||||
'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-apps-large.css' => '0a453d4b',
|
||||
'rsrc/css/sprite-apps-xlarge.css' => 'db66c878',
|
||||
|
@ -757,7 +757,7 @@ return array(
|
|||
'phui-text-css' => '23e9b4b7',
|
||||
'phui-timeline-view-css' => 'd3ccba00',
|
||||
'phui-workboard-view-css' => 'bf70dd2e',
|
||||
'phui-workpanel-view-css' => '6f8527f6',
|
||||
'phui-workpanel-view-css' => '97b69459',
|
||||
'policy-css' => '957ea14c',
|
||||
'policy-edit-css' => '05cca26a',
|
||||
'ponder-comment-table-css' => '6cdccea7',
|
||||
|
|
|
@ -4,6 +4,7 @@ final class PhabricatorProjectBoardController
|
|||
extends PhabricatorProjectController {
|
||||
|
||||
private $id;
|
||||
private $handles;
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
|
@ -90,6 +91,8 @@ final class PhabricatorProjectBoardController
|
|||
'moveURI' => $this->getApplicationURI('move/'.$project->getID().'/'),
|
||||
));
|
||||
|
||||
$this->handles = ManiphestTaskListView::loadTaskHandles($viewer, $tasks);
|
||||
|
||||
foreach ($columns as $column) {
|
||||
$panel = id(new PHUIWorkpanelView())
|
||||
->setHeader($column->getDisplayName())
|
||||
|
@ -181,6 +184,7 @@ final class PhabricatorProjectBoardController
|
|||
private function renderTaskCard(ManiphestTask $task) {
|
||||
$request = $this->getRequest();
|
||||
$viewer = $request->getUser();
|
||||
$handles = $this->handles;
|
||||
|
||||
$color_map = ManiphestTaskPriority::getColorMap();
|
||||
$bar_color = idx($color_map, $task->getPriority(), 'grey');
|
||||
|
@ -191,7 +195,7 @@ final class PhabricatorProjectBoardController
|
|||
$task,
|
||||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
|
||||
return id(new PHUIObjectItemView())
|
||||
$card = id(new PHUIObjectItemView())
|
||||
->setObjectName('T'.$task->getID())
|
||||
->setHeader($task->getTitle())
|
||||
->setGrippable($can_edit)
|
||||
|
@ -208,6 +212,13 @@ final class PhabricatorProjectBoardController
|
|||
->setHref('/maniphest/task/edit/'.$task->getID().'/')
|
||||
->setWorkflow(true))
|
||||
->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 {
|
||||
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};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue