We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 069d976f authored by Evan Prodromou's avatar Evan Prodromou

SearchSubMenu is a MoreMenu

parent baaad0dc
...@@ -45,7 +45,7 @@ if (!defined('STATUSNET')) { ...@@ -45,7 +45,7 @@ if (!defined('STATUSNET')) {
* @link http://status.net/ * @link http://status.net/
*/ */
class SearchSubMenu extends Menu class SearchSubMenu extends MoreMenu
{ {
protected $user; protected $user;
protected $searches; protected $searches;
...@@ -57,22 +57,32 @@ class SearchSubMenu extends Menu ...@@ -57,22 +57,32 @@ class SearchSubMenu extends Menu
$this->searches = $searches; $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) { foreach ($this->searches as $search) {
if (!empty($search)) { if (!empty($search)) {
$this->out->menuItem(common_local_url('noticesearch', $items[] = array('noticesearch',
array('q' => $search)), array('q' => $search),
sprintf('"%s"', $search), sprintf('"%s"', $search),
sprintf(_('Notices including %s'), $search), sprintf(_('Notices including %s'), $search));;
$this->actionName == 'noticesearch' && $this->action->arg('q') == $search,
'nav_streams_search_'.$search);
} }
} }
$this->out->elementEnd('ul'); return $items;
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment