summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-11 14:36:34 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-11 14:36:34 -0400
commitd0f8fd20fb9e50aad9568a458934b52a9439228c (patch)
treead95b104b0e8dfb64b7b91dfef28f7fac8d04afb /actions
parentf4ed6059980afdaede47e33307c6432e83aea484 (diff)
push notice form and sub-menu into header div
darcs-hash:20080611183634-84dde-97119e7ef1abb01f6ce8723955dc5d6e06e644a8.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/all.php21
-rw-r--r--actions/avatar.php3
-rw-r--r--actions/password.php3
-rw-r--r--actions/profilesettings.php4
-rw-r--r--actions/showstream.php15
5 files changed, 30 insertions, 16 deletions
diff --git a/actions/all.php b/actions/all.php
index 06d88477d..44e3fd239 100644
--- a/actions/all.php
+++ b/actions/all.php
@@ -45,15 +45,8 @@ class AllAction extends StreamAction {
# Looks like we're good; show the header
common_show_header($profile->nickname . _t(" and friends"),
- array($this, 'show_header'), $user);
-
- $cur = common_current_user();
-
- if ($cur && $cur->id == $profile->id) {
- common_notice_form();
- }
-
- $this->views_menu();
+ array($this, 'show_header'), $user,
+ array($this, 'show_top'));
$this->show_notices($profile);
@@ -68,6 +61,16 @@ class AllAction extends StreamAction {
'title' => _t('Feed for friends of ') . $user->nickname));
}
+ function show_top($user) {
+ $cur = common_current_user();
+
+ if ($cur && $cur->id == $user->id) {
+ common_notice_form();
+ }
+
+ $this->views_menu();
+ }
+
function show_notices($profile) {
$notice = DB_DataObject::factory('notice');
diff --git a/actions/avatar.php b/actions/avatar.php
index 2d8a9f81d..b91dd794c 100644
--- a/actions/avatar.php
+++ b/actions/avatar.php
@@ -24,8 +24,7 @@ require_once(INSTALLDIR.'/lib/settingsaction.php');
class AvatarAction extends SettingsAction {
function show_form($msg=NULL, $success=false) {
- common_show_header(_t('Avatar'));
- $this->settings_menu();
+ common_show_header(_t('Avatar'), NULL, NULL, array($this, 'settings_menu'));
if ($msg) {
$this->message($msg, $success);
} else {
diff --git a/actions/password.php b/actions/password.php
index fe19f5f71..ee61c3e97 100644
--- a/actions/password.php
+++ b/actions/password.php
@@ -24,8 +24,7 @@ require_once(INSTALLDIR.'/lib/settingsaction.php');
class PasswordAction extends SettingsAction {
function show_form($msg=NULL, $success=false) {
- common_show_header(_t('Change password'));
- $this->settings_menu();
+ common_show_header(_t('Change password'), NULL, NULL, array($this, 'settings_menu'));
if ($msg) {
$this->message($msg, $success);
} else {
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index e94d846bd..755c293c7 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -26,8 +26,8 @@ class ProfilesettingsAction extends SettingsAction {
function show_form($msg=NULL, $success=false) {
$user = common_current_user();
$profile = $user->getProfile();
- common_show_header(_t('Profile settings'));
- $this->settings_menu();
+ common_show_header(_t('Profile settings'), NULL, NULL, array($this, 'settings_menu'));
+
if ($msg) {
$this->message($msg, $success);
} else {
diff --git a/actions/showstream.php b/actions/showstream.php
index 6fed6df12..52dbcd0ff 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -52,7 +52,9 @@ class ShowstreamAction extends StreamAction {
header('X-XRDS-Location: '. common_local_url('xrds', array('nickname' =>
$user->nickname)));
- common_show_header($profile->nickname, array($this, 'show_header'), $user);
+ common_show_header($profile->nickname,
+ array($this, 'show_header'), $user,
+ array($this, 'show_top'));
$cur = common_current_user();
@@ -69,6 +71,17 @@ class ShowstreamAction extends StreamAction {
common_show_footer();
}
+ function show_top($user) {
+
+ $cur = common_current_user();
+
+ if ($cur && $cur->id == $user->id) {
+ common_notice_form();
+ }
+
+ $this->views_menu();
+ }
+
function show_header($user) {
common_element('link', array('rel' => 'alternate',
'href' => common_local_url('userrss', array('nickname' =>