Skip to content

Commit 1c64b40

Browse files
author
epriestley
committed
Minor improvements to Applications application
Summary: I missed these in review, but here are a couple of tweaks: - Call `setWorkflow(true)` on the actions. This makes the dialogs pop up on the same page with Javascript if it's available. - When the user installs/uninstalls an application, send them back to the application's detail page, not the application list. Test Plan: - Uninstalled an application (saw dialog, got sent back to detail page). - Installed an application (saw dialog, got sent back to detail page). - Canceled an application uninstall. Reviewers: Afaque_Hussain Reviewed By: Afaque_Hussain CC: aran Differential Revision: https://secure.phabricator.com/D4762
1 parent 8b86ec6 commit 1c64b40

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/applications/meta/controller/PhabricatorApplicationDetailViewController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ private function buildActionView(
9090
id(new PhabricatorActionView())
9191
->setName(pht('Uninstall'))
9292
->setIcon('delete')
93+
->setWorkflow(true)
9394
->setHref(
9495
$this->getApplicationURI(get_class($selected).'/uninstall/'))
9596
);
@@ -98,6 +99,7 @@ private function buildActionView(
9899
id(new PhabricatorActionView())
99100
->setName(pht('Install'))
100101
->setIcon('new')
102+
->setWorkflow(true)
101103
->setHref(
102104
$this->getApplicationURI(get_class($selected).'/install/'))
103105
);
@@ -107,6 +109,7 @@ private function buildActionView(
107109
id(new PhabricatorActionView())
108110
->setName(pht('Uninstall'))
109111
->setIcon('delete')
112+
->setWorkflow(true)
110113
->setDisabled(true)
111114
->setHref(
112115
$this->getApplicationURI(get_class($selected).'/uninstall/'))

src/applications/meta/controller/PhabricatorApplicationUninstallController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ public function processRequest() {
2121
return new Aphront404Response();
2222
}
2323

24+
$view_uri = $this->getApplicationURI('view/'.$this->application);
25+
2426
if ($request->isDialogFormPost()) {
2527
$this->manageApplication();
26-
return id(new AphrontRedirectResponse())->setURI('/applications/');
28+
return id(new AphrontRedirectResponse())->setURI($view_uri);
2729
}
2830

2931
$dialog = id(new AphrontDialogView())
3032
->setUser($user)
31-
->addCancelButton('/applications/view/'.$this->application);
33+
->addCancelButton($view_uri);
3234

3335
if ($this->action == 'install') {
3436
if ($selected->canUninstall()) {

0 commit comments

Comments
 (0)