Add previews to ApplicationTransaction

Summary:
Implements previews for Macros and Pholio.

(Design is nonfinal -- kind of split the difference between `diff_full_view.png`, laziness, and space concerns. Next couple diffs will add more stuff here.)

Test Plan: {F28055}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran, vrana

Maniphest Tasks: T2104

Differential Revision: https://secure.phabricator.com/D4246
This commit is contained in:
epriestley
2012-12-21 05:51:33 -08:00
parent 4af2e3c4e2
commit 0fd77783a4
15 changed files with 391 additions and 137 deletions

View File

@@ -79,23 +79,14 @@ final class PhabricatorMacroViewController
? pht('Add Comment')
: pht('Grovel in Awe'));
$add_comment_form = id(new AphrontFormView())
->setWorkflow(true)
->setFlexible(true)
->addSigil('transaction-append')
->setAction($this->getApplicationURI('/comment/'.$macro->getID().'/'))
$submit_button_name = $is_serious
? pht('Add Comment')
: pht('Lavish Praise');
$add_comment_form = id(new PhabricatorApplicationTransactionCommentView())
->setUser($user)
->appendChild(
id(new PhabricatorRemarkupControl())
->setUser($user)
->setLabel('Comment')
->setName('comment'))
->appendChild(
id(new AphrontFormSubmitControl())
->setValue(
$is_serious
? pht('Add Comment')
: pht('Lavish Praise')));
->setAction($this->getApplicationURI('/comment/'.$macro->getID().'/'))
->setSubmitButtonName($submit_button_name);
return $this->buildApplicationPage(
array(