From 9c1697383c38d8194181ac3c3c0320a1b2489c8b Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 2 Dec 2011 21:11:38 -0800 Subject: [PATCH] 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 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 --- .../view/addcomment/DifferentialAddCommentView.php | 10 +++++++++- .../differential/view/addcomment/__init__.php | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/applications/differential/view/addcomment/DifferentialAddCommentView.php b/src/applications/differential/view/addcomment/DifferentialAddCommentView.php index b3305debe4..78d845a680 100644 --- a/src/applications/differential/view/addcomment/DifferentialAddCommentView.php +++ b/src/applications/differential/view/addcomment/DifferentialAddCommentView.php @@ -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')); diff --git a/src/applications/differential/view/addcomment/__init__.php b/src/applications/differential/view/addcomment/__init__.php index 352c41acd1..fed62292bc 100644 --- a/src/applications/differential/view/addcomment/__init__.php +++ b/src/applications/differential/view/addcomment/__init__.php @@ -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');