From 0d47b8af26d0158d3090b05f251d87afcd6ee987 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 13 Nov 2014 07:55:45 -0800 Subject: [PATCH] Add a dialog explaining what happened to wiki pages Summary: Ayep. Test Plan: {F233319} Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D10845 --- resources/celerity/map.php | 22 ++++++------- src/__phutil_library_map__.php | 2 ++ .../PhabricatorProjectApplication.php | 2 +- .../PhabricatorProjectProfileController.php | 6 ++++ ...habricatorProjectWikiExplainController.php | 31 +++++++++++++++++++ 5 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 src/applications/project/controller/PhabricatorProjectWikiExplainController.php diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 9ac7d22d63..a267e02325 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -387,7 +387,7 @@ return array( 'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => 'e5822781', 'rsrc/js/application/files/behavior-icon-composer.js' => '8ef9ab58', 'rsrc/js/application/files/behavior-launch-icon-composer.js' => '48086888', - 'rsrc/js/application/herald/HeraldRuleEditor.js' => '3fc2c8f2', + 'rsrc/js/application/herald/HeraldRuleEditor.js' => '335fd41f', 'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec', 'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3', 'rsrc/js/application/maniphest/behavior-batch-editor.js' => 'f588412e', @@ -537,7 +537,7 @@ return array( 'global-drag-and-drop-css' => '697324ad', 'harbormaster-css' => '49d64eb4', 'herald-css' => 'c544dd1c', - 'herald-rule-editor' => '3fc2c8f2', + 'herald-rule-editor' => '335fd41f', 'herald-test-css' => '778b008e', 'inline-comment-summary-css' => '8cfd34e8', 'javelin-aphlict' => '4a07e8e3', @@ -1025,6 +1025,15 @@ return array( 'javelin-install', 'javelin-typeahead-source', ), + '335fd41f' => array( + 'multirow-row-manager', + 'javelin-install', + 'javelin-util', + 'javelin-dom', + 'javelin-stratcom', + 'javelin-json', + 'phabricator-prefab', + ), '357b6e9b' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1070,15 +1079,6 @@ return array( 'javelin-stratcom', 'phabricator-tooltip', ), - '3fc2c8f2' => array( - 'multirow-row-manager', - 'javelin-install', - 'javelin-util', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-json', - 'phabricator-prefab', - ), '40a6a403' => array( 'javelin-install', 'javelin-dom', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 24055a702c..10c757cb2b 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -2142,6 +2142,7 @@ phutil_register_library_map(array( 'PhabricatorProjectUIEventListener' => 'applications/project/events/PhabricatorProjectUIEventListener.php', 'PhabricatorProjectUpdateController' => 'applications/project/controller/PhabricatorProjectUpdateController.php', 'PhabricatorProjectWatchController' => 'applications/project/controller/PhabricatorProjectWatchController.php', + 'PhabricatorProjectWikiExplainController' => 'applications/project/controller/PhabricatorProjectWikiExplainController.php', 'PhabricatorQuery' => 'infrastructure/query/PhabricatorQuery.php', 'PhabricatorRecaptchaConfigOptions' => 'applications/config/option/PhabricatorRecaptchaConfigOptions.php', 'PhabricatorRedirectController' => 'applications/base/controller/PhabricatorRedirectController.php', @@ -5264,6 +5265,7 @@ phutil_register_library_map(array( 'PhabricatorProjectUIEventListener' => 'PhabricatorEventListener', 'PhabricatorProjectUpdateController' => 'PhabricatorProjectController', 'PhabricatorProjectWatchController' => 'PhabricatorProjectController', + 'PhabricatorProjectWikiExplainController' => 'PhabricatorProjectController', 'PhabricatorRecaptchaConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorRedirectController' => 'PhabricatorController', 'PhabricatorRefreshCSRFController' => 'PhabricatorAuthController', diff --git a/src/applications/project/application/PhabricatorProjectApplication.php b/src/applications/project/application/PhabricatorProjectApplication.php index 9c8a5e48d3..0ea1a2f495 100644 --- a/src/applications/project/application/PhabricatorProjectApplication.php +++ b/src/applications/project/application/PhabricatorProjectApplication.php @@ -83,7 +83,7 @@ final class PhabricatorProjectApplication extends PhabricatorApplication { 'history/(?P[1-9]\d*)/' => 'PhabricatorProjectHistoryController', '(?Pwatch|unwatch)/(?P[1-9]\d*)/' => 'PhabricatorProjectWatchController', - + 'wiki/' => 'PhabricatorProjectWikiExplainController', ), '/tag/' => array( '(?P[^/]+)/' => 'PhabricatorProjectProfileController', diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php index 9feb64ebbc..ac21febabc 100644 --- a/src/applications/project/controller/PhabricatorProjectProfileController.php +++ b/src/applications/project/controller/PhabricatorProjectProfileController.php @@ -261,6 +261,12 @@ final class PhabricatorProjectProfileController } } + $view->addAction( + id(new PhabricatorActionView()) + ->setIcon('fa-book grey') + ->setName(pht('View Wiki')) + ->setWorkflow(true) + ->setHref('/project/wiki/')); return $view; } diff --git a/src/applications/project/controller/PhabricatorProjectWikiExplainController.php b/src/applications/project/controller/PhabricatorProjectWikiExplainController.php new file mode 100644 index 0000000000..83ab9ba8c5 --- /dev/null +++ b/src/applications/project/controller/PhabricatorProjectWikiExplainController.php @@ -0,0 +1,31 @@ +newDialog() + ->setTitle(pht('Wikis Have Changed')) + ->appendParagraph( + pht( + 'Wiki pages in Phriction have been upgraded to have more powerful '. + 'support for policies and access control. Each page can now have '. + 'its own policies.')) + ->appendParagraph( + pht( + 'This change obsoletes dedicated project wiki pages and '. + 'resolves a number of issues they had: you can now have '. + 'multiple wiki pages for a project, put them anywhere, give '. + 'them custom access controls, and rename them (or the project) '. + 'more easily and with fewer issues.')) + ->appendParagraph( + pht( + 'If you want to point users of this project to specific wiki '. + 'pages with relevant documentation or information, edit the project '. + 'description and add links. You can use the %s syntax to link to a '. + 'wiki page.', + phutil_tag('tt', array(), '[[ example/page/ ]]'))) + ->addCancelButton('/', pht('Okay')); + } + +}