default.php 785 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Group entity view
  4. *
  5. * @package ElggGroups
  6. */
  7. $group = $vars['entity'];
  8. $icon = elgg_view_entity_icon($group, 'tiny');
  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')) && !elgg_in_context("widgets_groups_show_members")) {
  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. }