Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionCommitController.php
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | if ($bad_commit) { | ||||
'This commit is enormous, and affects more than %d files. '. | 'This commit is enormous, and affects more than %d files. '. | ||||
'Changes are not shown.', | 'Changes are not shown.', | ||||
$hard_limit)); | $hard_limit)); | ||||
} else { | } else { | ||||
// The user has clicked "Show All Changes", and we should show all the | // The user has clicked "Show All Changes", and we should show all the | ||||
// changes inline even if there are more than the soft limit. | // changes inline even if there are more than the soft limit. | ||||
$show_all_details = $request->getBool('show_all'); | $show_all_details = $request->getBool('show_all'); | ||||
$change_panel = new AphrontPanelView(); | $change_panel = new PHUIObjectBoxView(); | ||||
$change_panel->setHeader("Changes (".number_format($count).")"); | $header = new PHUIHeaderView(); | ||||
$header->setHeader("Changes (".number_format($count).")"); | |||||
$change_panel->setID('toc'); | $change_panel->setID('toc'); | ||||
if ($count > self::CHANGES_LIMIT && !$show_all_details) { | if ($count > self::CHANGES_LIMIT && !$show_all_details) { | ||||
$show_all_button = phutil_tag( | |||||
'a', | $icon = id(new PHUIIconView()) | ||||
array( | ->setSpriteSheet(PHUIIconView::SPRITE_ICONS) | ||||
'class' => 'button green', | ->setSpriteIcon('transcript'); | ||||
'href' => '?show_all=true', | |||||
), | $button = id(new PHUIButtonView()) | ||||
pht('Show All Changes')); | ->setText(pht('Show All Changes')) | ||||
->setHref('?show_all=true') | |||||
->setTag('a') | |||||
->setIcon($icon); | |||||
$warning_view = id(new AphrontErrorView()) | $warning_view = id(new AphrontErrorView()) | ||||
->setSeverity(AphrontErrorView::SEVERITY_WARNING) | ->setSeverity(AphrontErrorView::SEVERITY_WARNING) | ||||
->setTitle('Very Large Commit') | ->setTitle('Very Large Commit') | ||||
->appendChild( | ->appendChild( | ||||
pht("This commit is very large. Load each file individually.")); | pht("This commit is very large. Load each file individually.")); | ||||
$change_panel->appendChild($warning_view); | $change_panel->setFormError($warning_view); | ||||
$change_panel->addButton($show_all_button); | $header->addActionLink($button); | ||||
} | } | ||||
$change_panel->appendChild($change_table); | $change_panel->appendChild($change_table); | ||||
$change_panel->setNoBackground(); | $change_panel->setHeader($header); | ||||
$content[] = $change_panel; | $content[] = $change_panel; | ||||
$changesets = DiffusionPathChange::convertToDifferentialChangesets( | $changesets = DiffusionPathChange::convertToDifferentialChangesets( | ||||
$changes); | $changes); | ||||
$vcs = $repository->getVersionControlSystem(); | $vcs = $repository->getVersionControlSystem(); | ||||
switch ($vcs) { | switch ($vcs) { | ||||
▲ Show 20 Lines • Show All 872 Lines • Show Last 20 Lines |