summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-04-07 18:30:41 -0700
committerZach Copley <zach@controlyourself.ca>2009-04-07 18:30:41 -0700
commita8a870303e6249b0254faa51b62fe2656daefd5e (patch)
tree82e1841ef6b94ec4e84a97236593e509753f89d8
parent47d61ad21150358e223f5a9f78cec8f0870c90ea (diff)
parentafebef50e46dc6285e3b3fcdf7907d26598a4e95 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
-rw-r--r--actions/showfavorites.php2
-rw-r--r--actions/showstream.php2
-rw-r--r--actions/subscribers.php22
-rw-r--r--actions/subscriptions.php22
-rw-r--r--actions/usergroups.php18
5 files changed, 64 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,
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
diff --git a/actions/subscriptions.php b/actions/subscriptions.php
index 3fbea2039..b0c0a9b8d 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->user->nickname);
+ }
+ }
+ else {
+ $message = sprintf(_('%s is not listening to anyone.'), $this->user->nickname);
+ }
+
+ $this->elementStart('div', 'guide');
+ $this->raw(common_markup_to_html($message));
+ $this->elementEnd('div');
+ }
}
class SubscriptionsList extends ProfileList
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');
+ }
}