-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.3] Add pagination to datasetmanager.php #2202
base: Development
Are you sure you want to change the base?
Conversation
|
||
private $conn; | ||
private $collArr = array(); | ||
private $datasetId = 0; | ||
private $errorArr = array(); | ||
private $occurrenceCount = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line.
return false; | ||
} | ||
return $status; | ||
} | ||
|
||
public function getOccurrences($datasetId){ | ||
public function setOccurrenceCount($datasetId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new method
} | ||
} | ||
|
||
public function getOccurrences($datasetId, $pageNumber = 1, $retLimit = 500) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modified method
return $returnVal; | ||
} | ||
|
||
public function getOccurrenceCount($datasetId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new method
…ions/listtabledisplay.php
if($occArr = $datasetManager->getOccurrences($datasetId)){ | ||
?> | ||
$retLimit = 200; | ||
if ($occArr = $datasetManager->getOccurrences($datasetId, $pageNumber, $retLimit)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated based on change in method signature.
<?php echo '<b>'.$LANG['COUNT'].': '.count($occArr).' '.$LANG['RECORDS'].'</b>'; ?> | ||
<?php echo '<b>' . $LANG['COUNT'] . ': ' . count($occArr) . ' ' . $LANG['RECORDS'] . '</b>'; ?> | ||
</div> | ||
<div class="bottom-breathing-room-rel"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the pagination div
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment
…lay a little better
@Atticus29 I found one edge case between 1050 and about 880 pixels where the last page floats off the page |
Fixed in b2fc870 and 8cc5859. I added another behavior at intermediate screen sizes where only the odd page number links in the sliding window get shown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's beautiful! Works locally.
Description
This PR closes #2200 . It also autoformats the invovled files quite a bit, so I added comments to the "Files changed" tab above where the meaningful changes were made.
Currently, the maximum number of records displayed per page is an arbitrary 200, but I'm happy to change it.
Before
After
Pull Request Checklist:
Pre-Approval
master
branch and PR'd using the merge option (not squashed) into thehotfix
branch.Development
branch, NOTmaster
Post-Approval
Development
branch, remember to use the squash & merge optionhotfix
branch, remember to use the merge option (i.e., no squash).Development
branch into the master branch, remember to use the merge optionhotfix
branch into themaster
branch use the squash & merge optionmaster
intoDevelopment
should be made with the merge option (i.e., no squash).hotfix
branch and create a newhotfix
branchhotfix
branch.Development
branch before a tagged release (i.e., before an imminent merge into the master branch), make sure to notify the team and lock theDevelopment
branch to prevent accidental merges while QA takes place. Follow the release protocol here.Thanks for contributing and keeping it clean!