Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
| Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | public function render() { | ||||
| $is_fixed = false; | $is_fixed = false; | ||||
| switch ($inline->getFixedState()) { | switch ($inline->getFixedState()) { | ||||
| case PhabricatorInlineCommentInterface::STATE_DONE: | case PhabricatorInlineCommentInterface::STATE_DONE: | ||||
| case PhabricatorInlineCommentInterface::STATE_DRAFT: | case PhabricatorInlineCommentInterface::STATE_DRAFT: | ||||
| $is_fixed = true; | $is_fixed = true; | ||||
| break; | break; | ||||
| } | } | ||||
| $is_synthetic = false; | |||||
| if ($inline->getSyntheticAuthor()) { | |||||
| $is_synthetic = true; | |||||
| } | |||||
| $metadata = array( | $metadata = array( | ||||
| 'id' => $inline->getID(), | 'id' => $inline->getID(), | ||||
| 'phid' => $inline->getPHID(), | 'phid' => $inline->getPHID(), | ||||
| 'changesetID' => $inline->getChangesetID(), | 'changesetID' => $inline->getChangesetID(), | ||||
| 'number' => $inline->getLineNumber(), | 'number' => $inline->getLineNumber(), | ||||
| 'length' => $inline->getLineLength(), | 'length' => $inline->getLineLength(), | ||||
| 'isNewFile' => (bool)$inline->getIsNewFile(), | 'isNewFile' => (bool)$inline->getIsNewFile(), | ||||
| 'on_right' => $this->getIsOnRight(), | 'on_right' => $this->getIsOnRight(), | ||||
| 'original' => $inline->getContent(), | 'original' => $inline->getContent(), | ||||
| 'replyToCommentPHID' => $inline->getReplyToCommentPHID(), | 'replyToCommentPHID' => $inline->getReplyToCommentPHID(), | ||||
| 'isDraft' => $inline->isDraft(), | 'isDraft' => $inline->isDraft(), | ||||
| 'isFixed' => $is_fixed, | 'isFixed' => $is_fixed, | ||||
| 'isGhost' => $inline->getIsGhost(), | 'isGhost' => $inline->getIsGhost(), | ||||
| 'isSynthetic' => $is_synthetic, | |||||
| ); | ); | ||||
| $sigil = 'differential-inline-comment'; | $sigil = 'differential-inline-comment'; | ||||
| if ($this->preview) { | if ($this->preview) { | ||||
| $sigil = $sigil.' differential-inline-comment-preview'; | $sigil = $sigil.' differential-inline-comment-preview'; | ||||
| } | } | ||||
| $classes = array( | $classes = array( | ||||
| 'differential-inline-comment', | 'differential-inline-comment', | ||||
| ); | ); | ||||
| $content = $inline->getContent(); | $content = $inline->getContent(); | ||||
| $handles = $this->handles; | $handles = $this->handles; | ||||
| $links = array(); | $links = array(); | ||||
| $is_synthetic = false; | |||||
| if ($inline->getSyntheticAuthor()) { | |||||
| $is_synthetic = true; | |||||
| } | |||||
| $draft_text = null; | $draft_text = null; | ||||
| if (!$is_synthetic) { | if (!$is_synthetic) { | ||||
| // This display is controlled by CSS | // This display is controlled by CSS | ||||
| $draft_text = id(new PHUITagView()) | $draft_text = id(new PHUITagView()) | ||||
| ->setType(PHUITagView::TYPE_SHADE) | ->setType(PHUITagView::TYPE_SHADE) | ||||
| ->setName(pht('Unsubmitted')) | ->setName(pht('Unsubmitted')) | ||||
| ->setSlimShady(true) | ->setSlimShady(true) | ||||
| ->setColor(PHUITagView::COLOR_RED) | ->setColor(PHUITagView::COLOR_RED) | ||||
| ▲ Show 20 Lines • Show All 342 Lines • Show Last 20 Lines | |||||