GitHost.io will be shut down on June 1, 2019. At that point this instance will be unreachable and all data will be irrevocably deleted. More details at https://about.gitlab.com/gitlab-hosted/#githost-is-shutting-down-on-june-1st-2019

Commit baaad0dc authored by Evan Prodromou's avatar Evan Prodromou

TagSubMenu is a MoreMenu

parent 12e0f891
......@@ -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'));
}
}
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