edit.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. $widget = elgg_extract("entity", $vars);
  3. // number of files to display
  4. $num_display = sanitise_int($widget->num_display, false);
  5. if (empty($num_display)) {
  6. $num_display = 4;
  7. }
  8. // show only featured files
  9. $noyes_options = array(
  10. "no" => elgg_echo("option:no"),
  11. "yes" => elgg_echo("option:yes")
  12. );
  13. // listing options
  14. $listing_options = array(
  15. 1 => elgg_echo("file:list"),
  16. 2 => elgg_echo("file:gallery")
  17. );
  18. ?>
  19. <div>
  20. <?php
  21. echo elgg_echo("file:num_files");
  22. echo ":&nbsp;";
  23. echo elgg_view("input/dropdown", array("name" => "params[num_display]", "options" => array(1,2,3,4,5,6,7,8,9,10,15,20), "value" => $num_display));
  24. ?>
  25. </div>
  26. <div>
  27. <?php
  28. echo elgg_echo("widget:file:edit:show_only_featured");
  29. echo ":&nbsp;";
  30. echo elgg_view("input/dropdown", array("name" => "params[featured_only]", "options_values" => $noyes_options, "value" => $widget->featured_only));
  31. ?>
  32. </div>
  33. <div>
  34. <?php
  35. echo elgg_echo("file:gallery_list");
  36. echo ":&nbsp;";
  37. echo elgg_view("input/dropdown", array("name" => "params[gallery_list]", "options_values" => $listing_options, "value" => $widget->gallery_list));
  38. ?>
  39. </div>