]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Group directory - fix group logo display
authorZach Copley <zach@status.net>
Wed, 13 Apr 2011 22:52:44 +0000 (15:52 -0700)
committerZach Copley <zach@status.net>
Wed, 13 Apr 2011 22:52:44 +0000 (15:52 -0700)
plugins/Directory/actions/groupdirectory.php
plugins/Directory/lib/sortablegrouplist.php

index 04454122e0f3ff086ece42a801bd704f69fbe7ce..9fee9ef59b7929dfce2055139cd8477c530002ba 100644 (file)
@@ -117,7 +117,7 @@ class GroupdirectoryAction extends Action
     {
         // TRANS: Page notice for groups directory.
         // 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).
         $instructions = <<< END_OF_INSTRUCTIONS
 %%site.name%% groups let you find and talk with people of similar
index db6bc1d068e9b14781d7e7ce33c426157120b36b..7d0265d9ac33b27b0204690d65cb1286fce0e346 100644 (file)
@@ -166,21 +166,31 @@ class SortableGroupListItem extends SortableSubscriptionListItem
 
     function showAvatar()
     {
-        $avatar = $this->profile->stream_logo;
-        $aAttrs = $this->linkAttributes();
-        $this->out->elementStart('a', $aAttrs);
+        $logo = ($this->profile->stream_logo) ?
+        $this->profile->stream_logo : User_group::defaultLogo(AVATAR_STREAM_SIZE);
+
+        $this->out->elementStart(
+            'a',
+            array(
+                'href'  => $this->profile->homeUrl(),
+                'class' => 'url entry-title',
+                'rel'   => 'contact group'
+            )
+        );
         $this->out->element(
-            'img', 
-             array(
-                'src' => ($avatar) ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_STREAM_SIZE),
+            'img',
+            array(
+                'src'    => $logo,
                 'class'  => 'photo avatar',
                 'width'  => 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(' ');
-        $hasFN = (!empty($this->profile->fullname)) ? 'nickname' : 'fn nickname';
+        $hasFN = ($this->profile->fullname) ? 'nickname' : 'fn org nickname';
         $this->out->elementStart('span', $hasFN);
         $this->out->raw($this->highlight($this->profile->nickname));
         $this->out->elementEnd('span');
@@ -251,7 +261,7 @@ class SortableGroupListItem extends SortableSubscriptionListItem
     {
         $user = $this->owner;
         if ($user) {
-  
+
             $this->out->elementStart('li', 'entity_subscribe');
             // XXX: special-case for user looking at own
             // subscriptions page