]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Directory/lib/sortablesubscriptionlist.php
Added more checked type-hints.
[quix0rs-gnu-social.git] / plugins / Directory / lib / sortablesubscriptionlist.php
index 8cc2657b5cabaf8a62edc0f01668d13155dda19e..7e9c3103583767ab350717d36407e2df1d913b1d 100644 (file)
@@ -151,7 +151,7 @@ class SortableSubscriptionList extends SubscriptionList
         return $cnt;
     }
 
-    function newListItem($profile, $odd)
+    function newListItem(Profile $profile, $odd)
     {
         return new SortableSubscriptionListItem($profile, $this->owner, $this->action, $odd);
     }
@@ -191,7 +191,7 @@ class SortableSubscriptionListItem extends SubscriptionListItem
 
     function startProfile()
     {
-        $this->out->elementStart('td', 'entity_profile h-card e-content');
+        $this->out->elementStart('td', 'entity_profile h-card');
     }
 
     function endProfile()
@@ -207,6 +207,18 @@ class SortableSubscriptionListItem extends SubscriptionListItem
 
     function endActions()
     {
+               
+               // delete button
+               $cur = common_current_user();
+        list($action, $r2args) = $this->out->returnToArgs();
+        $r2args['action'] = $action;        
+               if ($cur instanceof User && $cur->hasRight(Right::DELETEUSER)) {
+                       $this->out->elementStart('li', 'entity_delete');
+                       $df = new DeleteUserForm($this->out, $this->profile, $r2args);
+                       $df->show();            
+                       $this->out->elementEnd('li');
+               }
+                       
         $this->out->elementEnd('ul');
         $this->out->elementEnd('td');
     }