diff options
Diffstat (limited to 'mod/groups/views')
-rw-r--r-- | mod/groups/views/default/groups/css.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/profile/activity_module.php (renamed from mod/groups/views/default/groups/profile/activity_widget.php) | 41 | ||||
-rw-r--r-- | mod/groups/views/default/groups/profile/widgets.php | 5 |
3 files changed, 41 insertions, 7 deletions
diff --git a/mod/groups/views/default/groups/css.php b/mod/groups/views/default/groups/css.php index 5a7366fe3..5be21e981 100644 --- a/mod/groups/views/default/groups/css.php +++ b/mod/groups/views/default/groups/css.php @@ -17,7 +17,7 @@ margin-right: 30px; } -#group_tools_latest > .elgg-module .elgg-head { +#group_tools_latest > .elgg-module > .elgg-inner > .elgg-head { padding: 5px 5px 3px; background-color: #e4e4e4; border-bottom: 1px solid #cccccc; diff --git a/mod/groups/views/default/groups/profile/activity_widget.php b/mod/groups/views/default/groups/profile/activity_module.php index 3ac385553..8a2d587c9 100644 --- a/mod/groups/views/default/groups/profile/activity_widget.php +++ b/mod/groups/views/default/groups/profile/activity_module.php @@ -4,11 +4,50 @@ * * @package Groups */ + +global $CONFIG; + +if ($vars['entity']->activity_enable == 'no') { + return true; +} + +$group = $vars['entity']; + + +$all_link = elgg_view('output/url', array( + 'href' => "pg/groups/activity/$group->guid", + 'text' => elgg_echo('link:view:all'), +)); + +$header = "<span class=\"group-widget-viewall\">$all_link</span>"; +$header .= '<h3>' . elgg_echo('groups:activity') . '</h3>'; + + +elgg_push_context('widgets'); +$content = elgg_list_river(array( + 'limit' => 4, + 'pagination' => false, + 'joins' => array("join {$CONFIG->dbprefix}entities e1 on e1.guid = rv.object_guid"), + 'wheres' => array("(e1.container_guid = $group->guid)"), +)); +elgg_pop_context(); + +if (!$content) { + $content = '<p>' . elgg_echo('groups:activity:none') . '</p>'; +} + +$params = array( + 'header' => $header, + 'body' => $content, +); +echo elgg_view('layout/objects/module', $params); + +return true; ?> <span class="group_widget_link"><a href="<?php echo elgg_get_site_url() . "pg/groups/activity/" . elgg_get_page_owner_guid(); ?>"><?php echo elgg_echo('link:view:all')?></a></span> <h3><?php echo elgg_echo("activity"); ?></h3> <?php - $owner = elgg_get_page_owner(); + $owner = elgg_get_page_owner_entity(); $group_guid = $owner->guid; $limit = 5; diff --git a/mod/groups/views/default/groups/profile/widgets.php b/mod/groups/views/default/groups/profile/widgets.php index 3e28c0091..b72932ab3 100644 --- a/mod/groups/views/default/groups/profile/widgets.php +++ b/mod/groups/views/default/groups/profile/widgets.php @@ -7,11 +7,6 @@ // tools widget area echo "<div id='group_tools_latest' class='clearfix'>"; - - // activity latest - echo "<div class='group_tool_widget activity clearfix'>"; - echo elgg_view("groups/profile/activity_widget", array('entity' => $vars['entity'])); - echo "</div>"; // enable tools to extend this area echo elgg_view("groups/tool_latest", array('entity' => $vars['entity'])); |