Differential D12033 Diff 29183 src/applications/differential/render/DifferentialChangesetHTMLRenderer.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/render/DifferentialChangesetHTMLRenderer.php
| Show First 20 Lines • Show All 429 Lines • ▼ Show 20 Lines | protected function buildInlineComment( | ||||
| $on_right = false) { | $on_right = false) { | ||||
| $user = $this->getUser(); | $user = $this->getUser(); | ||||
| $edit = $user && | $edit = $user && | ||||
| ($comment->getAuthorPHID() == $user->getPHID()) && | ($comment->getAuthorPHID() == $user->getPHID()) && | ||||
| ($comment->isDraft()) | ($comment->isDraft()) | ||||
| && $this->getShowEditAndReplyLinks(); | && $this->getShowEditAndReplyLinks(); | ||||
| $allow_reply = (bool)$user && $this->getShowEditAndReplyLinks(); | $allow_reply = (bool)$user && $this->getShowEditAndReplyLinks(); | ||||
| $allow_done = !$comment->isDraft() && $this->getCanMarkDone(); | |||||
| return id(new PHUIDiffInlineCommentDetailView()) | return id(new PHUIDiffInlineCommentDetailView()) | ||||
| ->setInlineComment($comment) | ->setInlineComment($comment) | ||||
| ->setIsOnRight($on_right) | ->setIsOnRight($on_right) | ||||
| ->setHandles($this->getHandles()) | ->setHandles($this->getHandles()) | ||||
| ->setMarkupEngine($this->getMarkupEngine()) | ->setMarkupEngine($this->getMarkupEngine()) | ||||
| ->setEditable($edit) | ->setEditable($edit) | ||||
| ->setAllowReply($allow_reply); | ->setAllowReply($allow_reply) | ||||
| ->setCanMarkDone($allow_done); | |||||
| } | } | ||||
| /** | /** | ||||
| * Build links which users can click to show more context in a changeset. | * Build links which users can click to show more context in a changeset. | ||||
| * | * | ||||
| * @param int Beginning of the line range to build links for. | * @param int Beginning of the line range to build links for. | ||||
| * @param int Length of the line range to build links for. | * @param int Length of the line range to build links for. | ||||
| ▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines | |||||