]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showstream.php
Profile block base style
[quix0rs-gnu-social.git] / actions / showstream.php
index bd1b8a7de3acdc9b015f59386e5a8c8d4736b4cd..2919a154f21710197d609a4244c35ad216e49ff8 100644 (file)
@@ -202,6 +202,19 @@ class ShowstreamAction extends StreamAction {
                $user = User::staticGet('id', $profile->id);
                common_profile_new_message_nudge($cur, $user, $profile);
 
+        if ($cur) {
+            $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');
+        }
+
                common_element_end('ul');
 
                common_element_end('div');