123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- exit(1);
- }
- class SettingsNav extends Menu
- {
-
- function show()
- {
- $actionName = $this->action->trimmed('action');
- $user = common_current_user();
- $nickname = $user->nickname;
- $name = $user->getProfile()->getBestName();
- $stub = new HomeStubNav($this->action);
- $this->submenu(_m('MENU','Home'), $stub);
-
- $this->action->elementStart('ul');
- $this->action->elementStart('li');
-
- $this->action->element('h3', null, _m('HEADER','Settings'));
- $this->action->elementStart('ul', array('class' => 'nav'));
- if (Event::handle('StartAccountSettingsNav', array(&$this->action))) {
- $this->action->menuItem(common_local_url('profilesettings'),
-
- _m('MENU','Profile'),
-
- _('Change your profile settings'),
- $actionName == 'profilesettings');
- $this->action->menuItem(common_local_url('avatarsettings'),
-
- _m('MENU','Avatar'),
-
- _('Upload an avatar'),
- $actionName == 'avatarsettings');
- $this->action->menuItem(common_local_url('passwordsettings'),
-
- _m('MENU','Password'),
-
- _('Change your password'),
- $actionName == 'passwordsettings');
- $this->action->menuItem(common_local_url('emailsettings'),
-
- _m('MENU','Email'),
-
- _('Change email handling'),
- $actionName == 'emailsettings');
- $this->action->menuItem(common_local_url('urlsettings'),
-
- _m('MENU','URL'),
-
- _('URL shorteners'),
- $actionName == 'urlsettings');
- Event::handle('EndAccountSettingsNav', array(&$this->action));
- $haveImPlugin = false;
- Event::handle('HaveImPlugin', array(&$haveImPlugin));
- if ($haveImPlugin) {
- $this->action->menuItem(common_local_url('imsettings'),
-
- _m('MENU','IM'),
-
- _('Updates by instant messenger (IM)'),
- $actionName == 'imsettings');
- }
- if (common_config('sms', 'enabled')) {
- $this->action->menuItem(common_local_url('smssettings'),
-
- _m('MENU','SMS'),
-
- _('Updates by SMS'),
- $actionName == 'smssettings');
- }
- $this->action->menuItem(common_local_url('oauthconnectionssettings'),
-
- _m('MENU','Connections'),
-
- _('Authorized connected applications'),
- $actionName == 'oauthconnectionsettings');
- if (common_config('oldschool', 'enabled')) {
- $this->action->menuItem(common_local_url('oldschoolsettings'),
-
- _m('MENU','Old school'),
-
- _('UI tweaks for old-school users'),
- $actionName == 'oldschoolsettings');
- }
- Event::handle('EndConnectSettingsNav', array(&$this->action));
- }
- $this->action->elementEnd('ul');
- $this->action->elementEnd('li');
- $this->action->elementEnd('ul');
- }
- }
|