]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
added filler/guide text to user replies timeline.
authorRobin Millette <millette@controlyourself.ca>
Tue, 7 Apr 2009 23:25:12 +0000 (23:25 +0000)
committerRobin Millette <millette@controlyourself.ca>
Tue, 7 Apr 2009 23:25:12 +0000 (23:25 +0000)
actions/all.php
actions/replies.php

index dc5da3e005ab0003a95d93654effc4ca7928d2a1..f5bbfe2e395c00138bdc990da56f01a9326a5bb8 100644 (file)
@@ -84,7 +84,7 @@ class AllAction extends ProfileAction
             if ($this->user->id === $current_user->id) {
                 $message .= _('Try subscribing to more people, [join a group](%%action.groups) or post something yourself.');
             } else {
-                $message .= sprintf(_('You can try to [nudge %s](./) from his profile or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, '@' . $this->user->nickname);
+                $message .= sprintf(_('You can try to [nudge %s](../%s) from his profile or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
             }
         }
         else {
index 4ab9b14ed26be98187ee0949c0a2a4b3fac352c6..2769cb4227c05ea2796167a6e61a07913de4a4a0 100644 (file)
@@ -166,12 +166,36 @@ class RepliesAction extends Action
         $nl = new NoticeList($notice, $this);
 
         $cnt = $nl->show();
+        if (0 === $cnt) {
+            $this->showEmptyListMessage();
+        }
 
         $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
                           $this->page, 'replies',
                           array('nickname' => $this->user->nickname));
     }
 
+    function showEmptyListMessage()
+    {
+        $message = sprintf(_('This is the timeline showing replies to %s but %s hasn\'t received a notice to his attention yet.'), $this->user->nickname, $this->user->nickname) . ' ';
+
+        if (common_logged_in()) {
+            $current_user = common_current_user();
+            if ($this->user->id === $current_user->id) {
+                $message .= _('You can engage other users in a conversation, subscribe to more people or [join groups](%%action.groups%%).');
+            } else {
+                $message .= sprintf(_('You can try to [nudge %s](../%s) or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
+            }
+        }
+        else {
+            $message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to his or her attention.'), $this->user->nickname);
+        }
+
+        $this->elementStart('div', 'guide');
+        $this->raw(common_markup_to_html($message));
+        $this->elementEnd('div');
+    }
+
     function isReadOnly()
     {
         return true;