Display Show Raw File links in Differential only if the file exists
Test Plan: Open menu for added file Open menu for deleted file Open menu for changed file Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1410
This commit is contained in:
@@ -118,17 +118,25 @@ class DifferentialChangesetListView extends AphrontView {
|
||||
$changeset->getAbsoluteRepositoryPath($this->diff, $repository));
|
||||
}
|
||||
|
||||
$meta = array(
|
||||
'detailURI' => (string)$detail_uri,
|
||||
'diffusionURI' => $diffusion_uri,
|
||||
'containerID' => $detail->getID(),
|
||||
);
|
||||
$change = $changeset->getChangeType();
|
||||
if ($change != DifferentialChangeType::TYPE_ADD) {
|
||||
$meta['leftURI'] = (string)$detail_uri->alter('view', 'old');
|
||||
}
|
||||
if ($change != DifferentialChangeType::TYPE_DELETE &&
|
||||
$change != DifferentialChangeType::TYPE_MULTICOPY) {
|
||||
$meta['rightURI'] = (string)$detail_uri->alter('view', 'new');
|
||||
}
|
||||
|
||||
$detail_button = javelin_render_tag(
|
||||
'a',
|
||||
array(
|
||||
'class' => 'button small grey',
|
||||
'meta' => array(
|
||||
'detailURI' => (string)$detail_uri,
|
||||
'leftURI' => (string)$detail_uri->alter('view', 'old'),
|
||||
'rightURI' => (string)$detail_uri->alter('view', 'new'),
|
||||
'diffusionURI' => $diffusion_uri,
|
||||
'containerID' => $detail->getID(),
|
||||
),
|
||||
'meta' => $meta,
|
||||
'href' => $detail_uri,
|
||||
'target' => '_blank',
|
||||
'sigil' => 'differential-view-options',
|
||||
|
||||
Reference in New Issue
Block a user