Changeset View
Changeset View
Standalone View
Standalone View
src/applications/paste/controller/PhabricatorPasteViewController.php
| Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | $timeline = id(new PhabricatorApplicationTransactionView()) | ||||
| ->setMarkupEngine($engine); | ->setMarkupEngine($engine); | ||||
| $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | ||||
| $add_comment_header = $is_serious | $add_comment_header = $is_serious | ||||
| ? pht('Add Comment') | ? pht('Add Comment') | ||||
| : pht('Debate Paste Accuracy'); | : pht('Debate Paste Accuracy'); | ||||
| $submit_button_name = $is_serious | |||||
| ? pht('Add Comment') | |||||
| : pht('Pity the Fool'); | |||||
| $draft = PhabricatorDraft::newFromUserAndKey($user, $paste->getPHID()); | $draft = PhabricatorDraft::newFromUserAndKey($user, $paste->getPHID()); | ||||
| $add_comment_form = id(new PhabricatorApplicationTransactionCommentView()) | $add_comment_form = id(new PhabricatorApplicationTransactionCommentView()) | ||||
| ->setUser($user) | ->setUser($user) | ||||
| ->setObjectPHID($paste->getPHID()) | ->setObjectPHID($paste->getPHID()) | ||||
| ->setDraft($draft) | ->setDraft($draft) | ||||
| ->setHeaderText($add_comment_header) | ->setHeaderText($add_comment_header) | ||||
| ->setAction($this->getApplicationURI('/comment/'.$paste->getID().'/')) | ->setAction($this->getApplicationURI('/comment/'.$paste->getID().'/')) | ||||
| ->setSubmitButtonName($submit_button_name); | ->setSubmitButtonName(pht('Add Comment')); | ||||
| return $this->buildApplicationPage( | return $this->buildApplicationPage( | ||||
| array( | array( | ||||
| $crumbs, | $crumbs, | ||||
| $object_box, | $object_box, | ||||
| $source_code, | $source_code, | ||||
| $timeline, | $timeline, | ||||
| $add_comment_form, | $add_comment_form, | ||||
| ▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines | |||||