Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | if ($length) { | ||||
| $end = $start + $length; | $end = $start + $length; | ||||
| $line = 'Lines '.number_format($start).'-'.number_format($end); | $line = 'Lines '.number_format($start).'-'.number_format($end); | ||||
| } else { | } else { | ||||
| $line = 'Line '.number_format($start); | $line = 'Line '.number_format($start); | ||||
| } | } | ||||
| $metadata = array( | $metadata = array( | ||||
| 'id' => $inline->getID(), | 'id' => $inline->getID(), | ||||
| 'phid' => $inline->getPHID(), | |||||
| '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->onRight, | 'on_right' => $this->onRight, | ||||
| 'original' => $inline->getContent(), | 'original' => $inline->getContent(), | ||||
| 'replyToCommentPHID' => $inline->getReplyToCommentPHID(), | |||||
| ); | ); | ||||
| $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'; | ||||
| } | } | ||||
| $content = $inline->getContent(); | $content = $inline->getContent(); | ||||
| $handles = $this->handles; | $handles = $this->handles; | ||||
| $links = array(); | $links = array(); | ||||
| $is_synthetic = false; | $is_synthetic = false; | ||||
| if ($inline->getSyntheticAuthor()) { | if ($inline->getSyntheticAuthor()) { | ||||
| $is_synthetic = true; | $is_synthetic = true; | ||||
| } | } | ||||
| $is_draft = false; | $is_draft = false; | ||||
| if ($inline->isDraft() && !$is_synthetic) { | if ($inline->isDraft() && !$is_synthetic) { | ||||
| $links[] = pht('Not Submitted Yet'); | $links[] = pht('Not Submitted Yet'); | ||||
| $is_draft = true; | $is_draft = true; | ||||
| } | } | ||||
| // TODO: This stuff is nonfinal, just making it do something. | |||||
| if ($inline->getHasReplies()) { | |||||
| $links[] = pht('Has Reply'); | |||||
| } | |||||
| if ($inline->getReplyToCommentPHID()) { | |||||
| $links[] = pht('Is Reply'); | |||||
| } | |||||
| if (!$this->preview) { | if (!$this->preview) { | ||||
| $links[] = javelin_tag( | $links[] = javelin_tag( | ||||
| 'a', | 'a', | ||||
| array( | array( | ||||
| 'href' => '#', | 'href' => '#', | ||||
| 'mustcapture' => true, | 'mustcapture' => true, | ||||
| 'sigil' => 'differential-inline-prev', | 'sigil' => 'differential-inline-prev', | ||||
| ), | ), | ||||
| ▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines | |||||