diff --git a/resources/sql/patches/062.phrictionmenu.sql b/resources/sql/patches/062.phrictionmenu.sql new file mode 100644 index 0000000000..763ab599d5 --- /dev/null +++ b/resources/sql/patches/062.phrictionmenu.sql @@ -0,0 +1,9 @@ +/* Older versions incorrectly computed the depth for the root page. */ +UPDATE phabricator_phriction.phriction_document + SET depth = 0 where slug = '/'; + +INSERT INTO phabricator_directory.directory_item + (name, description, href, categoryID, sequence, dateCreated, dateModified) +VALUES + ("Phriction", "Write things down.", "/w/", 4, 1100, + UNIX_TIMESTAMP(), UNIX_TIMESTAMP()); \ No newline at end of file diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index e1e52ed079..b6e196a1cc 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -1137,7 +1137,7 @@ celerity_register_resource_map(array( ), 'phriction-document-css' => array( - 'uri' => '/res/e764414a/rsrc/css/application/phriction/phriction-document-css.css', + 'uri' => '/res/c08b5f24/rsrc/css/application/phriction/phriction-document-css.css', 'type' => 'css', 'requires' => array( diff --git a/src/applications/phriction/controller/base/PhrictionController.php b/src/applications/phriction/controller/base/PhrictionController.php index 7a88e71080..ddb3a5421d 100644 --- a/src/applications/phriction/controller/base/PhrictionController.php +++ b/src/applications/phriction/controller/base/PhrictionController.php @@ -41,10 +41,12 @@ abstract class PhrictionController extends PhabricatorController { ); } - if (!empty($tabs)) { - $page->setTabs($tabs, idx($data, 'tab')); - } + $tabs['help'] = array( + 'name' => 'Help', + 'href' => PhabricatorEnv::getDoclink('article/Phriction_User_Guide.html'), + ); + $page->setTabs($tabs, idx($data, 'tab')); $page->appendChild($view); $response = new AphrontWebpageResponse(); diff --git a/src/applications/phriction/controller/base/__init__.php b/src/applications/phriction/controller/base/__init__.php index 40bf3fcdf8..73a0c10d5e 100644 --- a/src/applications/phriction/controller/base/__init__.php +++ b/src/applications/phriction/controller/base/__init__.php @@ -8,6 +8,7 @@ phutil_require_module('phabricator', 'aphront/response/webpage'); phutil_require_module('phabricator', 'applications/base/controller/base'); +phutil_require_module('phabricator', 'infrastructure/env'); phutil_require_module('phutil', 'utils'); diff --git a/src/applications/phriction/controller/edit/PhrictionEditController.php b/src/applications/phriction/controller/edit/PhrictionEditController.php index cfa2f04658..f7bad2cf12 100644 --- a/src/applications/phriction/controller/edit/PhrictionEditController.php +++ b/src/applications/phriction/controller/edit/PhrictionEditController.php @@ -132,6 +132,13 @@ class PhrictionEditController $uri = PhrictionDocument::getSlugURI($uri); $uri = PhabricatorEnv::getProductionURI($uri); + $remarkup_reference = phutil_render_tag( + 'a', + array( + 'href' => PhabricatorEnv::getDoclink('article/Remarkup_Reference.html'), + ), + 'Formatting Reference'); + $form = id(new AphrontFormView()) ->setUser($user) ->setAction($request->getRequestURI()->getPath()) @@ -151,7 +158,8 @@ class PhrictionEditController ->setLabel('Content') ->setValue($content->getContent()) ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL) - ->setName('content')) + ->setName('content') + ->setCaption($remarkup_reference)) ->appendChild( id(new AphrontFormSubmitControl()) ->setValue($submit_button)); diff --git a/src/applications/phriction/controller/edit/__init__.php b/src/applications/phriction/controller/edit/__init__.php index 306f152475..50d25f580d 100644 --- a/src/applications/phriction/controller/edit/__init__.php +++ b/src/applications/phriction/controller/edit/__init__.php @@ -21,6 +21,7 @@ phutil_require_module('phabricator', 'view/form/control/textarea'); phutil_require_module('phabricator', 'view/form/error'); phutil_require_module('phabricator', 'view/layout/panel'); +phutil_require_module('phutil', 'markup'); phutil_require_module('phutil', 'utils'); diff --git a/src/docs/userguide/phriction.diviner b/src/docs/userguide/phriction.diviner new file mode 100644 index 0000000000..1d636d1a1d --- /dev/null +++ b/src/docs/userguide/phriction.diviner @@ -0,0 +1,12 @@ +@title Phriction User Guide +@group userguide + +Construct a detailed written history of your civilization. + += Overview = + +Phriction is a simple wiki. You can edit pages, and the text you write will stay +there. Other people can see it later. + +NOTE: Phriction is extremely new and very basic for now. Give us feedback on +what you'd like to see improve! diff --git a/src/docs/userguide/remarkup.diviner b/src/docs/userguide/remarkup.diviner index cc0ae5c59f..034b965eb5 100644 --- a/src/docs/userguide/remarkup.diviner +++ b/src/docs/userguide/remarkup.diviner @@ -141,4 +141,15 @@ In Differential and Maniphest, you can mention another user by writing: @username When you submit your comment, this will add them as a CC on the revision or task -if they aren't already CC'd. \ No newline at end of file +if they aren't already CC'd. + += Phriction Documents = + +You can link to Phriction documents with a name or path: + + Make sure you sign and date your [legal/Letter of Marque and Reprisal]! + +With a pipe (##|##), you can retitle the link. Use this to mislead your +opponents: + + Check out these [legal/boring_documents/ | exciting legal documents]!