1
0
Fork 0
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:
epriestley 2011-05-28 07:44:07 -07:00
parent bc71888249
commit 0492f3ba2e
4 changed files with 6 additions and 2 deletions

View file

@ -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'),
);

View file

@ -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');

View file

@ -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'),
);

View file

@ -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');