123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- class GroupMessageListItem extends Widget
- {
- var $gm;
-
- function __construct($out, $gm)
- {
- parent::__construct($out);
- $this->gm = $gm;
- }
-
- function show()
- {
- $group = $this->gm->getGroup();
- $sender = $this->gm->getSender();
- $this->out->elementStart('li', array('class' => 'h-entry notice message group-message',
- 'id' => 'message-' . $this->gm->id));
- $this->out->elementStart('div', 'entry-title');
- $this->out->elementStart('span', 'vcard author');
- $this->out->elementStart('a',
- array('href' => $sender->profileurl,
- 'class' => 'url'));
- $avatarUrl = $sender->avatarUrl(AVATAR_STREAM_SIZE);
- $this->out->element('img', array('src' => $avatarUrl,
- 'width' => AVATAR_STREAM_SIZE,
- 'height' => AVATAR_STREAM_SIZE,
- 'class' => 'photo avatar',
- 'alt' => $sender->getBestName()));
- $this->out->element('span',
- array('class' => 'nickname fn'),
- $sender->nickname);
- $this->out->elementEnd('a');
- $this->out->elementEnd('span');
- $this->out->elementStart('p', array('class' => 'e-content message-content'));
- $this->out->raw($this->gm->rendered);
- $this->out->elementEnd('p');
- $this->out->elementEnd('div');
- $this->out->elementStart('div', 'e-content');
- $this->out->elementStart('a', array('rel' => 'bookmark',
- 'class' => 'timestamp',
- 'href' => $this->gm->url));
- $this->out->element('time', array('class' => 'dt-published',
- 'datetime' => common_date_iso8601($this->gm->created),
-
- 'title' => common_exact_date($this->gm->created)),
- common_date_string($this->gm->created));
- $this->out->elementEnd('a');
- $this->out->elementEnd('div');
- $this->out->elementEnd('li');
- }
- }
|