summaryrefslogtreecommitdiff
path: root/actions/subscriptions.php
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-04-08 01:05:17 +0000
committerRobin Millette <millette@controlyourself.ca>2009-04-08 01:05:17 +0000
commit68ed6be71f24f5b434dfe8a5d3f28543d6bd2644 (patch)
treeb837493f62002d059a33e75be27c5028fe8d5271 /actions/subscriptions.php
parent1371a142b193673a9b3d0fc4766249215ae94992 (diff)
added filler/guide text to subscription list.
Diffstat (limited to 'actions/subscriptions.php')
-rw-r--r--actions/subscriptions.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/actions/subscriptions.php b/actions/subscriptions.php
index 3fbea2039..878fd0cd2 100644
--- a/actions/subscriptions.php
+++ b/actions/subscriptions.php
@@ -95,6 +95,9 @@ class SubscriptionsAction extends GalleryAction
if ($subscriptions) {
$subscriptions_list = new SubscriptionsList($subscriptions, $this->user, $this);
$cnt = $subscriptions_list->show();
+ if (0 == $cnt) {
+ $this->showEmptyListMessage();
+ }
}
$subscriptions->free();
@@ -103,6 +106,25 @@ class SubscriptionsAction extends GalleryAction
$this->page, 'subscriptions',
array('nickname' => $this->user->nickname));
}
+
+ function showEmptyListMessage()
+ {
+ if (common_logged_in()) {
+ $current_user = common_current_user();
+ if ($this->user->id === $current_user->id) {
+ $message = _('You\'re not listening to anyone\'s notices right now, try subscribing to people you know. Try [people search](%%action.peoplesearch%%), look for members in groups you\'re interested in and in our [featured users](%%action.featured%%). If you\'re a [Twitter user](%%action.twittersettings%%), you can automatically subscribe to people you already follow there.');
+ } else {
+ $message = sprintf(_('%s is not listening to anyone.'), $this->profile->nickname);
+ }
+ }
+ else {
+ $message = sprintf(_('%s is not listening to anyone.'), $this->profile->fullname);
+ }
+
+ $this->elementStart('div', 'guide');
+ $this->raw(common_markup_to_html($message));
+ $this->elementEnd('div');
+ }
}
class SubscriptionsList extends ProfileList