Group directory - fix group logo display
This commit is contained in:
parent
055d61ef79
commit
3a3a53dfcc
@ -117,7 +117,7 @@ class GroupdirectoryAction extends Action
|
|||||||
{
|
{
|
||||||
// TRANS: Page notice for groups directory.
|
// TRANS: Page notice for groups directory.
|
||||||
// TRANS: %%site.name%% is the name of the StatusNet site.
|
// TRANS: %%site.name%% is the name of the StatusNet site.
|
||||||
// TRANS: %%%%action.newgroup%%%% is a URL. Do not change it.
|
// TRANS: %%action.newgroup%% is a URL. Do not change it.
|
||||||
// TRANS: This message contains Markdown links in the form [link text](link).
|
// TRANS: This message contains Markdown links in the form [link text](link).
|
||||||
$instructions = <<< END_OF_INSTRUCTIONS
|
$instructions = <<< END_OF_INSTRUCTIONS
|
||||||
%%site.name%% groups let you find and talk with people of similar
|
%%site.name%% groups let you find and talk with people of similar
|
||||||
|
@ -166,21 +166,31 @@ class SortableGroupListItem extends SortableSubscriptionListItem
|
|||||||
|
|
||||||
function showAvatar()
|
function showAvatar()
|
||||||
{
|
{
|
||||||
$avatar = $this->profile->stream_logo;
|
$logo = ($this->profile->stream_logo) ?
|
||||||
$aAttrs = $this->linkAttributes();
|
$this->profile->stream_logo : User_group::defaultLogo(AVATAR_STREAM_SIZE);
|
||||||
$this->out->elementStart('a', $aAttrs);
|
|
||||||
|
$this->out->elementStart(
|
||||||
|
'a',
|
||||||
|
array(
|
||||||
|
'href' => $this->profile->homeUrl(),
|
||||||
|
'class' => 'url entry-title',
|
||||||
|
'rel' => 'contact group'
|
||||||
|
)
|
||||||
|
);
|
||||||
$this->out->element(
|
$this->out->element(
|
||||||
'img',
|
'img',
|
||||||
array(
|
array(
|
||||||
'src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_STREAM_SIZE),
|
'src' => $logo,
|
||||||
'class' => 'photo avatar',
|
'class' => 'photo avatar',
|
||||||
'width' => AVATAR_STREAM_SIZE,
|
'width' => AVATAR_STREAM_SIZE,
|
||||||
'height' => AVATAR_STREAM_SIZE,
|
'height' => AVATAR_STREAM_SIZE,
|
||||||
'alt' => ($this->profile->fullname) ? $this->profile->fullname : $this->profile->nickname
|
'alt' => ($this->profile->fullname)
|
||||||
|
? $this->profile->fullname : $this->profile->nickname
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->out->text(' ');
|
$this->out->text(' ');
|
||||||
$hasFN = (!empty($this->profile->fullname)) ? 'nickname' : 'fn nickname';
|
$hasFN = ($this->profile->fullname) ? 'nickname' : 'fn org nickname';
|
||||||
$this->out->elementStart('span', $hasFN);
|
$this->out->elementStart('span', $hasFN);
|
||||||
$this->out->raw($this->highlight($this->profile->nickname));
|
$this->out->raw($this->highlight($this->profile->nickname));
|
||||||
$this->out->elementEnd('span');
|
$this->out->elementEnd('span');
|
||||||
|
Loading…
Reference in New Issue
Block a user