Differential D17117 Diff 41174 src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
| Show All 14 Lines | class PhabricatorApplicationTransactionCommentView extends AphrontView { | ||||
| private $commentID; | private $commentID; | ||||
| private $draft; | private $draft; | ||||
| private $requestURI; | private $requestURI; | ||||
| private $showPreview = true; | private $showPreview = true; | ||||
| private $objectPHID; | private $objectPHID; | ||||
| private $headerText; | private $headerText; | ||||
| private $noPermission; | private $noPermission; | ||||
| private $fullWidth; | private $fullWidth; | ||||
| private $infoView; | |||||
| private $currentVersion; | private $currentVersion; | ||||
| private $versionedDraft; | private $versionedDraft; | ||||
| private $commentActions; | private $commentActions; | ||||
| private $commentActionGroups = array(); | private $commentActionGroups = array(); | ||||
| private $transactionTimeline; | private $transactionTimeline; | ||||
| public function setObjectPHID($object_phid) { | public function setObjectPHID($object_phid) { | ||||
| ▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | public function setHeaderText($text) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setFullWidth($fw) { | public function setFullWidth($fw) { | ||||
| $this->fullWidth = $fw; | $this->fullWidth = $fw; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setInfoView(PHUIInfoView $info_view) { | |||||
| $this->infoView = $info_view; | |||||
| return $this; | |||||
| } | |||||
| public function getInfoView() { | |||||
| return $this->infoView; | |||||
| } | |||||
| public function setCommentActions(array $comment_actions) { | public function setCommentActions(array $comment_actions) { | ||||
| assert_instances_of($comment_actions, 'PhabricatorEditEngineCommentAction'); | assert_instances_of($comment_actions, 'PhabricatorEditEngineCommentAction'); | ||||
| $this->commentActions = $comment_actions; | $this->commentActions = $comment_actions; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getCommentActions() { | public function getCommentActions() { | ||||
| return $this->commentActions; | return $this->commentActions; | ||||
| ▲ Show 20 Lines • Show All 209 Lines • ▼ Show 20 Lines | if ($comment_actions) { | ||||
| array( | array( | ||||
| 'class' => 'phui-comment-action-bar grouped', | 'class' => 'phui-comment-action-bar grouped', | ||||
| ), | ), | ||||
| array( | array( | ||||
| $action_select, | $action_select, | ||||
| )); | )); | ||||
| $form->appendChild($action_bar); | $form->appendChild($action_bar); | ||||
| $info_view = $this->getInfoView(); | |||||
| if ($info_view) { | |||||
| $info_box = id(new PHUIBoxView()) | |||||
| ->addMargin(PHUI::MARGIN_LARGE) | |||||
chad: Hows this look on mobile? I'm surprised we don't already have CSS for this, but maybe it didn't… | |||||
| ->appendChild($info_view); | |||||
| $form->appendChild($info_box); | |||||
| } | |||||
| $form->appendChild($invisi_bar); | $form->appendChild($invisi_bar); | ||||
| $form->addClass('phui-comment-has-actions'); | $form->addClass('phui-comment-has-actions'); | ||||
| Javelin::initBehavior( | Javelin::initBehavior( | ||||
| 'comment-actions', | 'comment-actions', | ||||
| array( | array( | ||||
| 'actionID' => $action_id, | 'actionID' => $action_id, | ||||
| 'inputID' => $input_id, | 'inputID' => $input_id, | ||||
| ▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines | |||||
Hows this look on mobile? I'm surprised we don't already have CSS for this, but maybe it didn't come up during the recent redesign.