mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 14:51:06 +01:00
Add Column Edit / History actions to workboard columns
Summary: This brings up "Edit Column" as an action item under the main column dropdown as well as a "Column History" for completeness. Unsure column history is actually useful, but leaving it in anyways. It might be nice to have some sort of dialog version of a history page. Test Plan: Make a workboard, add a column, edit column name, stay on workboard. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D17874
This commit is contained in:
parent
11c5638832
commit
a25c79bbc0
3 changed files with 18 additions and 7 deletions
|
@ -837,6 +837,16 @@ final class PhabricatorProjectBoardViewController
|
|||
->setHref($batch_edit_uri)
|
||||
->setDisabled(!$can_batch_edit);
|
||||
|
||||
// Column Related Actions Below
|
||||
//
|
||||
$edit_uri = 'board/'.$this->id.'/edit/'.$column->getID().'/';
|
||||
$column_items[] = id(new PhabricatorActionView())
|
||||
->setName(pht('Edit Column'))
|
||||
->setIcon('fa-pencil')
|
||||
->setHref($this->getApplicationURI($edit_uri))
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(true);
|
||||
|
||||
$can_hide = ($can_edit && !$column->isDefaultColumn());
|
||||
$hide_uri = 'board/'.$this->id.'/hide/'.$column->getID().'/';
|
||||
$hide_uri = $this->getApplicationURI($hide_uri);
|
||||
|
@ -858,6 +868,12 @@ final class PhabricatorProjectBoardViewController
|
|||
->setWorkflow(true);
|
||||
}
|
||||
|
||||
$details_uri = 'board/'.$this->id.'/column/'.$column->getID().'/';
|
||||
$column_items[] = id(new PhabricatorActionView())
|
||||
->setName(pht('Column History'))
|
||||
->setIcon('fa-columns')
|
||||
->setHref($this->getApplicationURI($details_uri));
|
||||
|
||||
$column_menu = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
foreach ($column_items as $item) {
|
||||
|
|
|
@ -103,7 +103,7 @@ final class PhabricatorProjectColumnDetailController
|
|||
->setIcon('fa-pencil')
|
||||
->setHref($this->getApplicationURI($base_uri.'edit/'.$id.'/'))
|
||||
->setDisabled(!$can_edit)
|
||||
->setWorkflow(!$can_edit));
|
||||
->setWorkflow(true));
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
|
|
@ -51,12 +51,7 @@ final class PhabricatorProjectColumnEditController
|
|||
|
||||
$validation_exception = null;
|
||||
$base_uri = '/board/'.$project_id.'/';
|
||||
if ($is_new) {
|
||||
// we want to go back to the board
|
||||
$view_uri = $this->getApplicationURI($base_uri);
|
||||
} else {
|
||||
$view_uri = $this->getApplicationURI($base_uri.'column/'.$id.'/');
|
||||
}
|
||||
$view_uri = $this->getApplicationURI($base_uri);
|
||||
|
||||
if ($request->isFormPost()) {
|
||||
$v_name = $request->getStr('name');
|
||||
|
|
Loading…
Reference in a new issue