layout.php 964 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Layout of embed panel loaded in lightbox
  4. */
  5. $title = elgg_view_title(elgg_echo('embed:media'));
  6. $menu = elgg_view_menu('embed', array('sort_by' => 'priority'));
  7. $selected = elgg_get_config('embed_tab');
  8. if ($selected->getData('view')) {
  9. $tab = elgg_view($selected->getData('view'), $vars);
  10. } else {
  11. $tab = elgg_list_entities(
  12. embed_get_list_options($selected->getData('options')),
  13. 'elgg_get_entities',
  14. 'embed_list_items'
  15. );
  16. if (!$tab) {
  17. $tab = elgg_echo('embed:no_section_content');
  18. }
  19. }
  20. $tab .= elgg_view('graphics/ajax_loader', array(
  21. 'class' => 'embed-throbber mtl',
  22. ));
  23. $container_info = elgg_view('input/hidden', array(
  24. 'name' => 'embed_container_guid',
  25. 'value' => elgg_get_page_owner_guid(),
  26. ));
  27. echo <<<HTML
  28. <script type='text/javascript'>
  29. // check if embed is loaded in a lightbox
  30. elgg.embed_extended.lightbox_initialize();
  31. </script>
  32. <div class="embed-wrapper">
  33. $title
  34. $menu
  35. $tab
  36. $container_info
  37. </div>
  38. HTML;