]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
move edit choice to group profile block
authorEvan Prodromou <evan@status.net>
Sat, 27 Aug 2011 19:10:47 +0000 (15:10 -0400)
committerEvan Prodromou <evan@status.net>
Sat, 27 Aug 2011 19:10:47 +0000 (15:10 -0400)
lib/groupnav.php
lib/groupprofileblock.php

index 33f77bef9b066235e498617cf2347bc61e68a902..e363995655c5c52bd98f8b65b9943008e63169af 100644 (file)
@@ -119,15 +119,6 @@ class GroupNav extends Menu
                                      sprintf(_m('TOOLTIP','%s blocked users'), $nickname),
                                      $action_name == 'blockedfromgroup',
                                      'nav_group_blocked');
-                $this->out->menuItem(common_local_url('editgroup', array('nickname' =>
-                                                                         $nickname)),
-                                     // TRANS: Menu item in the group navigation page. Only shown for group administrators.
-                                     _m('MENU','Admin'),
-                                     // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators.
-                                     // TRANS: %s is the nickname of the group.
-                                     sprintf(_m('TOOLTIP','Edit %s group properties'), $nickname),
-                                     $action_name == 'editgroup',
-                                     'nav_group_admin');
                 $this->out->menuItem(common_local_url('grouplogo', array('nickname' =>
                                                                          $nickname)),
                                      // TRANS: Menu item in the group navigation page. Only shown for group administrators.
index 10dddb84676b90f6317d91cc5b3ad96828e546ce..b5f23d288e824db6a6d4f3d0162156375008716c 100644 (file)
@@ -112,12 +112,24 @@ class GroupProfileBlock extends ProfileBlock
                 Event::handle('EndGroupSubscribe', array($this, $this->group));
             }
             $this->out->elementEnd('li');
+            if ($cur && $cur->isAdmin($this->group)) {
+                $this->out->elementStart('li', 'entity_edit');
+                $this->out->element('a', array('href' => common_local_url('editgroup',
+                                                                          array('nickname' => $this->group->nickname)),
+                                               // TRANS: Tooltip for menu item in the group navigation page. Only shown for group administrators.
+                                               // TRANS: %s is the nickname of the group.
+                                               'title' => sprintf(_m('TOOLTIP','Edit %s group properties'), $nickname)),
+                                    // TRANS: Link text for link on user profile.
+                                    _m('BUTTON','Edit'));
+                $this->out->elementEnd('li');
+            }
             if ($cur && $cur->hasRight(Right::DELETEGROUP)) {
                 $this->out->elementStart('li', 'entity_delete');
                 $df = new DeleteGroupForm($this->out, $this->group);
                 $df->show();
                 $this->out->elementEnd('li');
             }
+
             Event::handle('EndGroupActionsList', array($this, $this->group));
         }
         $this->out->elementEnd('ul');