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
This commit is contained in:
epriestley
2014-11-13 07:55:45 -08:00
parent 3d2e03d0e2
commit 0d47b8af26
5 changed files with 51 additions and 12 deletions

View File

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

View File

@@ -83,7 +83,7 @@ final class PhabricatorProjectApplication extends PhabricatorApplication {
'history/(?P<id>[1-9]\d*)/' => 'PhabricatorProjectHistoryController',
'(?P<action>watch|unwatch)/(?P<id>[1-9]\d*)/'
=> 'PhabricatorProjectWatchController',
'wiki/' => 'PhabricatorProjectWikiExplainController',
),
'/tag/' => array(
'(?P<slug>[^/]+)/' => 'PhabricatorProjectProfileController',

View File

@@ -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;
}

View File

@@ -0,0 +1,31 @@
<?php
final class PhabricatorProjectWikiExplainController
extends PhabricatorProjectController {
public function handleRequest(AphrontRequest $request) {
return $this->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'));
}
}