]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/groups.php
admin indicators in groups
[quix0rs-gnu-social.git] / actions / groups.php
index 154976f212b35321f14f4d48044ea9b922b337c6..b49d80f3779b96cc47401be41e8cc529d093efcf 100644 (file)
@@ -51,6 +51,11 @@ class GroupsAction extends Action
     var $page = null;
     var $profile = null;
 
+    function isReadOnly($args)
+    {
+        return true;
+    }
+
     function title()
     {
         if ($this->page == 1) {
@@ -95,9 +100,13 @@ class GroupsAction extends Action
 
     function showContent()
     {
-        $this->element('a', array('href' => common_local_url('newgroup'),
-                                  'id' => 'new_group'),
-                       _('Create a new group'));
+        if (common_logged_in()) {
+            $this->elementStart('p', array('id' => 'new_group'));
+            $this->element('a', array('href' => common_local_url('newgroup'),
+                                      'class' => 'more'),
+                           _('Create a new group'));
+            $this->elementEnd('p');
+        }
 
         $offset = ($this->page-1) * GROUPS_PER_PAGE;
         $limit =  GROUPS_PER_PAGE + 1;
@@ -114,4 +123,12 @@ class GroupsAction extends Action
         $this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE,
                           $this->page, 'groups');
     }
+
+    function showSections()
+    {
+        $gbp = new GroupsByPostsSection($this);
+        $gbp->show();
+        $gbm = new GroupsByMembersSection($this);
+        $gbm->show();
+    }
 }