Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php
Show First 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | if (!$this->preview) { | ||||
$nextprev->addButton($hide); | $nextprev->addButton($hide); | ||||
} | } | ||||
$nextprev->addButton($up); | $nextprev->addButton($up); | ||||
$nextprev->addButton($down); | $nextprev->addButton($down); | ||||
$action_buttons = array(); | $action_buttons = array(); | ||||
if ($this->allowReply) { | if ($this->allowReply) { | ||||
if (!$is_synthetic) { | if (!$is_synthetic) { | ||||
// NOTE: No product reason why you can't reply to these, but the reply | // NOTE: No product reason why you can't reply to these, but the reply | ||||
// mechanism currently sends the inline comment ID to the server, not | // mechanism currently sends the inline comment ID to the server, not | ||||
// file/line information, and synthetic comments don't have an inline | // file/line information, and synthetic comments don't have an inline | ||||
// comment ID. | // comment ID. | ||||
$action_buttons[] = id(new PHUIButtonView()) | $action_buttons[] = id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setIconFont('fa-reply') | ->setIconFont('fa-reply') | ||||
->setTooltip(pht('Reply')) | ->setTooltip(pht('Reply')) | ||||
->addSigil('differential-inline-reply') | ->addSigil('differential-inline-reply') | ||||
->setMustCapture(true); | ->setMustCapture(true); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
$anchor_name = $this->getAnchorName(); | $anchor_name = $this->getAnchorName(); | ||||
if ($this->editable && !$this->preview) { | if ($this->editable && !$this->preview) { | ||||
$action_buttons[] = id(new PHUIButtonView()) | $action_buttons[] = id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setIconFont('fa-pencil') | ->setIconFont('fa-pencil') | ||||
->setTooltip(pht('Edit')) | ->setTooltip(pht('Edit')) | ||||
->addSigil('differential-inline-edit') | ->addSigil('differential-inline-edit') | ||||
->setMustCapture(true); | ->setMustCapture(true); | ||||
$action_buttons[] = id(new PHUIButtonView()) | $action_buttons[] = id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setIconFont('fa-trash-o') | ->setIconFont('fa-trash-o') | ||||
->setTooltip(pht('Delete')) | ->setTooltip(pht('Delete')) | ||||
->addSigil('differential-inline-delete') | ->addSigil('differential-inline-delete') | ||||
->setMustCapture(true); | ->setMustCapture(true); | ||||
} else if ($this->preview) { | } else if ($this->preview) { | ||||
$links[] = javelin_tag( | $links[] = javelin_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'class' => 'inline-button-divider pml msl', | 'class' => 'inline-button-divider pml msl', | ||||
'meta' => array( | 'meta' => array( | ||||
'anchor' => $anchor_name, | 'anchor' => $anchor_name, | ||||
), | ), | ||||
'sigil' => 'differential-inline-preview-jump', | 'sigil' => 'differential-inline-preview-jump', | ||||
epriestley: In modern code, I am generally not aligning stuff anymore. It looks a little nicer to align… | |||||
), | ), | ||||
pht('Not Visible')); | pht('Not Visible')); | ||||
$action_buttons[] = id(new PHUIButtonView()) | $action_buttons[] = id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setTooltip(pht('Delete')) | ->setTooltip(pht('Delete')) | ||||
->setIconFont('fa-trash-o') | ->setIconFont('fa-trash-o') | ||||
->addSigil('differential-inline-delete') | ->addSigil('differential-inline-delete') | ||||
▲ Show 20 Lines • Show All 200 Lines • Show Last 20 Lines |
In modern code, I am generally not aligning stuff anymore. It looks a little nicer to align, but causes a lot of churn that I'm leaning toward not being worthwhile. Consider 'string'<single space>=><single space>value in lieu of alignment.