add.php 748 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. $page_owner = elgg_get_page_owner_entity();
  3. $any_member = ($page_owner->subgroups_members_create_enable != 'no');
  4. if (!($any_member && $page_owner->isMember())) {
  5. if (!$page_owner->canEdit()) {
  6. register_error(elgg_echo('au_subgroups:noedit'));
  7. forward($page_owner->getURL());
  8. }
  9. }
  10. $title = elgg_echo('au_subgroups:add:subgroup');
  11. // set up breadcrumb navigation
  12. au_subgroups_parent_breadcrumbs($page_owner);
  13. elgg_push_breadcrumb($page_owner->name, $page_owner->getURL());
  14. elgg_push_breadcrumb(elgg_echo('au_subgroups:add:subgroup'));
  15. $content = elgg_view('groups/edit');
  16. $body = elgg_view_layout('content', array(
  17. 'title' => $title,
  18. 'content' => $content,
  19. 'filter' => false
  20. ));
  21. echo elgg_view_page($title, $body);