Move uncommon workboard management options to "Manage Board" view

Summary:
This gives us room for less-common workboard management options like "Disable Board" without overloading the menus on the main board.

Particularly, we can add background color options here without anything getting weird.

I've left "Add Column" on the main UI since I think it's common enough to leave there. We could probably move "Hide Column" to this UI in the future, though.

Test Plan: {F1114475}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15278
This commit is contained in:
epriestley
2016-02-16 06:24:15 -08:00
parent e4690a3854
commit 5a44c85b6b
5 changed files with 165 additions and 24 deletions

View File

@@ -680,9 +680,8 @@ final class PhabricatorProjectBoardViewController
$id = $project->getID();
$disable_uri = $this->getApplicationURI("board/{$id}/disable/");
$manage_uri = $this->getApplicationURI("board/{$id}/manage/");
$add_uri = $this->getApplicationURI("board/{$id}/edit/");
$reorder_uri = $this->getApplicationURI("board/{$id}/reorder/");
$can_edit = PhabricatorPolicyFilter::hasCapability(
$viewer,
@@ -699,11 +698,9 @@ final class PhabricatorProjectBoardViewController
->setWorkflow(true);
$manage_items[] = id(new PhabricatorActionView())
->setIcon('fa-exchange')
->setName(pht('Reorder Columns'))
->setHref($reorder_uri)
->setDisabled(!$can_edit)
->setWorkflow(true);
->setIcon('fa-pencil')
->setName(pht('Manage Board'))
->setHref($manage_uri);
if ($show_hidden) {
$hidden_uri = $this->getURIWithState()
@@ -735,13 +732,6 @@ final class PhabricatorProjectBoardViewController
->setHref($batch_edit_uri)
->setDisabled(!$can_batch_edit);
$manage_items[] = id(new PhabricatorActionView())
->setIcon('fa-ban')
->setName(pht('Disable Workboard'))
->setHref($disable_uri)
->setWorkflow(true)
->setDisabled(!$can_edit);
$manage_menu = id(new PhabricatorActionListView())
->setUser($viewer);
foreach ($manage_items as $item) {
@@ -826,14 +816,6 @@ final class PhabricatorProjectBoardViewController
->setHref($batch_edit_uri)
->setDisabled(!$can_batch_edit);
$detail_uri = $this->getApplicationURI(
'board/'.$this->id.'/column/'.$column->getID().'/');
$column_items[] = id(new PhabricatorActionView())
->setIcon('fa-columns')
->setName(pht('Column Details'))
->setHref($detail_uri);
$can_hide = ($can_edit && !$column->isDefaultColumn());
$hide_uri = 'board/'.$this->id.'/hide/'.$column->getID().'/';
$hide_uri = $this->getApplicationURI($hide_uri);