summaryrefslogtreecommitdiff
path: root/actions/showstream.php
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-04-07 23:14:02 +0000
committerRobin Millette <millette@controlyourself.ca>2009-04-07 23:14:02 +0000
commitd704b3fa8ed8731251ff27919d447c8bd382383d (patch)
tree3c4fda61fc2ef9a3d229cb2fff68cabe71a30d1f /actions/showstream.php
parentc79bad0601512191f9b7523cea6a222444cb92d0 (diff)
added filler/guide text to user timeline.
Diffstat (limited to 'actions/showstream.php')
-rw-r--r--actions/showstream.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/actions/showstream.php b/actions/showstream.php
index 3c6c06070..cb40d1302 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -329,12 +329,37 @@ class ShowstreamAction extends ProfileAction
_('Subscribe'));
}
+ function showEmptyListMessage()
+ {
+ $message = sprintf(_('This is the timeline for %s but %s hasn\'t posted anything yet.'), $this->user->nickname, $this->user->nickname) . ' ';
+
+ if (common_logged_in()) {
+ $current_user = common_current_user();
+ if ($this->user->id === $current_user->id) {
+ $message .= _('Seen anything interesting recently? You haven\'t posted any notices yet, now would be a good time to start :)');
+ } else {
+ $message .= sprintf(_('You can try to nudge %s or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $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->element('br', array('clear' => 'both'));
+ $this->elementStart('div', 'guide');
+ $this->raw(common_markup_to_html($message));
+ $this->elementEnd('div');
+ }
+
function showNotices()
{
$notice = $this->user->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
$pnl = new ProfileNoticeList($notice, $this);
$cnt = $pnl->show();
+ if (0 == $cnt) {
+ $this->showemptyListMessage();
+ }
$this->pagination($this->page>1, $cnt>NOTICES_PER_PAGE, $this->page,
'showstream', array('nickname' => $this->user->nickname));