3 * StatusNet, the distributed open-source microblogging tool
5 * Tabset for a particular list
9 * LICENCE: This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Affero General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Affero General Public License for more details.
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 * @author Shashi Gowda <connect2shashi@gmail.com>
25 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
26 * @link http://status.net/
29 if (!defined('STATUSNET') && !defined('LACONICA')) {
33 require_once INSTALLDIR.'/lib/widget.php';
38 * Shows a group of tabs for a particular user group
42 * @author Shashi Gowda <connect2shashi@gmail.com>
43 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
44 * @link http://status.net/
48 class PeopletagNav extends Menu
55 * @param Action $action current action, used for output
57 function __construct($action=null, $profile=null)
59 parent::__construct($action);
60 $this->profile = $profile;
70 $action_name = $this->action->trimmed('action');
71 $nickname = $this->profile->nickname;
73 $this->out->elementStart('ul', array('class' => 'nav'));
74 if (Event::handle('StartPeopletagGroupNav', array($this))) {
75 $this->out->menuItem(common_local_url('peopletagsubscriptions', array('nickname' =>
77 // TRANS: Menu item in the group navigation page.
78 _m('MENU','List Subscriptions'),
79 // TRANS: Tooltip for menu item in the group navigation page.
80 // TRANS: %s is a user nickname.
81 sprintf(_m('TOOLTIP','Lists subscribed to by %s.'), $nickname),
82 $action_name == 'peopletagsubscriptions',
84 $this->out->menuItem(common_local_url('peopletagsforuser', array('nickname' =>
86 // TRANS: Menu item in the group navigation page.
87 // TRANS: %s is a user nickname.
88 sprintf(_m('MENU','Lists with %s'), $nickname),
89 // TRANS: Tooltip for menu item in the group navigation page.
90 // TRANS: %s is a user nickname.
91 sprintf(_m('TOOLTIP','Lists with %s.'), $nickname),
92 $action_name == 'peopletagsforuser',
94 $this->out->menuItem(common_local_url('peopletagsbyuser', array('nickname' =>
96 // TRANS: Menu item in the group navigation page.
97 // TRANS: %s is a user nickname.
98 sprintf(_m('MENU','Lists by %s'), $nickname),
99 // TRANS: Tooltip for menu item in the group navigation page.
100 // TRANS: %s is a user nickname.
101 sprintf(_m('TOOLTIP','Lists by %s.'), $nickname),
102 $action_name == 'peopletagsbyuser',
104 Event::handle('EndGroupGroupNav', array($this));
106 $this->out->elementEnd('ul');