aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/lib
diff options
context:
space:
mode:
Diffstat (limited to 'mod/blog/lib')
-rw-r--r--mod/blog/lib/blog.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php
index 8a4ab7644..354bf561d 100644
--- a/mod/blog/lib/blog.php
+++ b/mod/blog/lib/blog.php
@@ -80,10 +80,6 @@ function blog_get_page_content_list($container_guid = NULL) {
$crumbs_title = elgg_echo('blog:owned_blogs', array($container->name));
elgg_push_breadcrumb($crumbs_title);
- if (elgg_instanceof($container, 'group')) {
- $return['filter'] = '';
- }
-
if ($container_guid == $loggedin_userid) {
$return['filter_context'] = 'mine';
} else{
@@ -91,6 +87,20 @@ function blog_get_page_content_list($container_guid = NULL) {
$return['filter_context'] = 'none';
$return['buttons'] = '';
}
+
+ if (elgg_instanceof($container, 'group')) {
+ $return['filter'] = '';
+ if ($container->isMember(get_loggedin_user())) {
+ $url = "pg/blog/new/$container->guid";
+ $params = array(
+ 'href' => $url,
+ 'text' => elgg_echo("blog:new"),
+ 'class' => 'elgg-action-button',
+ );
+ $buttons = elgg_view('output/url', $params);
+ $return['buttons'] = $buttons;
+ }
+ }
} else {
$return['filter_context'] = 'all';
$return['title'] = elgg_echo('blog:title:all_blogs');