]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add "create a new group" button to group directory
authorZach Copley <zach@status.net>
Wed, 13 Apr 2011 23:43:28 +0000 (16:43 -0700)
committerZach Copley <zach@status.net>
Wed, 13 Apr 2011 23:43:28 +0000 (16:43 -0700)
plugins/Directory/actions/groupdirectory.php

index 9fee9ef59b7929dfce2055139cd8477c530002ba..84819ad7633bf62396ea711f4ea5d79e829da31d 100644 (file)
@@ -201,12 +201,30 @@ END_OF_INSTRUCTIONS;
     /**
      * Content area
      *
-     * Shows the list of popular notices
+     * Shows the groups
      *
      * @return void
      */
     function showContent()
     {
+        if (common_logged_in()) {
+            $this->elementStart(
+                'p',
+                array(
+                    'id' => 'new_group'
+                )
+            );
+            $this->element(
+                'a',
+                array(
+                    'href'  => common_local_url('newgroup'),
+                    'class' => 'more'),
+                    // TRANS: Link to create a new group on the group list page.
+                    _('Create a new group')
+            );
+            $this->elementEnd('p');
+        }
+
         $this->showForm();
 
         $this->elementStart('div', array('id' => 'profile_directory'));