Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15400478
D17879.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D17879.diff
View Options
diff --git a/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php b/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php
@@ -28,6 +28,7 @@
$this->setProject($board);
$id = $board->getID();
+ $view_uri = $this->getApplicationURI("board/{$id}/");
$manage_uri = $this->getApplicationURI("board/{$id}/manage/");
if ($request->isFormPost()) {
@@ -47,7 +48,7 @@
->applyTransactions($board, $xactions);
return id(new AphrontRedirectResponse())
- ->setURI($manage_uri);
+ ->setURI($view_uri);
}
$nav = $this->getProfileMenu();
diff --git a/src/applications/project/controller/PhabricatorProjectBoardManageController.php b/src/applications/project/controller/PhabricatorProjectBoardManageController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardManageController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardManageController.php
@@ -31,112 +31,58 @@
$board_id = $board->getID();
$header = $this->buildHeaderView($board);
- $actions = $this->buildActionView($board);
- $properties = $this->buildPropertyView($board);
-
- $properties->setActionList($actions);
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Workboard'), "/project/board/{$board_id}/");
$crumbs->addTextCrumb(pht('Manage'));
-
- $box = id(new PHUIObjectBoxView())
- ->setHeader($header)
- ->addPropertyList($properties);
+ $crumbs->setBorder(true);
$nav = $this->getProfileMenu();
+ $columns_list = $this->buildColumnsList($board, $columns);
+
+ $view = id(new PHUITwoColumnView())
+ ->setHeader($header)
+ ->setFooter($columns_list);
$title = array(
pht('Manage Workboard'),
$board->getDisplayName(),
);
- $columns_list = $this->buildColumnsList($board, $columns);
-
return $this->newPage()
->setTitle($title)
->setNavigation($nav)
->setCrumbs($crumbs)
- ->appendChild(
- array(
- $box,
- $columns_list,
- ));
+ ->appendChild($view);
}
private function buildHeaderView(PhabricatorProject $board) {
- $viewer = $this->getRequest()->getUser();
-
- $header = id(new PHUIHeaderView())
- ->setUser($viewer)
- ->setHeader(pht('Workboard: %s', $board->getDisplayName()));
-
- return $header;
- }
-
- private function buildActionView(PhabricatorProject $board) {
- $viewer = $this->getRequest()->getUser();
- $id = $board->getID();
-
- $actions = id(new PhabricatorActionListView())
- ->setUser($viewer);
+ $viewer = $this->getViewer();
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
$board,
PhabricatorPolicyCapability::CAN_EDIT);
- $reorder_uri = $this->getApplicationURI("board/{$id}/reorder/");
-
- $actions->addAction(
- id(new PhabricatorActionView())
- ->setIcon('fa-exchange')
- ->setName(pht('Reorder Columns'))
- ->setHref($reorder_uri)
- ->setDisabled(!$can_edit)
- ->setWorkflow(true));
-
- $background_uri = $this->getApplicationURI("board/{$id}/background/");
-
- $actions->addAction(
- id(new PhabricatorActionView())
- ->setIcon('fa-paint-brush')
- ->setName(pht('Change Background Color'))
- ->setHref($background_uri)
- ->setDisabled(!$can_edit)
- ->setWorkflow(!$can_edit));
-
+ $id = $board->getID();
$disable_uri = $this->getApplicationURI("board/{$id}/disable/");
- $actions->addAction(
- id(new PhabricatorActionView())
- ->setIcon('fa-ban')
- ->setName(pht('Disable Board'))
- ->setHref($disable_uri)
- ->setDisabled(!$can_edit)
- ->setWorkflow(true));
+ $button = id(new PHUIButtonView())
+ ->setTag('a')
+ ->setIcon('fa-ban')
+ ->setText(pht('Disable Board'))
+ ->setHref($disable_uri)
+ ->setDisabled(!$can_edit)
+ ->setWorkflow(true);
- return $actions;
- }
-
- private function buildPropertyView(
- PhabricatorProject $board) {
- $viewer = $this->getRequest()->getUser();
-
- $properties = id(new PHUIPropertyListView())
+ $header = id(new PHUIHeaderView())
+ ->setHeader(pht('Workboard: %s', $board->getDisplayName()))
->setUser($viewer)
- ->setObject($board);
-
- $background = $board->getDisplayWorkboardBackgroundColor();
- if ($background !== null) {
- $map = PhabricatorProjectWorkboardBackgroundColor::getOptions();
- $map = ipull($map, 'name');
+ ->setPolicyObject($board)
+ ->setProfileHeader(true)
+ ->addActionLink($button);
- $name = idx($map, $background, $background);
- $properties->addProperty(pht('Background Color'), $name);
- }
-
- return $properties;
+ return $header;
}
private function buildColumnsList(
@@ -165,6 +111,11 @@
if ($column->isHidden()) {
$item->setDisabled(true);
+ $item->addAttribute(pht('Hidden'));
+ $item->setImageIcon('fa-columns grey');
+ } else {
+ $item->addAttribute(pht('Visible'));
+ $item->setImageIcon('fa-columns');
}
$view->addItem($item);
diff --git a/src/applications/project/controller/PhabricatorProjectBoardReorderController.php b/src/applications/project/controller/PhabricatorProjectBoardReorderController.php
--- a/src/applications/project/controller/PhabricatorProjectBoardReorderController.php
+++ b/src/applications/project/controller/PhabricatorProjectBoardReorderController.php
@@ -23,13 +23,13 @@
$this->setProject($project);
$project_id = $project->getID();
- $manage_uri = $this->getApplicationURI("board/{$project_id}/manage/");
+ $view_uri = $this->getApplicationURI("board/{$project_id}/");
$reorder_uri = $this->getApplicationURI("board/{$project_id}/reorder/");
if ($request->isFormPost()) {
// User clicked "Done", make sure the page reloads to show the new
// column order.
- return id(new AphrontRedirectResponse())->setURI($manage_uri);
+ return id(new AphrontRedirectResponse())->setURI($view_uri);
}
$columns = id(new PhabricatorProjectColumnQuery())
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
@@ -705,10 +705,21 @@
->setDisabled(!$can_edit)
->setWorkflow(true);
+ $reorder_uri = $this->getApplicationURI("board/{$id}/reorder/");
$manage_items[] = id(new PhabricatorActionView())
- ->setIcon('fa-pencil')
- ->setName(pht('Manage Board'))
- ->setHref($manage_uri);
+ ->setIcon('fa-exchange')
+ ->setName(pht('Reorder Columns'))
+ ->setHref($reorder_uri)
+ ->setDisabled(!$can_edit)
+ ->setWorkflow(true);
+
+ $background_uri = $this->getApplicationURI("board/{$id}/background/");
+ $manage_items[] = id(new PhabricatorActionView())
+ ->setIcon('fa-paint-brush')
+ ->setName(pht('Change Background Color'))
+ ->setHref($background_uri)
+ ->setDisabled(!$can_edit)
+ ->setWorkflow(false);
if ($show_hidden) {
$hidden_uri = $this->getURIWithState()
@@ -727,6 +738,12 @@
->setName($hidden_text)
->setHref($hidden_uri);
+ $manage_uri = $this->getApplicationURI("board/{$id}/manage/");
+ $manage_items[] = id(new PhabricatorActionView())
+ ->setIcon('fa-gear')
+ ->setName(pht('Manage Workboard'))
+ ->setHref($manage_uri);
+
$batch_edit_uri = $request->getRequestURI();
$batch_edit_uri->setQueryParam('batch', self::BATCH_EDIT_ALL);
$can_batch_edit = PhabricatorPolicyFilter::hasCapability(
@@ -734,12 +751,6 @@
PhabricatorApplication::getByClass('PhabricatorManiphestApplication'),
ManiphestBulkEditCapability::CAPABILITY);
- $manage_items[] = id(new PhabricatorActionView())
- ->setIcon('fa-list-ul')
- ->setName(pht('Batch Edit Visible Tasks...'))
- ->setHref($batch_edit_uri)
- ->setDisabled(!$can_batch_edit);
-
$manage_menu = id(new PhabricatorActionListView())
->setUser($viewer);
foreach ($manage_items as $item) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 11:53 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7708478
Default Alt Text
D17879.diff (8 KB)
Attached To
Mode
D17879: Move Board Manage actions up a level
Attached
Detach File
Event Timeline
Log In to Comment