]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
float subscribe button right in profile list
authorEvan Prodromou <evan@prodromou.name>
Thu, 20 Nov 2008 20:40:22 +0000 (15:40 -0500)
committerEvan Prodromou <evan@prodromou.name>
Thu, 20 Nov 2008 20:40:22 +0000 (15:40 -0500)
darcs-hash:20081120204022-84dde-c238f7b51e43e81ce267ec65112f006f928676bf.gz

lib/profilelist.php
theme/default/display.css

index b8f52fd8fc9af8fc6d70b506a6495a8332e583fc..ec96c291616e75bb0b38d4b06b72ca7031f242fa 100644 (file)
@@ -55,6 +55,18 @@ class ProfileList {
                
                common_element_start('li', array('class' => 'profile_single',
                                                                                 'id' => 'profile-' . $this->profile->id));
+               
+               $user = common_current_user();
+               if ($user) {
+                       # XXX: special-case for user looking at own
+                       # subscriptions page
+                       if ($user->isSubscribed($this->profile)) {
+                               common_unsubscribe_form($profile);
+                       } else {
+                               common_subscribe_form($profile);
+                       }
+               }
+               
                $avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
                common_element_start('a', array('href' => $this->profile->profileurl));
                common_element('img', array('src' => ($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_STREAM_SIZE),
@@ -96,15 +108,6 @@ class ProfileList {
                        common_element_end('p');
                }
                
-               $user = common_current_user();
-               if ($user) {
-                       if ($user->isSubscribed($this->profile)) {
-                               common_unsubscribe_form($profile);
-                       } else {
-                               common_subscribe_form($profile);
-                       }
-               }
-               
                common_element_end('li');
        }
 
index 7a741d9b112c22f9148e43129607203e2dd14a59..2076cbf42a24c7066dc15ebf2712cb0f9cab1f6a 100644 (file)
@@ -750,6 +750,14 @@ input#openid_url {
        background-color: #f7ebcc;
        }
 
+.profile_single form#subscribe {
+        float: right;
+}
+
+.profile_single form#unsubscribe {
+        float: right;
+}
+       
 /* ----- IM Settings Form -----*/
 
 #imsettings p {