diff options
author | Sarven Capadisli <csarven@controlyourself.ca> | 2009-04-08 22:55:13 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@controlyourself.ca> | 2009-04-08 22:55:13 +0000 |
commit | e5657ca4bbd8a43bf2dd44c2554e807a45224bd7 (patch) | |
tree | 3ad9a722f787e277ab571d40522cd5289da738dc /actions/favorited.php | |
parent | e632f3be6f48c187b8049f35756b25ae80be2f0b (diff) | |
parent | 070cd3533c3474dc065c6681befb92dac51f4bf7 (diff) |
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'actions/favorited.php')
-rw-r--r-- | actions/favorited.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/actions/favorited.php b/actions/favorited.php index 20a354674..09ab1216a 100644 --- a/actions/favorited.php +++ b/actions/favorited.php @@ -104,9 +104,9 @@ class FavoritedAction extends Action { parent::prepare($args); $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; - + common_set_returnto($this->selfUrl()); - + return true; } @@ -143,14 +143,11 @@ 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.') . ' '; + function showEmptyList() + { + $message = _('Favorite notices appear on this page but no one 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.'); @@ -159,7 +156,7 @@ class FavoritedAction extends Action $message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!'); } - $this->elementStart('div', 'blankfiller'); + $this->elementStart('div', 'guide'); $this->raw(common_markup_to_html($message)); $this->elementEnd('div'); } @@ -217,6 +214,10 @@ class FavoritedAction extends Action $cnt = $nl->show(); + if ($cnt == 0) { + $this->showEmptyList(); + } + $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'favorited'); } |