Page MenuHomePhabricator
Paste P2015

Adding + button to workboard columns
ActivePublic

Authored by JohannesMP on Oct 28 2016, 12:27 PM.
// File is: ./src/applications/project/controller/PhabricatorProjectBoardViewController.php
// line above is: $panel->setHeaderTag($count_tag);
// Doing what PhabricatorProjectBoardViewController::getCreateURI() used to do before 6f7bb8c removed it
$edit_config = id(new ManiphestEditEngine())
->setViewer($this->getViewer())
->loadDefaultEditConfiguration(new ManiphestTask());
if ($edit_config) {
$create_uri = "/maniphest/task/edit/form/{$edit_config->getIdentifier()}/";
} else {
$create_uri = "/maniphest/task/edit/";
}
if ($column->getProxyPHID()) {
$default_phid = $column->getProxyPHID();
} else {
$default_phid = $column->getProjectPHID();
}
$panel->addHeaderAction(id(new PHUIIconView())
->setIcon('fa-plus')
->setHref($create_uri)
->addSigil('column-add-task')
->setMetadata(
array(
'createURI' => $create_uri,
'columnPHID' => $column->getPHID(),
'boardPHID' => $project->getPHID(),
'projectPHID' => $default_phid,
))
);
// line below is: $cards = id(new PHUIObjectItemListView())

Event Timeline

JohannesMP updated the paste's language from autodetect to php.
JohannesMP edited the content of this paste. (Show Details)
JohannesMP edited the content of this paste. (Show Details)Oct 28 2016, 12:30 PM
JohannesMP edited the content of this paste. (Show Details)May 16 2017, 7:37 PM
JohannesMP edited the content of this paste. (Show Details)May 17 2017, 12:39 AM
JohannesMP edited the content of this paste. (Show Details)