Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/controller/PhabricatorFileInfoController.php
| Show First 20 Lines • Show All 93 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('Question File Integrity'); | : pht('Question File Integrity'); | ||||
| $submit_button_name = $is_serious | |||||
| ? pht('Add Comment') | |||||
| : pht('Debate the Bits'); | |||||
| $draft = PhabricatorDraft::newFromUserAndKey($user, $file->getPHID()); | $draft = PhabricatorDraft::newFromUserAndKey($user, $file->getPHID()); | ||||
| $add_comment_form = id(new PhabricatorApplicationTransactionCommentView()) | $add_comment_form = id(new PhabricatorApplicationTransactionCommentView()) | ||||
| ->setUser($user) | ->setUser($user) | ||||
| ->setObjectPHID($file->getPHID()) | ->setObjectPHID($file->getPHID()) | ||||
| ->setDraft($draft) | ->setDraft($draft) | ||||
| ->setHeaderText($add_comment_header) | ->setHeaderText($add_comment_header) | ||||
| ->setAction($this->getApplicationURI('/comment/'.$file->getID().'/')) | ->setAction($this->getApplicationURI('/comment/'.$file->getID().'/')) | ||||
| ->setSubmitButtonName($submit_button_name); | ->setSubmitButtonName(pht('Add Comment')); | ||||
| return array( | return array( | ||||
| $timeline, | $timeline, | ||||
| $add_comment_form); | $add_comment_form); | ||||
| } | } | ||||
| private function buildActionView(PhabricatorFile $file) { | private function buildActionView(PhabricatorFile $file) { | ||||
| $request = $this->getRequest(); | $request = $this->getRequest(); | ||||
| ▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines | |||||