From 494288ab9f9370bdf4f7b4ab9990b64f05adbd9d Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 13 Jun 2011 12:52:52 +0200 Subject: [PATCH] Add admin page in nav --- include/nav.php | 9 +++++++-- view/nav.tpl | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/nav.php b/include/nav.php index 66fdbc49b2..5e50a8b79a 100644 --- a/include/nav.php +++ b/include/nav.php @@ -107,10 +107,15 @@ function nav(&$a) { $nav['settings'] = array('settings', t('Settings'),""); $nav['profiles'] = array('profiles', t('Profiles'),""); $nav['contacts'] = array('contacts', t('Contacts'),""); - - } + /** + * Admin page + */ + if (is_site_admin()){ + $nav['admin'] = array('admin/', t('Admin'), ""); + } + /** * diff --git a/view/nav.tpl b/view/nav.tpl index 7e76811d9e..79114749ad 100644 --- a/view/nav.tpl +++ b/view/nav.tpl @@ -16,6 +16,8 @@ $langselector $nav.search.1 $nav.directory.1 +{{ if $nav.admin }}$nav.admin.1{{ endif }} + {{ if $nav.network }} $nav.network.1