@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at recaptime-dev/main 42 lines 1.1 kB view raw
1<?php 2 3/** 4 * Row scaffold for `1up` (unified) changeset views. 5 * 6 * This scaffold is straightforward. 7 */ 8final class PHUIDiffOneUpInlineCommentRowScaffold 9 extends PHUIDiffInlineCommentRowScaffold { 10 11 public function render() { 12 $inlines = $this->getInlineViews(); 13 if (count($inlines) != 1) { 14 throw new Exception( 15 pht('One-up inline row scaffold must have exactly one inline view!')); 16 } 17 $inline = head($inlines); 18 19 $attrs = array( 20 'colspan' => 2, 21 'id' => $inline->getScaffoldCellID(), 22 ); 23 24 if ($inline->getIsOnRight()) { 25 $left_hidden = null; 26 $right_hidden = $inline->newHiddenIcon(); 27 } else { 28 $left_hidden = $inline->newHiddenIcon(); 29 $right_hidden = null; 30 } 31 32 $cells = array( 33 phutil_tag('td', array('class' => 'n'), $left_hidden), 34 phutil_tag('td', array('class' => 'n'), $right_hidden), 35 phutil_tag('td', array('class' => 'copy')), 36 phutil_tag('td', $attrs, $inline), 37 ); 38 39 return javelin_tag('tr', $this->getRowAttributes(), $cells); 40 } 41 42}