]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add a brief explanation of what group inbox is at the top of the page (instructions...
authorBrion Vibber <brion@pobox.com>
Mon, 7 Feb 2011 20:39:40 +0000 (12:39 -0800)
committerBrion Vibber <brion@pobox.com>
Mon, 7 Feb 2011 20:39:40 +0000 (12:39 -0800)
plugins/GroupPrivateMessage/groupinbox.php

index c7dfb966d5f10bd928c9027eb49dd7a65da8a506..39789cc9af4177e182383a5a80026318dc0612d5 100644 (file)
@@ -121,6 +121,9 @@ class GroupinboxAction extends GroupDesignAction
         $gml = new GroupMessageList($this, $this->gm);
         $cnt = $gml->show();
 
+        if ($cnt == 0) {
+            $this->element('p', 'guide', _m('This group has not received any private messages.'));
+        }
         $this->pagination($this->page > 1,
                           $cnt > MESSAGES_PER_PAGE,
                           $this->page,
@@ -173,4 +176,33 @@ class GroupinboxAction extends GroupDesignAction
                            $this->page);
         }
     }
+
+    /**
+     * Show the page notice
+     *
+     * Shows instructions for the page
+     *
+     * @return void
+     */
+
+    function showPageNotice()
+    {
+        $instr  = $this->getInstructions();
+        $output = common_markup_to_html($instr);
+
+        $this->elementStart('div', 'instructions');
+        $this->raw($output);
+        $this->elementEnd('div');
+    }
+
+    /**
+     * Instructions for using this page
+     *
+     * @return string localised instructions for using the page
+     */
+    function getInstructions()
+    {
+        // TRANS: Instructions for user inbox page.
+        return _m('This is the group inbox, which lists all incoming private messages for this group.');
+    }
 }