summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-10-05 10:28:53 +0000
committerSarven Capadisli <csarven@status.net>2009-10-05 10:28:53 +0000
commit1ccfb5d9d34128005bc10d89e3ed56ff0e643969 (patch)
tree41bff0fc01fdcc22cd948e7529608b71f89c76a5 /plugins
parentb9622999f8f313f10dd1bf39143ef2c872a53817 (diff)
parentacda8d4c7914b0bcea974c34d72c8b93ba731c17 (diff)
Merge branch '0.9.x-mobile' of git@gitorious.org:~csarven/statusnet/csarven-clone into 0.9.x-mobile
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MobileProfile/MobileProfilePlugin.php48
1 files changed, 47 insertions, 1 deletions
diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php
index 37aeeee87..7a36522f1 100644
--- a/plugins/MobileProfile/MobileProfilePlugin.php
+++ b/plugins/MobileProfile/MobileProfilePlugin.php
@@ -215,7 +215,7 @@ class MobileProfilePlugin extends WAP20Plugin
$action->elementStart('div', array('id' => 'header'));
$this->_showLogo($action);
- $action->showPrimaryNav();
+ $this->_showPrimaryNav($action);
if (common_logged_in()) {
$action->showNoticeForm();
}
@@ -245,6 +245,52 @@ class MobileProfilePlugin extends WAP20Plugin
}
+ function _showPrimaryNav($action) {
+ $user = common_current_user();
+ $connect = '';
+ if (common_config('xmpp', 'enabled')) {
+ $connect = 'imsettings';
+ } else if (common_config('sms', 'enabled')) {
+ $connect = 'smssettings';
+ } else if (common_config('twitter', 'enabled')) {
+ $connect = 'twittersettings';
+ }
+
+ $action->elementStart('ul', array('id' => 'site_nav_global_primary'));
+ if ($user) {
+ $action->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
+ _('Home'));
+ $action->menuItem(common_local_url('profilesettings'),
+ _('Account'));
+ if ($connect) {
+ $action->menuItem(common_local_url($connect),
+ _('Connect'));
+ }
+ if (common_config('invite', 'enabled')) {
+ $action->menuItem(common_local_url('invite'),
+ _('Invite'));
+ }
+ $action->menuItem(common_local_url('logout'),
+ _('Logout'));
+ }
+ else {
+ if (!common_config('site', 'closed')) {
+ $action->menuItem(common_local_url('register'),
+ _('Register'));
+ }
+ $action->menuItem(common_local_url('login'),
+ _('Login'));
+ }
+ $action->menuItem(common_local_url('doc', array('title' => 'help')),
+ _('Help'));
+ if ($user || !common_config('site', 'private')) {
+ $action->menuItem(common_local_url('peoplesearch'),
+ _('Search'));
+ }
+ $action->elementEnd('ul');
+ }
+
+
function onStartShowAside($action)
{
if ($this->serveMobile) {