123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- abstract class MessageList extends Widget
- {
- var $message;
-
- function __construct($out, $message)
- {
- parent::__construct($out);
- $this->message = $message;
- }
-
- function show()
- {
- $cnt = 0;
- $this->out->elementStart('div', array('id' =>'notices_primary'));
-
- $this->out->element('h2', null, _('Messages'));
- $this->out->elementStart('ul', 'notices messages');
- while ($this->message->fetch() && $cnt <= MESSAGES_PER_PAGE) {
- $cnt++;
- if ($cnt > MESSAGES_PER_PAGE) {
- break;
- }
- $mli = $this->newItem($this->message);
- $mli->show();
- }
- $this->out->elementEnd('ul');
- $this->out->elementEnd('div');
- }
-
- abstract function newItem($message);
- }
|