diff options
-rw-r--r-- | mod/blog/views/default/blog/group_module.php | 12 | ||||
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/group_module.php | 12 | ||||
-rw-r--r-- | mod/file/views/default/file/group_module.php | 12 | ||||
-rw-r--r-- | mod/groups/views/default/discussion/group_module.php | 12 | ||||
-rw-r--r-- | mod/pages/views/default/pages/group_module.php | 12 |
5 files changed, 35 insertions, 25 deletions
diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php index 14d41f07a..9a1515585 100644 --- a/mod/blog/views/default/blog/group_module.php +++ b/mod/blog/views/default/blog/group_module.php @@ -34,10 +34,12 @@ if (!$content) { $content = '<p>' . elgg_echo('blog:none') . '</p>'; } -$new_link = elgg_view('output/url', array( - 'href' => "blog/add/$group->guid", - 'text' => elgg_echo('blog:write'), -)); -$content .= "<span class='elgg-widget-more'>$new_link</span>"; +if ($group->canWriteToContainer()) { + $new_link = elgg_view('output/url', array( + 'href' => "blog/add/$group->guid", + 'text' => elgg_echo('blog:write'), + )); + $content .= "<span class='elgg-widget-more'>$new_link</span>"; +} echo elgg_view_module('info', '', $content, array('header' => $header)); diff --git a/mod/bookmarks/views/default/bookmarks/group_module.php b/mod/bookmarks/views/default/bookmarks/group_module.php index ea1358aeb..ff85c23ff 100644 --- a/mod/bookmarks/views/default/bookmarks/group_module.php +++ b/mod/bookmarks/views/default/bookmarks/group_module.php @@ -35,10 +35,12 @@ if (!$content) { $content = '<p>' . elgg_echo('bookmarks:none') . '</p>'; } -$new_link = elgg_view('output/url', array( - 'href' => "bookmarks/add/$group->guid", - 'text' => elgg_echo('bookmarks:add'), -)); -$content .= "<span class='elgg-widget-more'>$new_link</span>"; +if ($group->canWriteToContainer()) { + $new_link = elgg_view('output/url', array( + 'href' => "bookmarks/add/$group->guid", + 'text' => elgg_echo('bookmarks:add'), + )); + $content .= "<span class='elgg-widget-more'>$new_link</span>"; +} echo elgg_view_module('info', '', $content, array('header' => $header)); diff --git a/mod/file/views/default/file/group_module.php b/mod/file/views/default/file/group_module.php index c82e499ec..de8c62098 100644 --- a/mod/file/views/default/file/group_module.php +++ b/mod/file/views/default/file/group_module.php @@ -34,10 +34,12 @@ if (!$content) { $content = '<p>' . elgg_echo('file:none') . '</p>'; } -$new_link = elgg_view('output/url', array( - 'href' => "file/add/$group->guid", - 'text' => elgg_echo('file:add'), -)); -$content .= "<span class='elgg-widget-more'>$new_link</span>"; +if ($group->canWriteToContainer()) { + $new_link = elgg_view('output/url', array( + 'href' => "file/add/$group->guid", + 'text' => elgg_echo('file:add'), + )); + $content .= "<span class='elgg-widget-more'>$new_link</span>"; +} echo elgg_view_module('info', '', $content, array('header' => $header)); diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php index cbefe8e7c..165d9b1be 100644 --- a/mod/groups/views/default/discussion/group_module.php +++ b/mod/groups/views/default/discussion/group_module.php @@ -37,10 +37,12 @@ if (!$content) { $content = '<p>' . elgg_echo('grouptopic:notcreated') . '</p>'; } -$new_link = elgg_view('output/url', array( - 'href' => "discussion/add/" . $group->getGUID(), - 'text' => elgg_echo('groups:addtopic'), -)); -$content .= "<span class='elgg-widget-more'>$new_link</span>"; +if ($group->canWriteToContainer()) { + $new_link = elgg_view('output/url', array( + 'href' => "discussion/add/" . $group->getGUID(), + 'text' => elgg_echo('groups:addtopic'), + )); + $content .= "<span class='elgg-widget-more'>$new_link</span>"; +} echo elgg_view_module('info', '', $content, array('header' => $header)); diff --git a/mod/pages/views/default/pages/group_module.php b/mod/pages/views/default/pages/group_module.php index f36e30442..6befb1c65 100644 --- a/mod/pages/views/default/pages/group_module.php +++ b/mod/pages/views/default/pages/group_module.php @@ -37,10 +37,12 @@ if (!$content) { $content = '<p>' . elgg_echo('pages:none') . '</p>'; } -$new_link = elgg_view('output/url', array( - 'href' => "pages/add/$group->guid", - 'text' => elgg_echo('pages:add'), -)); -$content .= "<span class='elgg-widget-more'>$new_link</span>"; +if ($group->canWriteToContainer()) { + $new_link = elgg_view('output/url', array( + 'href' => "pages/add/$group->guid", + 'text' => elgg_echo('pages:add'), + )); + $content .= "<span class='elgg-widget-more'>$new_link</span>"; +} echo elgg_view_module('info', '', $content, array('header' => $header)); |