summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-11 11:52:58 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-11 11:52:58 -0400
commit9f39fd31afe198fc78c669088710af64a9976c3d (patch)
tree086701d6ef16a40fdbca557865bb3673f24d06a0 /lib/util.php
parente4534d60be73634ac49a1ac1f57ecc7bf8ccb1e8 (diff)
menu on home and profile
darcs-hash:20080611155258-84dde-7afab3908ff3464975f8478fcd41f065466170ae.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/util.php b/lib/util.php
index 172b7a6b9..def3a5750 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -232,19 +232,6 @@ function common_nav_menu() {
common_element_end('ul');
}
-function common_views_menu($selected=NULL) {
- $user = common_current_user();
- common_element_start('ul', array('id' => 'nav_views'));
- common_menu_item(common_local_url('all', array('nickname' =>
- $user->nickname)),
- _t('Home'));
- common_menu_item(common_local_url('showstream', array('nickname' =>
- $user->nickname)),
- _t('Profile'),
- ($user->fullname) ? $user->fullname : $user->nickname);
- common_element_end('ul');
-}
-
function common_foot_menu() {
common_element_start('ul', array('id' => 'nav_sub'));
common_menu_item(common_local_url('doc', array('title' => 'about')),
@@ -256,12 +243,16 @@ function common_foot_menu() {
common_element_end('ul');
}
-function common_menu_item($url, $text, $title=NULL) {
+function common_menu_item($url, $text, $title=NULL, $is_selected) {
+ $lattrs = array();
+ if ($is_selected) {
+ $lattrs['class'] = 'current';
+ }
+ common_element_start('li', $lattrs);
$attrs['href'] = $url;
if ($title) {
$attrs['title'] = $title;
}
- common_element_start('li');
common_element('a', $attrs, $text);
common_element_end('li');
}