mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Put "workflow" on Dashboard edit links when they're disabled
Summary: Depends on D20367. Ref T13272. When an edit action is disabled, we add "workflow" so that the "You can't do this" message renders in a dialog instead of a separate page. These actions are implemented in a nonstandard way; standardize them. Test Plan: Clicked both actions as a user who could take them (got normal behavior); and as a user who could not (got permissions dialog errors). Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13272 Differential Revision: https://secure.phabricator.com/D20368
This commit is contained in:
parent
5b38d2142c
commit
f504f40ee5
1 changed files with 4 additions and 3 deletions
|
@ -79,7 +79,8 @@ final class PhabricatorDashboardViewController
|
||||||
->setName(pht('Edit Dashboard'))
|
->setName(pht('Edit Dashboard'))
|
||||||
->setIcon('fa-pencil')
|
->setIcon('fa-pencil')
|
||||||
->setHref($this->getApplicationURI("edit/{$id}/"))
|
->setHref($this->getApplicationURI("edit/{$id}/"))
|
||||||
->setDisabled(!$can_edit));
|
->setDisabled(!$can_edit)
|
||||||
|
->setWorkflow(!$can_edit));
|
||||||
|
|
||||||
$curtain->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
|
@ -95,7 +96,7 @@ final class PhabricatorDashboardViewController
|
||||||
->setIcon('fa-check')
|
->setIcon('fa-check')
|
||||||
->setHref($this->getApplicationURI("archive/{$id}/"))
|
->setHref($this->getApplicationURI("archive/{$id}/"))
|
||||||
->setDisabled(!$can_edit)
|
->setDisabled(!$can_edit)
|
||||||
->setWorkflow($can_edit));
|
->setWorkflow(true));
|
||||||
} else {
|
} else {
|
||||||
$curtain->addAction(
|
$curtain->addAction(
|
||||||
id(new PhabricatorActionView())
|
id(new PhabricatorActionView())
|
||||||
|
@ -103,7 +104,7 @@ final class PhabricatorDashboardViewController
|
||||||
->setIcon('fa-ban')
|
->setIcon('fa-ban')
|
||||||
->setHref($this->getApplicationURI("archive/{$id}/"))
|
->setHref($this->getApplicationURI("archive/{$id}/"))
|
||||||
->setDisabled(!$can_edit)
|
->setDisabled(!$can_edit)
|
||||||
->setWorkflow($can_edit));
|
->setWorkflow(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $curtain;
|
return $curtain;
|
||||||
|
|
Loading…
Reference in a new issue