]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
delete groups from groups directory, for admins
authorHannes Mannerheim <h@nnesmannerhe.im>
Fri, 7 Nov 2014 14:44:22 +0000 (15:44 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 2 Dec 2014 14:31:27 +0000 (15:31 +0100)
actions/deletegroup.php
plugins/Directory/lib/sortablegrouplist.php

index 6d9d66d30e1f61ec86c8397373a63106b24414ab..c64bc1d8e90fd47fb91cfd4d0cd4743b358f8ad0 100644 (file)
@@ -171,6 +171,8 @@ class DeletegroupAction extends RedirectingAction
 
     function showContent() {
         $this->areYouSureForm();
+        $block = new GroupProfileBlock($this, $this->group);
+        $block->show();
     }
 
     /**
index 2849e75eba6fb69c5e8fc8f84dac17218d966d1c..7474d0daa608f9cfa9a037a8da1b4f71bf11e13a 100644 (file)
@@ -221,6 +221,23 @@ class SortableGroupListItem extends SortableSubscriptionListItem
         $this->endProfile();
     }
 
+    function endActions()
+    {
+        // delete button
+        $cur = common_current_user();
+        list($action, $r2args) = $this->out->returnToArgs();
+        $r2args['action'] = $action;
+        if ($cur instanceof User && $cur->hasRight(Right::DELETEGROUP)) {
+            $this->out->elementStart('li', 'entity_delete');
+            $df = new DeleteGroupForm($this->out, $this->profile, $r2args);
+            $df->show();
+            $this->out->elementEnd('li');
+        }
+
+        $this->out->elementEnd('ul');
+        $this->out->elementEnd('td');
+    }
+
     function showActions()
     {
         $this->startActions();