1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- class DefaultLocalNav extends Menu
- {
- function show()
- {
- $user = common_current_user();
- $this->action->elementStart('ul', array('id' => 'nav_local_default'));
- if (Event::handle('StartDefaultLocalNav', array($this, $user))) {
- if (!empty($user)) {
- $pn = new PersonalGroupNav($this->action);
-
- $this->submenu(_m('MENU','Home'), $pn);
- }
- $bn = new PublicGroupNav($this->action);
-
- $this->submenu(_m('MENU','Public'), $bn);
- if (!empty($user)) {
- $sn = new GroupsNav($this->action, $user);
- if ($sn->haveGroups()) {
-
- $this->submenu(_m('MENU', 'Groups'), $sn);
- }
- }
- if (!empty($user)) {
- $sn = new ListsNav($this->action, $user->getProfile());
- if ($sn->hasLists()) {
-
- $this->submenu(_m('MENU', 'Lists'), $sn);
- }
- }
- Event::handle('EndDefaultLocalNav', array($this, $user));
- }
- $this->action->elementEnd('ul');
- }
- }
|