Commit 4c44c449 authored by epriestley's avatar epriestley
Browse files

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
parent 7d152def
/* 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
......@@ -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(
......
......@@ -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();
......
......@@ -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');
......
......@@ -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));
......
......@@ -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');
......
@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
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]!
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment