Page MenuHomePhabricator

partial_diff.diff

Authored By
epriestley
Mar 6 2014, 1:35 AM
Size
3 KB
Referenced Files
None
Subscribers
None

partial_diff.diff

commit bc04b9e6caa6e280debb1c60d38fdcc5e2eba145
Author: epriestley <git@epriestley.com>
Date: Thu Feb 13 18:50:59 2014 -0800
WIP
diff --git a/src/applications/maniphest/storage/ManiphestTransaction.php b/src/applications/maniphest/storage/ManiphestTransaction.php
index 568b290..4c7e026 100644
--- a/src/applications/maniphest/storage/ManiphestTransaction.php
+++ b/src/applications/maniphest/storage/ManiphestTransaction.php
@@ -12,6 +12,7 @@ final class ManiphestTransaction
const TYPE_PRIORITY = 'priority';
const TYPE_EDGE = 'edge';
const TYPE_ATTACH = 'attach';
+ const TYPE_BOARDCOLUMN = 'boardcolumn';
public function getApplicationName() {
return 'maniphest';
diff --git a/src/applications/project/controller/PhabricatorProjectBoardController.php b/src/applications/project/controller/PhabricatorProjectBoardController.php
index 8aa5792..3a66050 100644
--- a/src/applications/project/controller/PhabricatorProjectBoardController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardController.php
@@ -93,8 +93,22 @@ final class PhabricatorProjectBoardController
foreach ($columns as $column) {
$panel = id(new PHUIWorkpanelView())
->setHeader($column->getDisplayName())
- ->setHeaderColor($column->getHeaderColor())
- ->setEditURI('edit/'.$column->getID().'/');
+ ->setHeaderColor($column->getHeaderColor());
+
+ $edit_uri = $this->getApplicationURI('board/'.$project->getID().'/edit/'.$column->getID().'/');
+ $add_uri = '/maniphest/task/create/?boardPHID='.$column->getPHID();
+
+ $panel->addAction(
+ id(new PHUIIconView())
+ ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS)
+ ->setSpriteIcon('settings-grey')
+ ->setHref($edit_uri));
+
+ $panel->addAction(
+ id(new PHUIIconView())
+ ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS)
+ ->setSpriteIcon('new-grey')
+ ->setHref($add_uri));
$cards = id(new PHUIObjectItemListView())
->setUser($viewer)
diff --git a/src/view/phui/PHUIWorkpanelView.php b/src/view/phui/PHUIWorkpanelView.php
index 2d4b946..c3f9208 100644
--- a/src/view/phui/PHUIWorkpanelView.php
+++ b/src/view/phui/PHUIWorkpanelView.php
@@ -3,8 +3,8 @@
final class PHUIWorkpanelView extends AphrontTagView {
private $cards = array();
+ private $actions = array();
private $header;
- private $editURI;
private $footerAction;
private $headerColor = PhabricatorActionHeaderView::HEADER_GREY;
@@ -18,6 +18,11 @@ final class PHUIWorkpanelView extends AphrontTagView {
return $this;
}
+ public function addAction(PHUIIconView $action) {
+ $this->actions[] = $action;
+ return $this;
+ }
+
public function setEditURI($edit_uri) {
$this->editURI = $edit_uri;
return $this;
@@ -53,15 +58,13 @@ final class PHUIWorkpanelView extends AphrontTagView {
$footer_tag);
}
- $header_edit = id(new PHUIIconView())
- ->setSpriteSheet(PHUIIconView::SPRITE_ACTIONS)
- ->setSpriteIcon('settings-grey')
- ->setHref($this->editURI);
-
$header = id(new PhabricatorActionHeaderView())
->setHeaderTitle($this->header)
- ->setHeaderColor($this->headerColor)
- ->addAction($header_edit);
+ ->setHeaderColor($this->headerColor);
+
+ foreach ($this->actions as $action) {
+ $header->addAction($action);
+ }
$body = phutil_tag(
'div',

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/q6/4f/nmdlu444gn2bntye
Default Alt Text
partial_diff.diff (3 KB)

Event Timeline