1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02: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:
epriestley 2011-07-12 08:28:07 -07:00
parent 7d152def3e
commit 4c44c44964
8 changed files with 50 additions and 6 deletions

View 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());

View 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(

View file

@ -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();

View file

@ -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');

View file

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

View file

@ -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');

View 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!

View file

@ -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.
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]!