]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showstream.php
Profile block base style
[quix0rs-gnu-social.git] / actions / showstream.php
index e12a227e3bdef339ff7dbcf6da7d10bdaeb47a6d..2919a154f21710197d609a4244c35ad216e49ff8 100644 (file)
@@ -203,8 +203,15 @@ class ShowstreamAction extends StreamAction {
                common_profile_new_message_nudge($cur, $user, $profile);
 
         if ($cur) {
-            common_element_start('li', array('id' => 'profile_block'));
-            common_block_form($profile);
+            $blocked = $cur->hasBlocked($profile);
+            common_element_start('li', array('id' => ($blocked) ? 'profile_unblock' : 'profile_block'));
+            if ($blocked) {
+                common_unblock_form($profile, array('action' => 'showstream',
+                                                    'nickname' => $profile->nickname));
+            } else {
+                common_block_form($profile, array('action' => 'showstream',
+                                                  'nickname' => $profile->nickname));
+            }
             common_element_end('li');
         }