]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
TagSubMenu is a MoreMenu
authorEvan Prodromou <evan@status.net>
Thu, 7 Jul 2011 14:59:00 +0000 (10:59 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 7 Jul 2011 14:59:00 +0000 (10:59 -0400)
plugins/TagSub/tagsubmenu.php

index 9a8215ee51a3e618aa17a0771a2325c263e9a5b0..01fa372dd9bdcf858bfbc65c4f0b50fe069f0bde 100644 (file)
@@ -44,7 +44,7 @@ if (!defined('STATUSNET')) {
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
  * @link      http://status.net/
  */
-class TagSubMenu extends Menu
+class TagSubMenu extends MoreMenu
 {
     protected $user;
     protected $tags;
@@ -56,22 +56,33 @@ class TagSubMenu extends Menu
         $this->tags = $tags;
     }
 
-    function show()
+    function getItems()
     {
-        $this->out->elementStart('ul', array('class' => 'nav'));
-
+        $items = array();
+        
         foreach ($this->tags as $tag) {
             if (!empty($tag)) {
-                $this->out->menuItem(common_local_url('tag',
-                                                      array('tag' => $tag)),
-                                     sprintf('#%s', $tag),
-                                     // TRANS: Menu item title. %s is a tag.
-                                     sprintf(_('Notices tagged with "%s".'), $tag),
-                                     $this->actionName == 'tag' && $this->action->arg('tag') == $tag,
-                                     'nav_streams_tag_'.$tag);
+                $items[] = array('tag',
+                                 array('tag' => $tag),
+                                 sprintf('#%s', $tag),
+                                 // TRANS: Menu item title. %s is a tag.
+                                 sprintf(_('Notices tagged with "%s".'), $tag));
             }
         }
 
-        $this->out->elementEnd('ul');
+        return $items;
+    }
+
+    function tag()
+    {
+        return 'tagsubs';
+    }
+    
+    function seeAllItem()
+    {
+        return array('tagsubs',
+                     array('nickname' => $this->user->nickname),
+                     _('See all'),
+                     _('See all tags you are following'));
     }
 }