summaryrefslogtreecommitdiff
path: root/actions/showfavorites.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-04-08 22:55:13 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-04-08 22:55:13 +0000
commite5657ca4bbd8a43bf2dd44c2554e807a45224bd7 (patch)
tree3ad9a722f787e277ab571d40522cd5289da738dc /actions/showfavorites.php
parente632f3be6f48c187b8049f35756b25ae80be2f0b (diff)
parent070cd3533c3474dc065c6681befb92dac51f4bf7 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'actions/showfavorites.php')
-rw-r--r--actions/showfavorites.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/actions/showfavorites.php b/actions/showfavorites.php
index d1c9283f0..4d4349505 100644
--- a/actions/showfavorites.php
+++ b/actions/showfavorites.php
@@ -162,6 +162,25 @@ class ShowfavoritesAction extends Action
$nav->show();
}
+ function showEmptyListMessage()
+ {
+ if (common_logged_in()) {
+ $current_user = common_current_user();
+ if ($this->user->id === $current_user->id) {
+ $message = _('You haven\'t chosen any favorite notices yet. Click the fave button on notices you like to bookmark them for later or shed a spotlight on them.');
+ } else {
+ $message = sprintf(_('%s hasn\'t added any notices to his favorites yet. Post something interesting they would add to their favorites :)'), $this->user->nickname);
+ }
+ }
+ else {
+ $message = sprintf(_('%s hasn\'t added any notices to his favorites yet. Why not [register an account](%%%%action.register%%%%) and then post something interesting they would add to thier favorites :)'), $this->user->nickname);
+ }
+
+ $this->elementStart('div', 'guide');
+ $this->raw(common_markup_to_html($message));
+ $this->elementEnd('div');
+ }
+
/**
* Show the content
*
@@ -183,9 +202,17 @@ class ShowfavoritesAction 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, 'showfavorites',
array('nickname' => $this->user->nickname));
}
+
+ function showPageNotice() {
+ $this->element('p', 'instructions', _('This is a way to share what you like.'));
+ }
}
+