Differential D17957 Diff 43202 src/applications/differential/view/DifferentialChangesetDetailView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/view/DifferentialChangesetDetailView.php
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | if (!$vs_id) { | ||||
$left_id = $changeset_id; | $left_id = $changeset_id; | ||||
$right_id = null; | $right_id = null; | ||||
} else { | } else { | ||||
// Showing a diff-of-diffs. | // Showing a diff-of-diffs. | ||||
$left_id = $vs_id; | $left_id = $vs_id; | ||||
$right_id = $changeset_id; | $right_id = $changeset_id; | ||||
} | } | ||||
// In the persistent banner, emphasize the current filename. | |||||
$path_part = dirname($display_filename); | |||||
$file_part = basename($display_filename); | |||||
$display_parts = array(); | |||||
if (strlen($path_part)) { | |||||
$path_part = $path_part.'/'; | |||||
$display_parts[] = phutil_tag( | |||||
'span', | |||||
array( | |||||
'class' => 'diff-banner-path', | |||||
), | |||||
$path_part); | |||||
} | |||||
$display_parts[] = phutil_tag( | |||||
'span', | |||||
array( | |||||
'class' => 'diff-banner-file', | |||||
), | |||||
$file_part); | |||||
return javelin_tag( | return javelin_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'sigil' => 'differential-changeset', | 'sigil' => 'differential-changeset', | ||||
'meta' => array( | 'meta' => array( | ||||
'left' => $left_id, | 'left' => $left_id, | ||||
'right' => $right_id, | 'right' => $right_id, | ||||
'renderURI' => $this->getRenderURI(), | 'renderURI' => $this->getRenderURI(), | ||||
'whitespace' => $this->getWhitespace(), | 'whitespace' => $this->getWhitespace(), | ||||
'highlight' => null, | 'highlight' => null, | ||||
'renderer' => $this->getRenderer(), | 'renderer' => $this->getRenderer(), | ||||
'ref' => $this->getRenderingRef(), | 'ref' => $this->getRenderingRef(), | ||||
'autoload' => $this->getAutoload(), | 'autoload' => $this->getAutoload(), | ||||
'loaded' => $this->getLoaded(), | 'loaded' => $this->getLoaded(), | ||||
'undoTemplates' => hsprintf('%s', $renderer->renderUndoTemplates()), | 'undoTemplates' => hsprintf('%s', $renderer->renderUndoTemplates()), | ||||
'path' => $display_filename, | 'displayPath' => hsprintf('%s', $display_parts), | ||||
'objectiveName' => basename($display_filename), | 'objectiveName' => basename($display_filename), | ||||
'icon' => 'fa-file-text-o', | 'icon' => $display_icon, | ||||
), | ), | ||||
'class' => $class, | 'class' => $class, | ||||
'id' => $id, | 'id' => $id, | ||||
), | ), | ||||
array( | array( | ||||
id(new PhabricatorAnchorView()) | id(new PhabricatorAnchorView()) | ||||
->setAnchorName($changeset->getAnchorName()) | ->setAnchorName($changeset->getAnchorName()) | ||||
->setNavigationMarker(true) | ->setNavigationMarker(true) | ||||
Show All 22 Lines |