objectManager: State number of matches when viewing tables
This commit is contained in:
@@ -342,6 +342,8 @@ class ObjectManager
|
|||||||
|
|
||||||
$sQueued = $this->getQueueString($this->getIsQueue(), $this->sState == 'rejected');
|
$sQueued = $this->getQueueString($this->getIsQueue(), $this->sState == 'rejected');
|
||||||
|
|
||||||
|
$this->showNumberOfResults($oObject);
|
||||||
|
|
||||||
/* Should we let the class draw its own custom table? */
|
/* Should we let the class draw its own custom table? */
|
||||||
if(method_exists($this->sClass, 'objectWantCustomDraw') &&
|
if(method_exists($this->sClass, 'objectWantCustomDraw') &&
|
||||||
$oObject->objectWantCustomDraw('table', $sQueued))
|
$oObject->objectWantCustomDraw('table', $sQueued))
|
||||||
@@ -1643,6 +1645,21 @@ class ObjectManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Shows how many entries we are displaying */
|
||||||
|
private function showNumberOfResults($oObject)
|
||||||
|
{
|
||||||
|
$iTotalEntries = $oObject->objectGetEntriesCount($this->sState, $this->oFilters);
|
||||||
|
if($this->oMultiPage->isEnabled())
|
||||||
|
{
|
||||||
|
$iShowingEntryFrom = $this->oMultiPage->iLowerLimit + 1;
|
||||||
|
$iShowingEntryTo = min($this->oMultiPage->iLowerLimit + $this->oMultiPage->iItemsPerPage, $iTotalEntries);
|
||||||
|
echo "Showing entry $iShowingEntryFrom to $iShowingEntryTo of $iTotalEntries<br /><br />\n";
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
echo "Showing $iTotalEntries entries";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function handleMultiPageControls($aClean, $bItemsPerPageSelector = TRUE)
|
private function handleMultiPageControls($aClean, $bItemsPerPageSelector = TRUE)
|
||||||
{
|
{
|
||||||
/* Display multi-page browsing controls (prev, next etc.) if applicable.
|
/* Display multi-page browsing controls (prev, next etc.) if applicable.
|
||||||
@@ -1796,6 +1813,11 @@ class MultiPage
|
|||||||
$this->iLowerLimit = $iLowerLimit;
|
$this->iLowerLimit = $iLowerLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isEnabled()
|
||||||
|
{
|
||||||
|
return $this->bEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
function getDataFromInput($aClean)
|
function getDataFromInput($aClean)
|
||||||
{
|
{
|
||||||
if(isset($aClean['iItemsPerPage']) && isset($aClean['iPage']))
|
if(isset($aClean['iItemsPerPage']) && isset($aClean['iPage']))
|
||||||
|
|||||||
Reference in New Issue
Block a user