Changeset View
Changeset View
Standalone View
Standalone View
src/applications/macro/controller/PhabricatorMacroViewController.php
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
| } | } | ||||
| $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | ||||
| $comment_header = $is_serious | $comment_header = $is_serious | ||||
| ? pht('Add Comment') | ? pht('Add Comment') | ||||
| : pht('Grovel in Awe'); | : pht('Grovel in Awe'); | ||||
| $submit_button_name = $is_serious | |||||
| ? pht('Add Comment') | |||||
| : pht('Lavish Praise'); | |||||
| $draft = PhabricatorDraft::newFromUserAndKey($user, $macro->getPHID()); | $draft = PhabricatorDraft::newFromUserAndKey($user, $macro->getPHID()); | ||||
| $add_comment_form = id(new PhabricatorApplicationTransactionCommentView()) | $add_comment_form = id(new PhabricatorApplicationTransactionCommentView()) | ||||
| ->setUser($user) | ->setUser($user) | ||||
| ->setObjectPHID($macro->getPHID()) | ->setObjectPHID($macro->getPHID()) | ||||
| ->setDraft($draft) | ->setDraft($draft) | ||||
| ->setHeaderText($comment_header) | ->setHeaderText($comment_header) | ||||
| ->setAction($this->getApplicationURI('/comment/'.$macro->getID().'/')) | ->setAction($this->getApplicationURI('/comment/'.$macro->getID().'/')) | ||||
| ->setSubmitButtonName($submit_button_name); | ->setSubmitButtonName(pht('Add Comment')); | ||||
| $object_box = id(new PHUIObjectBoxView()) | $object_box = id(new PHUIObjectBoxView()) | ||||
| ->setHeader($header) | ->setHeader($header) | ||||
| ->addPropertyList($properties); | ->addPropertyList($properties); | ||||
| if ($file_view) { | if ($file_view) { | ||||
| $object_box->addPropertyList($file_view); | $object_box->addPropertyList($file_view); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines | |||||