mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 01:02:42 +01:00
Fix "Show All Changes" button in Diffusion
Summary: See IRC. We currently render a "show all changes" button for commits which have more than 100 but fewer than 1000 changes, but it doesn't actually do anything. Make it do what it's supposed to. Test Plan: Set the limit to 2; clicked the button. Reviewers: chad, staticshock, btrahan Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D6900
This commit is contained in:
parent
a40861e5c6
commit
95dc69a30e
1 changed files with 6 additions and 2 deletions
|
@ -212,10 +212,14 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$hard_limit));
|
||||
$content[] = $huge_commit;
|
||||
} else {
|
||||
// The user has clicked "Show All Changes", and we should show all the
|
||||
// changes inline even if there are more than the soft limit.
|
||||
$show_all_details = $request->getBool('show_all');
|
||||
|
||||
$change_panel = new AphrontPanelView();
|
||||
$change_panel->setHeader("Changes (".number_format($count).")");
|
||||
$change_panel->setID('toc');
|
||||
if ($count > self::CHANGES_LIMIT) {
|
||||
if ($count > self::CHANGES_LIMIT && !$show_all_details) {
|
||||
$show_all_button = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
|
@ -283,7 +287,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$changeset->setID($path_ids[$changeset->getFilename()]);
|
||||
}
|
||||
|
||||
if ($count <= self::CHANGES_LIMIT) {
|
||||
if ($count <= self::CHANGES_LIMIT || $show_all_details) {
|
||||
$visible_changesets = $changesets;
|
||||
} else {
|
||||
$visible_changesets = array();
|
||||
|
|
Loading…
Reference in a new issue