default.php 742 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Group entity view
  4. *
  5. * @package ElggGroups
  6. */
  7. $group = $vars['entity'];
  8. $icon = elgg_view_entity_icon($group, 'tiny', $vars);
  9. $metadata = elgg_view_menu('entity', array(
  10. 'entity' => $group,
  11. 'handler' => 'groups',
  12. 'sort_by' => 'priority',
  13. 'class' => 'elgg-menu-hz',
  14. ));
  15. if (elgg_in_context('owner_block') || elgg_in_context('widgets')) {
  16. $metadata = '';
  17. }
  18. if ($vars['full_view']) {
  19. echo elgg_view('groups/profile/summary', $vars);
  20. } else {
  21. // brief view
  22. $params = array(
  23. 'entity' => $group,
  24. 'metadata' => $metadata,
  25. 'subtitle' => $group->briefdescription,
  26. );
  27. $params = $params + $vars;
  28. $list_body = elgg_view('group/elements/summary', $params);
  29. echo elgg_view_image_block($icon, $list_body, $vars);
  30. }