add.php 551 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * create a new site announcement
  4. */
  5. // only for editors
  6. site_announcements_editor_gatekeeper();
  7. // breadcrumb
  8. elgg_push_breadcrumb(elgg_echo('site_annoucements'), 'announcements/all');
  9. elgg_push_breadcrumb(elgg_echo('add'));
  10. // build page elements
  11. $title = elgg_echo('site_annoucements:add:title');
  12. $content = elgg_view_form('site_announcements/edit');
  13. // build page
  14. $page_data = elgg_view_layout('content', array(
  15. 'title' => $title,
  16. 'content' => $content,
  17. 'filter' => ''
  18. ));
  19. // draw page
  20. echo elgg_view_page($title, $page_data);