We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 2c14185a authored by Evan Prodromou's avatar Evan Prodromou

Add an indicator saying to whom a notice is addressed

parent 8b46624d
......@@ -119,6 +119,7 @@ class NoticeListItem extends Widget
{
$this->out->elementStart('div', 'entry-title');
$this->showAuthor();
$this->showAddressees();
$this->showContent();
$this->out->elementEnd('div');
}
......@@ -218,6 +219,24 @@ class NoticeListItem extends Widget
$this->out->elementEnd('span');
}
function showAddressees()
{
$groups = $this->notice->getGroups();
if (!empty($groups) && count($groups) > 0) {
$this->out->text('▶ ');
$first = true;
foreach ($groups as $group) {
if (!$first) {
$this->out->text(', ');
} else {
$first = false;
}
$this->out->element('a', array('href' => $group->homeUrl()),
$group->nickname);
}
}
}
/**
* show the avatar of the notice's author
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment