1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Add a link to Remarkup Reference below comment

Summary:
To reduce blindness, all textareas with some kind of special syntax should have
an information about this syntax and a link to its documentation. Preview
function is a nice complement but it doesn't replace this information.

I've added this information and the link below the comment field.

Please note that <a target> is a valid attribute in HTML5.

Test Plan:
Go to https://secure.phabricator.com/D1164#comment-content
There should be a link to Remarkup Reference
This link should open Remarkup Reference in a new window (to not discard the
comment)

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley, vrana

Differential Revision: 1164
This commit is contained in:
Jakub Vrana 2011-12-02 21:11:38 -08:00
parent 83efa6e1c5
commit 9c1697383c
2 changed files with 10 additions and 1 deletions

View file

@ -104,7 +104,15 @@ final class DifferentialAddCommentView extends AphrontView {
->setID('comment-content')
->setLabel('Comment')
->setEnableDragAndDropFileUploads(true)
->setValue($this->draft))
->setValue($this->draft)
->setCaption(phutil_render_tag(
'a',
array(
'href' => PhabricatorEnv::getDoclink(
'article/Remarkup_Reference.html'),
'target' => '_blank',
),
'Remarkup Reference')))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue($is_serious ? 'Submit' : 'Clowncopterize'));

View file

@ -20,6 +20,7 @@ phutil_require_module('phabricator', 'view/form/control/tokenizer');
phutil_require_module('phabricator', 'view/form/error');
phutil_require_module('phabricator', 'view/layout/panel');
phutil_require_module('phutil', 'markup');
phutil_require_module('phutil', 'utils');