aboutsummaryrefslogtreecommitdiff
path: root/mod/groups
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-03 07:17:38 -0400
committerCash Costello <cash.costello@gmail.com>2011-11-03 07:17:38 -0400
commit21f67d2117ed460c7d8374c9b42348e2eea2b0f4 (patch)
treecdb6e1088c44a3da99e530f121be4329b34920b9 /mod/groups
parente66bfc0434876327e7993382041db51d21b60f42 (diff)
downloadelgg-21f67d2117ed460c7d8374c9b42348e2eea2b0f4.tar.gz
elgg-21f67d2117ed460c7d8374c9b42348e2eea2b0f4.tar.bz2
Fixes #4042 made sure empty content pages had a message about no content
Diffstat (limited to 'mod/groups')
-rw-r--r--mod/groups/languages/en.php5
-rw-r--r--mod/groups/lib/discussion.php3
-rw-r--r--mod/groups/lib/groups.php15
-rw-r--r--mod/groups/views/default/discussion/group_module.php2
4 files changed, 22 insertions, 3 deletions
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 9f8bed9a4..0818e5602 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -69,9 +69,9 @@ $english = array(
'groups:notfound' => "Group not found",
'groups:notfound:details' => "The requested group either does not exist or you do not have access to it",
- 'groups:requests:none' => 'There are no outstanding membership requests at this time.',
+ 'groups:requests:none' => 'There are no current membership requests.',
- 'groups:invitations:none' => 'There are no outstanding invitations at this time.',
+ 'groups:invitations:none' => 'There are no current invitations.',
'item:object:groupforumtopic' => "Discussion topics",
@@ -113,6 +113,7 @@ $english = array(
'discussion:add' => 'Add discussion topic',
'discussion:latest' => 'Latest discussion',
'discussion:group' => 'Group discussion',
+ 'discussion:none' => 'No discussion',
'discussion:topic:created' => 'The discussion topic was created.',
'discussion:topic:updated' => 'The discussion topic was updated.',
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php
index e129e0f9d..68e5e4884 100644
--- a/mod/groups/lib/discussion.php
+++ b/mod/groups/lib/discussion.php
@@ -60,6 +60,9 @@ function discussion_handle_list_page($guid) {
'full_view' => false,
);
$content = elgg_list_entities($options);
+ if (!$content) {
+ $content = elgg_echo('discussion:none');
+ }
$params = array(
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php
index 44143d440..590ba2b35 100644
--- a/mod/groups/lib/groups.php
+++ b/mod/groups/lib/groups.php
@@ -24,6 +24,9 @@ function groups_handle_all_page() {
'inverse_relationship' => false,
'full_view' => false,
));
+ if (!$content) {
+ $content = elgg_echo('groups:none');
+ }
break;
case 'discussion':
$content = elgg_list_entities(array(
@@ -33,6 +36,9 @@ function groups_handle_all_page() {
'limit' => 40,
'full_view' => false,
));
+ if (!$content) {
+ $content = elgg_echo('discussion:none');
+ }
break;
case 'newest':
default:
@@ -40,6 +46,9 @@ function groups_handle_all_page() {
'type' => 'group',
'full_view' => false,
));
+ if (!$content) {
+ $content = elgg_echo('groups:none');
+ }
break;
}
@@ -107,6 +116,9 @@ function groups_handle_owned_page() {
'owner_guid' => elgg_get_page_owner_guid(),
'full_view' => false,
));
+ if (!$content) {
+ $content = elgg_echo('groups:none');
+ }
$params = array(
'content' => $content,
@@ -137,6 +149,9 @@ function groups_handle_mine_page() {
'inverse_relationship' => false,
'full_view' => false,
));
+ if (!$content) {
+ $content = elgg_echo('groups:none');
+ }
$params = array(
'content' => $content,
diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php
index 3c9961f82..e0bcd55d6 100644
--- a/mod/groups/views/default/discussion/group_module.php
+++ b/mod/groups/views/default/discussion/group_module.php
@@ -31,7 +31,7 @@ $content = elgg_list_entities($options);
elgg_pop_context();
if (!$content) {
- $content = '<p>' . elgg_echo('grouptopic:notcreated') . '</p>';
+ $content = '<p>' . elgg_echo('discussion:none') . '</p>';
}
$new_link = elgg_view('output/url', array(