From 68ed6be71f24f5b434dfe8a5d3f28543d6bd2644 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Wed, 8 Apr 2009 01:05:17 +0000 Subject: added filler/guide text to subscription list. --- actions/subscriptions.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 -- cgit v1.2.3-54-g00ecf From 3fb6c8218a1c8dc2078bf244bcc937e36f1e0e0e Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Wed, 8 Apr 2009 01:12:43 +0000 Subject: added filler/guide text to subscribers list. --- actions/subscribers.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/actions/subscribers.php b/actions/subscribers.php index 22faafaef..7ebb54d33 100644 --- a/actions/subscribers.php +++ b/actions/subscribers.php @@ -88,6 +88,9 @@ class SubscribersAction extends GalleryAction if ($subscribers) { $subscribers_list = new SubscribersList($subscribers, $this->user, $this); $cnt = $subscribers_list->show(); + if (0 == $cnt) { + $this->showEmptyListMessage(); + } } $subscribers->free(); @@ -96,6 +99,25 @@ class SubscribersAction extends GalleryAction $this->page, 'subscribers', 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 have no subscribers. Try subscribing to people you know and they might return the favor'); + } else { + $message = sprintf(_('%s has no subscribers. Want to be the first?'), $this->user->nickname); + } + } + else { + $message = sprintf(_('%s has no subscribers. Why not [register an account](%%%%action.register%%%%) and be the first?'), $this->user->nickname); + } + + $this->elementStart('div', 'guide'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); + } } class SubscribersList extends ProfileList -- cgit v1.2.3-54-g00ecf From ddb59f72db7f3c6393c0fb245631117e29f093a8 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Wed, 8 Apr 2009 01:13:37 +0000 Subject: text bugfix to guide text in subscription list. --- actions/subscriptions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/subscriptions.php b/actions/subscriptions.php index 878fd0cd2..b0c0a9b8d 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -114,11 +114,11 @@ class SubscriptionsAction extends GalleryAction 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); + $message = sprintf(_('%s is not listening to anyone.'), $this->user->nickname); } } else { - $message = sprintf(_('%s is not listening to anyone.'), $this->profile->fullname); + $message = sprintf(_('%s is not listening to anyone.'), $this->user->nickname); } $this->elementStart('div', 'guide'); -- cgit v1.2.3-54-g00ecf From 5c876167785768c41c78a9819868aca17a91e41d Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Wed, 8 Apr 2009 01:19:23 +0000 Subject: added filler/guide text to user groups list. --- actions/usergroups.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/actions/usergroups.php b/actions/usergroups.php index ded4ba76b..06b2334bf 100644 --- a/actions/usergroups.php +++ b/actions/usergroups.php @@ -139,10 +139,28 @@ class UsergroupsAction extends Action if ($groups) { $gl = new GroupList($groups, $this->user, $this); $cnt = $gl->show(); + if (0 == $cnt) { + $this->showEmptyListMessage(); + } } $this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE, $this->page, 'usergroups', array('nickname' => $this->user->nickname)); } + + function showEmptyListMessage() + { + $message = sprintf(_('%s is not a member of any group.'), $this->user->nickname) . ' '; + + if (common_logged_in()) { + $current_user = common_current_user(); + if ($this->user->id === $current_user->id) { + $message .= _('Try [searching for groups](%%action.groupsearch%%) and joining them.'); + } + } + $this->elementStart('div', 'guide'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); + } } -- cgit v1.2.3-54-g00ecf From afebef50e46dc6285e3b3fcdf7907d26598a4e95 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Wed, 8 Apr 2009 01:20:50 +0000 Subject: showemptListMessage -> showEmptyListMessage method name cleanup. --- actions/showfavorites.php | 2 +- actions/showstream.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/showfavorites.php b/actions/showfavorites.php index c4c91058f..4d4349505 100644 --- a/actions/showfavorites.php +++ b/actions/showfavorites.php @@ -203,7 +203,7 @@ class ShowfavoritesAction extends Action $cnt = $nl->show(); if (0 == $cnt) { - $this->showemptyListMessage(); + $this->showEmptyListMessage(); } $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, diff --git a/actions/showstream.php b/actions/showstream.php index 4181a2bab..ce237dae2 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -357,7 +357,7 @@ class ShowstreamAction extends ProfileAction $pnl = new ProfileNoticeList($notice, $this); $cnt = $pnl->show(); if (0 == $cnt) { - $this->showemptyListMessage(); + $this->showEmptyListMessage(); } $this->pagination($this->page>1, $cnt>NOTICES_PER_PAGE, $this->page, -- cgit v1.2.3-54-g00ecf