Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/PHUITimelineEventView.php
Show All 15 Lines | final class PHUITimelineEventView extends AphrontView { | ||||
private $isEdited; | private $isEdited; | ||||
private $isRemovable; | private $isRemovable; | ||||
private $transactionPHID; | private $transactionPHID; | ||||
private $isPreview; | private $isPreview; | ||||
private $eventGroup = array(); | private $eventGroup = array(); | ||||
private $hideByDefault; | private $hideByDefault; | ||||
private $token; | private $token; | ||||
private $tokenRemoved; | private $tokenRemoved; | ||||
private $quoteTargetID; | |||||
private $quoteRef; | |||||
public function setQuoteRef($quote_ref) { | |||||
$this->quoteRef = $quote_ref; | |||||
return $this; | |||||
} | |||||
public function getQuoteRef() { | |||||
return $this->quoteRef; | |||||
} | |||||
public function setQuoteTargetID($quote_target_id) { | |||||
$this->quoteTargetID = $quote_target_id; | |||||
return $this; | |||||
} | |||||
public function getQuoteTargetID() { | |||||
return $this->quoteTargetID; | |||||
} | |||||
public function setHideByDefault($hide_by_default) { | public function setHideByDefault($hide_by_default) { | ||||
$this->hideByDefault = $hide_by_default; | $this->hideByDefault = $hide_by_default; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getHideByDefault() { | public function getHideByDefault() { | ||||
return $this->hideByDefault; | return $this->hideByDefault; | ||||
▲ Show 20 Lines • Show All 320 Lines • ▼ Show 20 Lines | final class PHUITimelineEventView extends AphrontView { | ||||
private function renderExtra($is_first_extra) { | private function renderExtra($is_first_extra) { | ||||
$extra = array(); | $extra = array(); | ||||
if ($this->getIsPreview()) { | if ($this->getIsPreview()) { | ||||
$extra[] = pht('PREVIEW'); | $extra[] = pht('PREVIEW'); | ||||
} else { | } else { | ||||
$xaction_phid = $this->getTransactionPHID(); | $xaction_phid = $this->getTransactionPHID(); | ||||
if ($this->getQuoteTargetID()) { | |||||
$ref = null; | |||||
if ($this->getQuoteRef()) { | |||||
$ref = $this->getQuoteRef(); | |||||
if ($this->anchor) { | |||||
$ref = $ref.'#'.$this->anchor; | |||||
} | |||||
} | |||||
$extra[] = javelin_tag( | |||||
'a', | |||||
array( | |||||
'href' => '#', | |||||
'sigil' => 'transaction-quote', | |||||
'mustcapture' => true, | |||||
'meta' => array( | |||||
'targetID' => $this->getQuoteTargetID(), | |||||
'uri' => '/transactions/quote/'.$xaction_phid.'/', | |||||
'ref' => $ref, | |||||
), | |||||
), | |||||
pht('Quote')); | |||||
} | |||||
if ($this->getIsEdited()) { | if ($this->getIsEdited()) { | ||||
$extra[] = javelin_tag( | $extra[] = javelin_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => '/transactions/history/'.$xaction_phid.'/', | 'href' => '/transactions/history/'.$xaction_phid.'/', | ||||
'sigil' => 'workflow transaction-edit-history', | 'sigil' => 'workflow transaction-edit-history', | ||||
), | ), | ||||
pht('Edited')); | pht('Edited')); | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |