diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-04-03 20:35:18 +0000 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-04-03 20:35:18 +0000 |
commit | 96982477220316ee7af0326dc6ff42d2438b540e (patch) | |
tree | 04de7ca024cbe138bbe231bddf55d99724760130 | |
parent | e1fec6db2fdc9c28878c8f87bd5b55d1b1e5e1fa (diff) |
Added filler text to popular page for when it's empty, encouraging user to add favorites and/or register.
-rw-r--r-- | actions/favorited.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/actions/favorited.php b/actions/favorited.php index 231b97897..20a354674 100644 --- a/actions/favorited.php +++ b/actions/favorited.php @@ -143,6 +143,25 @@ class FavoritedAction extends Action $this->elementStart('div', 'instructions'); $this->raw($output); $this->elementEnd('div'); + + $favorite = new Fave; + + if ($favorite->count()) { + return; + } + + $message = _('Favorite notices appear on this page but noone has favorited one yet.') . ' '; + + if (common_logged_in()) { + $message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.'); + } + else { + $message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!'); + } + + $this->elementStart('div', 'blankfiller'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); } /** |