pagination for group inbox
This commit is contained in:
parent
20824292c9
commit
e759b15a92
@ -119,7 +119,13 @@ class GroupinboxAction extends GroupDesignAction
|
||||
function showContent()
|
||||
{
|
||||
$gml = new GroupMessageList($this, $this->gm);
|
||||
$gml->show();
|
||||
$cnt = $gml->show();
|
||||
|
||||
$this->pagination($this->page > 1,
|
||||
$cnt > MESSAGES_PER_PAGE,
|
||||
$this->page,
|
||||
'groupinbox',
|
||||
array('nickname' => $this->group->nickname));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,10 +68,23 @@ class GroupMessageList extends Widget
|
||||
function show()
|
||||
{
|
||||
$this->out->elementStart('ul', 'notices messages group-messages');
|
||||
while ($this->gm->fetch()) {
|
||||
|
||||
$cnt = 0;
|
||||
|
||||
while ($this->gm->fetch() && $cnt <= MESSAGES_PER_PAGE) {
|
||||
|
||||
$cnt++;
|
||||
|
||||
if ($cnt > MESSAGES_PER_PAGE) {
|
||||
break;
|
||||
}
|
||||
|
||||
$gmli = new GroupMessageListItem($this->out, $this->gm);
|
||||
$gmli->show();
|
||||
}
|
||||
|
||||
$this->out->elementEnd('ul');
|
||||
|
||||
return $cnt;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user