take out home/profile menu for all pages, use same format for settings menu

darcs-hash:20080611015609-84dde-e2789990adb9a166aa76d119b1e941dbf18fbcc9.gz
This commit is contained in:
Evan Prodromou 2008-06-10 21:56:09 -04:00
parent 3ccb0369b3
commit 7edc6e18fa
2 changed files with 10 additions and 13 deletions

View File

@ -50,7 +50,7 @@ class SettingsAction extends Action {
} }
function settings_menu() { function settings_menu() {
common_element_start('ul', 'settingsmenu menuish'); common_element_start('ul', array('id' => 'nav_views'));
common_menu_item(common_local_url('profilesettings'), common_menu_item(common_local_url('profilesettings'),
_t('Profile')); _t('Profile'));
common_menu_item(common_local_url('avatar'), common_menu_item(common_local_url('avatar'),

View File

@ -175,9 +175,6 @@ function common_show_header($pagetitle, $callable=NULL, $data=NULL, $notice=NULL
} }
common_element_end('div'); common_element_end('div');
common_element_start('div', array('id' => 'content')); common_element_start('div', array('id' => 'content'));
if (common_logged_in()) {
common_views_menu();
}
} }
function common_show_footer() { function common_show_footer() {
@ -216,6 +213,10 @@ function common_raw($xml) {
function common_nav_menu() { function common_nav_menu() {
$user = common_current_user(); $user = common_current_user();
common_element_start('ul', array('id' => 'nav')); common_element_start('ul', array('id' => 'nav'));
if ($user) {
common_menu_item(common_local_url('all', array('nickname' => $user->nickname)),
_t('Home'));
}
common_menu_item(common_local_url('public'), _t('Public')); common_menu_item(common_local_url('public'), _t('Public'));
common_menu_item(common_local_url('doc', array('title' => 'help')), common_menu_item(common_local_url('doc', array('title' => 'help')),
_t('Help')); _t('Help'));
@ -231,7 +232,7 @@ function common_nav_menu() {
common_element_end('ul'); common_element_end('ul');
} }
function common_views_menu() { function common_views_menu($selected=NULL) {
$user = common_current_user(); $user = common_current_user();
common_element_start('ul', array('id' => 'nav_views')); common_element_start('ul', array('id' => 'nav_views'));
common_menu_item(common_local_url('all', array('nickname' => common_menu_item(common_local_url('all', array('nickname' =>
@ -239,7 +240,8 @@ function common_views_menu() {
_t('Home')); _t('Home'));
common_menu_item(common_local_url('showstream', array('nickname' => common_menu_item(common_local_url('showstream', array('nickname' =>
$user->nickname)), $user->nickname)),
_t('Profile'), $user->fullname || $user->nickname); _t('Profile'),
($user->fullname) ? $user->fullname : $user->nickname);
common_element_end('ul'); common_element_end('ul');
} }
@ -297,14 +299,10 @@ function common_password($id, $label) {
function common_submit($id, $label) { function common_submit($id, $label) {
global $xw; global $xw;
common_element_start('p'); common_element_start('p');
common_element_start('label', array('for' => $id));
$xw->writeRaw(' ');
common_element_end('label');
common_element('input', array('type' => 'submit', common_element('input', array('type' => 'submit',
'id' => $id, 'id' => $id,
'name' => $id, 'name' => $id,
'value' => $label, 'value' => $label));
'class' => 'button'));
common_element_end('p'); common_element_end('p');
} }
@ -314,8 +312,7 @@ function common_textarea($id, $label, $content=NULL) {
common_element('textarea', array('rows' => 3, common_element('textarea', array('rows' => 3,
'cols' => 40, 'cols' => 40,
'name' => $id, 'name' => $id,
'id' => $id, 'id' => $id),
'class' => 'width50'),
($content) ? $content : ' '); ($content) ? $content : ' ');
common_element_end('p'); common_element_end('p');
} }