Display property changes on files
Summary: Never converted this TODO over from XHP. NOTE: This looks terrible since the CSS didn't make it over, can one of you grab the rules for .differential-property-table and .property-table-header? If they aren't still in trunk, try history for html/intern/css/tools/differential/ Test Plan: Made a property change, looked at it in Differentila. Reviewed By: aran Reviewers: jungejason, tuomaspelkonen, aran CC: codeblock, aran Differential Revision: 409
This commit is contained in:
@@ -1340,41 +1340,44 @@ EOSYNTHETIC;
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
/*
|
||||
TODO
|
||||
|
||||
$table = <table class="differential-property-table" />;
|
||||
$table->appendChild(
|
||||
<tr class="property-table-header">
|
||||
<th>Property Changes</th>
|
||||
<td class="oval">Old Value</td>
|
||||
<td class="nval">New Value</td>
|
||||
</tr>);
|
||||
|
||||
$keys = array_keys($old + $new);
|
||||
sort($keys);
|
||||
|
||||
$rows = array();
|
||||
foreach ($keys as $key) {
|
||||
$oval = idx($old, $key);
|
||||
$nval = idx($new, $key);
|
||||
if ($oval !== $nval) {
|
||||
if ($oval === null) {
|
||||
$oval = <em>null</em>;
|
||||
$oval = '<em>null</em>';
|
||||
} else {
|
||||
$oval = phutil_escape_html($oval);
|
||||
}
|
||||
|
||||
if ($nval === null) {
|
||||
$nval = <em>null</em>;
|
||||
$nval = '<em>null</em>';
|
||||
} else {
|
||||
$nval = phutil_escape_html($nval);
|
||||
}
|
||||
$table->appendChild(
|
||||
<tr>
|
||||
<th>{$key}</th>
|
||||
<td class="oval">{$oval}</td>
|
||||
<td class="nval">{$nval}</td>
|
||||
</tr>);
|
||||
|
||||
$rows[] =
|
||||
'<tr>'.
|
||||
'<th>'.phutil_escape_html($key).'</th>'.
|
||||
'<td class="oval">'.$oval.'</td>'.
|
||||
'<td class="nval">'.$nval.'</td>'.
|
||||
'</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
return $table;
|
||||
*/
|
||||
return
|
||||
'<table class="differential-property-table">'.
|
||||
'<tr class="property-table-header">'.
|
||||
'<th>Property Changes</th>'.
|
||||
'<td class="oval">Old Value</td>'.
|
||||
'<td class="nval">New Value</td>'.
|
||||
'</tr>'.
|
||||
implode('', $rows).
|
||||
'</table>';
|
||||
}
|
||||
|
||||
protected function renderChangesetTable($changeset, $contents) {
|
||||
|
||||
Reference in New Issue
Block a user