Differential D20848 Diff 49698 src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php
Show All 11 Lines | public function render() { | ||||
$inlines = $this->getInlineViews(); | $inlines = $this->getInlineViews(); | ||||
if (count($inlines) != 1) { | if (count($inlines) != 1) { | ||||
throw new Exception( | throw new Exception( | ||||
pht('One-up inline row scaffold must have exactly one inline view!')); | pht('One-up inline row scaffold must have exactly one inline view!')); | ||||
} | } | ||||
$inline = head($inlines); | $inline = head($inlines); | ||||
$attrs = array( | $attrs = array( | ||||
'colspan' => 3, | 'colspan' => 2, | ||||
'id' => $inline->getScaffoldCellID(), | 'id' => $inline->getScaffoldCellID(), | ||||
); | ); | ||||
if ($inline->getIsOnRight()) { | if ($inline->getIsOnRight()) { | ||||
$left_hidden = null; | $left_hidden = null; | ||||
$right_hidden = $inline->newHiddenIcon(); | $right_hidden = $inline->newHiddenIcon(); | ||||
} else { | } else { | ||||
$left_hidden = $inline->newHiddenIcon(); | $left_hidden = $inline->newHiddenIcon(); | ||||
$right_hidden = null; | $right_hidden = null; | ||||
} | } | ||||
$cells = array( | $cells = array( | ||||
phutil_tag('td', array('class' => 'n'), $left_hidden), | phutil_tag('td', array('class' => 'n'), $left_hidden), | ||||
phutil_tag('td', array('class' => 'n'), $right_hidden), | phutil_tag('td', array('class' => 'n'), $right_hidden), | ||||
phutil_tag('td', array('class' => 'copy')), | |||||
phutil_tag('td', $attrs, $inline), | phutil_tag('td', $attrs, $inline), | ||||
); | ); | ||||
return javelin_tag('tr', $this->getRowAttributes(), $cells); | return javelin_tag('tr', $this->getRowAttributes(), $cells); | ||||
} | } | ||||
} | } |