]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
authorSarven Capadisli <csarven@status.net>
Wed, 3 Mar 2010 20:31:44 +0000 (15:31 -0500)
committerSarven Capadisli <csarven@status.net>
Wed, 3 Mar 2010 20:31:44 +0000 (15:31 -0500)
EVENTS.txt
actions/usergroups.php
plugins/OStatus/OStatusPlugin.php
plugins/OStatus/theme/base/css/ostatus.css

index 47c67512ac88d87027969870281372a17206e9b8..2da6f3da61b1e89438e269424c8ad2fdc2f3f307 100644 (file)
@@ -778,6 +778,12 @@ StartShowSubscriptionsContent: before showing the subscriptions content
 EndShowSubscriptionsContent: after showing the subscriptions content
 - $action: the current action
 
+StartShowUserGroupsContent: before showing the user groups content
+- $action: the current action
+
+EndShowUserGroupsContent: after showing the user groups content
+- $action: the current action
+
 StartShowAllContent: before showing the all (you and friends) content
 - $action: the current action
 
index 97faabae65ad9cd7f02ab1c5cc0cba3d04a21fa1..29bda0a765c289dc107316bd1f1a4a5135346472 100644 (file)
@@ -130,22 +130,26 @@ class UsergroupsAction extends OwnerDesignAction
                        _('Search for more groups'));
         $this->elementEnd('p');
 
-        $offset = ($this->page-1) * GROUPS_PER_PAGE;
-        $limit =  GROUPS_PER_PAGE + 1;
+        if (Event::handle('StartShowUserGroupsContent', array($this))) {
+            $offset = ($this->page-1) * GROUPS_PER_PAGE;
+            $limit =  GROUPS_PER_PAGE + 1;
+
+            $groups = $this->user->getGroups($offset, $limit);
+
+            if ($groups) {
+                $gl = new GroupList($groups, $this->user, $this);
+                $cnt = $gl->show();
+                if (0 == $cnt) {
+                    $this->showEmptyListMessage();
+                }
+            }
 
-        $groups = $this->user->getGroups($offset, $limit);
+            $this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE,
+                              $this->page, 'usergroups',
+                              array('nickname' => $this->user->nickname));
 
-        if ($groups) {
-            $gl = new GroupList($groups, $this->user, $this);
-            $cnt = $gl->show();
-            if (0 == $cnt) {
-                $this->showEmptyListMessage();
-            }
+            Event::handle('EndShowUserGroupsContent', array($this));
         }
-
-        $this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE,
-                          $this->page, 'usergroups',
-                          array('nickname' => $this->user->nickname));
     }
 
     function showEmptyListMessage()
index da7ca2fe2b0dba8d0dd54645adfe65ece16dffa0..dc502e52c416ce926a5e5e2178c6cca256611b75 100644 (file)
@@ -729,6 +729,13 @@ class OStatusPlugin extends Plugin
         return true;
     }
 
+    function onStartShowUserGroupsContent($action)
+    {
+        $this->showEntityRemoteSubscribe($action);
+
+        return true;
+    }
+
     function onEndShowSubscriptionsMiniList($action)
     {
         $this->showEntityRemoteSubscribe($action);
index d1c60cc0d54a496ce03f9aca937a85141502384a..3b8928a3a9060ffb232f0a9774afd8dd1ca19206 100644 (file)
@@ -41,9 +41,6 @@ min-width:96px;
 #entity_remote_subscribe {
 padding:0;
 float:right;
-}
-
-.section #entity_remote_subscribe {
 position:relative;
 }
 
@@ -55,11 +52,10 @@ margin-bottom:0;
 border-color:#AAAAAA;
 }
 
-.section #entity_remote_subscribe .dialogbox {
+#entity_remote_subscribe .dialogbox {
 width:405px;
 }
 
-
 .aside #entity_subscriptions .more {
 float:left;
 }