content.php 671 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Elgg file widget view
  4. *
  5. * @package ElggFile
  6. */
  7. $num = $vars['entity']->num_display;
  8. $options = array(
  9. 'type' => 'object',
  10. 'subtype' => 'file',
  11. 'container_guid' => $vars['entity']->owner_guid,
  12. 'limit' => $num,
  13. 'full_view' => FALSE,
  14. 'pagination' => FALSE,
  15. 'distinct' => false,
  16. );
  17. $content = elgg_list_entities($options);
  18. echo $content;
  19. if ($content) {
  20. $url = "file/owner/" . elgg_get_page_owner_entity()->username;
  21. $more_link = elgg_view('output/url', array(
  22. 'href' => $url,
  23. 'text' => elgg_echo('file:more'),
  24. 'is_trusted' => true,
  25. ));
  26. echo "<span class=\"elgg-widget-more\">$more_link</span>";
  27. } else {
  28. echo elgg_echo('file:none');
  29. }