]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
move instructions up to the "whats up" area
authorEvan Prodromou <evan@prodromou.name>
Wed, 18 Jun 2008 03:57:39 +0000 (23:57 -0400)
committerEvan Prodromou <evan@prodromou.name>
Wed, 18 Jun 2008 03:57:39 +0000 (23:57 -0400)
darcs-hash:20080618035739-84dde-a562cffe186780d5f03cf53798ea249b2bda9fb1.gz

actions/avatar.php
actions/login.php
actions/password.php
actions/profilesettings.php
actions/register.php
actions/shownotice.php
actions/subscribed.php
actions/subscriptions.php

index 61d7e770d3fffa33c6d48f371cd887dce34d6724..a22512750ebe6148da563bc8baa5c1a3066af67a 100644 (file)
@@ -23,20 +23,25 @@ require_once(INSTALLDIR.'/lib/settingsaction.php');
 
 class AvatarAction extends SettingsAction {
 
-       function show_form($msg=NULL, $success=false) {
-               common_show_header(_t('Avatar'), NULL, NULL, array($this, 'settings_menu'));
+       function show_top($arr) {
+               $msg = $arr[0];
+               $success = $arr[1];
                if ($msg) {
                        $this->message($msg, $success);
                } else {
                        common_element('div', 'instructions', 
-                                                  _t('You can upload a new "avatar" (user picture) here. ' .
-                                                         'You can\'t edit the picture after you upload it, so you should ' .
-                                                         'edit it in your desktop image-manipulation software first. ' .
-                                                         'Everything works best if your picture is more or less square. ' . 
-                                                         'And remember: your image will be released under the site license, ' .
-                                                         'So don\'t upload images that don\'t belong to you or that you don\'t ' .
+                                                  _t('Upload a new "avatar" (user image) here. ' .
+                                                         'You can\'t edit the picture after you upload it, so ' .
+                                                         'make sure it\'s more or less square. ' . 
+                                                         'It must be under the site license, also. ' .
+                                                         'Use a picture that belongs to you and that you ' .
                                                          'want to share.'));
                }
+               $this->settings_menu();
+       }
+       
+       function show_form($msg=NULL, $success=false) {
+               common_show_header(_t('Avatar'), NULL, array($msg, $success), array($this, 'show_top'));
 
                $user = common_current_user();
                $profile = $user->getProfile();
index 5544fd8786a4ea79ccb6553075391234731228e5..5acb157f4f0315ebdb16c8d7276b111e7e524243 100644 (file)
@@ -60,14 +60,7 @@ class LoginAction extends Action {
        }
 
        function show_form($error=NULL) {
-               common_show_header(_t('Login'));
-               if ($error) {
-                       common_element('div', array('class' => 'error'), $error);
-               } else {
-                       common_element('div', 'instructions', 
-                                                  _t('Login with your username and password. ' .
-                                                         'Don\'t have a username yet? Choose register above. '));
-               }
+               common_show_header(_t('Login'), NULL, $error, array($this, 'show_top'));
                common_element_start('form', array('method' => 'POST',
                                                                                   'id' => 'login',
                                                                                   'action' => common_local_url('login')));
@@ -77,4 +70,14 @@ class LoginAction extends Action {
                common_element_end('form');
                common_show_footer();
        }
+       
+       function show_top($error=NULL) {
+               if ($error) {
+                       common_element('p', 'error', $error);
+               } else {
+                       common_element('p', 'instructions', 
+                                                  _t('Login with your username and password. ' .
+                                                         'Don\'t have a username yet? Choose register above. '));
+               }
+       }
 }
index 603ae58eaf0405c9884b775c0c2b0b50cdc879c0..3481ad33bb482bb3805a50d426e3496e4218c75a 100644 (file)
@@ -23,14 +23,21 @@ require_once(INSTALLDIR.'/lib/settingsaction.php');
 
 class PasswordAction extends SettingsAction {
 
-       function show_form($msg=NULL, $success=false) {
-               common_show_header(_t('Change password'), NULL, NULL, array($this, 'settings_menu'));
+       function show_top($arr) {
+               $msg = $arr[0];
+               $success = $arr[1];
                if ($msg) {
                        $this->message($msg, $success);
                } else {
                        common_element('div', 'instructions', 
                                                   _t('You can change your password here. Choose a good one!'));
                }
+               $this->settings_menu();
+       }
+       
+       function show_form($msg=NULL, $success=false) {
+               common_show_header(_t('Change password'), NULL,
+                                                  array($msg, $success), array($this, 'show_top'));
                common_element_start('form', array('method' => 'POST',
                                                                                   'id' => 'password',
                                                                                   'action' =>
index a5682b23bd7049fa0dbadea25eb801212a8992c1..44abb8e99cf19c4451c7b898b5288211dc6fe30f 100644 (file)
@@ -23,18 +23,25 @@ require_once(INSTALLDIR.'/lib/settingsaction.php');
 
 class ProfilesettingsAction extends SettingsAction {
 
-       function show_form($msg=NULL, $success=false) {
-               $user = common_current_user();
-               $profile = $user->getProfile();
-               common_show_header(_t('Profile settings'), NULL, NULL, array($this, 'settings_menu'));
-
+       function show_top($arr) {
+               $msg = $arr[0];
+               $success = $arr[1];
                if ($msg) {
                        $this->message($msg, $success);
                } else {
                        common_element('div', 'instructions',
                                                   _t('You can update your personal profile info here '.
-                                                         'so people know more about you. '));
+                                                         'so people know more about you.'));
                }
+               $this->settings_menu();
+       }
+       
+       function show_form($msg=NULL, $success=false) {
+               $user = common_current_user();
+               $profile = $user->getProfile();
+               common_show_header(_t('Profile settings'), NULL, array($msg, $success),
+                                                  array($this, 'show_top'));
+
                common_element_start('form', array('method' => 'POST',
                                                                                   'id' => 'profilesettings',
                                                                                   'action' =>
index d2c87f7bb33ff77196bc2d377105d401ab766bf9..cad5c2ed708745df0f4daa2c65659fc73966e773 100644 (file)
@@ -115,16 +115,19 @@ class RegisterAction extends Action {
                return $result;
        }
 
-       function show_form($error=NULL) {
-               global $config;
-
-               common_show_header(_t('Register'));
+       function show_top($error=NULL) {
                if ($error) {
-                       common_element('div', 'error', $error);
+                       common_element('p', 'error', $error);
                } else {
-                       common_element('div', 'instructions', 
-                                                  _t('You can create a new account to start posting notices. '));
+                       common_element('p', 'instructions', 
+                                                  _t('You can create a new account to start posting notices.'));
                }
+       }
+       
+       function show_form($error=NULL) {
+               global $config;
+
+               common_show_header(_t('Register'), NULL, $error, array($this, 'show_top'));
                common_element_start('form', array('method' => 'POST',
                                                                                   'id' => 'login',
                                                                                   'action' => common_local_url('register')));
index 4b954d57ba64cc646141dba3081ebaf69ee4b594..cc4149d48283b516f815404d266892fc71fbe8c9 100644 (file)
@@ -40,7 +40,9 @@ class ShownoticeAction extends StreamAction {
 
                # Looks like we're good; show the header
 
-               common_show_header($profile->nickname."'s status on ".common_date_string($notice->created));
+               common_show_header($profile->nickname."'s status on ".common_date_string($notice->created),
+                                                  NULL, $user,
+                                                  array($this, 'show_top'));
 
                common_element_start('ul', array('id' => 'notices'));
                $this->show_notice($notice);
@@ -49,6 +51,14 @@ class ShownoticeAction extends StreamAction {
                common_show_footer();
        }
 
+       function show_top($user) {
+               $cur = common_current_user();
+               
+               if ($cur && $cur->id == $user->id) {
+                       common_notice_form();
+               }
+       }
+       
        function no_such_notice() {
                common_user_error('No such notice.');
        }
index 5527b276f35ce44fc25bd878aba7f8ae9c1734ca..2b5bbd1b88093b7d8ac7bc605a36f478f38e0cdd 100644 (file)
@@ -41,11 +41,20 @@ class SubscribedAction extends Action {
                }
 
                $page = $this->arg('page') || 1;
-               common_show_header($profile->nickname . ": " . _t('Subscribers'));
+               common_show_header($profile->nickname . ": " . _t('Subscribers'),
+                                                  NULL, $profile,
+                                                  array($this, 'show_top'));
                $this->show_subscribed($profile, $page);
                common_show_footer();
        }
 
+       function show_top($profile) {
+               $user = common_current_user();
+               common_element('p', 'instructions',
+                                          _t('These are the people who listen to ') .
+                                          (($user && ($user->id == $profile->id)) ? _t('your notices.') : ($profile->nickname . _t('\'s notices.'))));
+       }
+
        function show_subscribed($profile, $page) {
                global $config;
                
index 566a053ead74e5a1d84e693b12fa0591311c92ef..35a707894424731869324adefb39e5fec9b95e36 100644 (file)
@@ -38,11 +38,20 @@ class SubscriptionsAction extends Action {
                        $this->no_such_user();
                }
                $page = $this->arg('page') || 1;
-               common_show_header($profile->nickname . ": " . _t('Subscriptions'));
+               common_show_header($profile->nickname . ": " . _t('Subscriptions'),
+                                                  NULL, $profile,
+                                                  array($this, 'show_top'));
                $this->show_subscriptions($profile, $page);
                common_show_footer();
        }
 
+       function show_top($profile) {
+               $user = common_current_user();
+               common_element('p', 'instructions',
+                                          _t('These are the people whose notices ') .
+                                          (($user && ($user->id == $profile->id)) ? _t('you listen to.') : ($profile->nickname . _t(' listens to.'))));
+       }
+       
        function show_subscriptions($profile, $page) {
 
                $subs = DB_DataObject::factory('subscription');