]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
authorEvan Prodromou <evan@status.net>
Sat, 27 Aug 2011 19:22:14 +0000 (15:22 -0400)
committerEvan Prodromou <evan@status.net>
Sat, 27 Aug 2011 19:22:14 +0000 (15:22 -0400)
lib/groupaction.php
lib/groupnav.php
lib/groupprofileblock.php

index 96d38ebab51fa7498f7a063694799d666c75b609..3b5cd528751d26840dd52b18035642b1ee17e4ca 100644 (file)
@@ -126,7 +126,6 @@ class GroupAction extends Action
     function showSections()
     {
         $this->showMembers();
-        $this->showStatistics();
         $this->showAdmins();
         $cloud = new GroupTagCloudSection($this, $this->group);
         $cloud->show();
@@ -149,9 +148,19 @@ class GroupAction extends Action
                                          'class' => 'section'));
 
         if (Event::handle('StartShowGroupMembersMiniList', array($this))) {
-
+             
             // TRANS: Header for mini list of group members on a group page (h2).
-            $this->element('h2', null, _('Members'));
+            $this->elementStart('h2');
+
+            $this->element('a', array('href' => common_local_url('groupmembers', array('nickname' =>
+                                                                                       $this->group->nickname))),
+                           _('Members'));
+
+            $this->text(' ');
+
+            $this->text($this->group->getMemberCount());
+            
+            $this->elementEnd('h2');
 
             $gmml = new GroupMembersMiniList($member, $this);
             $cnt = $gmml->show();
@@ -186,34 +195,6 @@ class GroupAction extends Action
         $adminSection->show();
     }
 
-    /**
-     * Show some statistics
-     *
-     * @return void
-     */
-    function showStatistics()
-    {
-        $this->elementStart('div', array('id' => 'entity_statistics',
-                                         'class' => 'section'));
-
-        // TRANS: Header for group statistics on a group page (h2).
-        $this->element('h2', null, _('Statistics'));
-
-        $this->elementStart('dl');
-
-        // TRANS: Label for group creation date.
-        $this->element('dt', null, _m('LABEL','Created'));
-        $this->element('dd', 'entity_created', date('j M Y',
-                                                 strtotime($this->group->created)));
-        // @todo FIXME: i18n issue. This label gets a colon added from somewhere. Should be part of the message.
-        // TRANS: Label for member count in statistics on group page.
-        $this->element('dt', null, _m('LABEL','Members'));
-        $this->element('dd', null, $this->group->getMemberCount());
-        $this->elementEnd('dl');
-
-        $this->elementEnd('div');
-    }
-
 
     function noticeFormOptions()
     {
index 33f77bef9b066235e498617cf2347bc61e68a902..61d3cfbd744ba3ddfc227590bb763dc015afb857 100644 (file)
@@ -75,24 +75,6 @@ class GroupNav extends Menu
 
         $this->out->elementStart('ul', array('class' => 'nav'));
         if (Event::handle('StartGroupGroupNav', array($this))) {
-            $this->out->menuItem(common_local_url('showgroup', array('nickname' =>
-                                                                     $nickname)),
-                                 // TRANS: Menu item in the group navigation page.
-                                 _m('MENU','Group'),
-                                 // TRANS: Tooltip for menu item in the group navigation page.
-                                 // TRANS: %s is the nickname of the group.
-                                 sprintf(_m('TOOLTIP','%s group'), $nickname),
-                                 $action_name == 'showgroup',
-                                 'nav_group_group');
-            $this->out->menuItem(common_local_url('groupmembers', array('nickname' =>
-                                                                        $nickname)),
-                                 // TRANS: Menu item in the group navigation page.
-                                 _m('MENU','Members'),
-                                 // TRANS: Tooltip for menu item in the group navigation page.
-                                 // TRANS: %s is the nickname of the group.
-                                 sprintf(_m('TOOLTIP','%s group members'), $nickname),
-                                 $action_name == 'groupmembers',
-                                 'nav_group_members');
 
             $cur = common_current_user();
 
@@ -119,15 +101,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..258a2f792ee36be7bc0510e40b5e948d780f4a28 100644 (file)
@@ -68,7 +68,7 @@ class GroupProfileBlock extends ProfileBlock
 
     function url()
     {
-        return $this->group->mainpage;
+        return $this->group->homeUrl();
     }
 
     function location()
@@ -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');