]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
SearchSubMenu is a MoreMenu
authorEvan Prodromou <evan@status.net>
Thu, 7 Jul 2011 16:06:56 +0000 (12:06 -0400)
committerEvan Prodromou <evan@status.net>
Thu, 7 Jul 2011 16:06:56 +0000 (12:06 -0400)
plugins/SearchSub/searchsubmenu.php

index 684f5c7db26742d05b8b66ad6b2b74d595ba08dc..755a3c9a5b121877300e6ce323e78b4fa02bd6b7 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('STATUSNET')) {
  * @link      http://status.net/
  */
 
-class SearchSubMenu extends Menu
+class SearchSubMenu extends MoreMenu
 {
     protected $user;
     protected $searches;
@@ -57,22 +57,32 @@ class SearchSubMenu extends Menu
         $this->searches = $searches;
     }
 
-    function show()
+    function tag()
     {
-        $this->out->elementStart('ul', array('class' => 'nav'));
+        return 'searchsubs';
+    }
+
+    function seeAllItem()
+    {
+        return array('searchsubs',
+                     array('nickname' => $this->user->nickname),
+                     _('See all'),
+                     _('See all searches you are following'));
+    }
 
+    function getItems()
+    {
+        $items = array();
+        
         foreach ($this->searches as $search) {
             if (!empty($search)) {
-                $this->out->menuItem(common_local_url('noticesearch',
-                                                      array('q' => $search)),
-                                     sprintf('"%s"', $search),
-                                     sprintf(_('Notices including %s'), $search),
-                                     $this->actionName == 'noticesearch' && $this->action->arg('q') == $search,
-                                     'nav_streams_search_'.$search);
+                $items[] = array('noticesearch',
+                                 array('q' => $search),
+                                 sprintf('"%s"', $search),
+                                 sprintf(_('Notices including %s'), $search));;
             }
         }
 
-        $this->out->elementEnd('ul');
-    }
-    
+        return $items;
+    } 
 }