diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-04-07 23:25:12 +0000 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-04-07 23:25:12 +0000 |
commit | 79b1e3a488372065590700491320b9d3b0c74de4 (patch) | |
tree | e3abc7fb563919351aab1969b7a34210fb9f9445 | |
parent | d704b3fa8ed8731251ff27919d447c8bd382383d (diff) |
added filler/guide text to user replies timeline.
-rw-r--r-- | actions/all.php | 2 | ||||
-rw-r--r-- | actions/replies.php | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/actions/all.php b/actions/all.php index dc5da3e00..f5bbfe2e3 100644 --- a/actions/all.php +++ b/actions/all.php @@ -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 { diff --git a/actions/replies.php b/actions/replies.php index 4ab9b14ed..2769cb422 100644 --- a/actions/replies.php +++ b/actions/replies.php @@ -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; |