Add a brief explanation of what group inbox is at the top of the page (instructions section), plus a message to show when there are no private messages in the inbox.

This commit is contained in:
Brion Vibber 2011-02-07 12:39:40 -08:00
parent ac5e7b727a
commit 1c3fabbc27

View File

@ -121,6 +121,9 @@ class GroupinboxAction extends GroupDesignAction
$gml = new GroupMessageList($this, $this->gm); $gml = new GroupMessageList($this, $this->gm);
$cnt = $gml->show(); $cnt = $gml->show();
if ($cnt == 0) {
$this->element('p', 'guide', _m('This group has not received any private messages.'));
}
$this->pagination($this->page > 1, $this->pagination($this->page > 1,
$cnt > MESSAGES_PER_PAGE, $cnt > MESSAGES_PER_PAGE,
$this->page, $this->page,
@ -173,4 +176,33 @@ class GroupinboxAction extends GroupDesignAction
$this->page); $this->page);
} }
} }
/**
* Show the page notice
*
* Shows instructions for the page
*
* @return void
*/
function showPageNotice()
{
$instr = $this->getInstructions();
$output = common_markup_to_html($instr);
$this->elementStart('div', 'instructions');
$this->raw($output);
$this->elementEnd('div');
}
/**
* Instructions for using this page
*
* @return string localised instructions for using the page
*/
function getInstructions()
{
// TRANS: Instructions for user inbox page.
return _m('This is the group inbox, which lists all incoming private messages for this group.');
}
} }