}
function settings_menu() {
- common_element_start('ul', 'settingsmenu menuish');
+ common_element_start('ul', array('id' => 'nav_views'));
common_menu_item(common_local_url('profilesettings'),
_t('Profile'));
common_menu_item(common_local_url('avatar'),
}
common_element_end('div');
common_element_start('div', array('id' => 'content'));
- if (common_logged_in()) {
- common_views_menu();
- }
}
function common_show_footer() {
function common_nav_menu() {
$user = common_current_user();
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('doc', array('title' => 'help')),
_t('Help'));
common_element_end('ul');
}
-function common_views_menu() {
+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' =>
_t('Home'));
common_menu_item(common_local_url('showstream', array('nickname' =>
$user->nickname)),
- _t('Profile'), $user->fullname || $user->nickname);
+ _t('Profile'),
+ ($user->fullname) ? $user->fullname : $user->nickname);
common_element_end('ul');
}
function common_submit($id, $label) {
global $xw;
common_element_start('p');
- common_element_start('label', array('for' => $id));
- $xw->writeRaw(' ');
- common_element_end('label');
common_element('input', array('type' => 'submit',
'id' => $id,
'name' => $id,
- 'value' => $label,
- 'class' => 'button'));
+ 'value' => $label));
common_element_end('p');
}
common_element('textarea', array('rows' => 3,
'cols' => 40,
'name' => $id,
- 'id' => $id,
- 'class' => 'width50'),
+ 'id' => $id),
($content) ? $content : ' ');
common_element_end('p');
}