Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (34 sloc) 1006 Bytes
<?php
/**
* Lists group_reviews created inside a specific group
*/
$guid = elgg_extract('guid', $vars);
elgg_set_page_owner_guid($guid);
elgg_group_gatekeeper();
$group = get_entity($guid);
if (!elgg_instanceof($group, 'group')) {
forward('', '404');
}
elgg_push_breadcrumb($group->name, $group->getURL());
elgg_push_breadcrumb(elgg_echo('Reviews'));
elgg_register_title_button('group_review', 'add', 'object', 'group_review');
$title = elgg_echo('Reviews');
$options = array(
'type' => 'object',
'subtype' => 'group_review',
'limit' => max(20, elgg_get_config('default_limit')),
'order_by' => 'e.last_action desc',
'container_guid' => $guid,
'full_view' => false,
'no_results' => elgg_echo('No review'),
'preload_owners' => true,
);
$content = elgg_list_entities($options);
$params = array(
'content' => $content,
'title' => $title,
'sidebar' => elgg_view('group_review/sidebar'),
'filter' => '',
);
$body = elgg_view_layout('content', $params);
echo elgg_view_page($title, $body);