<?php
-
/**
* StatusNet, the distributed open-source microblogging tool
*
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class SortableGroupList extends SortableSubscriptionList
{
/** Owner of this list */
$this->out->elementStart('tr');
$tableHeaders = array(
+ // TRANS: Column header in table for user nickname.
'nickname' => _m('Nickname'),
+ // TRANS: Column header in table for timestamp when user was created.
'created' => _m('Created')
);
foreach ($tableHeaders as $id => $label) {
-
$attrs = array('id' => $id);
$current = (!empty($this->action->sort) && $this->action->sort == $id);
$this->out->elementEnd('th');
}
+ // TRANS: Column header in table for members of a group.
$this->out->element('th', array('id' => 'Members'), _m('Members'));
$this->out->element('th', array('id' => 'controls'), null);
}
}
+ function showDescription()
+ {
+ if (!empty($this->profile->description)) {
+ $cutoff = 140; // XXX Should this be configurable?
+ $description = htmlspecialchars($this->profile->description);
+
+ if (mb_strlen($description) > $cutoff) {
+ $description = mb_substr($description, 0, $cutoff - 1)
+ .'<a href="' . $this->profile->homeUrl() .'">…</a>';
+ }
+
+ $this->out->elementStart('p', 'note');
+ $this->out->raw($description);
+ $this->out->elementEnd('p');
+ }
+
+ }
+
function showAvatar()
{
$logo = ($this->profile->stream_logo) ?
}
}
+ function showProfile()
+ {
+ $this->startProfile();
+ $this->showAvatar();
+ $this->showFullName();
+ $this->showLocation();
+ $this->showHomepage();
+ $this->showDescription(); // groups have this instead of bios
+ // Relevant portion!
+ $this->showTags();
+ $this->endProfile();
+ }
+
function showActions()
{
$this->startActions();
function showCreatedDate()
{
$this->out->elementStart('td', 'entry_created');
+ // @todo FIXME: Should we provide i18n for timestamps in core?
$this->out->raw(date('j M Y', strtotime($this->profile->created)));
$this->out->elementEnd('td');
}
}
}
-
}