mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Use Javelin workflow on directory item deletion
Summary: I think I wrote this before I laid in workflow, so they always redirect to another page even if you have JS. Use workflow if it's available. Test Plan: Deleted a directory item and a directory category via dialog workflow instead of full page reloads. Reviewed By: jungejason Reviewers: jungejason, tuomaspelkonen, aran CC: moskov, aran, jungejason Differential Revision: 359
This commit is contained in:
parent
bc71888249
commit
0492f3ba2e
4 changed files with 6 additions and 2 deletions
|
@ -33,11 +33,12 @@ class PhabricatorDirectoryCategoryListController
|
|||
'href' => '/directory/category/edit/'.$category->getID().'/',
|
||||
),
|
||||
phutil_escape_html($category->getName())),
|
||||
phutil_render_tag(
|
||||
javelin_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/directory/category/delete/'.$category->getID().'/',
|
||||
'class' => 'button grey small',
|
||||
'sigil' => 'workflow',
|
||||
),
|
||||
'Delete'),
|
||||
);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
phutil_require_module('phabricator', 'applications/directory/controller/base');
|
||||
phutil_require_module('phabricator', 'applications/directory/storage/category');
|
||||
phutil_require_module('phabricator', 'infrastructure/javelin/markup');
|
||||
phutil_require_module('phabricator', 'view/control/table');
|
||||
phutil_require_module('phabricator', 'view/layout/panel');
|
||||
|
||||
|
|
|
@ -37,11 +37,12 @@ class PhabricatorDirectoryItemListController
|
|||
'href' => '/directory/item/edit/'.$item->getID().'/',
|
||||
),
|
||||
phutil_escape_html($item->getName())),
|
||||
phutil_render_tag(
|
||||
javelin_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/directory/item/delete/'.$item->getID().'/',
|
||||
'class' => 'button grey small',
|
||||
'sigil' => 'workflow',
|
||||
),
|
||||
'Delete'),
|
||||
);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
phutil_require_module('phabricator', 'applications/directory/controller/base');
|
||||
phutil_require_module('phabricator', 'applications/directory/storage/category');
|
||||
phutil_require_module('phabricator', 'applications/directory/storage/item');
|
||||
phutil_require_module('phabricator', 'infrastructure/javelin/markup');
|
||||
phutil_require_module('phabricator', 'view/control/table');
|
||||
phutil_require_module('phabricator', 'view/layout/panel');
|
||||
|
||||
|
|
Loading…
Reference in a new issue