mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-29 00:40:57 +01:00
Add Phriction to the main nav menu
Summary: A few minor things: - Add Phriction to the homepage. - Link to remarkup reference on the edit screen. - Add a help tab with a super basic help document. Test Plan: Cursory inspection. Reviewed By: codeblock Reviewers: hsb, codeblock, jungejason, tuomaspelkonen, aran CC: aran, epriestley, codeblock Differential Revision: 655
This commit is contained in:
parent
7d152def3e
commit
4c44c44964
8 changed files with 50 additions and 6 deletions
9
resources/sql/patches/062.phrictionmenu.sql
Normal file
9
resources/sql/patches/062.phrictionmenu.sql
Normal file
|
@ -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());
|
|
@ -1137,7 +1137,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'phriction-document-css' =>
|
'phriction-document-css' =>
|
||||||
array(
|
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',
|
'type' => 'css',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -41,10 +41,12 @@ abstract class PhrictionController extends PhabricatorController {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($tabs)) {
|
$tabs['help'] = array(
|
||||||
$page->setTabs($tabs, idx($data, 'tab'));
|
'name' => 'Help',
|
||||||
}
|
'href' => PhabricatorEnv::getDoclink('article/Phriction_User_Guide.html'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$page->setTabs($tabs, idx($data, 'tab'));
|
||||||
$page->appendChild($view);
|
$page->appendChild($view);
|
||||||
|
|
||||||
$response = new AphrontWebpageResponse();
|
$response = new AphrontWebpageResponse();
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
phutil_require_module('phabricator', 'aphront/response/webpage');
|
phutil_require_module('phabricator', 'aphront/response/webpage');
|
||||||
phutil_require_module('phabricator', 'applications/base/controller/base');
|
phutil_require_module('phabricator', 'applications/base/controller/base');
|
||||||
|
phutil_require_module('phabricator', 'infrastructure/env');
|
||||||
|
|
||||||
phutil_require_module('phutil', 'utils');
|
phutil_require_module('phutil', 'utils');
|
||||||
|
|
||||||
|
|
|
@ -132,6 +132,13 @@ class PhrictionEditController
|
||||||
$uri = PhrictionDocument::getSlugURI($uri);
|
$uri = PhrictionDocument::getSlugURI($uri);
|
||||||
$uri = PhabricatorEnv::getProductionURI($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())
|
$form = id(new AphrontFormView())
|
||||||
->setUser($user)
|
->setUser($user)
|
||||||
->setAction($request->getRequestURI()->getPath())
|
->setAction($request->getRequestURI()->getPath())
|
||||||
|
@ -151,7 +158,8 @@ class PhrictionEditController
|
||||||
->setLabel('Content')
|
->setLabel('Content')
|
||||||
->setValue($content->getContent())
|
->setValue($content->getContent())
|
||||||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL)
|
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL)
|
||||||
->setName('content'))
|
->setName('content')
|
||||||
|
->setCaption($remarkup_reference))
|
||||||
->appendChild(
|
->appendChild(
|
||||||
id(new AphrontFormSubmitControl())
|
id(new AphrontFormSubmitControl())
|
||||||
->setValue($submit_button));
|
->setValue($submit_button));
|
||||||
|
|
|
@ -21,6 +21,7 @@ phutil_require_module('phabricator', 'view/form/control/textarea');
|
||||||
phutil_require_module('phabricator', 'view/form/error');
|
phutil_require_module('phabricator', 'view/form/error');
|
||||||
phutil_require_module('phabricator', 'view/layout/panel');
|
phutil_require_module('phabricator', 'view/layout/panel');
|
||||||
|
|
||||||
|
phutil_require_module('phutil', 'markup');
|
||||||
phutil_require_module('phutil', 'utils');
|
phutil_require_module('phutil', 'utils');
|
||||||
|
|
||||||
|
|
||||||
|
|
12
src/docs/userguide/phriction.diviner
Normal file
12
src/docs/userguide/phriction.diviner
Normal file
|
@ -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!
|
|
@ -141,4 +141,15 @@ In Differential and Maniphest, you can mention another user by writing:
|
||||||
@username
|
@username
|
||||||
|
|
||||||
When you submit your comment, this will add them as a CC on the revision or task
|
When you submit your comment, this will add them as a CC on the revision or task
|
||||||
if they aren't already CC'd.
|
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]!
|
||||||
|
|
Loading…
Reference in a new issue