<?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' => 'Admins'), _m('Admins'));
$this->out->element('th', array('id' => 'controls'), null);
$this->out->elementEnd('tr');
$this->owner = $owner;
}
- function startItem()
- {
- $attr = array(
- 'class' => 'profile',
- 'id' => 'profile-' . $this->profile->id
- );
-
- if ($this->alt) {
- $attr['class'] .= ' alt';
- }
-
- $this->out->elementStart('tr', $attr);
- }
-
function showHomepage()
{
if (!empty($this->profile->homepage)) {
$this->out->elementEnd('a');
}
- function endItem()
- {
- $this->out->elementEnd('tr');
- }
-
- function startProfile()
- {
- $this->out->elementStart('td', 'entity_profile vcard entry-content');
- }
-
- function endProfile()
- {
- $this->out->elementEnd('td');
- }
-
- function startActions()
- {
- $this->out->elementStart('td', 'entity_actions');
- $this->out->elementStart('ul');
- }
-
- function endActions()
- {
- $this->out->elementEnd('ul');
- $this->out->elementEnd('td');
- }
-
function show()
{
if (Event::handle('StartProfileListItem', array($this))) {
// XXX Add events?
$this->showCreatedDate();
$this->showMemberCount();
- $this->showAdmins();
if (Event::handle('StartProfileListItemActions', array($this))) {
$this->showActions();
Event::handle('EndProfileListItemActions', array($this));
}
$this->endItem();
+
Event::handle('EndProfileListItem', array($this));
}
}
$jf = new JoinForm($this->out, $this->profile);
$jf->show();
}
+
+ $this->out->elementEnd('li');
}
}
function showMemberCount()
{
- $this->out->elementStart('td', 'entry_subscriber_count');
+ $this->out->elementStart('td', 'entry_member_count');
$this->out->raw($this->profile->getMemberCount());
$this->out->elementEnd('td');
}
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');
}
function showAdmins()
{
- $this->out->elementStart('td', 'entry_notice_count');
+ $this->out->elementStart('td', 'entry_admins');
// @todo
$this->out->raw('gargargar');
$this->out->elementEnd('td');
}
}
-
}