]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/peopletaglist.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / lib / peopletaglist.php
index 8a4caf44fe55de9ea1facd73adb70dbb6280d696..b2f2dcca463753c2766de08dda9834505b81e911 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * StatusNet, the distributed open-source microblogging tool
  *
@@ -44,7 +43,6 @@ define('PEOPLETAGS_PER_PAGE', 20);
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class PeopletagList extends Widget
 {
     /** Current peopletag, peopletag query. */
@@ -104,13 +102,12 @@ class PeopletagListItem extends Widget
      *
      * @param Notice $notice The notice we'll display
      */
-
     function __construct($peopletag, $current, $out=null)
     {
         parent::__construct($out);
         $this->peopletag  = $peopletag;
         $this->current = $current;
-        $this->profile = Profile::staticGet('id', $this->peopletag->tagger);
+        $this->profile = Profile::getKV('id', $this->peopletag->tagger);
     }
 
     /**
@@ -121,7 +118,6 @@ class PeopletagListItem extends Widget
      *
      * @return void
      */
-
     function url()
     {
         return $this->peopletag->homeUrl();
@@ -146,7 +142,7 @@ class PeopletagListItem extends Widget
     function showStart()
     {
         $mode = ($this->peopletag->private) ? 'private' : 'public';
-        $this->out->elementStart('li', array('class' => 'hentry peopletag mode-' . $mode,
+        $this->out->elementStart('li', array('class' => 'h-entry peopletag mode-' . $mode,
                                              'id' => 'peopletag-' . $this->peopletag->id));
     }
 
@@ -173,7 +169,8 @@ class PeopletagListItem extends Widget
             array('href' => common_local_url('peopletagged',
                                               array('tagger' => $this->profile->nickname,
                                                     'tag' => $this->peopletag->tag))),
-            _('Tagged'));
+            // TRANS: Link description for link to list of users tagged with a tag (so part of a list).
+            _('Listed'));
         $this->out->raw($this->peopletag->taggedCount());
         $this->out->elementEnd('span');
 
@@ -182,6 +179,7 @@ class PeopletagListItem extends Widget
             array('href' => common_local_url('peopletagsubscribers',
                                               array('tagger' => $this->profile->nickname,
                                                     'tag' => $this->peopletag->tag))),
+            // TRANS: Link description for link to list of users subscribed to a tag.
             _('Subscribers'));
         $this->out->raw($this->peopletag->subscriberCount());
         $this->out->elementEnd('span');
@@ -194,7 +192,9 @@ class PeopletagListItem extends Widget
         $this->out->element('a', array('href' =>
                     common_local_url('editpeopletag', array('tagger' => $this->profile->nickname,
                                                     'tag' => $this->peopletag->tag)),
-                                  'title' => _('Edit peopletag settings')),
+                                  // TRANS: Title for link to edit list settings.
+                                  'title' => _('Edit list settings.')),
+                       // TRANS: Text for link to edit list settings.
                        _('Edit'));
         $this->out->elementEnd('li');
     }
@@ -221,23 +221,16 @@ class PeopletagListItem extends Widget
 
     function showCreator()
     {
-        $this->out->elementStart('span', 'author vcard');
         $attrs = array();
         $attrs['href'] = $this->profile->profileurl;
-        $attrs['class'] = 'url';
+        $attrs['class'] = 'h-card p-author nickname p-name';
         $attrs['rel'] = 'contact';
+        $attrs['title'] = $this->profile->getFancyName();
 
-        if (!empty($this->profile->fullname)) {
-            $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ')';
-        }
         $this->out->elementStart('a', $attrs);
-        $this->showAvatar();
-        $this->out->text(' ');
-        $this->out->element('span', 'nickname fn',
-                        htmlspecialchars($this->profile->nickname));
-
+        $this->showAvatar($this->profile);
+        $this->out->text($this->profile->getNickname());
         $this->out->elementEnd('a');
-        $this->out->elementEnd('span');
     }
 
     function showUpdated()
@@ -256,7 +249,8 @@ class PeopletagListItem extends Widget
             $this->out->elementStart('a',
                 array('href' => common_local_url('peopletagsbyuser',
                     array('nickname' => $this->profile->nickname, 'private' => 1))));
-            $this->out->element('span', 'privacy_mode', _('Private'));
+            // TRANS: Privacy mode text in list list item for private list.
+            $this->out->element('span', 'privacy_mode', _m('MODE','Private'));
             $this->out->elementEnd('a');
         }
     }
@@ -271,31 +265,6 @@ class PeopletagListItem extends Widget
         $this->out->elementEnd('span');
     }
 
-    /**
-     * show the avatar of the peopletag's creator
-     *
-     * This will use the default avatar if no avatar is assigned for the author.
-     * It makes a link to the author's profile.
-     *
-     * @return void
-     */
-
-    function showAvatar($size=AVATAR_STREAM_SIZE)
-    {
-        $avatar = $this->profile->getAvatar($size);
-
-        $this->out->element('img', array('src' => ($avatar) ?
-                                         $avatar->displayUrl() :
-                                         Avatar::defaultImage($size),
-                                         'class' => 'avatar photo',
-                                         'width' => $size,
-                                         'height' => $size,
-                                         'alt' =>
-                                         ($this->profile->fullname) ?
-                                         $this->profile->fullname :
-                                         $this->profile->nickname));
-    }
-
     function showActions()
     {
         $this->out->elementStart('div', 'entity_actions');
@@ -314,7 +283,6 @@ class PeopletagListItem extends Widget
 
     function showDescription()
     {
-        $this->out->element('div', 'entry-content description',
-                            $this->peopletag->description);
+        $this->out->element('div', 'e-content description', $this->peopletag->description);
     }
 }