Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
| Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | public function render() { | ||||
| } | } | ||||
| $ghost_tag = null; | $ghost_tag = null; | ||||
| $ghost = $inline->getIsGhost(); | $ghost = $inline->getIsGhost(); | ||||
| $ghost_id = null; | $ghost_id = null; | ||||
| if ($ghost) { | if ($ghost) { | ||||
| if ($ghost['new']) { | if ($ghost['new']) { | ||||
| $ghosticon = 'fa-fast-forward'; | $ghosticon = 'fa-fast-forward'; | ||||
| $reason = pht('Click to view forward comment.'); | $reason = pht('View forward comment'); | ||||
| } else { | } else { | ||||
| $ghosticon = 'fa-fast-backward'; | $ghosticon = 'fa-fast-backward'; | ||||
| $reason = pht('Click to view previous comment.'); | $reason = pht('View previous comment'); | ||||
| } | } | ||||
| $ghost_id = celerity_generate_unique_node_id(); | $ghost_id = celerity_generate_unique_node_id(); | ||||
| $ghost_icon = id(new PHUIIconView()) | $ghost_icon = id(new PHUIIconView()) | ||||
| ->setIconFont($ghosticon) | ->setIconFont($ghosticon) | ||||
| ->addSigil('has-tooltip') | ->addSigil('has-tooltip') | ||||
| ->setMetadata( | ->setMetadata( | ||||
| array( | array( | ||||
| ▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | if ($this->editable && !$this->preview) { | ||||
| ->addSigil('differential-inline-delete') | ->addSigil('differential-inline-delete') | ||||
| ->setMustCapture(true); | ->setMustCapture(true); | ||||
| $action_buttons->addButton($delete_button); | $action_buttons->addButton($delete_button); | ||||
| } else if ($this->preview) { | } else if ($this->preview) { | ||||
| $links[] = javelin_tag( | $links[] = javelin_tag( | ||||
| 'a', | 'a', | ||||
| array( | array( | ||||
| 'class' => 'button simple', | 'class' => 'button simple msl', | ||||
| 'meta' => array( | 'meta' => array( | ||||
| 'anchor' => $anchor_name, | 'anchor' => $anchor_name, | ||||
| ), | ), | ||||
| 'sigil' => 'differential-inline-preview-jump', | 'sigil' => 'differential-inline-preview-jump', | ||||
| ), | ), | ||||
| pht('Not Visible')); | pht('Not Visible')); | ||||
| $delete_button = id(new PHUIButtonView()) | $delete_button = id(new PHUIButtonView()) | ||||
| ▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | if (!$is_synthetic) { | ||||
| 'class' => 'differential-inline-done-label '. | 'class' => 'differential-inline-done-label '. | ||||
| ($this->getCanMarkDone() ? null : 'done-is-disabled'), | ($this->getCanMarkDone() ? null : 'done-is-disabled'), | ||||
| ), | ), | ||||
| array( | array( | ||||
| $done_input, | $done_input, | ||||
| pht('Done'), | pht('Done'), | ||||
| )); | )); | ||||
| } else { | } else { | ||||
| $done_button = id(new PHUIButtonView()) | |||||
| ->setTag('a') | |||||
| ->setColor(PHUIButtonView::SIMPLE) | |||||
| ->addClass('mml'); | |||||
| if ($is_done) { | if ($is_done) { | ||||
| $done_button->setIconFont('fa-check'); | $icon = id(new PHUIIconView())->setIconFont('fa-check sky msr'); | ||||
| $done_button->setText(pht('Done')); | $label = pht('Done'); | ||||
| $done_button->addClass('button-done'); | $class = 'button-done'; | ||||
| } else { | } else { | ||||
| $done_button->addClass('button-not-done'); | $icon = null; | ||||
| $done_button->setText(pht('Not Done')); | $label = pht('Not Done'); | ||||
| $class = 'button-not-done'; | |||||
| } | } | ||||
| $done_button = phutil_tag( | |||||
| 'div', | |||||
| array( | |||||
| 'class' => 'done-label '.$class, | |||||
| ), | |||||
| array( | |||||
| $icon, | |||||
| $label, | |||||
| )); | |||||
| } | } | ||||
| } | } | ||||
| $content = $this->markupEngine->getOutput( | $content = $this->markupEngine->getOutput( | ||||
| $inline, | $inline, | ||||
| PhabricatorInlineCommentInterface::MARKUP_FIELD_BODY); | PhabricatorInlineCommentInterface::MARKUP_FIELD_BODY); | ||||
| if ($this->preview) { | if ($this->preview) { | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | public function render() { | ||||
| $group_right = phutil_tag( | $group_right = phutil_tag( | ||||
| 'div', | 'div', | ||||
| array( | array( | ||||
| 'class' => 'inline-head-right', | 'class' => 'inline-head-right', | ||||
| ), | ), | ||||
| array( | array( | ||||
| $anchor, | $anchor, | ||||
| $done_button, | |||||
| $links, | $links, | ||||
| $nextprev, | |||||
| $action_buttons, | $action_buttons, | ||||
| $done_button, | $nextprev, | ||||
| )); | )); | ||||
| $markup = javelin_tag( | $markup = javelin_tag( | ||||
| 'div', | 'div', | ||||
| array( | array( | ||||
| 'class' => $classes, | 'class' => $classes, | ||||
| 'sigil' => $sigil, | 'sigil' => $sigil, | ||||
| 'meta' => $metadata, | 'meta' => $metadata, | ||||
| Show All 16 Lines | |||||